[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: squasfs and fetch parameter



Daniele Primon a écrit :
Is the loop device setup correctly? You should try  losetup to be
sure. Another hint makes me suspicious about is the double slash in
//fai.squashfs
i rerun with a remade sqaushfs and i got the same problem :

+ mkdir -p //fai.squashfs
+ log_begin_msg Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0"
+ [ -x /sbin/usplash_write ]
+ _log_msg Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ...
+ [ n = y ]
+ printf Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ... Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ... + mount -t squashfs -o ro,noatime /dev/loop0 //fai.squashfs
mount: mounting /dev/loop0 on //fai.squashfs failed: No such device
+ panic Can not mount /dev/loop0 (/live/image/live/fai.squashfs) on //fai.squashfs

it seems it come from the code in /usr/share/initramfs-tools/scripts/live ( ligne 1125/1583 ):


                       mkdir -p "${croot}/${imagename}"
log_begin_msg "Mounting \"${image}\" on \"${croot}${imagename}\" via \"${backdev}\"" mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofs$
                       log_end_msg



this is like if ${croot} was "/" and in fact the code set it to / but it seems it should not be that ?


here is some debug i was able to do:
-----------------------------------

(initramfs) losetup
/dev/loop0: 0 /live/image/live/fai.squashfs

(initramfs) ls -la /live/image/live/fai.squashfs
-rw-r--r-- 1 0 0 198922240 Jan 27 11:09 /live/image/live/fai.squashfs


(initramfs) ls -la /dev/loop0
brw-rw----    1 0        0          7,   0 Jan 27 11:07 /dev/loop0


i do not see how ton control why the loop device fails, the loop module is loaded in the kernel it seems ok


here is the log:


+ printf Begin: Trying wget http://10.1.0.251/fai.squashfs -O /live/image/live/fai.squashfs ... Begin: Trying wget http://10.1.0.251/fai.squashfs -O /live/image/live/fai.squashfs ... + basename http://10.1.0.251/fai.squashfs
+ wget http://10.1.0.251/fai.squashfs -O /live/image/live/fai.squashfs
Connecting to 10.1.0.251 (10.1.0.251:80)
fai.squashfs 100% |*******************************| 189M 00:00:00 ETA
+ [ 0 -eq 0 ]
+ rc=0
+ [ squashfs = tgz ]
+ break
+ [ 0 != 0 ]
+ return 0
+ rc=0
+ return 0
+ livefs_root=/live/image
+ [ -z /live/image ]
+ [  ]
+ [  ]
+ [  ]
+ [  ]
+ [ -n  ]
+ get_mac
+ mac=
+ cat /sys/class/net/eth0/iflink
+ status=4
+ [ 4 -eq 2 ]
+ cat /sys/class/net/eth1/iflink
+ status=5
+ [ 5 -eq 2 ]
+ cat /sys/class/net/eth2/iflink
+ status=2
+ [ 2 -eq 2 ]
+ cat /sys/class/net/eth2/address
+ mac=00:15:17:8f:44:3c
+ echo 00:15:17:8f:44:3c
+ sed s/:/-/g
+ tr [a-z] [A-Z]
+ mac=00-15-17-8F-44-3C
+ cat /sys/class/net/eth3/iflink
+ status=3
+ [ 3 -eq 2 ]
+ cat /sys/class/net/lo/iflink
+ status=1
+ [ 1 -eq 2 ]
+ echo 00-15-17-8F-44-3C
+ mac=00-15-17-8F-44-3C
+ echo 00-15-17-8F-44-3C
+ sed s/-//g
+ mac=0015178F443C
+ mount_images_in_directory /live/image /root 0015178F443C
+ directory=/live/image
+ rootmnt=/root
+ mac=0015178F443C
+ match_files_in_dir /live/image/live/*.squashfs
+ local pattern=/live/image/live/*.squashfs
+ echo /live/image/live/fai.squashfs
+ [ /live/image/live/fai.squashfs != /live/image/live/*.squashfs ]
+ return 0
+ [ -n 0015178F443C ]
+ adddirectory=/live/image/live/0015178F443C
+ setup_unionfs /live/image/live /root /live/image/live/0015178F443C
+ image_directory=/live/image/live
+ rootmnt=/root
+ addimage_directory=/live/image/live/0015178F443C
+ modprobe -q -b aufs
+ croot=/
+ rofsstring=
+ rofslist=
+ uname -r
+ cut -c 5-
+ sed s/[^0-9].*//
+ minor_kernel_version=26
+ [  = nfs ]
+ [ aufs = aufs ]
+ roopt=rr
+ [ -e /live/image/live/filesystem.filesystem.module ]
+ [ -e /live/image/live/filesystem.module ]
+ [ -e /live/image/live/fai.squashfs ]
+ image_string= /live/image/live/fai.squashfs
+ [ -e /live/image/live/*.ext2 ]
+ [ -e /live/image/live/*.ext3 ]
+ [ -e /live/image/live/*.xfs ]
+ [ -e /live/image/live/*.jffs2 ]
+ [ -e /live/image/live/*.dir ]
+ [ -n /live/image/live/0015178F443C ]
+ [ -d /live/image/live/0015178F443C ]
+ echo /live/image/live/fai.squashfs
+ sed -e s/ /\n/g
+ sort
+ image_string=/live/image/live/fai.squashfs
+ [ -n  ]
+ mkdir -p /
+ basename /live/image/live/fai.squashfs
+ imagename=fai.squashfs
+ export image devname
+ maybe_break live-realpremount
+ [  = live-realpremount ]
+ log_begin_msg Running /scripts/live-realpremount
+ [ -x /sbin/usplash_write ]
+ _log_msg Begin: Running /scripts/live-realpremount ...
+ [ n = y ]
+ printf Begin: Running /scripts/live-realpremount ...
Begin: Running /scripts/live-realpremount ... + run_scripts /scripts/live-realpremount
+ initdir=/scripts/live-realpremount
+ [ ! -d /scripts/live-realpremount ]
+ return
+ log_end_msg
+ [ -x /sbin/usplash_write ]
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ -d /live/image/live/fai.squashfs ]
+ [ -f /live/image/live/fai.squashfs ]
+ losetup --help
+ grep -q -- -r\b
+ get_backing_device /live/image/live/fai.squashfs
+ setup_loop /live/image/live/fai.squashfs loop /sys/block/loop* 0
+ local fspath=/live/image/live/fai.squashfs
+ local module=loop
+ local pattern=/sys/block/loop*
+ local offset=0
+ local encryption=
+ local readonly=
+ modprobe -q -b loop
+ [ -x /sbin/udevadm ]
+ udevadm settle
+ cat /sys/block/loop0/size
+ [ 0 -eq 0 ]
+ sys2dev /sys/block/loop0
+ sysdev=/block/loop0
+ udevinfo -q name -p /block/loop0
+ echo /dev/loop0
+ dev=/dev/loop0
+ options=
+ [ -n ]
+ losetup --help
+ grep -q -- -r\b
+ [ 0 -lt 0 ]
+ [ -z  ]
+ losetup /dev/loop0 /live/image/live/fai.squashfs
+ echo /dev/loop0
+ return 0
+ echo /dev/loop0
+ backdev=/dev/loop0
+ get_fstype /dev/loop0
+ local FSTYPE
+ local FSSIZE
+ is_luks /dev/loop0
+ devname=/dev/loop0
+ [ -x /sbin/cryptsetup ]
+ return 1
+ fstype /dev/loop0
+ eval FSTYPE=squashfs FSSIZE=198921979
+ FSTYPE=squashfs FSSIZE=198921979
+ [ squashfs != unknown ]
+ echo squashfs
+ return 0
+ fstype=squashfs
+ [ squashfs = unknown ]
+ [ -z squashfs ]
+ mkdir -p //fai.squashfs
+ log_begin_msg Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0"
+ [ -x /sbin/usplash_write ]
+ _log_msg Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ...
+ [ n = y ]
+ printf Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ... Begin: Mounting "/live/image/live/fai.squashfs" on "/fai.squashfs" via "/dev/loop0" ... + mount -t squashfs -o ro,noatime /dev/loop0 //fai.squashfs
mount: mounting /dev/loop0 on //fai.squashfs failed: No such device
+ panic Can not mount /dev/loop0 (/live/image/live/fai.squashfs) on //fai.squashfs
+ DEB_1=\033[1;31m .''`.  \033[0m
+ DEB_2=\033[1;31m: :'  : \033[0m
+ DEB_3=\033[1;31m`. `'`  \033[0m
+ DEB_4=\033[1;31m  `-    \033[0m
+ LIVELOG=\033[1;37m/live.log\033[0m
+ DEBUG=\033[1;37mdebug\033[0m
+ exec
+ exec



Reply to: