Grub error 21

Asked by Akis

Today I booted my PC as I always do and the boot process was very slow. It took me 5 minutes to get to GRUB. Once I got there it didnt show the list of OSes but I gut the message

GRUB Loading Stage 1.5

GRUB Loading, Please wait...
ERROR 22

I am currently typing this from the ubuntu 9.04 Live CD.
My ubuntu drive is not displayed/ mounted like it always does in Live CD. I tried many commands such as :

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4f1629d6

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 7296 58605088+ 7 HPFS/NTFS
ubuntu@ubuntu:~$ fixmbr
bash: fixmbr: command not found
ubuntu@ubuntu:~$

I noticed that my ubuntu hard drive is not detected!
what Can I do to fix this?

My PC specs:
AMD Athlon 64 @ 2.20GHZ
1GB ram
ATI video card 128MB
I have ubuntu and windows xp on 2 different hard disks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Akis
Solved:
Last query:
Last reply:

This question was reopened

  • by Akis
Revision history for this message
Akis (remond1988) said :
#1

I tried restoring GRUB an here is what I get:

grub> find /boot/grub/stage1

Error 15: File not found

grub>

Revision history for this message
Bhavani Shankar (bhavi) said :
#2
Revision history for this message
Akis (remond1988) said :
#3

Thanks for the reply, I tried the command on the link you gave mebut nothing happens when I copy it it to the CL.
btw I dont copy the $ sign because its already in the terminal.
I think I got a dead hard disk, how can I revive it?

Revision history for this message
Akis (remond1988) said :
#4

I cant access my ubuntu hard drive at all.
Even when booting in Live CD, the HD is not there but usually it is there.

Revision history for this message
Bhavani Shankar (bhavi) said :
#5

Maybe this link can help you out:

http://ubuntuforums.org/showthread.php?t=644773

Regards

Revision history for this message
Akis (remond1988) said :
#6

didnt work

Revision history for this message
Akis (remond1988) said :
#7

btw its a slave IDE drive

Revision history for this message
Akis (remond1988) said :
#8

My apologies! I just rebooted and it says GRUB error 21
Sorry for the mistake!

Revision history for this message
Tom (tom6) said :
#9
Revision history for this message
Tom (tom6) said :
#10

Using a LiveCd is brilliant! Good thinking :)))
The best link i could find to help with this are from 2 other excellent forums
http://ubuntuforums.org/showthread.php?t=62717
http://www.linuxquestions.org/questions/linux-newbie-8/grub-error-21-when-trying-to-boot-xp-after-installing-ubuntu-7.04-on-seperate-hdd-552043/

There was a suggestion from a ridiculous site that this guide might help
https://help.ubuntu.com/community/WindowsDualBoot#Recovering%20GRUB%20after%20reinstalling%20Windows
but i think they were barking up the wrong tree to start with.

People seem to be saying check you bios still recognises the drive but i am not sure how to do that. Perhaps try unpluging your external hard drive and then plug it in again?

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#11

You can see the Windows hard-drive from the LiveCd session? Is there 15Gb free space to install Ubuntu onto the internal hard-drive? if not another distro might be better. Is your Windows an early Vista or something else?

Clearly the problem is 'only' that your slave ide hard-drive is suddenly not being recognised. Are you comfortable with taking the side off your machine or are you fairly new to that sort of thing? I can talk you through it. Sorry it's taking me a while to catch up with what's going on here.
Regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#12

The Ubuntu drive is a segate hard disk and its not detected by the BIOS.
On the Live CD I can see the windows xp drive its 60GB but I am afraid to touch it because I use it as a back up drive.
I don't feel comfortable opening my pc, but I know someone who feels more confident to do it.
I am experiencing this problem for the first time.
When I turn on my PC, it takes too long to boot and before it reaches GRUB I get an error that says: Primary slave hard disk error. I think ubuntu is on slave.

Thanks for replying!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

I think you will find if you boot to windows and run disk manager you only have 1 drive with 2 partitions. Windows is retarded and calls partitions, drives, like 'C DRIVE' and 'D DRIVE' even if they are 2 partitions on the same physical drive and this confuses newcomers to Linux when they realise what is actually going and that windows is completely stupid.

Your fdisk output shows you have a single PATA drive with 1 NTFS partition on it. All drives are IDE, Even SATA. IDE is the litle bit of circuit board attatched to the drive to provide drive cache and S.M.A.R.T. capabilities. Old drives relied PURELY on the controller for instruction and had no IDE at all, post 1989-ish, drives had an IDE. When people say 'IDE HDD' they REALL mean 'PATA HDD' or parallel ATA, Newer drives use SATA or serial ATA but both have IDEs. SCSI HDDs have IDEs too.

