[PATCH] mkinitrd rescue mode

Jeff Layton jlayton at redhat.com
Sat Jun 4 12:50:44 UTC 2005


On Thu, 2005-06-02 at 17:04 -0400, Bill Rugolsky Jr. wrote:
>  
> One is expected to delete files before doing the switchroot.  Unlike a ramdisk,
> the ramfs pages are immediately reclaimed.

Ok, I've whipped up a new patch. This adds a simple "unlink" function to
nash. The mkinitrd script now does an "rm /bin/fsck*" (using busybox's
rm), and then a "unlink /bin/busybox" after the rescue mode and prior to
the switchroot. That should free up any significant extra memory we
consume by adding these tools to the initramfs.

The new patch is attached to the BZ ticket:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159287

I've done some looking around at whether there is some way to get at the
initramfs after switchrooting (or whether there is some mechanism to
cause the kernel to just free it), but haven't found any way to do this
yet.

The early-userspace docs seem to state that you can only have a single
cpio archive, but that multiple 'images' are allowed. I'm not clear at
this point on what these images are and how they're stored, however.

-- Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkinitrd-rescue.patch
Type: text/x-patch
Size: 3966 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20050604/d4c6e9b6/attachment.bin>


More information about the fedora-devel-list mailing list