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

Bug#433905: marked as done (initramfs-tools: Boot failure from software-RAID1 with debian on nslu2)

Your message dated Tue, 8 Jun 2010 11:36:40 +0200
with message-id <2010-06-08T11-32-05@devnull.michael-prokop.at>
and subject line Re: Bug#366175: Rootdelay
has caused the Debian Bug report #366175,
regarding initramfs-tools: Boot failure from software-RAID1 with debian on nslu2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

366175: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366175
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.88
Severity: critical
Justification: breaks the whole system

The Debian installation on my nslu2 is not bootable/accessible,
unless I solder a serial port onto the circuit board. Great fun,
but it should be avoided. The reason is that the initramfs scripts
are not able to initialize the root file system, which is in this
case a 'regular' partition on a RAID-1 volume over two usb-disks.
(no lvm or lvm2 involved). I have two equal usb disks attached in
this configuration:

root: /dev/md1, a raid1 with /dev/sda1 and /dev/sdb1 as slaves
swap: /dev/md2, a raid1 with /dev/sda2 and /dev/sdb2 as slaves
home: /dev/md3, a raid1 with /dev/sda3 and /dev/sdb3 as slaves

The problem is that the usb disks are not yet availlable when the
the root delay loop is entered. Unfortunately, the device /dev/md1
is created with mdadm before the loop is entered. During this loop,
the script checks whether the device /dev/md1 contains a sane
file system. When the usb disks are registered, /dev/md1 does not
become valid.

I think, the only way to solve this, is to modify the scripts in the
initramfs. The current scripts (0.88) check every 0.1 seconds to see
whether the root device has become valid. When this is the case, the
root delay is interrupted. Instead of checking only this, the script
should also try to assemble the raid1 root every 0.1 seconds,
otherwise /dev/md1 will never contain a sane file system.

The simple workaround for me, was to add the following line to the
local script in the root_delay loop:

/sbin/mdadm --assemble --auto=yes --no-degraded /dev/md1

