View previous topic :: View next topic |
Author |
Message |
bob doe Apprentice
Joined: 11 Jun 2007 Posts: 207
|
Posted: Sat Jan 16, 2010 4:54 pm Post subject: [SOLVED]mount: cannot setup loop device: no such file or dir |
|
|
Hey guys. This issue has been bugging me for months and is critical. The latest version of my LiveCD cannot boot due to this issue.
When the LiveCD boots, it runs an initramfs which runs it's own init. Part of this is to mount the actual LiveCD image file which is SquashFS.
The command run is
Code: | mount -t squashfs -o loop /cdrom/files/source.img /new |
Previously this has always worked. I do have a proper loop block device at /dev/loop0:
Code: | brw-rw---- 1 0 0 7, 0 Dec 21 13:18 /dev/loop0 |
And the proper modules built in to the kernel:
Code: | CONFIG_SQUASHFS=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_CRYPTOLOOP=m |
Nothing has changed between this version and previous versions in those terms. What has changed is my Portage tree. The kernel was updated but even going back to the previous kernel and config didnt solve anything (configs updated using 'make oldconfig') Various package updates have also changed and I believe a change from device-mapper to udev. Though Im not sure how that would be related.
At present, when I try to run my mount command I get this:
Code: | mount -t squashfs -o loop /cdrom/files/source.img /new
mount: cannot setup loop device: no such file or directory |
Please help!
Last edited by bob doe on Sun Jan 17, 2010 4:38 pm; edited 1 time in total |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sat Jan 16, 2010 5:17 pm Post subject: Re: mount: cannot setup loop device: no such file or directo |
|
|
bob doe wrote: | At present, when I try to run my mount command I get this:
Code: | mount -t squashfs -o loop /cdrom/files/source.img /new
mount: cannot setup loop device: no such file or directory |
| This may sound stupid, but sometimes it's the stupid things that drive us the most crazy.
Are you sure that the file /cdrom/files/source.img and the directory /new exist on your machine? It seems like the command is failing because of a missing file/directory. |
|
Back to top |
|
|
bob doe Apprentice
Joined: 11 Jun 2007 Posts: 207
|
Posted: Sat Jan 16, 2010 5:30 pm Post subject: |
|
|
Unfortunately, thats not it. Both /cdrom/files/source.img and /new exist. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sat Jan 16, 2010 7:54 pm Post subject: |
|
|
bob doe wrote: | Unfortunately, thats not it. Both /cdrom/files/source.img and /new exist. | Do you have any loop devices under /dev?
|
|
Back to top |
|
|
bob doe Apprentice
Joined: 11 Jun 2007 Posts: 207
|
Posted: Sat Jan 16, 2010 9:06 pm Post subject: |
|
|
Yes. As per the code block in my initial post. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23064
|
Posted: Sat Jan 16, 2010 9:54 pm Post subject: |
|
|
What is the output of strace on that mount attempt? |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sat Jan 16, 2010 10:06 pm Post subject: |
|
|
bob doe wrote: | Yes. As per the code block in my initial post. | Whoops!
Perhaps this is a permissions problem. Can you post this:
Code: |
ls -l /cdrom/files/source.img
ls- l /new
|
|
|
Back to top |
|
|
bob doe Apprentice
Joined: 11 Jun 2007 Posts: 207
|
Posted: Sat Jan 16, 2010 11:15 pm Post subject: |
|
|
Here are the outputs of ls -l:
Code: | -rwx------ 1 0 0 376242176 Jan 3 13:26 /cdrom/files/source.img
drwxr-xr-x 2 0 0 0 Jan 16 18:10 new |
I cant run an strace, I didnt include it in the initramfs, though I will try this later. |
|
Back to top |
|
|
bob doe Apprentice
Joined: 11 Jun 2007 Posts: 207
|
Posted: Sun Jan 17, 2010 3:22 pm Post subject: |
|
|
I think I've solved the issue. Although I have the loop block device as /dev/loop0, I tried adding a directory /dev/loop and within it a symlink /dev/loop/0 pointing to /dev/loop0 and that seemed to have worked. Im remaking the ISO and will test it out.
Finally!!!!
[Edit] That solved the issue. Now Im back to my original issue as per here: https://forums.gentoo.org/viewtopic-t-808162-highlight-.html Any help still greatly appreciated |
|
Back to top |
|
|
|