WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: losetup: loopimage.img: No such file or directory  (Read 8095 times)

Offline halma

  • Full Member
  • ***
  • Posts: 164
losetup: loopimage.img: No such file or directory
« on: July 08, 2014, 01:13:52 PM »
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

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

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

thanks
best regards
« Last Edit: July 08, 2014, 01:20:56 PM by halma »
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: losetup: loopimage.img: No such file or directory
« Reply #1 on: July 08, 2014, 01:28:55 PM »
Use the losetup in util-linux.

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: losetup: loopimage.img: No such file or directory
« Reply #2 on: July 08, 2014, 02:39:20 PM »
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
« Last Edit: July 08, 2014, 02:42:28 PM by halma »
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: losetup: loopimage.img: No such file or directory
« Reply #3 on: July 08, 2014, 02:58:13 PM »
Try adding "loop.max_loop=255" boot code to pre-configure the dev nodes.

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: losetup: loopimage.img: No such file or directory
« Reply #4 on: July 08, 2014, 03:14:57 PM »
i think this one works without changing anyting:

sudo /usr/local/sbin/losetup -o 32256 -f hdc.img
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: losetup: loopimage.img: No such file or directory
« Reply #5 on: July 08, 2014, 03: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.

Offline expresspotato

  • Newbie
  • *
  • Posts: 11
Re: losetup: loopimage.img: No such file or directory
« Reply #6 on: February 28, 2015, 01:04:03 PM »
Try adding "loop.max_loop=255" boot code to pre-configure the dev nodes.

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