diff options
| author | Diederik de Haas <didi.debian@cknow.org> | 2022-11-06 23:06:05 +0100 |
|---|---|---|
| committer | Diederik de Haas <didi.debian@cknow.org> | 2022-12-01 18:29:17 +0100 |
| commit | 82dfcf25ff708269c3ff2c4c8f3e094ae6505b39 (patch) | |
| tree | 8ef39509b4190d53832d49617f15fa8db96235f8 | |
| parent | 205dc2171862078d4a8ff4ee44ff807153f6a947 (diff) | |
Explicitly copy 'fsck*' into the initramfs
While fsck.ext4 and fsck.vfat are part of the initramfs, it turns out
that fsck itself isn't!
While it normally gets included in the initramfs, for some reason that
doesn't happen with our image creation, so it isn't available on first
boot, so explicitly copy 'fsck' so that it will be included.
For that to work, 'logsave' is needed too, so include that as well.
During boot up, initramfs wants to check the filesystems and it does so
via `fsck`, which then (presumably) checks the filesystem being used
and calls the appropriate fsck.* to do the actual checking.
But when `fsck` itself isn't available you get the following warning:
"Warning: fsck not present, so skipping root file system"
When it is available, you'll get a message like this:
"Begin: Will now check root file system ... fsck from util-linux 2.38.1"
Let's also follow our own advise and not *assume* the needed fsck
programs are present in initramfs, but add them explicitly.
Now we can start the resize operations while knowing the current
filesystem is in a proper/clean state.
| -rwxr-xr-x | rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs b/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs index 76df689..35e67fc 100755 --- a/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs +++ b/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs @@ -25,12 +25,19 @@ copy_exec /usr/bin/realpath copy_exec /usr/bin/tail copy_exec /usr/bin/test +# from dosfstools +copy_exec /sbin/fsck.vfat + # from e2fsprogs copy_exec /sbin/resize2fs +copy_exec /sbin/fsck.ext4 # from grep copy_exec /bin/grep +# from logsave +copy_exec /sbin/logsave + # from mount copy_exec /bin/mount copy_exec /bin/umount @@ -42,3 +49,4 @@ copy_exec /sbin/partprobe # from util-linux copy_exec /bin/lsblk copy_exec /sbin/blkid +copy_exec /sbin/fsck |
