Ultra-tiny HOWTO: multi-distro config -OR- Stupid LILO tricks (copyleft) 1999, 2000 by Brian Coyle brianc@magicnet.net This document may be freely distributed under the FDL. http://www.gnu.org/copyleft/fdl.html In early 1999, I picked up a 13Gb drive ($150.00 at Office Depot -- big sale). I slapped it into an old P90 and created a great platform for my experimentation with all the different distros. Here's how I did it - as always, YMMV. My test system has a 850Mb /dev/hda and the 13Gb /dev/hdc (the CD is /dev/hdb). I carved up hda so I have: Disk /dev/hda: 32 heads, 63 sectors, 827 cylinders Units = cylinders of 2016 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 50 50368+ 83 Linux /dev/hda2 51 101 51408 83 Linux /dev/hda3 102 183 82656 82 Linux swap /dev/hda4 184 823 645120 82 Linux swap hda1 (WAY oversized) contains lilo config hda2 holds kernels (/boot/distro_name) hda3 is Linux swap (I have 40Mb of real memory, thus 80Mb swap) this is shared by all Linux distros, Solaris has its own. hda4 is Solaris x86 - yes, Sun uses a Linux swap ID number I put Solaris x86 on the little drive because it doesn't like big drives (>1024 cyl). The big drive is simply carved into large chunks for each distro. Disk /dev/hdc: 16 heads, 63 sectors, 25228 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hdc1 1 2439 1229224+ 83 Linux /dev/hdc2 2440 4878 1229256 83 Linux /dev/hdc3 4879 7317 1229256 82 Linux swap /dev/hdc4 7318 25228 9027144 5 Extended /dev/hdc5 7318 9756 1229224+ 83 Linux /dev/hdc6 9757 12195 1229224+ 83 Linux /dev/hdc7 12196 14634 1229224+ 83 Linux /dev/hdc8 14635 17073 1229224+ 83 Linux /dev/hdc9 17074 19512 1229224+ 83 Linux /dev/hdc10 19513 21951 1229224+ 83 Linux /dev/hdc11 21952 24390 1229224+ 83 Linux /dev/hdc12 24391 25228 422320+ 83 Linux Since this is just a test system, I didn't get fancy with mount points everything goes under /. That little 420Mb hdc12 became a /home mount point shared across the distros. If you decide to share a file system across distro's, be sure all your user and group ID's match. That will ensure the correct permissions when booting another OS. /dev/hda2 holds the kernels in in a /boot/distro_name directory: [root@testsys /]# ls -l /boot total 66 drwxrwxr-x 3 root root 1024 May 27 1999 RH60 drwxr-xr-x 2 root root 1024 Dec 26 12:43 SuSE -rw-r--r-- 1 root root 512 May 27 1999 boot.0300 -rw-r--r-- 1 root root 4540 Jul 22 1999 boot.b drwxrwxr-x 2 root root 1024 Oct 24 15:09 caldera -rw-r--r-- 1 root root 612 Jul 22 1999 chain.b drwxrwxr-x 2 root root 1024 May 28 1999 debian drwxr-xr-x 2 root root 1024 Jun 2 1999 lost+found drwxrwxr-x 2 root root 1024 Oct 23 15:46 mandrake -rw------- 1 root root 51200 Dec 26 18:17 map -rw-r--r-- 1 root root 620 Jul 22 1999 os2_d.b drwxrwxr-x 2 root root 1024 Aug 19 00:11 slackware Keeping all the kernels here, ensures they remain below the 1024th cyl even though the root partition is somewhere else. Here's my lilo.conf - # # NOTE! Be sure to run lilo like this: # $ /sbin/lilo -C /mnt/lilo/lilo.conf # # Where /mnt/lilo is /dev/hda1 # and /boot is /dev/hda2 # # /dev/hdb == CD-ROM # # Current distros / mount points are: # /dev/hda1 LILO /mnt/lilo (shared, but not automount) # /dev/hda2 BOOT /boot (shared) # /dev/hda4 SOLARIS # /dev/hda3 SWAP (shared) # /dev/hdc1 Ret Hat 6.0 # /dev/hdc2 Debian # /dev/hdc3 unused (type==82 swap/Solaris) # /dev/hdc4 extended partition # /dev/hdc5 Caldera # /dev/hdc6 Slackware # /dev/hdc7 Mandrake 6.0 # /dev/hdc8 SuSE 6.2 # : # /dev/hdc12 HOME /home # boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=500 # # Default kernel # image=/boot/RH60/vmlinuz-2.2.5-15 label=RH60 root=/dev/hdc1 read-only # # additional entries # image=/boot/caldera/vmlinuz label=caldera root=/dev/hdc5 read-only image=/boot/debian/vmlinuz-2.0.36 label=debian root=/dev/hdc2 read-only # # Solaris # other=/dev/hda4 label=solaris loader=/boot/chain.b unsafe # # Slackware # image=/boot/slackware/vmlinuz label=slackware root=/dev/hdc6 read-only # # Mandrake # image=/boot/mandrake/vmlinuz label=mandrake root=/dev/hdc7 read-only # # SuSE # image=/boot/SuSE/vmlinuz label=suse root=/dev/hdc8 read-only For each distro, only /dev/hdc12 (/home), /dev/hda2 (/boot), the distro root (/), and swap (/dev/hda3) are automounted. When I install a new distro or update a kernel, I manually mount the lilo partition under /mnt/lilo. Then I copy the kernel to /boot/distro_name/ and edit /mnt/lilo/lilo.conf (NOT /etc/lilo.conf) if necessary. Finally, I run lilo with the -C arg (see the comments in lilo.conf above) and reboot. This is a great way to try other distros! (I bought a cheapbytes mondo pack last time out) I still have to load TurboLinux and Stampede among others. Eventually I'll get to some *BSD's. If you can build up a spare box, I highly recommend it!