(I don't want to boot from a degraded root device, if possible. This
is another issue with the initramfs scripts, but this should be
discussed in an another big report. Let's first fix this one.)

The downsides of this hack are:

(i) obviously, not generic enough. Ideally, one can think of a
directory local-root-delay-loop that contains the scripts that
should be executed during each iteration of the root-delay loop

(ii) The timing of the root delay is completely borked. On my
slow slug the mdadm command takes much longer than the sleep

I'm willing to write a patch that solves this problem, taking into
account the previous two considerations, but some feedback from
the maintainers would be useful before I start coding. If you need
more info, just ask.

This is the output on the serial console during a failing boot:

+Ethernet eth0: MAC address 00:18:39:30:0d:7d
IP:, Gateway:
Default server:, DNS server IP:

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Red Hat certified release, version 1.92 - built 15:16:07, Feb  3 2004

Platform: IXDP425 Development Platform (XScale)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x000723a0-0x01ff3000 available
FLASH: 0x50000000 - 0x50800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> boot;exec 0x01d00000
have eRcOmM
copy kernel code from flash to RAM
copy ramdisk file from flash to RAM
run kernel
Using base address 0x01d00000 and length 0x0001ffe0

APEX Boot Loader 1.4.15 -- Copyright (c) 2004,2005,2006,2007 Marc

APEX comes with ABSOLUTELY NO WARRANTY.  It is free software and you
are welcome to redistribute it under certain circumstances.
For details, refer to the file COPYING in the program source.

 apex => mem:0x00200000+0xa78c   (42892 bytes)
 env  => nor:0x7c000+15k         (no-write)

Use the command 'help help' to get started.

# copy -s $kernelsrc $bootaddr
# copy -s fis://kernel 0x00008000
1441760 bytes transferred
# copy -s $ramdisksrc $ramdiskaddr
# copy -s fis://ramdisk 0x01000000
6291440 bytes transferred
# wait 10 Type ^C key to cancel autoboot.
Type ^C key to cancel autoboot.
# boot
ATAG_MEM: start 0x00000000  size 0x02000000
ATAG_CMDLINE: (55 bytes) 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f
ATAG_INITRD2: start 0x01000000  size 0x00400000
Booting kernel at 0x00008000...
done, booting the kernel.
Linux version 2.6.18-4-ixp4xx (Debian 2.6.18.dfsg.1-12etch2)
(dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)) #1 Sun Apr 22 08:
34:11 UTC 2007
CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=0000397f
Machine: Linksys NSLU2
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists.  Total pages: 8192
Kernel command line: console=ttyS0,115200 rtc-x1205.probe=0,0x6f
IRQ lockup detection disabled
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 25780KB available (1948K code, 496K data, 92K init)
Security Framework v1.0.0 initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs... it is
Freeing initrd memory: 4096K
NET: Registered protocol family 16
IXP4xx: Using 16MiB expansion bus window size
PCI: IXP4xx is host
PCI: IXP4xx Using direct access for memory space
PCI: bus0: Fast back to back transfers disabled
dmabounce: registered device 0000:00:01.0 on pci bus
dmabounce: registered device 0000:00:01.1 on pci bus
dmabounce: registered device 0000:00:01.2 on pci bus
NET: Registered protocol family 2
IP route cache hash table entries: 256 (order: -2, 1024 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 1024 bind 512)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
audit: initializing netlink socket (disabled)
audit(4.380:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
IXP4xx Watchdog Timer: heartbeat 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing
serial8250.0: ttyS0 at MMIO 0xc8000000 (irq = 15) is a XScale
serial8250.0: ttyS1 at MMIO 0xc8001000 (irq = 13) is a XScale
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
IXP4XX-Flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in IXP4XX-Flash.0 at offset
6 RedBoot partitions found on MTD device IXP4XX-Flash.0
Creating 6 MTD partitions on "IXP4XX-Flash.0":
0x00000000-0x00040000 : "RedBoot"
NSLU2 MAC: 00:18:39:30:0d:7d
0x00040000-0x00060000 : "SysConf"
0x00060000-0x00080000 : "Loader"
0x00080000-0x001e0000 : "Kernel"
0x001e0000-0x007e0000 : "Ramdisk"
0x007e0000-0x00800000 : "FIS directory"
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
x1205 0-006f: chip found, driver version 1.0.7
x1205 0-006f: rtc core: registered x1205 as rtc0
Registered led device: ready
Registered led device: status
Registered led device: disk-1
Registered led device: disk-2
NET: Registered protocol family 26
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Time: OSTS clocksource has been installed.
x1205 0-006f: setting the system clock to 2007-06-16 17:57:41
Freeing init memory: 92K
Loading, please wait...
Begin: Loading essential drivers... ...
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
md: raid1 personality registered for level 1
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
Begin: Running /scripts/init-premount ...
PCI: enabling device 0000:00:01.0 (0140 -> 0142)
ohci_hcd 0000:00:01.0: OHCI Host Controller
ohci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:00:01.0: irq 28, io mem 0x48000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
PCI: enabling device 0000:00:01.1 (0140 -> 0142)
ohci_hcd 0000:00:01.1: OHCI Host Controller
ohci_hcd 0000:00:01.1: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:01.1: irq 27, io mem 0x48001000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
PCI: enabling device 0000:00:01.2 (0140 -> 0142)
ehci_hcd 0000:00:01.2: EHCI Host Controller
ehci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 3
ehci_hcd 0000:00:01.2: irq 26, io mem 0x48002000
ehci_hcd 0000:00:01.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 5 ports detected
usb 3-1: new high speed USB device using ehci_hcd and address 2
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
usb 3-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb 3-2: new high speed USB device using ehci_hcd and address 3
usb 3-2: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
Loading Intel IXP400 ethernet driver
Failed to load Intel IXP400 ethernet driver
Begin: Loading MD modules ...
Success: loaded module raid1.
Begin: Assembling MD array /dev/md1 ...
md: md1 stopped.
mdadm: no devices found for /dev/md1
Failure: failed to start /dev/md1
Begin: Waiting for root file system... ...
 Vendor: ST350084  Model: 1A                Rev: 3.AA
 Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
 sda:<5>  Vendor: ST350084  Model: 1A                Rev: 3.AA
 Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
 sdb:udevd-event[967]: wait_for_sysfs: waiting for '/sys/devices/
ioerr_cnt' failed
udevd-event[988]: wait_for_sysfs: waiting for '/sys/devices/
ioerr_cnt' failed
 sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
 sdb1 sdb2 sdb3
sd 1:0:0:0: Attached scsi disk sdb
Begin: Running /scripts/local-premount ...
mount: Mounting /dev/md1 on /root failed: No such device
Begin: Running /scripts/local-bottom ...
Begin: Running /scripts/init-bottom ...
mount: Mounting /root/dev on /dev/.static/dev failed: No such file or
mount: Mounting /sys on /root/sys failed: No such file or directory
mount: Mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init

BusyBox v1.1.3 (Debian 1:1.1.3-4) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off

-- Package-specific info:
-- /proc/cmdline
console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug

-- /proc/filesystems

-- lsmod
Module                  Size  Used by
ledtrig_heartbeat       3008  0
nfs                   267140  0
ipv6                  272732  14
nfsd                  238572  17
exportfs                5696  1 nfsd
lockd                  69912  3 nfs,nfsd
nfs_acl                 3936  2 nfs,nfsd
sunrpc                179632  13 nfs,nfsd,lockd,nfs_acl
dm_snapshot            17664  0
dm_mirror              21652  0
dm_mod                 60844  2 dm_snapshot,dm_mirror
rtc_dev                 7464  0
ixp4xx_mac             19380  0
ixp4xx_qmgr             8460  5 ixp4xx_mac
ixp4xx_npe             14176  2 ixp4xx_mac
evdev                  10496  0
firmware_class         10272  1 ixp4xx_npe
ixp4xx_beeper           3520  0
ehci_hcd               33324  0
ohci_hcd               18404  0
usb_storage            79979  6
usbcore               129180  4 ehci_hcd,ohci_hcd,usb_storage
ext3                  135624  2
jbd                    59112  1 ext3
mbcache                 9028  1 ext3
sd_mod                 19248  8
scsi_mod              111276  2 usb_storage,sd_mod
raid1                  23840  3
md_mod                 81492  5 raid1

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = yes
postinst_hook = flash-kernel

-- /etc/initramfs-tools/initramfs.conf

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable')
Architecture: arm (armv5tel)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-1-ixp4xx
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.1.3-4  Tiny utilities for small and embed
ii  cpio                          2.6-17     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.4.34-1   small statically-linked utilities
ii  module-init-tools             3.3-pre4-2 tools for managing Linux kernel mo
ii  udev                          0.105-4    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
* Jamie Thompson <bugs.debian@jamie-thompson.co.uk> [Sun May 03, 2009 at 12:57:04PM +0100]:

[vgchange is called before USB devices are available / root delay

> Would it be possible to get a message to appear when the root device isn't
> available suggesting the use of rootdelay as a stopgap until this gets fixed?

Recent initramfs-tools versions provide that.

Nowadays the lvm stuff is located in the lvm2 package which
provides /usr/share/initramfs-tools/scripts/local-top/lvm2 which is
executed after init-premount that runs the udev hooks for populating
the /dev tree. So this bug shouldn't be present with anymore.
If you still encounter any problems please feel free to reopen the
bugreport or just report a new one.

Closing this bugreport.


Attachment: signature.asc
Description: Digital signature

--- End Message ---

Reply to: