Is a distro independent grub boot possible using a boot partition???

John Summerfield debian at
Fri Feb 1 00:21:12 UTC 2008

Joe(theWordy)Philbrook wrote:
> Hash: SHA1
> Is a distro independent grub boot possible using a boot partition???

yes it is.
Create a small partition. For the sake of argument, we will assume it's 
Format it and install grub's files in it. See the grub docs for detailed 
information. Read until it becomes clear:-)

Install its boot record to /dev/hda

For every other distro, install its boot record to its partition.

The grub menu in the grub partition needs to point to each Linux distro 
(and Windows).

You might consider adding a menu entry for each Linux distro (and 
Windows) to boot the MBR so you can get back to the original menu.

Note that if you want to boot something not in the menu, you can go the 
grub's commandline and do it there.

The only problem I see with reusing a Mepis partition is it's way bigger 
than you need. 1 Mbyte should be enough.


> confirm that before I wing it because unlike my old pc there is no
> floppy so I can't test it with "grub-install /dev/fd0" first. So I guess
> I'm asking if that's all there is to it?

Adapt and run this script; it will create a boot CD:

09:11 [summer at numbat ~]$ cat bin/grub-cdrom
set -e
iso=$(mktemp -d /tmp/isoXXXXXX)
ls -dl ${iso}
cd ${iso}
mkdir -p boot/grub
cp -p /usr/share/grub/*/stage2_eltorito boot/grub
cat <<. >boot/grub/menu.lst
$( [ -f boot/grub/splash.xpm.gz ] && echo 
title Boot from disk
         root (hd0)
         chainloader +1
cp -l boot/grub/menu.lst boot/grub/grub.conf
cat boot/grub/grub.conf
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
         -boot-load-size 4 -boot-info-table -o /tmp/grub.iso .
ls -hl /tmp/grub.iso
rm -rf ${iso}
echo cdrecord -blank=fast -sao -eject /tmp/grub.iso
09:11 [summer at numbat ~]$

> But what I really want to know is once the grub installed to the mbr is
> booting from (hd0,2) using the menu.lst from that partition, will it
> continue to boot from the mbr if the linux that installed it to the mbr
> is no longer there?

It needs the partition where its stage 1.5 and stage 2 live.

> Or will I always have to reinstall grub to the mbr from some other
> installed linux before I trash the distro that last installed it???

never ever replace the MBR "because it seemed a good idea."



-- spambait
1aaaaaaa at  Z1aaaaaaa at
-- Advice

You cannot reply off-list:-)

More information about the fedora-list mailing list