Problem in losetup call by live-initramfs
Hello,
I'm using a backported live-initramfs 1.136.3 on a Etch system with
2.6.24etchnhalf linux image. I'm experiencing an error in
network booting a live system, because losetup fails, about
'-r' (read-only) option :
more live.log
...
+ /sbin/losetup --help
+ grep -q -- -r\b
+ get_backing_device /live/image/live/filesystem.squashfs -r
+ setup_loop /live/image/live/filesystem.squashfs loop /sys/block/loop* 0 -r
+ local fspath=/live/image/live/filesystem.squashfs
+ local module=loop
+ local pattern=/sys/block/loop*
+ local offset=0
+ local encryption=
+ local readonly=-r
...
+ losetup -r /dev/loop0 /live/image/live/filesystem.squashfs
losetup: invalid option -- r
BusyBox v1.1.3 (Debian 1:1.1.3-4) multi-call binary
Usage: losetup [-od] LOOPDEVICE [FILE]
Associate LOOPDEVICE with FILE, or display current association.
Options:
-d Disassociate LOOPDEVICE
-o OFFSET Start OFFSET bytes into FILE
The problem arises because there is 2 losetup commands available, one
in /sbin/losetup (understanding -r option) and one in busybox (don't
understanding -r yet) :
(initramfs) losetup --help
BusyBox v1.1.3 (Debian 1:1.1.3-4) multi-call binary
Usage: losetup [-od] LOOPDEVICE [FILE]
Associate LOOPDEVICE with FILE, or display current association.
Options:
-d Disassociate LOOPDEVICE
-o OFFSET Start OFFSET bytes into FILE
(initramfs) /sbin/losetup --help
/sbin/losetup: invalid option -- -
usage:
/sbin/losetup [options] loop_device file # setup
/sbin/losetup -F [options] loop_device [file] # setup, read /etc/fstab
/sbin/losetup loop_device # give info
/sbin/losetup -a # give info of all loops
/sbin/losetup -d loop_device # delete
/sbin/losetup -R loop_device # resize
options: -e encryption -o offset -s sizelimit -p passwdfd -T -S pseed
-H phash -I loinit -K gpgkey -G gpghome -C itercountk -v -r
You could either patch the live script in live-initramfs to always
use the same command (perhaps using a variable) or remove /sbin/losetup
command if busybox' one is sufficiant ?
Fred.
Reply to: