June 10, 2007

Back on Fedora

Posted in Life, Linux, Me at 11:45 am by mj

I’m kicking myself for not thinking of this earlier–fastboot!. This allows me to boot my old FC6 system, which allows me to be productive and hold off on configuring a new system (I’ve concluded Kubuntu is just broken, too many things didn’t work for me). I don’t get to take advantage of the new 64-bit system, but I can get some work done. Which is more important?

On the off-chance somebody else may find themselves in a similar position someday, searching Google or Technorati for an answer at 4AM, here’s essentially what I did to get up (granted, I took the scenic route). Remember, on the system with the fried motherboard, I have an old IDE primary HDD, but the new system only boots SATA. I also bought my new PowerEdge with 2x160GB SATA drives (“for free” if you believe Dell’s special offers). This means:

  • Disk A. Old primary IDE HDD, with working system and no dependencies on secondary drives.
  • Disk B. New primary SATA HDD.
  • Disk C. New secondary SATA HDD.

If I only had a single new primary SATA HDD, I probably would have bought a cheap IDE-to-SATA adapter from Fry’s to see if the new system would boot it that way. But I try to avoid Fry’s if I can, especially the one in Milpitas.

Step 1. Install new Linux distro on Disk B. Doesn’t really matter which distro at this point, since you’re not going to use it.

Step 2. Copy an image of Disk A onto Disk C. Be sure to connect disk A before booting. In my case, it meant disconnecting the CD-ROM and sitting the old drive on top of the case. Your command might look like this:

$ dd if=/dev/sda of=/dev/sdc

This will, undoubtedly, take a while (I got 18.1MB/s for 80GB data–for a total of 74 minutes). It doesn’t matter if disk A is smaller than disk C.

As above, an IDE-to-SATA adapter might have worked. But this way, whatever happens to your data as you’re messing with it (including the remote possibility of a poorly-wired new system that fries all your components), you’re just working off a copy.

Step 3. Reboot. This is the only way I know to get Linux to refresh its view of the volumes on disk C. There may be other ways.

Step 4. fsck your new volumes manually. Just to make sure they’re OK.

$ e2fsck -f -c /dev/sdc1
$ e2fsck -f -c /dev/sdc2

Step 5. Disable init-time fsck. I think the problem with e2fsck failing during init has something to do with moving from IDE to SATA, with the device view switcheroo that entails. Never really figured it out.

$ sudo mkdir /mnt/sdc2
$ sudo mount /dev/sdc2 /mnt/sdc2
$ sudo mv /mnt/sdc2/.autofsck /mnt/sdc2/NO.autofsck
$ sudo touch /mnt/sdc2/fastboot

Step 6. Disable disk B and boot into disk C. In your BIOS, turn off SATA controller 0, or else it’ll never boot disk C.

You should now see the GRUB (or LILO) boot menu from your old system. I tried passing various kernel boot parameters to the system (GRUB allows you to edit the command before booting), but no hint I provided the kernel about the root device or root filesystem prevented the e2fsck failure. Hence, the need for fastboot.

Your experience and results may vary. I’m just excited to be able to get some work done.


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: