On 06/07/2010 10:07 AM, Martin Michlmayr wrote:
> tags 582858 + patch
> thanks
> 
> * Daniel Kahn Gillmor <d...@fifthhorseman.net> [2010-05-24 09:00]:
>> 0 r...@moo:~# update-initramfs -k all -u
>> update-initramfs: Generating /boot/initrd.img-2.6.32-5-kirkwood
>> readlink: missing operand
>> Try `readlink --help' for more information.
>> stdin: Illegal seek
>> mkinitramfs: for root  missing  /sys/block/ entry
> 
> The patch below works for me.  Can you try it?
> 
> --- a/hook-functions  2010-06-07 15:03:22.000000000 +0100
> +++ b/hook-functions  2010-06-07 15:06:06.000000000 +0100
> @@ -226,6 +226,14 @@
>  
>       # findout root block device + fstype
>       eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 
> "\nFSTYPE=" $5; exit}}')"
> +
> +     # handle ubifs and return since ubifs root is a char device but
> +     # most of the commands below only work with block devices.
> +     if [ "${FSTYPE}" = "ubifs" ]; then
> +             manual_add_modules "${FSTYPE}"
> +             return
> +     fi
> +
>       if [ "${root}" = "/dev/root" ] ; then
>               root="/dev/disk/by-uuid/"$(blkid -o value -s UUID ${root}) 
> 2>/dev/null
>       fi


hrm, doesn't seem to work for me.  Am i applying it in the wrong place?
 Here's a transcript of a failure, patch application, and a repeated
failure:

>> 0 r...@moo:/usr/share/initramfs-tools# grep ^MODULES 
>> /etc/initramfs-tools/initramfs.conf
>> MODULES=dep
>> 0 r...@moo:/usr/share/initramfs-tools# update-initramfs -v -k $(uname -r) -u
>> Keeping /boot/initrd.img-2.6.32-5-kirkwood.dpkg-bak
>> update-initramfs: Generating /boot/initrd.img-2.6.32-5-kirkwood
>> readlink: missing operand
>> Try `readlink --help' for more information.
>> stdin: Illegal seek
>> mkinitramfs: for root  missing  /sys/block/ entry
>> mkinitramfs: workaround is MODULES=most
>> mkinitramfs: Error please report the bug
>> Removing /boot/initrd.img-2.6.32-5-kirkwood.dpkg-bak
>> update-initramfs: failed for /boot/initrd.img-2.6.32-5-kirkwood
>> 1 r...@moo:/usr/share/initramfs-tools# patch -p1 < /root/582858.diff 
>> patching file hook-functions
>> Hunk #1 succeeded at 258 (offset 32 lines).
>> 0 r...@moo:/usr/share/initramfs-tools# update-initramfs -v -k $(uname -r) -u
>> Keeping /boot/initrd.img-2.6.32-5-kirkwood.dpkg-bak
>> update-initramfs: Generating /boot/initrd.img-2.6.32-5-kirkwood
>> readlink: missing operand
>> Try `readlink --help' for more information.
>> stdin: Illegal seek
>> mkinitramfs: for root  missing  /sys/block/ entry
>> mkinitramfs: workaround is MODULES=most
>> mkinitramfs: Error please report the bug
>> Removing /boot/initrd.img-2.6.32-5-kirkwood.dpkg-bak
>> update-initramfs: failed for /boot/initrd.img-2.6.32-5-kirkwood
>> 1 r...@moo:/usr/share/initramfs-tools# 

It still works fine with MODULES=list, of course.

        --dkg

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to