Linux Distros Are Like Lays® Potato Chips… (Revisited)

… you can’t have just one.

Multi-booting – My Way

I’ve been multi-booting since I first came to Linux. Originally, it was due to my transition from MS Windows to GNU/Linux. Later, it was because I wanted to try more distributions. I was still hunting for the one that fit me best. I’ve since found that distro (Slackware). However, I still have multiple operating systems on my computer for varying reasons.

My current hard drive partition and usage map looks like this:

SATA 1 – Main/Secondary OS + Linux Archive

Primary – 25Gig: /(root) Slackware on /dev/sda1 (ext3)

Primary – 50Gig: /home Slackware on /dev/sda2 (ext3)

Extended – 175Gig: /dev/sda3

Partition – 25Gig: /(root) Debian on /dev/sda5 (ext3)

Partition – 50Gig: /home Debian on /dev/sda6 (ext3)

Partition – 2Gig: /swap (common) on /dev/sda7 (swap)

Partition – 98Gig: Linux Archive on /dev/sda8 (ext2)

SATA 2 – MS Windows + Experimental Operating Systems

Primary – 25Gig: MS Windows Main on /dev/sdb1 (ntfs)

Primary – 25Gig: MS Windows Programs on /dev/sdb2 (ntfs)

Extended – 200Gig: /dev/sdb3

Partition – 2Gig: /swap (common) on /dev/sdb5 (swap)

Partition – 15Gig: /(root) CentOS on /dev/sdb6 (ext3)

Partition – 25Gig: /home CentOS on /dev/sdb7 (ext3)

Partition – 15Gig: /(root) Arch Linux on /dev/sdb8 (ext3)

Partition – 25Gig: /home Arch Linux on /dev/sdb9 (ext3)

Partition – 15Gig: /(root)  PCLOS on /dev/sdb10 (ext3)

Partition – 25Gig: /home PCLOS on /dev/sdb11 (ext3)

Partition – 15Gig: /(root) Sidux on /dev/sdb12 (ext3)

Partition – 25Gig: /home Sidux on /dev/sdb13(ext3)

Partition – 15Gig: /(root) Mandriva on /dev/sdb14 (ext3)

Partition – 23Gig: /home Mandriva on /dev/sdb15 (ext3)

EIDE 1 – Backups

Primary – 50Gig: Slackware Backups on /dev/hda1 (ext2)

Primary – 50Gig: Debian Backups on /dev/hda2 (ext2)

Extended – 150Gig: /dev/hda3

Partition – 50Gig: MS Windows Backups on /dev/hda5 (FAT32)

Partition – 50Gig: Other OS Backups on /dev/hda6 (ext2)

Partition – 50Gig: OS Common Storage on /dev/hda7 (FAT32)

These three drives add up to three quarters of a Terabyte of space… way more than I actually need. However, space is cheap these days. I still remember paying $100 for a 10Gig drive less than ten years ago. Previously, SATA 1 and 2 were in RAID 1 (mirrored) configuration with MS Win XP Pro on them. What a waste. I rarely ever boot that OS these days (games only), so I broke the RAID down and repartitioned/reinstalled everything on my system.

The ten partitions you see on the SATA 2 drive are my experimental Linux slots. When this partition map was made, I intended to put CentOS, Arch, and Ark back on them, with the last two saved for Gentoo and maybe FreeBSD. It didn’t work out quite that way, as you can see. What is installed on those experimental partitions tends to change often.

A few things to take note of when partitioning and multi-booting in this fashion:

1) Remember the SATA 15 partition limit. Many newer distros use the libATA kernel drivers which force drive recognition as SATA regardless of whether the drive is EIDE or SATA, so for this reason remember to place your /common partitions and /swap partitions on the lower numbered ones. A libATA distro installed anywhere else on the lower 15 partitions (or another drive) will still be able to “see” and mount them this way.

2) MS Windows is like the “Borg” when it comes to being installed on a computer with other operating systems. It seeks out and destroys other operating systems. Be sure to install MS Windows first. It needs to be on the first partition of whatever drive you’re installing it on. After which, you can install your GNU/Linux distros safely.

3) Install your MBR controlling distribution last, time-wise, regardless of which partition/drive you’re installing on. This will allow it, especially in the case of Debian’s excellent GRUB, to “see” all the other installations and write them into your menu.lst for you. Even though Slackware is my primary operating system, and since I don’t use LILO, I allow Debian to control the MBR and boot my system with its GRUB.

4) Lastly, as in the case above, if your MS Windows installation is on a different drive than your MBR controlling OS, then your BIOS may have troubles booting the correct drive. No matter what you choose in BIOS as the first device, the Windows drive will boot. The reason for this is that Windows installs a bootable flag on its own drive. This flag gets priority from the BIOS. To set a bootable flag on the drive that you want to boot will require a bit of manipulation using a Live Linux CD* and the fdisk command.

Boot your Live CD and start it. From a terminal session within the CD do the following:

# fdisk /dev/

