A near-death experience

Decades ago when I was working under an “apprenticeship,” my mentor had a few words of advice. “Always have a Plan C,” she said. “Don’t you mean Plan B?” I asked. “No,” she said, “Plan C.”

At the time I took those words for the eccentric ravings of a jaded old woman, but many times thereafter I realized she was right. Friday was one of those times.

For the past few months I’ve had a small problem with partition sizes on my central machine — the one I rely on to be rock-steady. Originally when I built it, I allocated only 2Gb to the root partition, and ordinarily that would be enough considering the /boot and /home folders are separated out to other partitions. I have no real rationale for those things; I started doing that a long time ago and have stayed with it even up until now. (Actually, I do have a few rationales.)

However, what I have noticed with Crux is that jumping between kernels can take up to 1Gb of space, considering all the compiling and so forth. Maybe that’s not the case for everyone, but if I check the size of a decompressed tarball in /usr/src, after the kernel is built, the folder can occupy up to a whopping 600Mb. Don’t ask me where it comes from. I’m just an unwitting participant.

I have no complaint with that, and I certainly have no truck with the people who design those things. Six hundred megabytes or six, it makes no difference to me … except that if I jump from, for example, to, I suddenly have more than a gigabyte in space taken up by system files.

So I was willing to try repartitioning those areas via the GPartEd Live CD; after all, I have more than 50Gb available on the drive, if you count all the unused space dedicated to /home. A long time ago the live version of GPartEd came in quite handy for me, and I used to keep a spare one around just for emergencies. I downloaded the most recent stable version, just for this occasion.

To make an already long story short, something went wrong while the resizing and shuffling were underway, the screen went black and the system hung with no response. It ran like that for more than an hour and a half (I was afraid to cut the power while the drive light was still flickering), but when it looked like it was done I disconnected the AC and tried it out.

And as you might expect, everything was scrambled. I don’t know what happened when GPartEd hiccuped, but the system halfway booted, then lost track of itself and exploded in a digital fireball of error messages.

No problem. I have a Plan B. I am a faithful Clonezilla fan, and I was comfortable copying a spare image back across USB1.1 (ouch).

Except that Plan B fell through when the last partition it had cloned — the /home partition — had somehow been invalidated, and couldn’t be restored. I crossed my fingers that maybe it was just a fluke error, but when I rebooted my account was dropped at /, and all the configuration files were missing.

I ran e2fsck against the “empty” home partition and came up with an endless stream of errors in sequence, so I reformatted that partition, made a new /home/kmandla folder … and went to Plan C.

Because I keep a plain-jane sync of my home directory on an external drive, just for backup purposes. Because I like to move the same configurations between machines. And because I always have a Plan C. šŸ˜‰

In all, the catastrophe was averted, nothing needed recompiled or rebuilt, and in actuality, that folder had been synchronized at a more recent date than the Clonezilla backup, so the files would have needed refreshed anyway. Of course, the original problem — tight space in the root partition — still stands, and because I am a glutton for punishment I tried the same repartitioning stunt again and got the same screwball behavior in GPartEd, but nothing was lost in the attempt(s).

I don’t mind a freak accident or two, just so long as no one gets hurt. :mrgreen:

9 thoughts on “A near-death experience

  1. Pingback: Convert audio files recursively « Motho ke motho ka botho

  2. x33a

    Maybe try the old gparted disc. Sometimes the latest version (of anything) doesn’t work out for us.

    1. K.Mandla Post author

      I might try that, or try a different partitioning utility. There are some others I would like to look into. … Right now it’s an issue of finding enough time to set it up and let it run. My weekdays are a little busy. šŸ˜‰

  3. hb

    Here’s an idea that might perhaps qualify as some kind of “Plan A-1.1”, avoiding gparted alltogether: First, move /usr/src to an external drive or a bigger partition (in your case possibly even a subdirectory of /home). Then, simply do “ln -s /new_location/usr/src /usr/src”. šŸ™‚

    I am running Crux on my OLPC XO-1 (size of internal flashdrive: 1Gb), and to put everything that’s space consuming and only needed for system maintenance (in this case: the build directories, the ports tree, the download directory, /usr/src and /var/cache/.ccache) on a separate drive has worked flawlessly up to now.


    1. K.Mandla Post author

      I have done that in the past actually, and I’ve also hooked an entire partition into /usr/src, and compiled on a completely different drive.

      In this case I am suffering from my own obsessive-compulsive tendencies, knowing that there’s a slight misarrangement that irritates me a litte. … Like a grain of sand in my mouth.

      How is your OLPC, by the way? I had one a year or two ago, and enjoyed tinkering with it. I always ran my Crux installation off the USB drive, rather than the internal flash card. …

      1. hb

        Funny you should ask about my XO-1… šŸ™‚ I actually spent (or should that read “wasted”?) the better part of the christmas holidays on an attempt to re-create its CRUX setup with other lightweight and source based distributions. “Lightweight”, of course, meant that Gentoo was out, so I decided to split my efforts evenly between T2 Linux and SourceMage Linux as my remaining candidates, ultimately getting nowhere with both. Now it’ll be either a return to CRUX (perhaps for a commandline-only system this time?), or something along the lines of “simply slap Debian onto it, connect it to an external harddisk and try to set up a poor man’s version of Apple’s Time Capsule”.

        Seeing that the XO-1 is such a great conversation starter at airport lounges, I’ll most probably go for the CRUX option and and continue to employ the machine as my travel netbook for a while longer – I can always relegate it to home network status at a later point…


  4. Pingback: What was I thinking? « Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s