· But initramfs is rootfs: you can neither pivot_root rootfs, nor unmount it. Instead delete everything out of rootfs to free up the space (find -xdev / -exec rm ‘{}’ ‘;’), overmount rootfs with the new root (cd /newmount; mount –move. /; chroot.), attach stdin/stdout/stderr to the new /dev/console, and exec the new init. # Mount the root filesystem. mount -o ro /dev/sda1 /mnt/root # Clean up. umount /proc umount /sys # Boot the real thing. exec switch_root /mnt/root /sbin/init This example needs some device nodes to work, mainly the root block device. · Without manually adding new packages, the base, But I can’t mount initramfs, because I need the OS-release file in /sysroot. I also can’t mount the directories inside initramfs, because it’s an image file. Then you wouldn’t need an initrd (or initramfs) at all. Just something like root=PARTLABEL=USB passed to the kernel.
The squashfs image is on file system /dev/mmcblk0p1, so I mount this prior to mounting the Image. Unfortunately I'm stuck at mounting the SquashFS Image file. I tried mounting through. mount -o loop but I always get. mounting /dev/loop0 on /mnt/root failed: No such device So I tried to mount it through loop manually. /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck exited with status code 4. The root filesystem on /dev/sda1 requires a manual fsck. BusyBox v (Ubuntu ubuntu) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs). The kernel has currently 3 ways to mount the root filesystem: all required device and filesystem drivers compiled into the kernel, no initrd. init/main.c:init() will call prepare_namespace() to mount the final root filesystem, based on the root= option and optional init= to run some other init binary than listed at the end of init/main.c:init().
dracut - low-level tool for generating an initramfs/initrd image RAID) which are needed to access the root filesystem, mounting the root. If the initrd/initramfs file was not created in /boot, please rebuild by manually, for more see: How to rebuild the initial ramdisk image. hace 7 días Nowadays, the root file system may be on a wide range of hardware, mkinitcpio --generate /boot/www.doorway.ru --kernel.
0コメント