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

Bug#483082: initramfs-tools: Error while detecting rootfs when 'MODULES=dep'



On Mon, May 26, 2008 at 11:41:15PM +0200, Glennie Vignarajah wrote:
> Package: initramfs-tools
> Version: 0.92a
> Severity: grave
> Tags: patch
> Justification: renders package unusable

please learn to set severity properly.
MODULES=dep is not the default, thus is is max important, thanks.
also failing on 2 boxes is not like redering initrmafs-tools unusable!?
 
> Hello,
>  When MODULES is set to 'dep' in /etc/initramfs-tools/initramfs.conf,
>  update-initramfs fails to detect correctly the root filesystem(device
>  and fs used). When called, this command fails with:
> ----------
> mkinitramfs: missing rootfs root rootfs /sys entry
> mkinitramfs: workaround is MODULES=most
> mkinitramfs: Error please report the bug
> update-initramfs: failed for /boot/initrd.img-2.6.25-2-amd64
> ----------

ok cool, you are the first to report on this.

> 	This bug added with #479607, makes 2 of machines unsuable with
> 	2.6.25 kernel series.  The attached patch resolves the issue on
> 	my machines. Please, review the patch and consider it for the
> 	next release of this package.  Thanks,

can you please post addtitional info, i'd like to see output of
cat /etc/fstab
 
 
> -- Package-specific info:
> -- /proc/cmdline
> BOOT_IMAGE=Linux ro root=UUID=76188785-a331-44de-a9b8-12f07ce5172d profile=64 noisapnp

nice.
 
> --- /tmp/hook-functions	2008-05-26 21:32:24.000000000 +0200
> +++ /usr/share/initramfs-tools/hook-functions	2008-05-26 21:24:46.000000000 +0200
> @@ -222,7 +222,11 @@ dep_add_modules()
>  	local block minor root FSTYPE root_dev_path x
>  
>  	# findout root block device + fstype
> -	eval "$(mount | awk '/ \/ / {print "root=" $1 "\nFSTYPE=" $5; exit}')"
> +	eval "$(mount | awk '/ \/dev\// {if ($3 = "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')"
there seem to be a typo here, awk '/\/dev// {}' without space works
better for me.

> +	if [ "${root}" = "/dev/root" ] ; then
> +		root="/dev/disk/by-uuid/"$(/lib/udev/vol_id --uuid ${root}) 2>/dev/null
> +	fi
> +	root="$(readlink -f ${root})"

shouldn't the readlink be also under the if as only needed for UUID
path?
  
>  	# find out real rootfs on auto type
>  	if [ "${FSTYPE}" = "auto" ]; then


thanks for report.

-- 
maks



Reply to: