Kernel: Linux 2.6.32-5-kirkwood
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initramfs-tools depends on:
ii cpio 2.11-4 GNU cpio -- a program to manage ar
ii findutils 4.4.2-1 utilities for finding files--find,
ii klibc-utils 1.5.18-1 small utilities built with klibc f
ii module-init-tools 3.12~pre2-3 tools for managing Linux kernel mo
ii udev 154-1 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
ii busybox 1:1.14.2-2 Tiny utilities for small and embed
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100524090039.1624.22938.reportbug@moo">http://lists.debian.org/20100524090039.1624.22938.reportbug@moo
06-07-2010, 02:07 PM
Martin Michlmayr
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
tags 582858 + patch
thanks
* Daniel Kahn Gillmor <dkg@fifthhorseman.net> [2010-05-24 09:00]:
> 0 root@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
# findout root block device + fstype
eval "$(mount | awk '//dev// {if ($3 == "/") {print "root=" $1 "
FSTYPE=" $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
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100607140726.GY4688@jirafa.cyrius.com">http://lists.debian.org/20100607140726.GY4688@jirafa.cyrius.com
06-07-2010, 05:10 PM
Martin Michlmayr
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Martin Michlmayr <tbm@cyrius.com> [2010-06-07 15:07]:
> The patch below works for me. Can you try it?
I should mention that "works for me" means that the initramfs will be
generated without error.
I'm not claiming that you'll actually be able to boot from ubifs with
that ramdisk though. For that, i-t needs to be taught to know what to
do about something like root=ubi0:rootfs.
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100607171049.GA31558@jirafa.cyrius.com">http://lists.debian.org/20100607171049.GA31558@jirafa.cyrius.com
06-07-2010, 11:21 PM
Michael Prokop
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Martin Michlmayr <tbm@cyrius.com> [Mon Jun 07, 2010 at 06:10:49 +0100]:
> * Martin Michlmayr <tbm@cyrius.com> [2010-06-07 15:07]:
> > The patch below works for me. Can you try it?
> I should mention that "works for me" means that the initramfs will be
> generated without error.
Thanks for the patch, Martin.
Can I apply it already to i-t?
> I'm not claiming that you'll actually be able to boot from ubifs with
> that ramdisk though. For that, i-t needs to be taught to know what to
> do about something like root=ubi0:rootfs.
I see "root=ubi0:root ubi.mtd=2 rootfstype=ubifs" in the additional
information section of the original bugreport. Who does evaluate
this stuff in the guruplug device that's supposed to work?
And what's behind ubi0:root?
regards,
-mika-
06-08-2010, 08:58 AM
Martin Michlmayr
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Michael Prokop <mika@debian.org> [2010-06-08 01:21]:
> Thanks for the patch, Martin.
> Can I apply it already to i-t?
Sure.
> > I'm not claiming that you'll actually be able to boot from ubifs with
> > that ramdisk though. For that, i-t needs to be taught to know what to
> > do about something like root=ubi0:rootfs.
>
> I see "root=ubi0:root ubi.mtd=2 rootfstype=ubifs" in the additional
> information section of the original bugreport. Who does evaluate
> this stuff in the guruplug device that's supposed to work?
> And what's behind ubi0:root?
ubi.mtd=2 says that /dev/mtd2 should be used for ubi; this is then
ubi0. ubi0:root is the root volume.
I'm away this week but I'll try to look into this next week.
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100608085834.GI31084@jirafa.cyrius.com">http://lists.debian.org/20100608085834.GI31084@jirafa.cyrius.com
06-08-2010, 09:20 AM
Michael Prokop
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Martin Michlmayr <tbm@cyrius.com> [Tue Jun 08, 2010 at 09:58:34AM +0100]:
> * Michael Prokop <mika@debian.org> [2010-06-08 01:21]:
> > Thanks for the patch, Martin.
> > Can I apply it already to i-t?
> Sure.
Thanks, done.
> > > I'm not claiming that you'll actually be able to boot from ubifs with
> > > that ramdisk though. For that, i-t needs to be taught to know what to
> > > do about something like root=ubi0:rootfs.
> > I see "root=ubi0:root ubi.mtd=2 rootfstype=ubifs" in the additional
> > information section of the original bugreport. Who does evaluate
> > this stuff in the guruplug device that's supposed to work?
> > And what's behind ubi0:root?
> ubi.mtd=2 says that /dev/mtd2 should be used for ubi; this is then
> ubi0. ubi0:root is the root volume.
> I'm away this week but I'll try to look into this next week.
This would be great, thanks.
regards,
-mika-
06-08-2010, 03:35 PM
Daniel Kahn Gillmor
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
On 06/07/2010 10:07 AM, Martin Michlmayr wrote:
> tags 582858 + patch
> thanks
>
> * Daniel Kahn Gillmor <dkg@fifthhorseman.net> [2010-05-24 09:00]:
>> 0 root@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 "
FSTYPE=" $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:
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Daniel Kahn Gillmor <dkg@fifthhorseman.net> [2010-06-08 11:35]:
> 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:
With the patch applied, can you do:
sh -x mkinitramfs -k $(uname -r) -o /tmp/foo > debug 2>&1
bzip2 -9 debug
and then send me debug.bz2.
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100608172702.GJ1641@jirafa.cyrius.com">http://lists.debian.org/20100608172702.GJ1641@jirafa.cyrius.com
06-08-2010, 07:31 PM
Martin Michlmayr
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Daniel Kahn Gillmor <dkg@fifthhorseman.net> [2010-06-08 15:22]:
> >> rootfs on / type rootfs (rw)
> >> ubi0:root on / type ubifs (rw,relatime)
^^^^^^^^^
This is the output from 'mount', and here's what i-t does:
it looks for something with /dev/ in it. In your case, this does't
match so root= and FSTYPE= are empty. I think we should simply add a
check to i-t at this point to produce an error when $root is empty.
Daniel, do you know if ubi0:root in /etc/fstab is valid? Is that what
the ubi people recommend to use? Shouldn't this be a device like
/dev/ubiX_Y? (This would make i-t happy)
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100608193103.GD29780@jirafa.cyrius.com">http://lists.debian.org/20100608193103.GD29780@jirafa.cyrius.com
06-08-2010, 07:43 PM
Martin Michlmayr
Bug#582858: initramfs-tools: MODULES=dep fails when / is ubifs
* Martin Michlmayr <tbm@cyrius.com> [2010-06-08 21:31]:
> This is the output from 'mount', and here's what i-t does:
>
> eval "$(mount | awk '//dev// {if ($3 == "/") {print "root=" $1 "
FSTYPE=" $5; exit}}')"
>
> it looks for something with /dev/ in it. In your case, this does't
> match so root= and FSTYPE= are empty. I think we should simply add a
> check to i-t at this point to produce an error when $root is empty.
[PATCH] Produce an error when root cannot be determined with MODULES=dep
A lot of code in dep_add_modules() uses $root. Therefore, produce an
error message if we cannot determine the root device.
# findout root block device + fstype
eval "$(mount | awk '//dev// {if ($3 == "/") {print "root=" $1 "
FSTYPE=" $5; exit}}')"
+ if [ -z "$root" ]; then
+ echo "mkinitramfs: failed to determine root device"
+ echo "mkinitramfs: workaround is MODULES=most"
+ echo "Error please report bug on initramfs-tools and include the output of 'mount'"
+ fi
# handle ubifs and return since ubifs root is a char device but
# most of the commands below only work with block devices.
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100608194308.GA31538@jirafa.cyrius.com">http://lists.debian.org/20100608194308.GA31538@jirafa.cyrius.com