Welcome! Log In Create A New Profile


recovering a dirty ubifs partition with a "cleanup kernel"

Posted by ecc 
recovering a dirty ubifs partition with a "cleanup kernel"
September 22, 2010 09:28PM
I like having my kernel and initrd in /boot on a single ubifs partition, rather than in a dedicated uImage partition. But since u-boot doesn't handle ubifs recovery, the system won't boot if it was powered off when the filesystem was dirty.

Jeff's recovery partition can certainly handle this situation (and many others), but I found a very lightweight workaround -- just for this specific situation -- that might be useful if you want to maximize how much NAND is available for the rootfs.

I compiled a separate linux kernel with almost every option disabled except for MTD support, ubifs support, and the serial port driver. When the regular system fails to boot, I can boot this "cleanup kernel" with the additional parameter init=/usr/lib/klibc/bin/reboot. So it just mounts the ubifs root, does the recovery, and then reboots. The kernel is less than 512k. You can put it on a (small!) dedicated NAND partition, or on a TFTP server if you have one that you can count on always being up.
Re: recovering a dirty ubifs partition with a "cleanup kernel"
September 27, 2010 08:08PM
Hi ecc,
can you go through this thread and offer your valuable comment?

Edited 2 time(s). Last edit at 09/27/2010 08:14PM by archat68.

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.