Configuring a Multi-boot System

I’m going to sort of live-blog my process of configuring my new office computer so that it’s a dual-boot Windows 7 and Linux machine. The first thing you need to do is select your preferred linux distribution and download the installation media. You can learn about pretty much every distribution out there from DistroWatch.com. A distribution is the set of standard applications, package installers, and configuration tools that different development teams maintain and distribute, wrapped around the Linux kernel. At work, we use the commercially maintained Suse. Many people I know use the community maintained Ubuntu. I use Slackware, which is maintained primarily by Patrick Volkerding. If you’re interested in having a Linux system that’s very painless to use and customize, I’d probably recommend Ubuntu. If you want to learn a lot about how Linux in specific and operating systems in general work, you’ll have a lot of fun with Slackware, which works just fine out of the box, too.

On we go:

1. You need to have some unallocated space on an installed hard disk. You can either slot a new one into your box or resize the existing disk partition. In the past, I’d use Partition Magic, which you can get on Hiren’s boot CD. Windows 7 has a very welcome “Shrink partition” routine, accessible by right-clicking “computer” in the start menu, and choosing “manage” in the context menu. Click the Disk Management submenu, then right-click on the system volume and choose “Shrink volume”. My computer came with a 1tb disk. I’m sacrificing 216gb for the Linux installation. 200 of that will be the linux partition and the other 16 will be a swap partition. When an OS runs out of available memory, it stores some of the data that was to be kept in memory to the hard disk in what’s called a page file. Windows stores page files on the system disk. Linux uses a dedicated disk to swap excess data from memory to. A sound rule of thumb is to allocate twice the amount of RAM for the swap disk and you’ll likely never see your system crash for lack of available memory.

2. Put the linux installation disk into your optical tray and restart the computer, booting off that disk. How to do that depends on your computer’s BIOS: some automatically boot from a CD when one is present, mine requires me to press F12 at boot time. I originally learned how to install Slackware (and a bunch of other stuff) from Grogan at BitBenderForums, although much has changed since then—notably, there’s no real point in partitioning your disks the way he did back when he wrote that. You just need one disk partition for the system and the swap partition. This is my first time installed Slackware since version 11, I think, and supposedly much has improved in the current release, which is 13. Grogan’s procedure is still a good guide: use fdisk to create your two partitions from unallocated space, change the swap partition’s id to 82, then run the slackware installer with setup. My computer came with 3 partitions installed, two of them for rescue partitions, one for Windows 7. I created an extended partition with the two logical partitions inside.

3. A few things have changed in the installer already. The EXT4 disk format is now available. Surprisingly Reiserfs is still, too, in spite of its author’s murderous ways. NTFS support is available now, too. The installer recognized the windows disks that are on this machine and asked whether I want to be able to see them when booted to Linux, I opted to allow users read-only access and to give root RW privileges. I did the full distro installation and enabled a few of the network servers like samba and nfs. After setup is done, you restart the computer and choose Linux in Lilo’s boot menu. In the past, I’d had to edit Lilo pretty extensively, but it appears to have installed nicely this time automatically. I create a non-root user for myself using the adduser script, then configure audio with alsaconf.

4. Everything works great out of the box. Slackware is configured to boot up to a bash shell. Since I’ll be using this as a desktop workstation, I’m changing that so it’ll boot up into the KDE graphical environment. To do that, you edit /etc/inittab using vim or emacs, and changing the line that reads:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

to this:
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

With that done, I issue the command:
shutdown -r now
to restart the computer and boot it up to Slackware in KDE using the user I created. (And the current version of KDE is quite beautiful out of the box).

That’s it. I’m done. Took me about an hour start to finish.

Later: Turned out that the installation killed my ability to boot to windows. Remember those utility partitions I mentioned? Lilo automatically assumed the windows system partition was sda1, which was a diagnostic partition. Editing /etc/lilo.conf to make windows boot to sda2 instead fixed that. I’ve also got the proprietary driver installed for my ATI graphics card, so I’m rolling along at full 1920X1080. I also had a weird problem with the network that sorted itself somehow after a bunch of poking at stuff.

Leave a Reply