[Bug 523749] New: kpartx mkinitrd script chokes on loop devices
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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 User hare@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=523749#c1 Hannes Reinecke <hare@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|hare@novell.com |mvancura@novell.com --- Comment #1 from Hannes Reinecke <hare@novell.com> 2009-09-16 04:26:54 MDT --- Initrd issue. Milan, can you have a look here? -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c3 Michal Marek <mmarek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmarek@novell.com AssignedTo|mmarek@novell.com |hare@novell.com --- Comment #3 from Michal Marek <mmarek@novell.com> 2010-01-22 15:41:47 UTC --- setup-kpartx.sh is part of kpartx.rpm -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c4 Hannes Reinecke <hare@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #4 from Hannes Reinecke <hare@novell.com> 2010-01-25 09:44:40 UTC --- Actually, I'm not sure how to handle this, either. Guess we should figure out the correct way of handling this before taking some action here ... -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c5 --- Comment #5 from Ludwig Nussel <lnussel@novell.com> 2010-01-25 11:03:31 CET --- from offline discussion: simply allowing loop devices could be dangerous as mkinitrd would succeed but the system may not actually be bootable, e.g. due to missing drivers. So mkinitrd could fail but offer an option to ignore such errors. related problems are in bug 523746 and bug 547612 -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c6 Michal Marek <mmarek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #6 from Michal Marek <mmarek@novell.com> 2010-03-10 20:18:22 UTC --- Fix committed to http://gitorious.org/opensuse/mkinitrd, branches master, SLES-11 and SLES-11-SP1. -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c8 Michal Marek <mmarek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #8 from Michal Marek <mmarek@novell.com> 2010-03-26 14:01:38 UTC --- Submitted. -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c9 Swamp Workflow Management <swamp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:released:sle11:32748 --- Comment #9 from Swamp Workflow Management <swamp@suse.com> 2010-08-03 14:08:38 UTC --- Update released for: mkinitrd, mkinitrd-debuginfo, mkinitrd-debugsource Products: SLE-DEBUGINFO 11 (i386, ia64, ppc64, s390x, x86_64) SLE-DESKTOP 11 (i386, x86_64) SLE-SERVER 11 (i386, ia64, ppc64, s390x, x86_64) -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=523749 http://bugzilla.novell.com/show_bug.cgi?id=523749#c10 --- Comment #10 from Bernhard Wiedemann <bwiedemann@suse.com> --- This is an autogenerated message for OBS integration: This bug (523749) was mentioned in https://build.opensuse.org/request/show/50796 11.1:Test / mkinitrd -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com