You cannot install grub to the drive as there is no space to store the grub config. If there is another drive in your system then it is either no being detected by the BIOS or its ontroller needs a special module to get going. If you only have this single 60Gb drive you will need to resize the NTFS partition to make space for Ubuntu or buy another drive to install alongside to install to. This will give you grub too, as installing the OS also installs grub and the install will detect the windows install and configure a dual boot for you.

https://help.ubuntu.com/community/WindowsDualBoot

Before undertaking any partition resizing, ensure your data backups are up to date in case anything goes wrong.

Revision history for this message
Tom (tom6) said :
#14

Ok, if this is a friend that is likely to be willing to help or perhaps even to just supervise you doing it then that's superb!

When you say it's your back-up drive do you mean there is not a bootable Windows on it? Your other drive has both Windows and Ubuntu as a dual-boot?

You do have a very unusual problem. Most people never experience anything like this and really don't have to go poking around inside their machines at all. Especially if they are mostly running linux. Just out of curiosity does you machine have a cd-drive that reads only and a separate dvd-writer? Also are you in the UK? Do the mains power plugs on your machine have 3 pins or 2?

Regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#15

I am from Canada, but the computer plug has two square-like pins and a circular pin the third one is used for power surge protection.
I have xp and ubuntu on two different physical HDs
I have two separate disc drives, an LG DVD R-RW (main) and a SONY CD/R-RW.
Windows is used normally just like ubuntu, but I usually back-up my files because I only boot to windows for iTunes, games and to restore files when needed.

Revision history for this message
Akis (remond1988) said :
#16

Is there a way I can force mount the hard drive from the live CD or from the BIOS?

Revision history for this message
Jeruvy (jeruvy) said :
#17

If the drive isn't detected in BIOS it's unlikely it can be used for 'booting' purposes. Have you resolved this issue yet? Your fdisk only shows one drive with one partition. I'm not seeing the second one. Are you sure the drive is good? If this drive is connected via USB or eSATA then it should be detectable in the BIOS at boot time provided the drive is powered up.

Revision history for this message
Tom (tom6) said :
#18

Ok, so we now have 3 differeent threads going on in looking into this problem.

1. None of the pins on your mains power supply are to "earth" the machine? Nothing to prevent people or machines from getting electric shocks?

2. It sounds like we could fix the Windows drive to boot into Windows but we would need to boot into Windows to do that :( One way involves installing grub either onto that Windows drive (as AP suggested) or onto a Usb-Stick or something. Another way is by using a Windows installer Cd, recovery Cd or even just some odd Windows boot Cd.

3. Can you LiveCd the Ubuntu Cd in the Sony Cd-drive? or is that the one that is better at making CDs? Do you have any cheap blank CDs around to make another distro on? Do you have any nice blank DVDs that we could backup data onto? Is the Windows an early Vista or is it a service-packed Vista or an Xp?

Lol, i just seem to be asking more and more questions!
Sorry about this!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#19

I don't know how to force mount. Hopefully someone else can help with that! It does sound like a good plan. I also don't know what options in the bios are likely to help force the issue from there. Again hopefully someone else can help?

Revision history for this message
Akis (remond1988) said :
#20

I don't have any storage media available at this time. However I have most of my important documents in the cloud (thanks to ubuntu one).
at this time I want to solve the booting problem with ubuntu drive, since my documents there are more updated.
I tried reseting my BIOS to default (this always worked when I had GRUB errors) But this time it didn't work. The ubuntu drive is still listed as "not detected" under slave had disc on the BIOS.

Revision history for this message
Tom (tom6) said :
#21

I have been reading up about power supplies in different countries and there's a really neat trick we can do in the Uk (and about half the rest of the world) that would possibly be a really bad plan in America or Canada). So before removing the side of your case even to have a little look without touching anything it is extremely important to unplug the machine from the mains. In the Uk i could get away with switching the machine off at the front and at the back and at the wall socket without needing to unplug it but in about half the world the unplugging part is quite critical. I think going that route is probably best left to someone that knows what they are doing already but it's worth learning the tricks from them when they are having a look.

Revision history for this message
Akis (remond1988) said :
#22

I wish this problem occured at the end of October, so I could just upgrade to the latest version of ubuntu.
On my PC I have a back switch that turns off the computer completely, even when its plugged in into the wall. is this what you are mentioning?

Revision history for this message
Tom (tom6) said :
#23

Yes, that one (after a normal shutdown) and then pull the wall socket out but only if you want to take the side off the machine. It's getting quite late for me here so i would leave this until tomorrow, especially because i hadn't considered the option of force-mounting - although if a drive can't be seen by the bios then i am not sure it would be possible.

The other options of getting at least something working, other than a LiveCd which isn't ideal for the longer term.
1. Proper dual-boot with Windows. Not really an option with an early Vista but Win98, Xp or a Vista with Service Pack1 would be fine.
2. Proper dual-boot with Windows but using a much smaller distro than Ubuntu if there's not enough free space on the WIndows drive. The same problem with early Vista's remains tho.
3. Install grub to a usb-stick, boot into Windows and fix it so that the machine can happily boot into Windows. Ubuntu or another distro might be able to be installed inside Windows. For an early Vista something like this is about all i can suggest.

Is there an old machine relegated to a cupboard or something that can be scavenged for parts? such as even a fairly old hard-drive (preferably newer than 1989 tho ;) )?

