Welcome! Log In Create A New Profile

Advanced

Boot from USB while SATA disks connected

Posted by Marcel 
Marcel
Boot from USB while SATA disks connected
April 28, 2013 02:02PM
Hi,

i'm using a GoFlexHome with 3.1.10-17-ARCH. The OS is installed on a USB-Stick (ext2). For the databackup, I want to use two 3,5" hd-drives as raid 1, too.

Cause i use 3,5" disk, i use a extra power supply for the disks. So i can switch the disks, during the boot process on! After i set the disks into the raid1, i must use for a working bootprocess, the following steps:
* Switch off the power supply for the disks
* Reboot/switch on the GoFlex
* Wait for finished uboot (the led becomes on)
* Switch on the power supply for the disks

If i don't switch the power supply of the disks during the boot process on, the boot fails. See the log! If the disks on the beginning of the bootprocess on, the boot fails too!

My google search told me, that i must use disklabel for working booting. I used tunefs to give my stick the label "rootfs" and changed the usb_init entry in my env!

fw_setenv usb_init "run usb_scan; setenv usb_root LABEL=rootfs"

But the booting problem is still alive.

The boot log is always the same:

Quote

U-Boot 2010.09 (Feb 16 2011 - 18:42:02)
UBIT v0.6 by Jeff Doozan and Peter Carmichael
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:fast", error -19
Error reading superblock on volume 'ubi:fast'!
UBIFS not mounted, use ubifs mount to mount volume first!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2869732 bytes read
Loading file "/uInitrd" from usb device 0:1 (usbda1)
** File not found /uInitrd
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
** File not found /boot/uInitrd
## Booting kernel from Legacy Image at 00680000 ...
Image Name: Linux-3.1.10-17-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2869668 Bytes = 2.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ..

The kernel-startup messages a different:

Quote
SATA switched on, after uboot finished
[ 22.838797] rtc-mv rtc-mv: internal RTC not ticking
[ 23.374057] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.379619] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 23.388181] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.393883] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 23.425058] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.430610] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 23.643752] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen
[ 23.651250] ata1: edma_err_cause=00000010 pp_flags=00000000, dev connect
[ 23.657985] ata1: SError: { PHYRdyChg DevExch }
[ 23.662630] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen
[ 23.670092] ata2: edma_err_cause=00000010 pp_flags=00000000, dev connect
[ 23.676829] ata2: SError: { PHYRdyChg DevExch }
[ 25.949158] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 35.960322] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities

Quote
SATA always off
[ 22.852634] rtc-mv rtc-mv: internal RTC not ticking
[ 23.388068] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.393631] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 23.402193] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.407893] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 23.421194] sd 2:0:0:0: [sda] No Caching mode page present
[ 23.426894] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 25.842956] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 35.854835] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[ 126.882998] systemd[1]: Timed out waiting for device dev-md0.device.
[ 126.912981] systemd[1]: Dependency failed for /media/dddrive.
[ 126.942985] systemd[1]: Dependency failed for Local File Systems.

