Broken /etc/rc.local

Ixo X oxI ixo at myna.ws
Sat Jul 24 13:09:01 EDT 2010


An idea . . . one could also just boot with the previous boot image by
holding down the 'O' game pad
( http://wiki.laptop.org/go/Cheat_codes ).

It might be then possible to edit (as root), the previous image found in
/versions , then 'O' game pad again.
It'll take a moment to figure out which image (version code) is currently
active, and which is 'previous'.  But I find the following script handy in
tracking version and build information.

$ more sysinfo
grep -v "\=" /etc/issue /boot/olpc_build
/versions/pristine/*/boot/olpc_build
ls -Ld /versions/* /versions/contents/* /versions/pristine/*
/versions/configs/*
ls -ld /versions/running /versions/boot
$

:)  Just a theory mind you. . . good luck.  -Ixo


On Fri, Jul 23, 2010 at 14:20, Paul Fox <pgf at laptop.org> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20100724/942f31d7/attachment.html>


More information about the Devel mailing list