My latest warning against dual- and triple-booting Linux and BSDs

| | Comments (9) |

My advice is to avoid dual-booting, and especially triple-booting (or even more than that).

If you set up a box to dual-boot with two Linux distros, Linux and Windows, or even a BSD (OpenBSD, NetBSD, FreeBSD) and Linux, and you leave it alone, you'll probably be OK.

But me, I'm testing things all the time, and lately I've been playing around with triple-booting on my Gateway Solo 1450 laptop. I've done this a lot, and I generally know how to do it so I don't hose one partition or another.

But I slightly hosed something on the laptop last night.

I've been playing around with FreeBSD, trying to figure out why it sometimes manages my CPU fan extremely well but usually not at all.

I have FOUR primary partitions on the 30 GB hard drive. The first is Linux swap, the second is Ubuntu 8.04, the third Debian Lenny, and for a long time the fourth was just an empty Linux ext3 partition where I could stash files large and small.

I started throwing new OSes on it about a week or so ago. I had PC-BSD on there, FreeBSD, Debian Etch ...

And last night I did another FreeBSD install. Now remember, I had FOUR primary partitions. As far as I know, no BSDs will install on a secondary partition. And in Linux, — again, as far as I know — you can only have four primary partitions. If you want more than that, you need to make one an 'extended' partition, and then you can fill that with a much larger number of secondary partitions (I'm not sure of the total number in Linux, but it's a lot).

When I was installing FreeBSD to the fourth primary partition, I veered from my usual practice of installing it in a single FreeBSD partition and instead let the installer auto-partition the portion of the drive set aside for FreeBSD.

Long story short, I think I screwed something up.

I deleted the screwed-up FreeBSD partition and replaced it with another Linux ext3 partition, but that didn't seem to "fix" whatever problem it is I'm having.

Debian Lenny boots fine. But Ubuntu 8.04 stalls in the middle. It eventually does boot, but there's a stall of a few minutes in the boot sequence. I booted in recovery mode to see what was going on, and it does appear to be disk-related, but I'm not quite sure what to do about it. I already deleted the "offending" partition, but maybe I shouldn't have replaced it (or so quickly before testing the other partitions)?

It's been over six months since I hosed a whole box, so in the grand scheme of things I'm not doing too badly.

But I should really start following my own advice and stop dual-booting on what, for me at least, amount to "production machines," which I rely on to get work done.

When experimenting, I need to swap whole drives instead, like I do with my VIA C3-based converted-thin client test box, which has three drives that are easily swapped via power and IDE cables that extend well outside the thin client's small case.

I didn't hose things so badly that I either lost files or can't boot either of the two Linux distros on the box, but I really need to be more careful, especially when mixing BSDs and Linux.

When doing just that, incidentally, I've had a lot more success by installing the given BSD FIRST, then throwing Linux on the box after that.

What I think I'm going to do, when it comes to Linux anyway, is to have the first partition be swap, the second partition for the distro itself and the third partition for /home. That way I can theoretically swap in new distros and keep the same /home file (backing that up, of course).

Now I'm going to think of what to install on the Gateway Solo 1450 to single-boot it for awhile.

9 Comments

Ignacio Author Profile Page said:

And in Linux, — again, as far as I know — you can only have four primary partitions.

Actually, that's a limitation of the MS-DOS partition table. More flexible partition standards exist, but the typical PC BIOS cannot understand them.

...you can fill that with a much larger number of secondary partitions (I'm not sure of the total number in Linux, but it's a lot).

Logical partitions. 59. Well, more, but Linux won't let you use more.

ComputerBob Author Profile Page said:

I had the same basic problems and came to the same conclusion in July, 2007.

That's when I wrote My Hardware-Based Dual-Boot PC:

http://www.computerbob.com/guides/my_hardware-based_dual-boot_pc.php

Thanks for the information on the four-partition limit, that it's part of the MS-DOS legacy.

I'm going to look into this. I'd love to have the option of a disk-partitioning scheme that threw out the old and gave today's operating systems more freedom.

