Re: 1hdd 4os's boot loader/shared swap files?



On 2/14/2011 6:19 PM, The Natural Philosopher wrote:
Mike S wrote:
I have a friend who wants 4 OS's on his hdd, and he has a few
questions about the best way to proceed:

- can he use one swap file partition and have Debian, Slackware and
Suse all share it, instead of having one swap file partition for each
distro?


I think so, if its a separate partition.


- what is the recommended boot loader to handle 4 OS's (incl. Win2k)?
Is there any advantage to using lilo over grub?

pass.

- what is the recommended location for the boot loader. I would think
a separate partition would be the safest, but if anyone has any
recommended reading or experience with this I'll be happy to hear it.

i thought boot loaders lived outside partitions.

could be wrong at that.

IIUC the boot loader can go in the MBR, in a separate partition (where resizing partitions from Windows and other Windows operations won't delete it) and in a SuperBlock.

Grub in the MBR:

http://www.dedoimedo.com/computers/grub.html

How does GRUB work?
When a computer boots, the BIOS transfers control to the first boot device, which can be a hard disk, a floppy disk, a CD-ROM, or any other BIOS-recognized device. We'll concentrate on hard disks, for the sake of simplicity.
The first sector on a hard is called the Master Boot Record (MBR). This sector is only 512 bytes long and contains a small piece of code (446 bytes) called the primary boot loader and the partition table (64 bytes) describing the primary and extended partitions.
By default, MBR code looks for the partition marked as active and once such a partition is found, it loads its boot sector into memory and passes control to it.
GRUB replaces the default MBR with its own code.
------------------------------------------------------------
Grub in a separate partition:

http://www.gnu.org/software/grub/manual/grub.html

Another example is when you have a separate boot partition which is mounted at /boot. Since GRUB is a boot loader, it doesn't know anything about mountpoints at all. Thus, you need to run grub-install like this:

# grub-install --root-directory=/boot /dev/hda
------------------------------------------------------------
Grub in the superblock:

http://www.happy-monkey.net/LPI/html/ch04.html

3.3. MBR vs. Superblock

The first stage of the GRUB and LILO boot loaders does not always have to be installed in the Master Boot Record of the hard disk. Sometimes it is convenient to install the boot loader in the first sector, or superblock, of the root partition, particularly for systems that have multiple operating systems. Check the boot loader's man page for details on how to specify the installation location.
------------------------------------------------------------
.