Originally Posted by
10Ten
ugh...
any ideas? will i have to reinstall this damn liveCD AGAIN???
No, you never need to reinstall the live CD. But, you should understand what's going on, and maybe that will be harder, although it's really not very complicated, at least it wasn't until the latest version, if you did a clean install and ended up with "GRUB 2". Installing GRUB (1) is easy, but if you have GRUB 2, I don't know how. In fact, I simply installed the original GRUB manually.
For GRUB 1, you need two things - you need the grub files in /boot/grub, along with menu.lst, and you need the boot loader in the MBR that knows where to look for the OS and the grub files.
If you have an existing /boot/grub/ then using the live CD to fix things is easy - all you have to do is tell GRUB where they are, and reinstall it into the MBR. This takes two commands from the grub prompt.
You need to know what partition your root linux is on. If you only have one, it would be /dev/sda1 (first drive, first partition). But in GRUB's terminology, this is HD0,0 (no spaces).
For me, my root drive is an extended partition, which always starts with 5, so it's /dev/sda6, the first logical partition in the extended partition.
Here's what I do to install GRUB from the live CD (pre-9.1 version):
Enter "sudo grub" in the terminal. Always use sudo (or an su prompt) or grub will run, but not work worth a damn!
Code:
grub> find /boot/grub/menu.lst
(hd0,5)
grub> root (hd0,5)
grub> setup (hd0)
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 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
Explanation. First, I did a find to confirm the location of my grub files, using menu.lst (because I can remember that one easily).
The GRUB prompt is "grub>", by the way.
Then, I told GRUB about that location, with the "root" command, installed the boot loader into the MBR with the setup command, saw that everything was OK, and entered "quit" to exit.
That's what does it for me.
Bookmarks