Originally Posted by windows22
I don't have GRUB 2 though do I? It says 0.97. What version is the GRUB you kindly provided?
I have no idea of the Linux device numbers - as I say Ubuntu is totally unhelpful here in revealing what you have. If you still have the patience (!) I would suggest you could tell me what to type from the prompt when I run your CD. Isn't it better to put grub in Windows if so what do I type. I have no idea what a chainload is. I will try to read some of the docs but the point is this should not be needed. Which link proposes a menu.cfg file?
Certainly Linux needs to sort this out, totally unacceptable and a core failure if dual booting consistently does not work. Thanks everyone.
I provided version 0.97 of GRUB. I believe what you have now is version 1.97 (GRUB 2). Synaptic will show you the grub package installed on the disk, but that might not be the same as the grub actually installed for booting. Press "Esc" during booting, and then look at the version displayed by GRUB.
Using my boot CD, you can find the correct device numbers with the "find" command. Keep in mind that those device numbers are only correct for my version of grub and not GRUB 2. You will need to know the exact file names and folder names.
Those commands should print out the device name for the Linux and the Windows partitions.
The "best" version of GRUB is for you to decide. You may have less problem getting help for Ubuntu if you use the normal GRUB 2 that comes with Ubuntu.
If you wish to install my (legacy) version of "grub" the safest thing is to install it in the Windows partition. Ubuntu updates should not modify the Windows partition. Boot from the Ubuntu CD, select the options to run Ubuntu from the CD "Without any change to your computer". Click on "Applications" in the menu, then "Accessories" and then "Terminal". Enter this command to start a root shell.
sudo su -
Type in a command to look at your partition table.
Create some mount points.
Mount the windows partition.
mount -o rw /dev/sda1 /mnt/win
Remove the Ubuntu CD and put in my boot CD.
Mount the CD
mount -o ro /dev/sr0 /mnt/cd
Copy the required files to the Windows partition.
mkdir -p /mnt/win/boot/grub
cp /mnt/cd/install/boot/grub/* .
Edit the "menu.lst" file and add the correct entry for Windows and Ubuntu.
Your "menu.lst" should have entries similar to this in order to boot Windows and Linux.
linux /vmlinuz ro root=UUID=the-disk-id
linux /vmlinuz ro root=/dev/sda4
Un-mount the Windows partition and GRUB CD.
Now you should be able to install the GRUB that is located in the Windows partition. Boot from my GRUB CD.
Type in the commands to install grub to the MBR.
Remove the boot CD and restart the computer. You should see the menu for GRUB 0.97. If you have a problem with an entry you can press "e" to edit it (not saved) or "c" to enter boot commands (not saved).
Once you have booted an OS, edit the "menu.lst" file and make corrections.
When you are typing in commands to GRUB to boot manually, follow the commands with the "boot" command. For example:
linux /vmlinuz ro root=/dev/sda4
You do not use the "title" command when manually entering boot commands. That can only be used in "menu.lst".
To repair the GRUB installation after something changes the MBR you can boot from my GRUB CD again, and repeat these commands.
If something changes the GRUB files that you stored in the Windows FAT32 partition you may have to repeat all of the commands including those to copy the files.
As you can see, installing GRUB yourself is not simple and it is easy to make a mistake. I did my best to provide the correct information but I also made some assumptions that could be wrong.
- I assumed that Ubuntu has "vmlinuz" and "initrd.img" links in the root directory that refer to the correct files.
- I assumed that your Windows is installed in the first Primary partition and it is FAT32.
- I assumed that Ubuntu is installed in the first Logical partition.
- I assumed that Ubuntu is using the device name "/dev/sda" for the hard disk.
- I assumed that Ubuntu is using the device name "/dev/sr0" for the CD-ROM.
The legacy version of GRUB is not being updated so it may not work with Ubuntu or other Linux distros in the future. There are already patches to support "ext4" and other Linux changes. The version I provided has the "ext4" patch.
I like the legacy version of GRUB because of the ability to search for files using "find" and install grub from the "native" mode that accesses the disk through the BIOS instead of Linux.