Revision history for this message
Tom (tom6) said :
#24

Err the wall plug! not the wall socket! Sorry

Revision history for this message
Sam_ (and-sam) said :
#25
Revision history for this message
Akis (remond1988) said :
#26

I will wait for a friend to open up my PC and check for faulty cables or dead hard drive. I guess that's my only option. If the HD is dead then, I have to find a way to recover my data from the dead HD to new one(if possible)

Thanks

Revision history for this message
Tom (tom6) said :
#27

Ahhh, nice one Sam :))

The line "go into bios and check if the hard drive controller is "off", if so change to "auto"." gives us something to look for in the bios. Good luck with finding this, it's not going to be easy!

If the hard-drive is dead you might find a local "Data Recovery" company or specialist that might be able to help with this. It is likely to cost quite a lot tho so get a quote before giving them the work. Telling them that it's linux on the drive might help make it easier for them and occasionally even results in a lower fee.

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#28

Well there is always the option of just keep using the LiveCd and find out how to set a persistent image

Revision history for this message
Akis (remond1988) said :
#29

here is something weird. I fixed windows xp bootloader, so now am windows. However when I go to my computer>>properties>>hardware devices tab on device manager I am able to mount my "dead ubuntu drive" xp is able to see it on my computer and when I click on it it says format now(which is normal). before I fixed xp, I got a BIOS error "backup and replace primary slave drive" so over the weekend am gonna have someone to open my pc and look for loose wires or even replace the HD

Revision history for this message
Akis (remond1988) said :
#30

edit: I am writing this from windows xp

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#31

Windows is immensely crippled and can only read a small number of file systems. 4 infact, fat, fat16, fat32 and ntfs. it flat out sucks so needs help from people.

If you install:
www.fs-driver.org/

you should be able to read the partition.

Revision history for this message
Tom (tom6) said :
#32

Oh fantastic :))) Getting into Windows and being able to boot into it is great. I think Xp is the best Windows at the moment, for co-operating with linux anyway. Vista is a nightmare and WIn7 is a bit of an unknown.

As AP pointed out it is possible to get special utility programs to try to access certain types of linux data under certain conditions but something far better can be done much more easily.

Several gnu&linux distros can be installed inside Windows. Obviously Ubuntu can but it still needs about 15Gb of free space inside Windows. It would probably be the best option tho. Another one called Puppy certainly can
http://distrowatch.com/table.php?distribution=puppy
Pure puppy rather than any of the puplets might well give us some very handy tools right on the desktop. The main advantage with Puppy is that it is very tiny and light-weight so it's fast. I haven't tried it in a long while and it has had a new release or 2 since i last tried it so i hesitate to put a figure on how large but think it's under 100Mb or something!

I think there are a few other distros also designed to be able to easily install inside Windows as tho they were just another Windows program. Obviously we are most experienced with Ubuntu but Puppy might be worth trying in this particular case.

To install a distro inside Windows just boot into Windows and put the cd in the cd-drive or even just mount the iso image with DaemonTools or something. There are quite a few Windows programs that can treat an iso or other img as tho it was a cd in a cd-drive. If the distro is going to be easy to install then it shold just pop-up with an installer just exactly as a normal Windows program would.

Doing this would give you access to all the normal linux tools for trying to nudge your other hard-drive back into life. Then afterwards we could uninstall the distro to leave Windows pretty much just as it was, again in the same way as you can with normal Windows programs.

Obviously i still think it would be much much better to do a proper dual-boot install with Ubuntu or perhaps Wolvix Hunter 1.1.0
http://distrowatch.com/table.php?distribution=wolvix
because i really don't like working inside Windows. Nothing inside Windows seems to work the way it should and it seems to busy keeping secrets from you to be great at helping fix things.

Anyway, at least you have options again now :))
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#33

Oh there's always Kolibri but that's not even a *nix let alone a linux based operating System and does seem to be very much in its very early stages of development
http://distrowatch.com/weekly.php?issue=20090831#feature
I wouldn't seriously try this but it is very tiny and fast even if it can't do anything useful yet. Good to see developments like this tho :)

