Tiny Core Linux

General TC => General TC Talk => Topic started by: halma on July 08, 2014, 10:13:52 AM

Title: losetup: loopimage.img: No such file or directory
Post by: halma on July 08, 2014, 10:13:52 AM
Hi, i hope this is the right section to post

i am using tinycorelinux 5.3 (3.14.5-tinycore64)

i try to mount an loop image file with losetup but it fails with

tc@box: sudo losetup -f hdc.img -o 32256
losetup: hdc.img: No such file or directory

sometimes i dont know why i can mount the loop image without deleting any other loop device but most of times if i try it fails as written above

here is an strace of losetup
maybe someone knows how to fix this issue

http://pastebin.com/MeXcgHwC (http://pastebin.com/MeXcgHwC)

moun.sh
Code: [Select]
#!/bin/sh

FILE=hdc.img
OFS=32256
LODEV=`losetup -f`
losetup -o $OFS $LODEV $FILE

thanks
best regards
Title: Re: losetup: loopimage.img: No such file or directory
Post by: gerald_clark on July 08, 2014, 10:28:55 AM
Use the losetup in util-linux.
Title: Re: losetup: loopimage.img: No such file or directory
Post by: halma on July 08, 2014, 11:39:20 AM
ok i installed with tce the util-linux.tcz extension

after an reboot it tells me now:

tc@box: losetup -f -o 32256 hdc.img
losetup: not found unused device

and as sudo
tc@box: sudo losetup -f -o 32256 hdc.img
losetup: hdc.img: failed to setup loop device: No such file or directory
Title: Re: losetup: loopimage.img: No such file or directory
Post by: gerald_clark on July 08, 2014, 11:58:13 AM
Try adding "loop.max_loop=255" boot code to pre-configure the dev nodes.
Title: Re: losetup: loopimage.img: No such file or directory
Post by: halma on July 08, 2014, 12:14:57 PM
i think this one works without changing anyting:

sudo /usr/local/sbin/losetup -o 32256 -f hdc.img
Title: Re: losetup: loopimage.img: No such file or directory
Post by: gerald_clark on July 08, 2014, 12:22:11 PM
Check your $PATH variable.  /usr/local/sbin should be before /sbin.
If you loaded util-linux after booting, you may need to do a "hash -r" so ash does not pick up a previously run losetup instead of the newer one.
Title: Re: losetup: loopimage.img: No such file or directory
Post by: expresspotato on February 28, 2015, 10:04:03 AM
Try adding "loop.max_loop=255" boot code to pre-configure the dev nodes.

Awesome this worked adding it to uEnv.txt, thanks!