I would like to chroot to another rootfs and unmount the former one so, after mounting a SD card containing a rootfs (on /mnt/disk/
) and killing almost every process, I tried to run:
umount /tmp
mount --move /proc /mnt/disk/proc
mount --move /sys /mnt/disk/sys
and then, mount --move /dev /mnt/disk/dev
which fails with the error message:
mount: mounting /dev/ on /mnt/disk/dev failed: No such file or directory
Some more information:
I also tried
umount /dev
givingumount: can't umount /dev/: Invalid argument
# (same error with /dev/root)The former rootfs is on a NAND partition (JFFS2)
/proc/cmdline
contains:root=/dev/mtdblock3
mount -t jffs2 /dev/mtdblock3 /mnt/disk/dev
works (mounts the former root) Could it be related to a filesystem conflict between the SD card and the root partition ?cat /mnt/disk/proc/mounts
rootfs / rootfs rw 0 0
/dev/root / jffs2 rw 0 0
/proc /mnt/disk/proc proc rw 0 0
/sys /mnt/disk/sys sysfs rw 0 0
/dev/mmcblk0p0 /mnt/disk ext2 rw,errors=continue 0 0Kernel: 2.6.29.4
- busybox: 1.16.1