I suppose logical volume management (LVM) is a big step forward in this regard.

Oh, don't be such a killjoy. I dual boot two distros on my desktop and change the second one every few months. Usually I go through three to six new distros and then settle on something. Right now I've got Mandriva on the second partition, but I'll probably go back to something like 64studio (by way of FreeBSD 7).

It's one of the things I love about Linux, and another aspect of the freedom of choice it offers. I've learned a couple of things, however: always back stuff up. Have a separate /home partition. And avoid using XFS on the root partitions for both distros.

Maybe your problem is related to that. I think it was some journaling or fsck feature that didn't like the drives being written to when it wasn't awake and keeping track. So when it booted it had to have a snit and then catch up. Could be what is making Ubunutu choke during boot. Of course, you'd think that one episode of choking would fix it.

If I were you I'd go with two / partitions, a home partition and swap. And, y'know, save your pennies to replace that 30 gig drive with something a little bigger (and put the 30 gig in a 2.5 inch external case for backups). I'm sure I'm preaching to the choir, but hey, what is the comment section for?

fstephens Author Profile Page said:

There is always risk in adding complexity, but I used to have up to 6 OS's on one machine. I don't recall too many problems, except Mandrake overwriting the MBR. That was easily fixed by writing back the saved MBR that LILO had made, with dd. I don't know if GRUB has such a capability (I don't think so), but you can easily back it up this way:

dd if=/dev/hda of=mbr.bak bs=512 count=1
(mbr.bak is just an arbitrary name for the file)
Restore it with:
dd if=mbr.bak of=/dev/hda bs=512 count=1

Or if you want to restore the MBR, but not the partition table (last 64 bytes, including volume descriptor), use bs=446 instead of 512.
dd is dangerous though, so TRIPLE check your commands!

I used to use dd to save the boot record from a Linux partition to a file and edit Win2K's boot.ini to have ntloader boot LILO, which in turn booted Linux. Much easier now with GRUB.

I currently have Win2K (just to run an Access database), Kubuntu, Suse and Gentoo installed on my main machine with no problems. It can work fine as long as you are very aware of the partition layout and watch that the OS's installer uses the one you expect it to.

@Joseph

I agree with you. I'd like to say I'm not going to dual- or triple-boot anymore, and I've had a lot of success with one of my machines on which OpenBSD is the main OS, with a small Linux partition for Puppy, DSL and whatever other live CDs I want to use.

I tried to have a single /home partition with two / partitions before, and that was a bit of a disaster. The two distros kept competing to see which one's user configuration files would dominate.

I still have problems with GRUB, when an update to one distro doesn't rewrite the menu.lst for another, so I'm starting to go to chainloading into the "secondary" distros and installing separate bootloaders in each additional OS's / partition.

One thing you mention that I certainly will do is create a separate /home partition for each distro. That way it's easier to reinstall over a hosed / partition and keep the user files intact.

And yes, I do need a bigger drive, or a few. I do prefer to swap drives than have these complicated multi-boot systems set up. I'd love to find a few $10 drives, but most new ones start at $50, and for laptops, used drives aren't all that cheap.

@fstephens

My problems stemmed from NOT having an extended partition set up with a bunch of secondary partitions within that.

The reason I did that is because BSDs will not boot from a secondary partition. That's one area in which Linux has it over the BSDs big time.

I don't think my partition table is screwed up. I deleted the offending partition, and Debian boots fine. The Ubuntu problem could be related, or coincidental.

I've had quite a few Ubuntu installs "go bad" on me for one reason or another. The deeper I look into how Ubuntu configures hardware, I see huge differences in the way Ubuntu runs when compared with Debian and most other distros. There's less for the user to do to set things up, but it's harder to figure out what's going on when things go wrong.

Like I said in my previous comment, separate /home partitions are critical, as are backups.

I'm just now exploring the use of rsync for backups; I'll get the hang of it soon, I hope. Thanks go to Carla Schroder's "Linux Cookbook," my No. 1 reference for all mucking around in Linux.