Revision history for this message
Akis (remond1988) said :
#34

SOLVED!

I had someone here to open my pc and we found out that I had a lose cable. He put it back to its place and it worked!
Thanks to everyone for assisting me.

Revision history for this message
Tom (tom6) said :
#35

WooooHooooo!!! :))))
Brilliant!! Nicely done :))

So, i guess now you only need to re-instate grub again?
https://help.ubuntu.com/community/WindowsDualBoot#Recovering%20GRUB%20after%20reinstalling%20Windows

Lol, isn't that about where we started? I am guessing the LiveCd session works fine and you can see your Windows drive and your Ubuntu drive? To help us help you fix the MBR to fix the Ubuntu Grub please get to a linux command-line
https://help.ubuntu.com/community/UsingTheTerminal#Starting%20a%20Terminal
and type in (or copy&paste with the mouse)

sudo fdisk -l

where " -l" is a lower-case " -L". The sudo part might ask you for your normal user password, not the SuperUser/Root one and it wont give any stars as you type. Then just copy&paste the output from that into here :)

Congrats, good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#36

another problem occurred

now, I have ubuntu drive set as my first boot drive on BIOS.
Ubuntu boots fine and I can see grub. However, when scroll down to windows xp and press enter I get an error.
I couldn't see it very well because it went to OS selection list again. The only thing my eyes caught was grub error 2

here is what I tried to solve the problem

method 1:

 I rebooted and I inserted the windows xp CD, went to recovery console and typed fixboot and the bootloader was installed sucessfully. I restarted the pc and nothing changed.

method 2 :

on BIOS I set xp as my main drive and it booted to xp directly without grub. I inserted the ubuntu live CD and I installed grub (I got instrunctions from ubuntu forums) Grub was installed successfully and I reboted. after reboot it went straight to xp.

what am I doing wrong?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#37

Then run:

gksudo gedit /boot/grub/menu.lst

and edit the windows option to be representative of your system

Sounds like you need to reinstall grub again. Reinstalling the xp bootloader will not change the config of grub so you need to edit that. Install grub to the ubuntu drive and set that in the bios as bootable. You can then trial and error until you get a boot

You can even press e to edit the grub entry for XP and keep editting it until xp boots, then put the settings in menu.lst to make them permanent.

Revision history for this message
Akis (remond1988) said :
#38

here is a copy of my boot list:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=acff373e-4cc6-4e49-845c-ed209754a553

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#39

Ok and on your disk is windows on the first partition on drive 0?

Revision history for this message
Akis (remond1988) said :
#40

here is a copy of my boot list:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=acff373e-4cc6-4e49-845c-ed209754a553

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

Revision history for this message
Akis (remond1988) said :
#41

sorry for double posting menu list :-)

Revision history for this message
Tom (tom6) said :
#42

Lol, that's ok, don't worry.

It seems there's possibly an increasing number of problems to sort out with grub now. First lets sort out the menu.lst a bit. Notice the line

# howmany=all

and change that to

# howmany=2

As the ## comment says, that will keep the number of kernels displayed down to a reasonable number. So from now on the boot-menu should only show 4 options for booting into Ubuntu. At the end of menu.lst this stanza controls where grub looks for Windows

"
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1
"

It's really the line "rootnoverify (hd0,0)" that points at where grub expects to find Windows. Note that Grub counts from 0, so (hd0,0) is the primary MAster hard-drive's first partition - but (hd1,0) would be the primary SLave hard-drive's first partition. So, decide which way around you are going to have your hard-drives and then set that line accordingly and then save the menu.lst. Notice that in the Ubuntu stanzas it uses uuid reference numbers to locate the partitions instead of "root (hd0,1)" type of address. Since the uuid numbers stay the same whichever order you plug the hard-drives in then that makes it easier for the grub to find the Ubuntu partition :) Sadly, Windows doesn't yet use uuid numbers - hence the confusion.

Ok, so once you have set the menu.lst to point at where the Windows drive will be and then wired up the hard-drives to make that so then check that you can boot into ubuntu. If not then bootup a LiveCd, get to a command-line and type

sudo grub

find /boot/grub/stage1

note that this 2nd command is on a grub command-line, not on a normal linux command-line. The "find" command just needs to find any of the files that are in that folder. I think it makes sense to look for the "stage1" but any of those other files in there will do. As an example lets say it gives you the output (hd1,2) then you would continue with the grub command-line typing in

root (hd1,2)

setup (hd0)

quit

and that should get you back to a normal linux command-line again. Note that "setup" always needs to 'fix' the MBR of the dive considered to be the Primary MAster for the machine for the current given bios settings. lol

Good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#43

