[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Busbox missing fdisk and fsck: How to add?

On Tue, May 22, 2018 at 8:42 PM, Gilles wrote:

> On an ARM appliance, as a way to run fsck on a USB keydrive that holds /boot
> and /, I was thinking of running a small Linux image from RAM after
> downloading it through TFTP.

Another option would be to use debirf to build an initramfs-based live
system that looks like your normal system (minus logs/data/config),
runs entirely from RAM and contains fsck and any other tools needed
for rescuing the system. I'm not sure if it can do cross-arch builds
but failing that you could build it on the ARM system you have.


> Problem is, the Busybox it contains is missing fdisk and fsck:

It should be feasible to download the source package, tweak the build
config, rebuild the binary packages, extract the relevant binaries and
include them in your small Linux image.

apt build-dep busybox
apt source busybox
cd busybox-*/
$EDITOR <busybox-build-configs>
cd ..
dpkg-deb -x busybox-static*.deb busybox-static
cp busybox-static/bin/busybox /srv/tftp/

> Is there a way to download a compatible fsck binary from somewhere?

You would have to either build it or get someone else to do that for you.

You could use the one from the normal fsck packages instead of busybox.

I don't know how big the busybox fdisk/fsck support is, but it might
be worth reporting a bug on busybox asking for them to be enabled.
Alternatively, a bug report asking for a busybox-static-full package
containing support for every busybox applet might be a good idea.



Reply to: