busybox initramfs loop mount
Solution 1
In order to solve this problem, I had to be more verbose about my mounting command. I ended up using:
modprobe loop
mount -t iso9660 -o loop /bootpart/rootfs.raw /root
This worked properly.
Solution 2
According to mount(2):
EINVAL source had an invalid superblock. Or, a remount was attempted, but source was not already mounted on target. Or, a move was attempted, but source was not a mount point, or was '/'.
Of which the first failure seems the most likely and is easy enough to check with
fsck /rootfs.raw
Does the machine you are trying to mount upon have the loop driver built in or loaded? Try
grep loop /proc/devices
If not, is loop a loadable module? Try
# modload loop
Are there loop-device block i-nodes in place? What does
ls -l /dev/loop*
show? Does the major number correspond to the driver number in /proc/devices
?
Related videos on Youtube
Javier Torron Diaz
Updated on September 18, 2022Comments
-
Javier Torron Diaz almost 2 years
I'm trying to loop mount my root filesystem (a loop file) within a busybox initramfs.
I try to run the command:
mount /rootfs.raw /root
... which works on my Ubuntu laptop, however, I simply get
mount: mounting /dev/loop0 on /root failed: Invalid argument
No matter what combination of options I use, (including loading to /loop0 manually and trying to mount it), the system will not mount the loop device.
Why can't I mount it?
-
msw almost 11 yearsHave you tried
-o loop
?
-
-
Javier Torron Diaz almost 11 yearsSee my answer please