I think this problem is very simple to solve, but I must be doing something wrong.
again, the master physical drive is the one with xp on it.

here is what am doing

method 1:
when ubuntu drive is set to boot first, I insert the ubuntu 9.04 live CD Or/and I follow these steps through my ubuntu installation:
sudo grub
find /boot/grub/stage1
root (hd1,0)
setup (hd1)
quit

the command line says grub is installed successfully and when I restart nothing really changes, xp still cant boot. Now if
I set xp as first bootable hard drive and I follow the instructions above, again nothing changes. If I fix the windows bootloader through thee windows xp CD and follow the repair instructions, this time only xp boots without showing grub.

Method 2:

set ubuntu as first bootable drive and insert xp CD. I follow these instructions:
pc boots xp CD
when ready I press the R button for repaid console
I am asked for admin password and I enter it correctly.
I type fixboot and bootloader is installed successfully on D drive (ubuntu drive)
I reboot and grub shows up, I scroll to the Microsoft windows xp home edition and I get GRUB ERROR stage 2
I go back to the BIOS and I setup xp as my first bootable drive and same thing happens but instead of writing the boot loader on D, it writes it to C drive (windows xp) and again it goes straight to xp when pc is restarted.

as you can see I explained everything to the best of my knowledge and I have some questions.
if I install grub from synaptic, will it solve the problem?
Why grub is not booting xp even if BIOS settings are the same as they always were? (they are written down)
If you have xp installed can you please check your BIOS if xp is set to boot first(but grub is installed on xp drive)
anything else I can try ?

Revision history for this message
Tom (tom6) said :
#44

Each time you fix the Window boot-loader you break the Grub. The Windows boot-loader cannot boot into Ubuntu.

Each time you fix the Grub you break the Windows boot-loader. However Grub can boot into Windows.

The Mbr on a hard-drive can only point to 1 boot-loader.

Revision history for this message
Tom (tom6) said :
#45

There are 3 steps to solving this problem

1. Stop moving the drives around because it makes it impossible for me to describe how to fix the problem.

2. Use the LiveCd to fix grub, this sets the Mbr to look for grub

3. Fix the menu.lst to find Windows

Revision history for this message
Tom (tom6) said :
#46

You keep breaking grub by using the Xp Cd. Don't use the Xp Cd at all during this whole procedure. Put it away in a drawer or somewhere safe.

The only Cd you might ever need in all of this is the Ubuntu Cd to use as a LiveCd to get to a linux-command-line.

Revision history for this message
Akis (remond1988) said :
#47

Tom, I keep using the Ubuntu Live CD to fix grub and nothing really changes. I treied almost everything.
Is there a template menu list I can use that contains ubuntu and xp (xp main drive and ubuntu slave secondary drive.)
I think ubuntu is HD1,0
xp is HD 0,0

Revision history for this message
Tom (tom6) said :
#48

Hi, sorry it got late here and i had to go.

There is of course a way of doing this so that you can happily keep swapping the drives around. Lets start by editing the menu.lst and adding a 2nd option for Windows so that at least one of them should work whichever order the drives are in. So add an extra stanza for Windows making the end of your menu.lst look like this

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows XP on master drive
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Windows XP on slave drive
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

Revision history for this message
Akis (remond1988) said :
#49

it didn't work.
should I give super grub a try?
whats the difference between the two grubs?
If this does int solve anything, I guess ill wait for ubuntu 9.10 to upgrade and maybe it will fix the issue.

Revision history for this message
Tom (tom6) said :
#50

The Super Grub disk uses the same grub but it provides a much nicer user interface and has a few fancy tools for doing what we have been doing on the command-line. It might be worth trying since it does sometimes clear up a few confusions and anyway it's worth trying to admire the UI :)

Just to check a couple of things. When you boot into the Ubuntu that is on the hard-drive does menu.lst still have the 2 stanzas for Windows or has it gone back to just the 1?

Thanks, good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#51

the stanzas have gone back to 1.
can I install super grub throgh synaptic?
will super grub have a conflict with the current grub installation?
thanks

Revision history for this message
Tom (tom6) said :
#52

Errr, Super Grub Disk is a separate distro like Ubuntu or something but made to only run as a LiveCd and give access to the tools it uses
http://www.supergrubdisk.org/
http://www.supergrubdisk.org/index.php?pid=5

Can you try adding the 2nd stanza again? I think i know what has gone wrong so doing it this way should work now. You can make it so that you can boot into Ubuntu even when the Cd is not in the cd/dvd-drive right? Once you have booted into Ubuntu without the Ubuntu Cd being in the cd/dvd-drive then try this on the command-line

cd /boot/grub
sudo gedit menu.lst

and add in the Windows stanzas right at the end

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows XP on master drive
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Windows XP on slave drive
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

