[solved] GoFlexNet: kernel boot failure with secondary drive

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[solved] GoFlexNet: kernel boot failure with secondary drive

Postby baafie » Fri Mar 07, 2014 10:34 am

Hi,

I'm having a booting problem: my boot disk is a USB drive. When it is the only drive available, all is fine, but when there is also a SATA drive plugged in, the netconsole shows the following:
$this->bbcode_second_pass_code('', '[ 37.743631] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[ 37.768799] EXT4-fs (sda1): couldn't mount as ext2 due to feature incompatibilities
[ 37.886364] Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 37.898963] [<c000d620>] (unwind_backtrace+0x0/0xe8) from [<c042a498>] (panic+0x64/0x194)
[ 37.907205] [<c042a498>] (panic+0x64/0x194) from [<c042a1e4>] (init_post+0x108/0x130)
[ 37.915126] [<c042a1e4>] (init_post+0x108/0x130) from [<c059a8e8>] (kernel_init+0x134/0x160)')

On my secondary drive there is an ext4 partition which the kernel is apparently trying to load as the root partition. /dev/sda1 is being passed as a kernel argument, I gather from a successful boot:
$this->bbcode_second_pass_code('', '[ 0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(pogoplug),-(root) root=/dev/sda1 rootdelay=10 netconsole=@10.10.10.6/eth0,@10.10.10.4/')

The root filesystem on the USB drive is labeled rootfs.