And I've overwritten the MBR a dozen times. I usually use Knoppix (with a tip from the great "Knoppix Hacks" books) to restore it.

fstephens Author Profile Page said:

Steven,
I tend to try and keep the number of partitions minimal, so I have never used a separate /home partition on a multi-boot machine. I know that is the recommended procedure, and I am doing that on my old Thinkpad with Xubuntu. One reason is that the partition table is much more complicated with extended partitions. I found that out when I had to write mine manually a few times in a hex editor when trying to get OS/2 to install in a logical partition.It even worked about half the time. :-) Long story. As a result, I like to use all primary partitions if possible.

I agree with you about the simplicity of Ubuntu (and lots of other distro's/utilities) making things harder to fix if something goes wrong. I am always telling people "simplicity for the user equals complexity for the programmer". Still, I have never had an *ubuntu install "go bad", at least not where I couldn't fix it. I did have a Debian install go south that I gave up on. Maybe it was just me, as I was on a month long sailing trip and distracted by sun and sea.

But I would be very interested to hear the details of the differences you have found in configuration/initialization between Ubuntu and Debian etc.

I too like "Linux Cookbook". Also, my copy of "Running Linux" is heavily highlighted and bookmarked.I have a dozen or so Linux reference books, but I find I can usually get the info quicker online than looking it up in a book.

Good article on Debian's 15th BTW. I may install it on my main system again.

@fstephens

It seems that Debian likes to autoconfigure during the installation and then write that configuration to the appropriate text files.

In Ubuntu, autoconfiguration is done during boot time, and that tends to happen with each boot, with less written to configuration files.

Ubuntu automounts additional partitions/drives automatically, Debian less so. Usually in
Debian, unless you specify during the install, additional partitions will not be mounted. You have to create directories and mount them manually (or create directories and put your drive information in /etc/fstab).

I'm happy enough to write my drives to /etc/fstab, since I've been doing this awhile, but it is convenient to have the system autodetect whatever it is you have plugged in. That's how Macs and Windows PCs do it, and I imagine that's why Ubuntu does it.

On two different machines in Ubuntu, I've had radically different /etc/X11/xorg.conf files. On an "older" machine, it had a lot more detail than it does on this Gateway Solo 1450, in which xorg.conf has very little configuration written to it at all.

As with almost all Linux distributions, things can look very different on different hardware, and that makes it a) hard to generalize, and b) easy for a user to think one distro is better than another because it runs better on his or her specific hardware. I'm as guilty of that as anybody. I have a limited number of computers on which to experiment with this stuff, and that tends to shape my view in a significant way.

Leave a comment

Tech Talk column

Steven Rosenberg's weekly Tech Talk column, which appears Saturdays in the Los Angeles Daily News, is now available on the Daily News Technology page.

About this blog

New ways to sign in to comment: I just added the ability for prospective commenters on this blog to sign in using their AOL, Yahoo! and Wordpress.com accounts (for the past 200 posts anyway ... more than that will take an extensive, middle-of-the-night rebuild). That's in addition to the other sign-in choices, which include starting a Movable Type account on this blog, Typekey, OpenID, Live Journal and Vox. If you have trouble getting your Movable Type account verified, or any of the other sign-in options are not working properly, please e-mail me. With these added ways of signing in, there's more reason than ever for you to make a comment (or several!).




Steven Rosenberg aims to learn what he does not know. He writes about it here.



About this Entry

This page contains a single entry by Steven Rosenberg published on August 14, 2008 12:00 PM.

One thing that preload helps run quickly: OpenOffice was the previous entry in this blog.

Bad chip makes iPhone 3G slow; Apple trying software fix ... and iPhone coming to Best Buy is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

Steven Rosenberg on My latest warning against dual- and triple-booting Linux and BSDs: @fstephens It seems that Debian likes to autoconfigure during the ins ...

fstephens on My latest warning against dual- and triple-booting Linux and BSDs: Steven, I tend to try and keep the number of partitions minimal, so I ...