Now you should be able to save that. I think that last time you either edited the menu.lst that is on the Cd or else when you edited the menu.lst you hadn't "sudoed" the command so that it didn't really save it when you thought you had saved it. Usually when you edit a file in gedit a star appears in front ofthe file-name to let you know there are unsaved changes. When you click on "Save" that star should vanish.

I hope this helps!
Good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#53

Hey Tom

I can boot xp and ubuntu normally without the CD. However I have to swap drives in order to boot an OS. when I am on ubuntu drive grub shows up normally, but when try to start xp I get GRUB ERROR 2
When I swap to the xp drive, grub does not show at all. It boots straight to xp
even when I add the stanzas I get the same message OR sometimes it even freezes and I have to hard reset the pc.
One more problem, when I upgrade to a new kernel on ubuntu I cant boot ubuntu anymore, unless If I go to the Live CD then sudo nautilus
mount the ubuntu drive from live CD and go to file system-> boot-> grub -> menu.list Backup

then I copy the text on menu.list and paste it into the damaged one and it saves it successfully without any warning messages. I take out the Live CD and ubuntu boots fine with an old kernel.

To be honest this is very weird. since I started using ubuntu it always breaks one month before a new version is released.

Revision history for this message
Akis (remond1988) said :
#54

More info: When kernel upgrades break ubuntu I get an error message.
its something like this:

UUID with numbers and letters.

Thanks Tom

Revision history for this message
Akis (remond1988) said :
#55

More info:

Hi Tom I tried fix grub again with the live CD. Here is what I did:

terminal
sudo grub
grub> root (hd0,0)
grub> setup (hd0)
Error 17: Cannot mount selected partition

Then I tried

sudo grub
grub> find /boot/grub/stage1
 (hd1,0)

grub> root (hd0,0)

grub> setup (hd0)

Error 17: Cannot mount selected partition

grub> root (hd1,0)

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 18 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+18 p (hd1,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

grub> find /boot/grub/stage1

when I do this nothing changes. I boot ubuntu normally but not windows xp home edition.

Thanks again.

Revision history for this message
Akis (remond1988) said :
#56

More info:

Both windows xp and ubuntu hard drives are mounted on the Live CD.

Revision history for this message
Tom (tom6) said :
#57

Hi :)

I think just fixing one issue at a time is all i can do by remote like this. Have you been able to save both stanzas for Windows into the menu.lst on the Ubuntu hard-drive? After saving them when you reboot and get to the grub boot-menu how many options do you see for Windows, please tell us what the Windows options say

Thanks and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#58

Hi :)

Looking at your other posts, they all make sense except for the kernel updates issue which i think we are going to have to leave until later.

Each drive has an MBR ( = Master Boot Record). Each MBR can point to 1 boot-loader. At the moment the MBR on the Xp drive points at the Windows boot-loader, which seems like a good plan. On the Ubuntu drive the MBR points at grub, which is also good :) Does this make sense?

The bios can only point at 1 of the MBRs. The bios, by default, looks for the MBR on the Primary MAster hard-drive.

So when the drives are plugged in with the Xp one being the MAster then the bios goes to the MBR on the Xp drive which then passes control to the Windows boot-loader which then boots into Windows (of course). Does this make sense?

Regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#59

Hi Tom, Yes everything makes sense.
When I copy th stanzas I get two options in Grub:

Microsoft Windows xp Home Edition Primary master Drive
and
Microsoft Windows xp Home Edition Primary slave Drive

If I boot the primary mater, I get error 2 (hd1)
If I boot primary slave, it shows the same thing but screen freezes and I cant go back, but I can only hard reset.

I am not sure if xp is on hd1, how can I found out?

Revision history for this message
Akis (remond1988) said :
#60

Tom, if you have windows xp installed on your computer, can you please tell me your BIOS and Grub configuration. Just in case if there is a mistake on my settings. A sample of menu.lst would be great too.

Thanks

Revision history for this message
Akis (remond1988) said :
#61

more info: Here is a copy of my fstab if you need it.

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sdb1 during installation
UUID=acff373e-4cc6-4e49-845c-ed209754a553 / ext4 relatime,errors=remount-ro 0 1
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Revision history for this message
Tom (tom6) said :
#62

