Broken /etc/rc.local

Paul Fox pgf at laptop.org
Fri Jul 23 17:20:42 EDT 2010


hal wrote:
 > 
 > I botched an edit to /etc/rc.local and now my system hangs during boot.
 > 
 > Is there a way to edit a file from firmware?  Or delete a file?

OFW understands how to read and write ext2 filesystems, so the
built-in (micro-)emacs can edit files on /boot.  (this is why
/boot is an ext2 fs -- so OFW can fix errors in the boot partition.)
but the root fs is ext3, and i don't think OFW will touch it, at
least not for writing.

i keep a separately bootable image around for such occasions -- either
a USB or external SD card loaded with an OS i can boot, and use to
rescue the primary installation.

easiest way to create is to take a spare SD card, and use fs-update:

    ok devalias fsdisk ext:
    ok fs-update u:os126.zd

then boot the external card, and it will automount the internal card.

(i've also used mavrothal's TinyCore images to rescue my laptop -- they
boot much faster, so if you're breaking the system a lot, can be handy.)

paul
=---------------------
 paul fox, pgf at laptop.org



More information about the Devel mailing list