uBoot info: $this->bbcode_second_pass_code('', 'U-Boot 2010.09 (Feb 16 2011 - 18:42:02)
UBIT v0.6 by Jeff Doozan and Peter Carmichael')


Do you have any ideas?

Thanks!

The output of `printenv' from the netconsole:
$this->bbcode_second_pass_code('', 'bootcmd=run fast_boot; run usb_boot; run hd_boot; run ubi_boot
bootdelay=3
baudrate=115200
ide_start=ide reset
ubi_start=ubi part root
usb_start=usb start
nc_test=ping $ncip
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
silent_boot=run silent_rd ubi_args ubi_fallback
fast_boot=run fast_rd ubi_args ubi_fallback
usb_boot=for scan in 0 1 2 3; do run usb_args_$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback;done
usb_args_0=boot_dev='usb 0:1'; dev_args='root=/dev/sda1 rootdelay=10'
usb_args_1=boot_dev='usb 1:1'; dev_args='root=/dev/sdb1 rootdelay=10'
usb_args_2=boot_dev='usb 2:1'; dev_args='root=/dev/sdc1 rootdelay=10'
usb_args_3=boot_dev='usb 3:1'; dev_args='root=/dev/sdd1 rootdelay=10'
hd_boot=run ide_start; for scan in 0 1; do run hd_args_$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback; done
ubi_boot=run ubi_rd ubi_args ubi_fallback
ubi_args=dev_args='ubi.mtd=root'
rescue=dev_args='ubi.mtd=root rootfstype=preboot'; boot_dev='usb 0:1'; run ext2_kern ext2_auto boot_rd; boot_dev='ide 0:1'; run ide_start ext2_kern ext2_auto boot_rd; run silent_rd ubi_fallback; run fast_rd ubi_fallback; run ubi_rd ubi_fallback
chain=nand read.e 0x800000 0x480000 0x80000; go 0x800200
ethact=egiga0
console=ttyS0,115200
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(pogoplug),-(root)
set_bootargs=setenv bootargs console=$console $mtdparts $dev_args $rd_args netconsole=@$ipaddr/eth0,@$ncipk/
ext2_kern=ext2load $boot_dev $addr_kern /boot/uImage
ext2_auto=ext2load $boot_dev $addr_rd /boot/uInitrd
ext2_rd=ext2load $boot_dev $addr_rd /uInitrd
ext2_boot=run ext2_rd boot_rd; run ext2_auto boot_auto; run boot_kern
fat_kern=fatload $boot_dev $addr_kern /boot/uImage
fat_rd=fatload $boot_dev $addr_rd /uInitrd
fat_boot=run fat_rd boot_rd
ubi_kern=ubifsmount boot; ubifsload $addr_kern /boot/uImage
ubi_rd=ubifsmount ramdisk; ubifsload $addr_rd /uInitrd
ubi_fallback=run ubi_kern boot_rd
silent_rd=ubifsmount silent; ubifsload $addr_rd /uInitrd
fast_rd=ubifsmount fast; ubifsload $addr_rd /uInitrd
boot_kern=run set_bootargs; bootm $addr_kern
boot_rd=run set_bootargs; bootm $addr_kern $addr_rd
boot_auto=rd_args='rootfstype=auto'; run boot_rd
addr_kern=0x680000
addr_rd=0x1100000
ipaddr=10.10.10.6
ncip=10.10.10.5
ncipk=10.10.10.4
serverip=10.10.10.3
led_init=green blinking
led_exit=green off
led_error=orange blinking
ethaddr=02:50:43:9f:c0:1c
preboot=run ubi_start silent_boot; run nc_test nc_start; run usb_start
hd_args_0=boot_dev='ide 0:1'; dev_args='root=/dev/sda1'
hd_args_1=boot_dev='ide 1:1'; dev_args='root=/dev/sda1'
partition=nand0,0
mtddevnum=0
mtddevname=u-boot
stdin=nc
stdout=nc
stderr=nc')
Last edited by baafie on Sat Mar 08, 2014 12:00 pm, edited 1 time in total.
baafie
 
Posts: 15
Joined: Sun Apr 01, 2012 10:57 am

Re: GoFlex Net: kernel boot failure with secondary drive

Postby moonman » Fri Mar 07, 2014 11:29 am

Is your second drive labeled rootfs too? As far as I remember label=rootfs is hardcoded into uinitrd.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: GoFlex Net: kernel boot failure with secondary drive

Postby baafie » Fri Mar 07, 2014 11:35 am

No, there are no labels on the second drive's partitions. Also, there does not appear to be a file named uinitrd on my system. I'm running the following kernel, installed using the ALARM instructions:

$this->bbcode_second_pass_code('', 'Linux alarm 3.1.10-32-ARCH #1 PREEMPT Tue Feb 11 06:26:34 MST 2014 armv5tel GNU/Linux')
baafie
 
Posts: 15
Joined: Sun Apr 01, 2012 10:57 am

Re: GoFlex Net: kernel boot failure with secondary drive

Postby WarheadsSE » Fri Mar 07, 2014 2:23 pm

As for uInitrd, you can generated that.

Otherwise, the SATA disks will almost always come up prior to the USB, and this be /dev/sda && /dev/sdb (if two are present), thus overriding the /dev/sda1 for the USB.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: GoFlex Net: kernel boot failure with secondary drive

Postby baafie » Fri Mar 07, 2014 2:28 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'A')s for uInitrd, you can generated that.

1) How?
2) If I do that, how do I ensure that it stays in sync with the kernel as system updates appear?
3) Do I have to update the uBoot environment, which presently hardcodes /dev/sdxn?
baafie
 
Posts: 15
Joined: Sun Apr 01, 2012 10:57 am

Re: GoFlex Net: kernel boot failure with secondary drive

Postby WarheadsSE » Fri Mar 07, 2014 2:55 pm

1) Enable initramfs creation
2) use the appropriate mkimage command to turn the initramfs into an uInitrd
3) Yeah, you can then use a LABEL= instead of a device name.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: GoFlex Net: kernel boot failure with secondary drive

Postby baafie » Sat Mar 08, 2014 12:01 pm

I don't know what 'enabling initramfs creation' means, but I managed to create an initramfs and initrd respectively using the following commands:
$this->bbcode_second_pass_code('', 'mkinitcpio -g /boot/initramfs-linux.img
mkimage -A arm -T ramdisk -C none -n "uInitrd" -d /boot/initramfs-linux.img /boot/uInitrd')
Then I replaced the root parameter in
$this->bbcode_second_pass_code('', 'usb_args_0=boot_dev='usb 0:1'; dev_args=root=/dev/sda1 rootdelay=10'')
with root=LABEL=rootfs by running
$this->bbcode_second_pass_code('', 'fw_setenv usb_args_0 "boot_dev='usb 0:1'; dev_args='root=LABEL=rootfs rootdelay=10'"')
In order to execute the last command I had to instruct fw_setenv and fw_printenv to address the uBit environment, by writing the following in /etc/fw_env.config:
$this->bbcode_second_pass_code('', '/dev/mtd0 0x60000 0x20000 0x20000')

Having done the above, my GoFlex Net now boots from USB with secondary drives plugged in!

Thank you WarheadsSE and moonman for your help.
baafie
 
Posts: 15
Joined: Sun Apr 01, 2012 10:57 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 7 guests