Here's my entire menu.lst

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 4

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=fa8de3e2-0ab1-4009-bfec-4087efdd66de ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=fa8de3e2-0ab1-4009-bfec-4087efdd66de

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=1

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-15-generic
uuid fa8de3e2-0ab1-4009-bfec-4087efdd66de
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=fa8de3e2-0ab1-4009-bfec-4087efdd66de ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
uuid fa8de3e2-0ab1-4009-bfec-4087efdd66de
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=fa8de3e2-0ab1-4009-bfec-4087efdd66de ro single
initrd /boot/initrd.img-2.6.28-15-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian ones.
title Microsoft Windows XP Professional
root (hd2,0)
savedefault
makeactive
chainloader +1

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 66daaabd-ec15-4184-9ee5-df800b17fde2
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=66daaabd-ec15-4184-9ee5-df800b17fde2 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 66daaabd-ec15-4184-9ee5-df800b17fde2
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=66daaabd-ec15-4184-9ee5-df800b17fde2 ro single
initrd /boot/initrd.img-2.6.28-11-generic

# This entry automatically added by the Debian installer for an existing linux installation on /dev/sda8.
title WolvixCub-1.1.0 (on /dev/sda8)
root (hd0,7)
kernel /boot/vmlinuz root=/dev/sda8 ro splash=verbose
initrd /boot/initrd.splash
savedefault
boot

Revision history for this message
Tom (tom6) said :
#63

But i have 2 different Ubuntu' on 2 different drives and only 1 Windows. Also i have Wolvix Cub. My men.lst is not really laid out the way i want it. I keep meaning to put Windows at the very top of the list. Also my value for "default" is set completely wrong

Revision history for this message
Tom (tom6) said :
#64

Hi :)

I think that now the next step is to boot-up into the Ubuntu that is on the hard-drive and do the Mbr fix with the drives arranged properly

sudo grub

root (hd0,0)

setup (hd0)

quit

Hopefully that should sort this problem out. However, we don't seem to be having much luck so my next suggestion is to do a partial reinstal to reinstall grub onto a separate partition. Hopefully though things should just work now and booting into Windows shouldn't be a problem

Good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#65

Hi Tom, I solved the problem.I added and replaced some stanzas from ubuntu forums. I think the new stanza swapped my drives and xp booted in grub perfectly.
However now when I boot ubuntu I lose mouse and keyboard functionality before I reach the GDM screen.
I have a ps2 mouse and keyboard, however the ps2 mouse is connected to a usb hub.

any ideas?
Thanks :-)

Revision history for this message
Tom (tom6) said :
#66

Wow!! Brilliantly well done there! :)))
Glad to hear that's fixed :))

Please post the question about the mouse and keyboard as a new question
https://answers.launchpad.net/ubuntu/+addquestion
so that some more relevant people can take a look into fixing that.

Welcome to linux-land, especially the Ubuntu corner of it :)
Many regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#67

Hi Tom, I want to thank you for your support.
You have been very helpful and always here to help.
As soon as I get mouse and keyboard fixed ill post my menu.lst in case if some one has/ had the same problem like mine.

Thanks and regards
Akis

Revision history for this message
Akis (remond1988) said :
#68

here is a copy of my old menu.lst plus the new stanza that solved the problem:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=acff373e-4cc6-4e49-845c-ed209754a553

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=acff373e-4cc6-4e49-845c-ed209754a553 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid acff373e-4cc6-4e49-845c-ed209754a553
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

NEW staza :

title Microsoft Windows XP Home Edition
rootnoverify (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

Revision history for this message
Tom (tom6) said :
#69

Hi :)

Thanks, you are welcome :)) It's always good to see someone willing to put so much work into trying to get it all setup. Too many people seem to just give up at the first sign of trouble but you have put a lot of work into something that is usually so easy. Just because something is usually easy doesn't mean it always is and there are lots of other people that have also had to struggle with grub. As a result you are also much more knowledgeable than i was when i first started with linux. You are in a better position to be able to help other people when they first get interested in trying linux out, although i would urge caution before helping family members! :) I hope you now have as much fun as i have had with it so far. Even just half as much would be good :)

Now that you have Ubuntu working on your system it might be well worth going through every step in this guide to sort almost all your multimedia out in one go
https://help.ubuntu.com/community/Medibuntu
just missing out the optional step until you feel ready to make that leap.

Another guide good for occasional reference is
https://help.ubuntu.com/community/SwitchingToUbuntu/FromWindows

That was interesting that the mapping commands helped fix this. Does it mean that which slot your hard-drive is in it boots off the same boot-menu line?

Thanks a lot for your perseverance and hard work there!
Good luck and many regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#70

Hi :)

It has just occured to me that it might be a good plan to backup your menu.lst right now, before anything has a chance to go wrong with it!

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst-100909

Note that as you start typing the pathname pressing the Tab key might help you complete the typing in a predictive txt type of way.

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#71

Hi :)

Have you been able to try the new Ubuntu 10.04 before it gets officially released?
http://www.ubuntulinux.org/testing/lucid/beta2
Trying it as a LiveCd or as an extra dual/multi-boot would be ideal. Developers and everyone are keen to try to iron out any problems before 10.04 gets officially released so you might find faster & more effective answers to your bug reports which would make 10.04 work better on your system for you

