[Bug 244554] New: Initial mkinitrd creation fails
https://bugzilla.novell.com/show_bug.cgi?id=244554 Summary: Initial mkinitrd creation fails Product: openSUSE 10.3 Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Blocker Priority: P5 - None Component: Installation AssignedTo: stefan.fent@novell.com ReportedBy: aj@novell.com QAContact: jsrain@novell.com I see: An error occured during initrd creation. /sbin/mkinitrd: line 3036: /dev/fd/62: No such file or directory No '/' mouintpoint specified in /etc/fstab sed: couldn't flush stdout: Broken pipe -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #1 from aj@novell.com 2007-02-12 02:58 MST ------- Created an attachment (id=118555) --> (https://bugzilla.novell.com/attachment.cgi?id=118555&action=view) Logfiles from /mnt/...yast -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #2 from aj@novell.com 2007-02-12 02:59 MST ------- Created an attachment (id=118556) --> (https://bugzilla.novell.com/attachment.cgi?id=118556&action=view) logfiles from /var/...yast -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 stefan.fent@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|stefan.fent@novell.com |uli@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 uli@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|uli@novell.com |werner@novell.com Severity|Blocker |Critical ------- Comment #4 from uli@novell.com 2007-02-12 07:37 MST ------- Looks like a bash bug to me. This code: while read fstab_device fstab_mountpoint fstab_type fstab_options dummy ; do if [ "$fstab_mountpoint" = "/" ]; then rootdev="$fstab_device" rootfstype="$fstab_type" rootfsopts="$fstab_options" break fi done < <( sed -e '/^[ ]*#/d' < $root_dir/etc/fstab) fails, while this code sed -e '/^[ ]*#/d' $root_dir/etc/fstab >/tmp/fstab$$ while read fstab_device fstab_mountpoint fstab_type fstab_options dummy ; do if [ "$fstab_mountpoint" = "/" ]; then rootdev="$fstab_device" rootfstype="$fstab_type" rootfsopts="$fstab_options" break fi done < /tmp/fstab$$ rm /tmp/fstab$$ works. Worked around for alpha $WHATEVER, downgraded to Critical, reassigning to bash maintainer. It may be worth noting that this issue was found on an AMD64 (virtual) machine. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 werner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hare@novell.com, werner@novell.com, | |uli@novell.com Status|NEW |NEEDINFO Info Provider| |aj@novell.com ------- Comment #5 from werner@novell.com 2007-02-12 08:07 MST ------- If the bash is called bash and _not_ sh both code segments do work for me. Do you have called the bash by its real name or do you have used the /bin/sh links for the code above? And if you've used the /bin/sh link, do you have uswd `set +o posix' to enable the non POSIX feature named pipe aka `<()' or `()>'. Beside this the bash uses the device files provided at /dev/fd .. if those things are not provided well within mkinitrd this would be not a bug of the bash its self but of mkinitrd. This because if the stuff works within normal system the bug is in the environment of the bash provided by mkinitrd. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 aj@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|aj@novell.com | ------- Comment #6 from aj@novell.com 2007-02-12 08:16 MST ------- This happens in mkinitrd. It uses #! /bin/bash but not set +o posix. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 werner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|werner@novell.com |hare@novell.com ------- Comment #7 from werner@novell.com 2007-02-12 08:28 MST ------- Then this code is used before a udev daemon is started -> user error. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 aj@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan.fent@novell.com ------- Comment #8 from aj@novell.com 2007-02-12 08:37 MST ------- This happens during setup of the system in a chroot. Perhaps /dev is not mounted in the chroot? We have two options: * Do not use named pipes, e.g. use mkfifo or temporary files * Mount /dev -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 stefan.fent@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |olh@novell.com ------- Comment #9 from stefan.fent@novell.com 2007-02-12 08:55 MST ------- Maybe this is related to the remove of devs.rpm? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #10 from werner@novell.com 2007-02-12 09:07 MST ------- What's abput (re)mounting /dev from running mkinitrd file system with its running udev? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #11 from suse-beta@cboltz.de 2007-02-12 17:38 MST ------- Ulrich, your workaround uses an insecure tempfile :-( ++++++ mkinitrd ++++++ --- mkinitrd/mkinitrd 2006-11-24 22:13:47.000000000 +0100 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd 2007-02-12 15:33:18.000000000 +0100 [...] + sed -e '/^[ ]*#/d' $root_dir/etc/fstab >/tmp/fstab$$ [...] - done < <( sed -e '/^[ ]*#/d' < $root_dir/etc/fstab) + done < /tmp/fstab$$ + rm /tmp/fstab$$ /tmp/fstab* can be target of a classical symlink attach now ;-) Please use mktemp to generate a secure tempfile name (or use a secure [aka non-worldwriteable] directory) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #12 from werner@novell.com 2007-02-13 02:38 MST ------- Within an ram disk during intallation we do not panic about security. The only user is root and there is no network. Beside this we may skip sed by using bash language e.g. `case "$fstab_device" in \#*|"") continue ;; esac' within the loop, then we could also use $root_dir/etc/fstab. Nevertheless, by creating a temporary file it is normaly a good idea to use trap for removeing the temporary file to get around not onyl EXIT but also various SIGnals. But within the ram disk this is not necessary. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #13 from aj@novell.com 2007-02-13 02:48 MST ------- mkinitrd is also called in the running system - so the security concerns should be taken care of. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 olh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|olh@novell.com | ------- Comment #14 from olh@novell.com 2007-02-13 02:49 MST ------- I havent looked what changes were made to fix bug #144773 Since this was most likely a fresh install, none of those code paths were changed . I hope. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #15 from werner@novell.com 2007-02-13 02:56 MST ------- Nevertheless, is /dev mounted with file system type udev and does the link /dev/fd to /proc/self/fd exist within the ram disk during mkinitrd? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 ------- Comment #16 from olh@novell.com 2007-02-13 02:57 MST ------- I can not reproduce it in the running system, with alpha0+ at least, also with current bash. Since the changes were not commited to mkinitrd cvs, nothing bad happend. We should look at the system when its in the failing state. Maybe the /dev handling was screwed up. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244554 olh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #17 from olh@novell.com 2007-02-13 06:30 MST ------- *** This bug has been marked as a duplicate of bug 244937 *** -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com