
http://bugzilla.novell.com/show_bug.cgi?id=523749 Summary: kpartx mkinitrd script chokes on loop devices Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: hare@novell.com ReportedBy: lnussel@novell.com QAContact: qa@suse.de Found By: Development When creating virtual machine images it is sometimes useful to chroot into a system that was set up via loop device and kpartx/device mapper. After applying the patch from bug 523746 on 11.1 the script /lib/mkinitrd/scripts/setup-kpartx.sh still has problems with such a setup. I'm not sure how the fix should look like in this case. The output of mkinitrd (with set -x) at the right place looks like this: # rootdev=/dev/disk/by-uuid/412c3369-c79d-4d3a-af02-e9b09b48c5ef mkinitrd Kernel image: /boot/vmlinuz-2.6.30.1-2-default Initrd image: /boot/initrd-2.6.30.1-2-default Root device: /dev/disk/by-uuid/412c3369-c79d-4d3a-af02-e9b09b48c5ef (/dev/dm-0) (mounted on / as ext3) Resume device: /dev/disk/by-id/ata-ST3320820AS_6QF4MDVH-part1 (/dev/sda1) ++ '[' device-mapper = device-mapper ']' +++ dmsetup info -c --noheadings -o uuid -j 253 -m 0 ++ dm_uuid=part1-loop0 ++ case $dm_uuid in ++ dm_uuid=loop0 ++++ dmsetup info -u loop0 --noheadings -c -o major,minor Device does not exist. Command failed +++ majorminor2blockdev +++ local major=0 minor= +++ '[' '!' '' ']' ++++ IFS=: ++++ set -- 0 ++++ echo +++ minor= ++++ IFS=: ++++ set -- 0 ++++ echo 0 +++ major=0 +++ '[' 0 -lt 0 ']' ++++ cat /proc/partitions ++++ egrep '^[ ]*0[ ]* ' +++ local retval= +++ echo /dev/ ++ kpartx_blockdev=' /dev/' ++ root_kpartx=1 ++ set +x ++ '[' sd = device-mapper ']' ++ kpartx_blockdev=' /dev/ /dev/sda1' ++ set +x /lib/mkinitrd/setup/11-storage.sh: line 27: /dev/disk/by-uuid/412c3369-c79d-4d3a-af02-e9b09b48c5ef: syntax error: operand expected (error token is "/dev/disk/by-uuid/412c3369-c79d-4d3a-af02-e9b09b48c5ef") /lib/mkinitrd/setup/11-storage.sh: line 36: / 256: syntax error: operand expected (error token is "/ 256") Fatal storage error. Device /dev/ could not be analyzed. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.