Thanks and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#72

Hi Tom

My Ubuntu is working fine. I cant wait for ubuntu 10.04 LTS.
Thanks for asking.

On Mon, Apr 12, 2010 at 10:38 AM, Tom
<email address hidden>wrote:

> Your question #81702 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/81702
>
> Tom posted a new comment:
> Hi :)
>
> Have you been able to try the new Ubuntu 10.04 before it gets officially
> released?
> http://www.ubuntulinux.org/testing/lucid/beta2
> Trying it as a LiveCd or as an extra dual/multi-boot would be ideal.
> Developers and everyone are keen to try to iron out any problems before
> 10.04 gets officially released so you might find faster & more effective
> answers to your bug reports which would make 10.04 work better on your
> system for you
>
> Thanks and regards from
> Tom :)
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Tom (tom6) said :
#73

Hi :)

There is no need to wait! You can test-drive it right now with a LiveCd
https://help.ubuntu.com/community/LiveCD

Even when the proper official release does appear in about 3 weeks time it would still be best to check it as a LiveCd before installing.

Have you managed to move /home to it's own partition yet? That can be a great thing to do to prepare your system so that all the data & setting stay safe. Proper Backups are slightly better but having a separate /home partition does make things a lot easier for installs

Good luck and regards from
Tom :)

Revision history for this message
Akis (remond1988) said :
#74

I will download Lucid soon. Can you give me more information regarding
/home?
Its my first time reading about this. How can it make my install easier?
Once backup /home, do I have re-install all my apps ?
Thanks

On Mon, Apr 12, 2010 at 12:34 PM, Tom
<email address hidden>wrote:

> Your question #81702 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/81702
>
> Tom posted a new comment:
> Hi :)
>
> There is no need to wait! You can test-drive it right now with a LiveCd
> https://help.ubuntu.com/community/LiveCD
>
> Even when the proper official release does appear in about 3 weeks time
> it would still be best to check it as a LiveCd before installing.
>
> Have you managed to move /home to it's own partition yet? That can be a
> great thing to do to prepare your system so that all the data & setting
> stay safe. Proper Backups are slightly better but having a separate
> /home partition does make things a lot easier for installs
>
> Good luck and regards from
> Tom :)
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Tom (tom6) said :
#75

Hi :)

You don't have to try Lucid but i think it's good fun to have a sneak preview before it gets released.

/home is where all your data & settings are kept and linux allows it all to be kept on a separate partition from the OS & programs which are kept in / so you could organise something like this on your hard-drive

sda1 / for your current Ubuntu
sda2 / for Lucid
sda3 Swap
sda4 /home for your current Ubuntu

Your current install & the Lucid one could share the same /home partition or you could just keep the /home just for the current install. This would mean that Lucid was completely contained on sda2 so if there was any trouble with it then the problems wouldn't affect your current install. We could say that the Lucid is in a "sandbox". This is an excellent way of testing something safely.

When you install Ubuntu the entire / partition has to be re-formatted which loses all the data in that partition. Normally /home is inside / so all that data & your settings would be lost.

If you have /home on a separate partition then when / gets reformatted the /home doesn't need to be. This means it is very easy to do a fresh install which is almost always better than an upgrade. Once you can easily do fresh installs without having to worry about your data much then it is easier to recover from problems which would otherwise be almost catastrophic.

Also it would mean that various installs could all share the same /home and share a lot of data quite a lot more easily. Obviously you probably wouldn't share to much with a system that you weren't completely sure about so keeping Lucid's /home inside it's / on sda2 would be a good plan for the short-term and could easily be changed later.
https://help.ubuntu.com/community/DiskSpace#Separate%20/home

The swap is easily be shared by the 2 different installs as no data is kept in there permanently and it gets wiped whenever you shutdown the machine. Swap is the "virtual memory" to help Ram.
https://help.ubuntu.com/community/SwapFaq

I am just in the process of re-writing this guide about moving the /home to it's own partition. It is not easy because the ideas are unfamiliar until you have been using the system for a while but the guide helps quite a bit
https://help.ubuntu.com/community/Partitioning/Home/Moving

Since all your programs are kept in / you wouldn't have to reinstall them for this but when you upgrade to Lucid then you will. I have a neat trick to make that very much easier although it still requires quite a hefty download. Go into Synaptic Package Manager

System - Administration - Synaptic

and up to it's "File" menu and "Save markings as ..." make sure to tick the box to "save all packages, not just those marked" and then save that as a text-file which can then be read back in by Lucid's Synaptic ;)

Ok, hopefully that covers everything!! :))
Good luck and regards from
Tom :)