Steven Rosenberg on My latest warning against dual- and triple-booting Linux and BSDs: @fstephens My problems stemmed from NOT having an extended partition ...

Steven Rosenberg on My latest warning against dual- and triple-booting Linux and BSDs: @Joseph I agree with you. I'd like to say I'm not going to dual- or t ...

fstephens on My latest warning against dual- and triple-booting Linux and BSDs: There is always risk in adding complexity, but I used to have up to 6 ...

Joseph Ferrare on My latest warning against dual- and triple-booting Linux and BSDs: Oh, don't be such a killjoy. I dual boot two distros on my desktop an ...

Steven Rosenberg on My latest warning against dual- and triple-booting Linux and BSDs: Thanks for the information on the four-partition limit, that it's part ...

ComputerBob on My latest warning against dual- and triple-booting Linux and BSDs: I had the same basic problems and came to the same conclusion in July, ...

Ignacio on My latest warning against dual- and triple-booting Linux and BSDs: And in Linux, — again, as far as I know — you can only have four prima ...

Powered by Movable Type 4.25

LXer

Links

Daily News technology
LXer
Distrowatch
Linus' Blog
David Pogue
BoingBoing
Linux Today
TuxRadar
Linux.com
Linux Planet
The Open Road
Linux Outlaws podcast
Dan Lynch
Fabian Scherschel
The VAR Guy
Larry the Free Software Guy
Chess Griffin
Linux Reality podcast
Desktop Linux
Practical Technology
Linux Devices
ZDNet
ZDNet U.K.
iTWire
CNet News
TechCrunch
The Register
Ars Technica
Reg Developer
Computerworld
Computerworld blogs
Steven J. Vaughan-Nichols at Computerworld
Debian
Planet Debian
Debian Forums
Debian News
debianHELP
debiantutorials.org
The Debian User
Wolfgang Lonien
Debian-News.net
Debian Administration
Debian Admin
Debian Weather
Ubuntu
Xubuntu
Kubuntu
Edubuntu
Gobuntu
Planet Ubuntu
Ubuntu Forums
Ubuntu Geek
Works With U
Dustin Kirkland
Ubuntu UK Podcast
Popey
gNewSense
CrunchBang Linux
OpenBSD
OpenBSD Journal
OpenBSD Ports
OpenBSD 101
Planet.OpenBSD.nu
jggimi's OpenBSD live CD
DaemonForums
BSDanywhere
Marc Balmer
Denny's OpenBSD blog
Polarwave's OpenBSD Tips and Tricks
Binary Updates for OpenBSD
Puppy Linux
Damn Small Linux
Tiny Core Linux
PCLinuxOS
Mandriva
Red Hat
Red Hat News
Red Hat Blogs
Red Hat: Truth Happens
Red Hat Magazine
CentOS
Planet CentOS
Fedora
Slackware
Slackbuilds
Robby's Slackware Packages
Slackblogs
dropline GNOME for Slackware
GNOME Slackbuild
GWARE - GNOME for Slackware
Wolvix
Zenwalk Linux
Vector Linux
Slax
Splack Linux — Slackware for Sparc
Nonux
How to Forge
marc.info BSD and Linux mailing list archive
FreeBSD
FreeBSD, the Unknown Giant
A Year in the Life of a BSD Guru
NetBSD
PC-BSD
DesktopBSD
DragonFlyBSD
DragonFlyBSD Digest
DesktopBSD
BSD Talk podcast
OpenSolaris
MilaX
BeleniX
DeLi Linux
Linux Loop
Electronista
Engadget
Gizmodo

Advertisement

Other blogs

Johnson Update in Inside USC with Scott Wolf
Has Bynum outgrown Kareem? in Inside the Lakers
Can the Angels just get to the end of this thing without an injury? in Farther Off the Wall
Neuheisel On: in Inside UCLA with Jon Gold
U.S. Roster for Final Two WCQ Announced in 100 Percent Soccer