$ sudo grubThere is Ubuntu Intrepid Ibex installed on (hd0,5) and I installed OzOS (Ubuntu variant using E17 Desktop) on (hd0,2) which overwrote the MBR. Now I want to format (hd0,2) but if I do it without setting up the Grub's MBR pointing to (hd0,5) my system would become un-bootable.
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage1
(hd0,2)
(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
$
By the command root (hd0,5) I have told Grub to use the menu.lst of (hd0,5) while setting up.
Simple, isn't it, only three commands:
grub> find /boot/grub/stage1Now suppose I want to boot OzOS installed on (hd0,2) I can edit menu.lst on (hd0,5) and make an entry to boot it but I decided to use some other way which is not commonly used to boot Linux.
grub> root (hd0,X)
grub> setup (hd0)
$ sudo grubI have setup grub of (hd0,2) on the partition itself instead of MBR and edited menu.lst as follows:
grub> root (hd0,2)
grub> setup (hd0,2)
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,2)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,2)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,5) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.
grub> chainloader +1
grub> boot
title OzOSWhen I select OzOS on grub installed on MBR it "chainloads" the bootloader installed on (hd0,2) which opens another boot menu (listing menu.lst of hda3).
root (hd0,2)
chainloader +1
Dear Kamalesh,
ReplyDeleteI would like to talk to you regarding building Linux Distro.
Can you please let me know your mail id to take it further.
With Best Regards,
Charan
scharanb@yahoo.com