Quote
SATA always on
[ 25.847139] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 35.893260] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 not in group (block 2838187772)!
[ 35.903272] EXT4-fs (sda1): group descriptors corrupted!
[ 35.927178] EXT4-fs (sda1): couldn't mount as ext2 due to feature incompatibilities
[ 35.964621] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 not in group (block 2838187772)!
[ 35.974624] EXT4-fs (sda1): group descriptors corrupted!
[ 36.056765] Unable to handle kernel paging request at virtual address 00303030
[ 36.064043] pgd = c0004000
[ 36.066801] [00303030] *pgd=00000000
[ 36.070418] Internal error: Oops: 5 [#1] PREEMPT
[ 36.075056] Modules linked in:
[ 36.078135] CPU: 0 Not tainted (3.1.10-17-ARCH #1)
[ 36.083303] PC is at mount_block_root+0x200/0x280
[ 36.088033] LR is at mount_block_root+0x1e0/0x280
[ 36.092761] pc : [<c052fbfc>] lr : [<c052fbdc>] psr: 40000013
[ 36.092766] sp : c7829f80 ip : 00000000 fp : 00000000
[ 36.104303] r10: c049f470 r9 : c7812150 r8 : 00008000
[ 36.109554] r7 : 00000000 r6 : c0551e7c r5 : c7812021 r4 : 00303030
[ 36.116112] r3 : c7829eb0 r2 : c7829f74 r1 : c049f448 r0 : 00000039
[ 36.122669] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 36.130020] Control: 0005397f Table: 00004000 DAC: 00000017
[ 36.135791] Process swapper (pid: 1, stack limit = 0xc7828270)
[ 36.141651] Stack: (0xc7829f80 to 0xc782a000)
[ 36.146043] 9f80: 00000000 00000000 00006180 c74a4c80 00006000 c00d3508 c78190a0 c7497300
[ 36.154266] 9fa0: c049f470 00000001 c0593380 c0551e91 c000945c 00000013 00000000 00000000
[ 36.162489] 9fc0: 00000000 c052ff3c fffffffe 00000002 00000000 c0558ee4 c0558ee4 c052f8c8
[ 36.170711] 9fe0: 00000000 00000000 00000000 00000000 c052f7ac c000945c ffffffff ffffffff
[ 36.178942] [<c052fbfc>] (mount_block_root+0x200/0x280) from [<c052ff3c>] (prepare_namespace+0x160/0x1c0)
[ 36.188565] [<c052ff3c>] (prepare_namespace+0x160/0x1c0) from [<c052f8c8>] (kernel_init+0x11c/0x14c)
[ 36.197758] [<c052f8c8>] (kernel_init+0x11c/0x14c) from [<c000945c>] (kernel_thread_exit+0x0/0x8)
[ 36.206682] Code: e1a00004 ebf3b5e7 e2800001 e0844000 (e5d43000)
[ 36.212882] ---[ end trace 2f254dfb3bd44332 ]---
[ 36.217644] Kernel panic - not syncing: Attempted to kill init!
[ 36.223632] [<c000d290>] (unwind_backtrace+0x0/0xe0) from [<c03cc914>] (panic+0x58/0x198)
[ 36.231898] [<c03cc914>] (panic+0x58/0x198) from [<c0021a48>] (do_exit+0x88/0x7a0)
[ 36.239548] [<c0021a48>] (do_exit+0x88/0x7a0) from [<c000b8e0>] (die+0x1d4/0x200)
[ 36.247106] [<c000b8e0>] (die+0x1d4/0x200) from [<c03cc7ec>] (__do_kernel_fault.part.2+0x54/0x74)
[ 36.256051] [<c03cc7ec>] (__do_kernel_fault.part.2+0x54/0x74) from [<c03d3f98>] (do_page_fault.part.3+0x274/0x2b0)
[ 36.266489] [<c03d3f98>] (do_page_fault.part.3+0x274/0x2b0) from [<c03d4000>] (do_page_fault+0x2c/0x94)
[ 36.275965] [<c03d4000>] (do_page_fault+0x2c/0x94) from [<c00083cc>] (do_DataAbort+0x34/0x98)
[ 36.284570] [<c00083cc>] (do_DataAbort+0x34/0x98) from [<c03d27b8>] (__dabt_svc+0x38/0x60)
[ 36.292896] Exception stack(0xc7829f38 to 0xc7829f80)
[ 36.297998] 9f20: 00000039 c049f448
[ 36.306231] 9f40: c7829f74 c7829eb0 00303030 c7812021 c0551e7c 00000000 00008000 c7812150
[ 36.314474] 9f60: c049f470 00000000 00000000 c7829f80 c052fbdc c052fbfc 40000013 ffffffff
[ 36.322729] [<c03d27b8>] (__dabt_svc+0x38/0x60) from [<c052fbfc>] (mount_block_root+0x200/0x280)
[ 36.331597] [<c052fbfc>] (mount_block_root+0x200/0x280) from [<c052ff3c>] (prepare_namespace+0x160/0x1c0)
[ 36.341241] [<c052ff3c>] (prepare_namespace+0x160/0x1c0) from [<c052f8c8>] (kernel_init+0x11c/0x14c)
[ 36.350448] [<c052f8c8>] (kernel_init+0x11c/0x14c) from [<c000945c>] (kernel_thread_exit+0x0/0x8)

Does anybody, what i must do, for a working boot, with the connected SATA disks?
Marcel
Re: Boot from USB while SATA disks connected
April 28, 2013 02:07PM
A little edit:

I'm using a GoFlexNet, not GoFlexHome!
Re: Boot from USB while SATA disks connected
April 28, 2013 03:34PM
Marcel,

You should get the latest rootfs at Arch site and put it on a EXT3 stick, boot with it without the SATA drives connected. After it booted up, plug in the SATA drives. After verifying that this works, post back and we'll help to set the envs correctly to enable booting while SATA is connect.

I also notice you're running older uBoot. You might want to reinstall to get the latest uBoot (but worry about it later).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot from USB while SATA disks connected
June 08, 2013 04:39AM
Hi,
setenv usb_root LABEL=rootfs
doesn't work, as it is altered during boot when running usb_scan. You need to hardcode it in usb_set_bootargs

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: