Yellow Dog Solutions

TOPIC: How To Use the Rescue Disk When You Mess Up a System File.



Introduction
I'm running YDL 2.0 with two kernels, the 2.2.19 from YDL 2.0, and a 2.4.18 version from Ben Herrenschmitt's website (I'm hoping to get my USB CD-RW working).

Somehow, i managed to clobber Something in my startup sequence. Neither kernel would boot, and eventually I spotted the error message that my
/etc/rc.d/rc.sysinit (file) wouldn't execute.

The Problem
The problem as I saw it was that the "rescue" kernel didn't have access to my root files on /dev/hda11, and every other kernel including the ons on CD-ROM just crashed,

"could not execute"
/etc/rc.d/rc.sysinit
So, how do you get to your HD files with the rescue kernel?


The Answer:
Put the "tasty Morsels" CD-ROM in the drive (by the way, mine's an iMac DV SE) and reboot. When the choice is offered, press c for cd-rom. Then press return for the default kernel, i.e. "rescue".

The trick is that rescue has a completely empty directory called /root. I mounted my Linux root on it:
mount /dev/hda11 /root -t ext2
(to cut a long story short, not counting the attempts to edit the file with vi, let alone emacs)
I had somehow made the file "not executable", so, all I needed to do was issue the command
chmod 755 /root/etc/rc.d/rc.sysinit
# the code 7 at the start says "execute, write, read" if you are the owner (root)

In General
The technique of mounting your hard disk Linux root partition under the "rescue" system from CD-ROM as /root, will give you access to the files, but all the names will be prefixed with /root, and so things like modprobe will need extra information, because stuff won't be where they expect. Also, forget about KDE and all the other neat graphical stuff, this is a stripped-down Linux. Nevertheless, it got me out of a situation where I thought I'd have to backup (How?), erase, and reinstall.


Backup? How?
Actually, I did manage to copy some directories I was anxious about. E.g.
mount /dev/hda11 /root -t ext2
# mount the Linux root

mount /dev/hda9 /root/mnt/macos -t hfs
# mount Macintosh HD where /mnt/macos usually is

cp -R /root/home/Albert/mostprecious /root/mnt/macos
# copy my home folder's most precious stuff to a folder on Macintosh HD

Caution
You probably won't need this stuff unless, like me, you're pushing the limits of what you know about Linux. That being the case, you *might* get yourself in still worse trouble. Proceed VERY CAREFULLY, and perhaps you should draw a diagram first. But you won't need the rescue disk unless you're already in trouble, so good luck!

This HOWTO was written by Albert Rogers



 
          Copyright ® 1999-2010. Fixstars Corporation. All rights reserved.
YDL.net Fixstars Corporation