fdisk> a (option to toggle bootable flag on drive

–partition number? 1 (first partition on the drive)

fdisk> w (command to write the new info to disk and exit fdisk)

–bootable flag reset for this drive

This will set the bootable flag to the drive you choose. Reboot, go into BIOS setup and choose your first boot drive. It should boot fine now.

*Another option to use is the way I actually did it on my own system… I used SLAX on a flash drive to perform the fdisk above. Worked like a champ!

Anyway, that’s the way my system is set up. Whenever I add or change operating systems, I just edit the Debian /boot/grub/menu.lst to reflect those changes.

Have fun with it!

Until next time…

~Eric

Note: This article first appeared on my Linux.com Community Blog (now defunct). Some of the above is out-dated. I currently only run Slackware (primary), Arch (secondary), CentOS (tester1), and Debian (tester2).


Multi-booting My Way (Not Necessarily the Easy Way)

The following is a brief step-by-step on how I’ve been multi-booting different operatings systems on my machines for the past few years.

It’s not necessarily the easy way to do things. It is the way I first learned and the way that I’m most comfortable with using. I’m posting it here, as I believe it may be helpful to some Linux Explorers out there. This tutorial is based on GRUB Legacy. I do not use the new GRUB2 on my machines.

Here we go…

I have multiple drives on my system, so multi-booting becomes a bit more interesting. Currently, I have three hard drives installed. They are /dev/sda, /dev/sdb, and /dev/sdc. We won’t concern ourselves at all with /dev/sdc because it is primarily used as a common storage/backup drive. My operating systems are installed on /dev/sda and /dev/sdb.

I use /dev/sda (1st boot device in my BIOS) as the drive that has my primary operating system and my secondary operating system on it. I break my drives down into numerous partitions because I always install GNU/Linux operating systems on at least two partitions; /(root) and /home. I also have a common /swap partition on each drive that I plan on installing GNU/Linux distributions on.

My /dev/sda partitions look like this:

/dev/sda1   *       16065    51215219    25599577+  83  Linux <– Slackware /(root)
/dev/sda2        51247350   153645659    51199155   83  Linux <– Slackware /home
/dev/sda3       153661725   488392064   167365170    5  Extended
/dev/sda5       153661788   204860879    25599546   83  Linux <– Arch /(root)
/dev/sda6       204877008   307275254    51199123+  83  Linux <– Arch /home
/dev/sda7       307307448   311403959     2048256   82  Linux swap / Solaris
/dev/sda8       311420088   488392064    88485988+  83  Linux <– Archives

My /dev/sdb partitions look like this:

/dev/sdb1   *       16384    51216383    25600000    7  HPFS/NTFS/exFAT <– MS Windows XP
/dev/sdb2        51232768   102432767    25600000    7  HPFS/NTFS/exFAT <– MS Windows Programs
/dev/sdb3       102453181   488270159   192908489+   5  Extended
/dev/sdb5       102453183   106550639     2048728+  82  Linux swap / Solaris
/dev/sdb6       106565823   137289599    15361888+  83  Linux <– CentOS tester 1 /(root)
/dev/sdb7       137304783   188501039    25598128+  83  Linux <– CentOS tester 1 /home
/dev/sdb8       188516223   219239999    15361888+  83  Linux <– Foresight tester 2 /(root)
/dev/sdb9       219255183   270451439    25598128+  83  Linux <– Foresight tester 2 /home
/dev/sdb10      270466623   301190399    15361888+  83  Linux <– Debian tester 3 /(root)
/dev/sdb11      301205583   352401839    25598128+  83  Linux <– Debian tester 3 /home
/dev/sdb12      352417023   383140799    15361888+  83  Linux <– vacant tester 4 /(root)
/dev/sdb13      383155983   434352239    25598128+  83  Linux <– vacant tester 5 /home
/dev/sdb14      434367423   488270159    26951368+  83  Linux <– common storage

You get the above information on your drives using the fdisk -l command as root from the command line.

Alright then, let’s say that I now want to install Fedora Core Linux on my tester 4 partitions of /dev/sdb. Here’s how I would do that step-by-step:

1) Begin the Fedora installation setting /dev/sdb5 as swap, /dev/sb12 as /(root), and /dev/sdb13 as the /home partition from Fedora’s installer.

2) When the Anaconda installer reaches the point where it asks where I want to install the GRUB bootloader, I choose to SKIP installation of GRUB.

3) Once the install is finished, I reboot my main operating system (Slackware) and from the command line I mount the newly installed Fedora /(root) partition:

root_Slackware/home/vtel57:# mount /dev/sdb12 /mnt/tmp

*Note: I have a /mnt/tmp directory in my Slackware. If you don’t have a /mnt/tmp, just mount in /mnt. You’ll be fine.

4) I list the contents of the Fedora /boot directory:

root_Slackware/home/vtel57:# ls /mnt/tmp/boot

5) I copy down the vmlinuz and initrd information. You’ll be looking for the vmlinuz-<kernel version> and the initrd-<kernel version>.img files specifically. You’ll need that information for the next step.

6) I edit my /boot/grub/menu.lst file to add the new Fedora Core entry. Note: my MBR-controlling GRUB is in my secondary OS, Arch Linux. I can still mount and modify it from within Slackware, though.

root_Slackware/home/vtel57:# mount /dev/sda5 /mnt/tmp

root_Slackware/home/vtel57:# vim /mnt/tmp/boot/grub/menu.lst

I’ll add this entry to the file:

# Fedora Core

title          fedora (t4)

root         (hd1,11)

kernel     /boot/vmlinuz-<kernel version> root=/dev/sdb12 ro

initrd       /boot/vmlinuz-<kernel version>.img

7) I reboot and choose “fedora (t4)” from the GRUB menu to boot my new Fedora installation.

That’s it, folks. Straightforward, but not necessary the easiest way to do this. That’s the beauty of GNU/Linux. You can do it your way.

Have fun!

~Eric

P.S. I’m still working on the next shell scripting lesson. It’s going to be about variables and parameters, a necessary lesson for further BASH learning. Unfortunately, it’s also kinda’ complicated, so it’s taking me a bit to figure out how to formulate a lesson and still stay loyal to my primary goal here… keeping it as simple as possible. Stay tuned…


Follow

Get every new post delivered to your Inbox.

Join 40 other followers