3

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?

1
  • 3
    Have you tried -o loop?
    – msw
    Aug 21, 2013 at 2:28

2 Answers 2

2

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.

1

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?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .