[How-To] Boot Entirely from SATA

This forum is for all other ARMv5 devices

Re: [How-To] Boot Entirely from SATA

Postby WarheadsSE » Wed Dec 28, 2011 4:05 am

I hate to sound ignorant, but those of you not using enclosures, "just direct connect"s .. please tell me you're getting power from somewhere...
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [How-To] Boot Entirely from SATA

Postby jkgm » Wed Dec 28, 2011 4:14 am

WarheadsSE wrote:Pics would be nice, I assume you'll be tapping a power from somewhere?

I haven't started trying to mount it yet – wanted to get it actually booting first. I'm tapping power from one of the USB ports. I just connected the power wires from a USB cable to the 5v lines of a SATA cable, and it's working fine when I'm not trying to boot from the drive.

Alternately, I've considered probing the power coming directly from the PSU to the logic board. I haven't tried yet, but I expect it to be 5v as well.
jkgm
 
Posts: 18
Joined: Thu Dec 15, 2011 10:51 am

Re: [How-To] Boot Entirely from SATA

Postby 0123456789 » Wed Dec 28, 2011 6:45 am

I too am unsuccessful in getting this to work, I just get the blinking light, no booting.

Stock Pogoplug B01
Thermaltake BlacX ST0005U (dock works as I am able to see the drive if I boot stock, then power on the dock and scan for it)

stage1.wrapped -> stage1/stage1.wrapped800
u-boot.wrapped -> u-boot/u-boot.wrapped
uImage -> uImages/uImage.nopci

I plan to play around with it some more, if I manage to make progress I will be sure to post here.
0123456789
 
Posts: 15
Joined: Tue Oct 26, 2010 5:24 am

Re: [How-To] Boot Entirely from SATA

Postby WarheadsSE » Wed Dec 28, 2011 2:18 pm

Hmm.. I don't have a spare SATA drive at the moment to try fresh.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [How-To] Boot Entirely from SATA

Postby telzey » Thu Dec 29, 2011 6:44 pm

OK, I finally got my serial adapter working.

So to summarize ...

PogoPlug P21 with working eSATA drive (in Vantec NexStar3 NST-360SU enclosure)

stage1.wrapped -> stage1/stage1.wrapped700
u-boot.wrapped -> u-boot/u-boot.wrapped
uImage -> uImages/uImage.nopci

All partitions created as per the 1st post.

The Pogo tries to boot but gets stuck with the LED on the front flashing.

Here is the output from the serial port ...

Code: Select all
Stage-1 Bootloader Mon Nov 14 22:15:13 EST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001B01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading disk 0, Image 0
  Sector : 0x0000009A
  Hdr len: 0x0001FB34
  Hdr CRC: 0x827E0FA5
 OK
Initialising disks
SATA PHY not ready for device 1
Detecting SATA busses:
Bus 0: Found first device OK
  Device 0: Model: ST3320620AS  Firm: 3.AAC  Ser#: 5QF0D3MM
            Type: Hard Disk
            Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
  Device 1: not available
Failed to read valid environment from disk, using built-in default


U-Boot 1.1.2 (Dec 19 2011 - 20:06:48)

U-Boot code: 60E00000 -> 60E1FB34  BSS: -> 60E5435C
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value

IDE read: device 0 block # 288, count 1 ... 1 blocks read: OK
Hit any key to stop autoboot:  0

Loading from IDE device 0, partition 1: Name: hda1
  Type: U-Boot
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 60500000 ...
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.31.6_SMP_820 (root@ProDev) (gcc version 4.6.0 20110429 (prerelease) (GCC) ) #100 SMP Sun May 29 04:53:45 EDT 2011
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root='$root_dev' console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait ubi.mtd=2,512 mem=128M poweroutage=yes
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 125496KB available (3692K code, 291K data, 124K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.260000] Security Framework initialized
[    0.260000] Mount-cache hash table entries: 512
[    0.270000] CPU: Testing write buffer coherency: ok
[    0.270000] Calibrating local timer... 349.99MHz.
[    0.340000] CPU1: Booted secondary processor
[    0.440000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.670000] Brought up 2 CPUs
[    0.680000] SMP: Total of 2 processors activated (558.69 BogoMIPS).
[    0.690000] NET: Registered protocol family 16
[    0.690000] Number of DMA channels = 4, version = 4
[    0.700000] Reserving a DMA channel for DirectRAID
[    0.700000] Allocating 389 SRAM generic DMA descriptors
[    0.720000] bio: create slab <bio-0> at 0
[    0.730000] SCSI subsystem initialized
[    0.730000] usbcore: registered new interface driver usbfs
[    0.740000] usbcore: registered new interface driver hub
[    0.740000] usbcore: registered new device driver usb
[    0.780000] NET: Registered protocol family 2
[    0.780000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.790000] Switched to NOHz mode on CPU #0
[    0.790000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.790000] Switched to NOHz mode on CPU #1
[    0.800000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.810000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.810000] TCP reno registered
[    0.820000] NET: Registered protocol family 1
[    0.820000] Create fragment cache
[    0.830000] fuse init (API version 7.12)
[    0.830000] msgmni has been set to 245
[    0.840000] alg: No test for stdrng (krng)
[    0.850000] io scheduler noop registered
[    0.850000] io scheduler anticipatory registered
[    0.850000] io scheduler deadline registered
[    0.860000] io scheduler cfq registered (default)
[    0.880000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.890000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    0.910000] brd: module loaded
[    0.910000] loop: module loaded
[    0.920000] ox820sata: OX820 sata core.
[    0.920000] scsi0 : oxnassata
[    0.930000] scsi1 : oxnassata
[    0.930000] ata1: SATA max UDMA/133 irq 50
[    0.930000] ata2: SATA max UDMA/133 irq 50
[    0.940000] ox820sata: reseting SATA core
[    1.460000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.510000] ata1.00: ATA-7: ST3320620AS, 3.AAC, max UDMA/133
[    1.520000] ata1.00: 625142448 sectors, multi 0: LBA48
[    1.570000] ata1.00: configured for UDMA/133
[    1.570000] ox820sata: reseting SATA core
[    2.290000] ata2: SATA link down (SStatus 0 SControl 300)
[    2.290000] scsi 0:0:0:0: Direct-Access     ATA      ST3320620AS      3.AA PQ: 0 ANSI: 5
[    2.300000] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    2.310000] sd 0:0:0:0: [sda] Write Protect is off
[    2.310000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.320000] tun: Universal TUN/TAP device driver, 1.6
[    2.320000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.320000] NAND: Page read time 40ms
[    2.320000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    2.320000] Scanning device for bad blocks
[    2.340000] Bad eraseblock 386 at 0x000003040000
[    2.390000]  sda:
[    2.390000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    2.400000] 0x000000000000-0x000000e00000 : "boot"
[    2.400000] 0x000000e00000-0x000008000000 : "rootfs"
[    2.410000]  unknown partition table
[    2.410000] UBI: attaching mtd2 to ubi0
[    2.410000] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.420000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.430000] UBI: logical eraseblock size:    129024 bytes
[    2.430000] UBI: smallest flash I/O unit:    2048
[    2.440000] UBI: sub-page size:              512
[    2.440000] UBI: VID header offset:          512 (aligned 512)
[    2.450000] UBI: data offset:                2048
[    2.860000] UBI: attached mtd2 to ubi0
[    2.860000] UBI: MTD device name:            "rootfs"
[    2.870000] UBI: MTD device size:            114 MiB
[    2.870000] UBI: number of good PEBs:        911
[    2.880000] UBI: number of bad PEBs:         1
[    2.880000] UBI: max. allowed volumes:       128
[    2.890000] UBI: wear-leveling threshold:    4096
[    2.890000] UBI: number of internal volumes: 1
[    2.900000] UBI: number of user volumes:     1
[    2.900000] UBI: available PEBs:             0
[    2.910000] UBI: total number of reserved PEBs: 911
[    2.910000] UBI: number of PEBs reserved for bad PEB handling: 9
[    2.920000] UBI: max/mean erase counter: 2/0
[    2.920000] UBI: image sequence number: 0
[    2.930000] UBI: background thread "ubi_bgt0d" started, PID 302
[    2.930000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.930000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    2.930000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
[    2.960000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    2.980000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    2.980000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.990000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.990000] usb usb1: Product: OXNAS EHCI Host Controller
[    3.000000] usb usb1: Manufacturer: Linux 2.6.31.6_SMP_820 ehci_hcd
[    3.010000] usb usb1: SerialNumber: usb
[    3.010000] usb usb1: configuration #1 chosen from 1 choice
[    3.020000] hub 1-0:1.0: USB hub found
[    3.020000] hub 1-0:1.0: 2 ports detected
[    3.030000] Initializing USB Mass Storage driver...
[    3.030000] usbcore: registered new interface driver usb-storage
[    3.040000] USB Mass Storage support registered.
[    3.040000] mice: PS/2 mouse device common for all mice
[    3.050000] TCP cubic registered
[    3.050000] NET: Registered protocol family 10
[    3.060000] NET: Registered protocol family 17
[    3.060000] RPC: Registered udp transport module.
[    3.070000] RPC: Registered tcp transport module.
[    3.070000] Waiting for root device '$root_dev'...
[    3.340000] usb 1-1: new high speed USB device using oxnas-ehci and address 2
[    3.490000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    3.490000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.500000] usb 1-1: Product: USB2.0 Hub
[    3.500000] usb 1-1: configuration #1 chosen from 1 choice
[    3.510000] hub 1-1:1.0: USB hub found
[    3.520000] hub 1-1:1.0: 4 ports detected
telzey
 
Posts: 58
Joined: Fri Dec 16, 2011 8:42 pm

Re: [How-To] Boot Entirely from SATA

Postby telzey » Thu Dec 29, 2011 7:07 pm

So looking at my previous post, I'm not sure what root filesystem the kernel is going to try to load.

May I suggest an alternate partition layout that would make testing a little less destructive?

In particular, having u-boot looking for the kernel in partition 1 rather than use a hard-coded sector number like the original iomega example that redsquare posted in http://archlinuxarm.org/forum/viewtopic.php?f=29&t=1172&hilit=magic&start=30#p8381 means that we can't have a fallback to a working system to boot from flash and USB.

The partition layout that I'd suggest would look something like ...

Code: Select all
Number  Start (sector)    End (sector)  Size       Code  Name
   1           16384        14696447   7.0 GiB     0700  Linux/Windows data
   2        14696448        29376511   7.0 GiB     0700  Linux/Windows data
   3        29376512        31473663   1024.0 MiB  8200  Linux swap
   4        31473664       625142414   283.1 GiB   0700  Linux/Windows data
   5              34           16383   8.0 MiB     EF02  BIOS boot partition


That's a GPT version, but the same idea would work for MBR partitioning. FYI, the pogoplug does boot from flash successfully with the rootfs on sda1 on a GTP partitioned disk using either USB or eSATA cables.

The main advantage here is that if the HDD boot kernel lives at sector 2048 and uses a rootfs on /dev/sda2 then we've got 2 completely separate installations of ALARM on the HDD.

If we screw up the HDD boot somehow then we can just remove the eSATA cable and plug in a USB cable and reboot from from flash and /dev/sda1 to get a working system.
telzey
 
Posts: 58
Joined: Fri Dec 16, 2011 8:42 pm

Re: [How-To] Boot Entirely from SATA

Postby WarheadsSE » Thu Dec 29, 2011 7:31 pm

Say wha..

The bootargs didn't complete root= parameter.

Look, if you are booting with my method, then we're at the following missed point:
This does not touch the NAND at all, and the SATA will always be /dev/sda.
Therefore:
- remove the sata drive and power cycle: get NAND bootloader
- NAND boots USB perfectly fine

I am not certain people realize the limitation of the uBoot 1.1.2... GPT partitions being one of them.

The /dev/sda1 leave you having an easier method to put a new kernel on (dd of=/dev/sda1(or2)) .. I tried that very uboot, and there has to be something off, but I had no issue booting to it. I can replace the uboot with default parameters that do not attempt to dervice if it should boot from /dev/sda1 or /dev/sda2.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [How-To] Boot Entirely from SATA

Postby telzey » Thu Dec 29, 2011 9:10 pm

Thanks for the fast response :D

WarheadsSE wrote:This does not touch the NAND at all, and the SATA will always be /dev/sda.
Therefore:
- remove the sata drive and power cycle: get NAND bootloader
- NAND boots USB perfectly fine


I totally understand, that's my point.

By putting the HDD-boot kernel into sda1 you've killed my ability to use the same HDD to boot from NAND just by changing the cables from SATA to USB. It means that I MUST have a 2nd HDD or USB-flash drive to get the system booting again (or have a totally separate linux machine to use to fix the situation).

It's not a killer, but in my mind I'd PERSONALLY find it cleaner and more convenient to not require that, and I don't see that you actually lose anything by hard-coding the kernel location into uBoot.

WarheadsSE wrote:I am not certain people realize the limitation of the uBoot 1.1.2... GPT partitions being one of them.


Again, I understand. But if uBoot just looked for the kernel at sector 2048 instead of partition sda1 then uBoot wouldn't care if the HDD was partitioned with MBR, GTP-with-protective-mbr, or GPT-with-hybrid-mbr. Once the kernel is loaded it is quite happy to mount the rootfs on a GPT disk.

WarheadsSE wrote:The /dev/sda1 leave you having an easier method to put a new kernel on (dd of=/dev/sda1(or2))


Again, I understand what you're saying, but since you'd normally be using a script to write the kernel it doesn't really matter if it is "of=/dev/sda bs=512 seek=2048" instead of "of=/dev/sda1".

WarheadsSE wrote:I tried that very uboot, and there has to be something off, but I had no issue booting to it.


I'm going to wipe the 1st 16G of my HDD and try the steps again to make sure that I didn't get something wrong.
telzey
 
Posts: 58
Joined: Fri Dec 16, 2011 8:42 pm

Re: [How-To] Boot Entirely from SATA

Postby telzey » Thu Dec 29, 2011 9:48 pm

OK, so here's the latest attempt ...

1st 16G of the HDD wiped clean.
New MBR partition table (with fdisk, definitely no GPT to confuse things).
2 partitions, 10MB sda1 unformatted, 7GB sda2 formatted ext3. No other partitions, no swap space.
Rootfs copied to sda2 as instructed. usr/local/mac_addr created and confirmed.

Same results as before, the boot starts and then hangs up with the PogoPlug's power led flashing.

Here is the output ...

Code: Select all
Stage-1 Bootloader Mon Nov 14 22:15:13 EST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001B01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading disk 0, Image 0
  Sector : 0x0000009A
  Hdr len: 0x0001FB34
  Hdr CRC: 0x827E0FA5
 OK
Initialising disks
SATA PHY not ready for device 1
Detecting SATA busses:
Bus 0: Found first device OK
  Device 0: Model: ST3320620AS  Firm: 3.AAC  Ser#: 5QF0D3MM
            Type: Hard Disk
            Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
  Device 1: not available
Failed to read valid environment from disk, using built-in default


U-Boot 1.1.2 (Dec 19 2011 - 20:06:48)

U-Boot code: 60E00000 -> 60E1FB34  BSS: -> 60E5435C
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value

IDE read: device 0 block # 288, count 1 ... 1 blocks read: OK
Hit any key to stop autoboot:  0

Loading from IDE device 0, partition 1: Name: hda1
  Type: U-Boot
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 60500000 ...
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.31.6_SMP_820 (root@ProDev) (gcc version 4.6.0 20110429 (prerelease) (GCC) ) #100 SMP Sun May 29 04:53:45 EDT 2011
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root='$root_dev' console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait ubi.mtd=2,512 mem=128M poweroutage=yes
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 125496KB available (3692K code, 291K data, 124K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.260000] Security Framework initialized
[    0.260000] Mount-cache hash table entries: 512
[    0.270000] CPU: Testing write buffer coherency: ok
[    0.270000] Calibrating local timer... 349.99MHz.
[    0.340000] CPU1: Booted secondary processor
[    0.440000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.670000] Brought up 2 CPUs
[    0.680000] SMP: Total of 2 processors activated (558.69 BogoMIPS).
[    0.690000] NET: Registered protocol family 16
[    0.690000] Number of DMA channels = 4, version = 4
[    0.700000] Reserving a DMA channel for DirectRAID
[    0.700000] Allocating 389 SRAM generic DMA descriptors
[    0.720000] bio: create slab <bio-0> at 0
[    0.730000] SCSI subsystem initialized
[    0.730000] usbcore: registered new interface driver usbfs
[    0.740000] usbcore: registered new interface driver hub
[    0.740000] usbcore: registered new device driver usb
[    0.780000] NET: Registered protocol family 2
[    0.780000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.790000] Switched to NOHz mode on CPU #0
[    0.790000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.790000] Switched to NOHz mode on CPU #1
[    0.800000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.810000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.810000] TCP reno registered
[    0.820000] NET: Registered protocol family 1
[    0.820000] Create fragment cache
[    0.830000] fuse init (API version 7.12)
[    0.830000] msgmni has been set to 245
[    0.840000] alg: No test for stdrng (krng)
[    0.850000] io scheduler noop registered
[    0.850000] io scheduler anticipatory registered
[    0.850000] io scheduler deadline registered
[    0.860000] io scheduler cfq registered (default)
[    0.880000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.890000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    0.910000] brd: module loaded
[    0.910000] loop: module loaded
[    0.920000] ox820sata: OX820 sata core.
[    0.920000] scsi0 : oxnassata
[    0.930000] scsi1 : oxnassata
[    0.930000] ata1: SATA max UDMA/133 irq 50
[    0.930000] ata2: SATA max UDMA/133 irq 50
[    0.940000] ox820sata: reseting SATA core
[    1.460000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.510000] ata1.00: ATA-7: ST3320620AS, 3.AAC, max UDMA/133
[    1.520000] ata1.00: 625142448 sectors, multi 0: LBA48
[    1.570000] ata1.00: configured for UDMA/133
[    1.570000] ox820sata: reseting SATA core
[    2.290000] ata2: SATA link down (SStatus 0 SControl 300)
[    2.290000] scsi 0:0:0:0: Direct-Access     ATA      ST3320620AS      3.AA PQ: 0 ANSI: 5
[    2.300000] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    2.310000] sd 0:0:0:0: [sda] Write Protect is off
[    2.310000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.320000] tun: Universal TUN/TAP device driver, 1.6
[    2.320000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.320000] NAND: Page read time 40ms
[    2.320000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    2.320000] Scanning device for bad blocks
[    2.340000] Bad eraseblock 386 at 0x000003040000
[    2.390000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    2.390000] 0x000000000000-0x000000e00000 : "boot"
[    2.400000]  sda:
[    2.400000] 0x000000e00000-0x000008000000 : "rootfs"
[    2.410000] UBI: attaching mtd2 to ubi0
[    2.410000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.420000] UBI: logical eraseblock size:    129024 bytes
[    2.420000] UBI: smallest flash I/O unit:    2048
[    2.430000] UBI: sub-page size:              512
[    2.430000] UBI: VID header offset:          512 (aligned 512)
[    2.440000] UBI: data offset:                2048
[    2.850000]  sda1 sda2
[    2.850000] UBI: attached mtd2 to ubi0
[    2.860000] UBI: MTD device name:            "rootfs"
[    2.860000] UBI: MTD device size:            114 MiB
[    2.870000] UBI: number of good PEBs:        911
[    2.870000] UBI: number of bad PEBs:         1
[    2.880000] UBI: max. allowed volumes:       128
[    2.880000] UBI: wear-leveling threshold:    4096
[    2.890000] UBI: number of internal volumes: 1
[    2.890000] UBI: number of user volumes:     1
[    2.900000] UBI: available PEBs:             0
[    2.900000] UBI: total number of reserved PEBs: 911
[    2.900000] UBI: number of PEBs reserved for bad PEB handling: 9
[    2.910000] UBI: max/mean erase counter: 2/0
[    2.920000] UBI: image sequence number: 0
[    2.920000] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.920000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.930000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    2.940000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
[    2.940000] UBI: background thread "ubi_bgt0d" started, PID 301
[    2.970000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    2.990000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    2.990000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.000000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.000000] usb usb1: Product: OXNAS EHCI Host Controller
[    3.010000] usb usb1: Manufacturer: Linux 2.6.31.6_SMP_820 ehci_hcd
[    3.020000] usb usb1: SerialNumber: usb
[    3.020000] usb usb1: configuration #1 chosen from 1 choice
[    3.030000] hub 1-0:1.0: USB hub found
[    3.030000] hub 1-0:1.0: 2 ports detected
[    3.040000] Initializing USB Mass Storage driver...
[    3.040000] usbcore: registered new interface driver usb-storage
[    3.050000] USB Mass Storage support registered.
[    3.050000] mice: PS/2 mouse device common for all mice
[    3.060000] TCP cubic registered
[    3.060000] NET: Registered protocol family 10
[    3.070000] NET: Registered protocol family 17
[    3.070000] RPC: Registered udp transport module.
[    3.080000] RPC: Registered tcp transport module.
[    3.080000] Waiting for root device '$root_dev'...
[    3.350000] usb 1-1: new high speed USB device using oxnas-ehci and address 2
[    3.500000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    3.500000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.510000] usb 1-1: Product: USB2.0 Hub
[    3.510000] usb 1-1: configuration #1 chosen from 1 choice
[    3.520000] hub 1-1:1.0: USB hub found
[    3.530000] hub 1-1:1.0: 4 ports detected
telzey
 
Posts: 58
Joined: Fri Dec 16, 2011 8:42 pm

Re: [How-To] Boot Entirely from SATA

Postby telzey » Thu Dec 29, 2011 10:08 pm

Aaaah ... finally got it working!

I pressed a key to stop the boot and enter uBoot. There I changed the "bootcmd" variable to the correct root filesystem and then continued the boot ... and it worked!

Now how do I make this permanent?

Code: Select all
Stage-1 Bootloader Mon Nov 14 22:15:13 EST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001B01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading disk 0, Image 0
  Sector : 0x0000009A
  Hdr len: 0x0001FB34
  Hdr CRC: 0x827E0FA5
 OK
Initialising disks
SATA PHY not ready for device 1
Detecting SATA busses:
Bus 0: Found first device OK
  Device 0: Model: ST3320620AS  Firm: 3.AAC  Ser#: 5QF0D3MM
            Type: Hard Disk
            Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
  Device 1: not available
Failed to read valid environment from disk, using built-in default


U-Boot 1.1.2 (Dec 19 2011 - 20:06:48)

U-Boot code: 60E00000 -> 60E1FB34  BSS: -> 60E5435C
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value

IDE read: device 0 block # 288, count 1 ... 1 blocks read: OK
Hit any key to stop autoboot:  0
$  printenv
bootcmd=run dload1 boot || run dload2 boot || lightled
bootdelay=2
baudrate=115200
ethaddr=00:30:e0:00:00:01
ipaddr=172.31.0.128
serverip=172.31.0.100
autoload=n
netmask=255.255.0.0
bootfile="uImage"
lightled=ledfail 1
extinguishled=ledfail 0
boot=bootm 60500000
dload1=diskboot 60500000 0:1
dload2=diskboot 60500000 0:2
root_dev1=/dev/sda2
root_dev2=/dev/sda1
root_dev=/dev/sda2
stdin=serial
stdout=serial
stderr=serial
bootargs=root='$root_dev' console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait ubi.mtd=2,512 mem=128M poweroutage=yes

Environment size: 567/8188 bytes
$ setenv bootargs root=/dev/sda2 console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait ubi.mtd=2,512 mem=128M poweroutage=yes
$ run bootcmd

Loading from IDE device 0, partition 1: Name: hda1
  Type: U-Boot
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 60500000 ...
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2159884 Bytes =  2.1 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.31.6_SMP_820 (root@ProDev) (gcc version 4.6.0 20110429 (prerelease) (GCC) ) #100 SMP Sun May 29 04:53:45 EDT 2011
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root=/dev/sda2 console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootwait ubi.mtd=2,512 mem=128M poweroutage=yes
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 125496KB available (3692K code, 291K data, 124K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.260000] Security Framework initialized
[    0.260000] Mount-cache hash table entries: 512
[    0.270000] CPU: Testing write buffer coherency: ok
[    0.270000] Calibrating local timer... 349.99MHz.
[    0.340000] CPU1: Booted secondary processor
[    0.440000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.670000] Brought up 2 CPUs
[    0.680000] SMP: Total of 2 processors activated (558.69 BogoMIPS).
[    0.690000] NET: Registered protocol family 16
[    0.690000] Number of DMA channels = 4, version = 4
[    0.700000] Reserving a DMA channel for DirectRAID
[    0.700000] Allocating 389 SRAM generic DMA descriptors
[    0.720000] bio: create slab <bio-0> at 0
[    0.730000] SCSI subsystem initialized
[    0.730000] usbcore: registered new interface driver usbfs
[    0.740000] usbcore: registered new interface driver hub
[    0.740000] usbcore: registered new device driver usb
[    0.770000] NET: Registered protocol family 2
[    0.770000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.780000] Switched to NOHz mode on CPU #0
[    0.780000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.780000] Switched to NOHz mode on CPU #1
[    0.790000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.800000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.800000] TCP reno registered
[    0.810000] NET: Registered protocol family 1
[    0.810000] Create fragment cache
[    0.820000] fuse init (API version 7.12)
[    0.820000] msgmni has been set to 245
[    0.830000] alg: No test for stdrng (krng)
[    0.840000] io scheduler noop registered
[    0.840000] io scheduler anticipatory registered
[    0.840000] io scheduler deadline registered
[    0.850000] io scheduler cfq registered (default)
[    0.870000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.880000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    0.890000] brd: module loaded
[    0.900000] loop: module loaded
[    0.910000] ox820sata: OX820 sata core.
[    0.910000] scsi0 : oxnassata
[    0.920000] scsi1 : oxnassata
[    0.920000] ata1: SATA max UDMA/133 irq 50
[    0.920000] ata2: SATA max UDMA/133 irq 50
[    0.930000] ox820sata: reseting SATA core
[    1.450000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.490000] ata1.00: ATA-7: ST3320620AS, 3.AAC, max UDMA/133
[    1.500000] ata1.00: 625142448 sectors, multi 0: LBA48
[    1.550000] ata1.00: configured for UDMA/133
[    1.560000] ox820sata: reseting SATA core
[    2.270000] ata2: SATA link down (SStatus 0 SControl 300)
[    2.270000] scsi 0:0:0:0: Direct-Access     ATA      ST3320620AS      3.AA PQ: 0 ANSI: 5
[    2.280000] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    2.290000] sd 0:0:0:0: [sda] Write Protect is off
[    2.290000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.300000]  sda:
[    2.310000] tun: Universal TUN/TAP device driver, 1.6
[    2.310000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.320000] NAND: Page read time 40ms
[    2.320000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    2.330000] Scanning device for bad blocks
[    2.360000] Bad eraseblock 386 at 0x000003040000
[    2.410000]  sda1 sda2
[    2.410000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    2.420000] 0x000000000000-0x000000e00000 : "boot"
[    2.430000] 0x000000e00000-0x000008000000 : "rootfs"
[    2.430000] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.440000] UBI: attaching mtd2 to ubi0
[    2.440000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.450000] UBI: logical eraseblock size:    129024 bytes
[    2.450000] UBI: smallest flash I/O unit:    2048
[    2.460000] UBI: sub-page size:              512
[    2.460000] UBI: VID header offset:          512 (aligned 512)
[    2.470000] UBI: data offset:                2048
[    2.880000] UBI: attached mtd2 to ubi0
[    2.880000] UBI: MTD device name:            "rootfs"
[    2.890000] UBI: MTD device size:            114 MiB
[    2.890000] UBI: number of good PEBs:        911
[    2.900000] UBI: number of bad PEBs:         1
[    2.900000] UBI: max. allowed volumes:       128
[    2.910000] UBI: wear-leveling threshold:    4096
[    2.910000] UBI: number of internal volumes: 1
[    2.920000] UBI: number of user volumes:     1
[    2.920000] UBI: available PEBs:             0
[    2.930000] UBI: total number of reserved PEBs: 911
[    2.930000] UBI: number of PEBs reserved for bad PEB handling: 9
[    2.940000] UBI: max/mean erase counter: 2/0
[    2.940000] UBI: image sequence number: 0
[    2.940000] UBI: background thread "ubi_bgt0d" started, PID 304
[    2.940000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.940000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    2.940000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
[    2.980000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    3.000000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    3.000000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.010000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.010000] usb usb1: Product: OXNAS EHCI Host Controller
[    3.020000] usb usb1: Manufacturer: Linux 2.6.31.6_SMP_820 ehci_hcd
[    3.030000] usb usb1: SerialNumber: usb
[    3.030000] usb usb1: configuration #1 chosen from 1 choice
[    3.040000] hub 1-0:1.0: USB hub found
[    3.040000] hub 1-0:1.0: 2 ports detected
[    3.050000] Initializing USB Mass Storage driver...
[    3.050000] usbcore: registered new interface driver usb-storage
[    3.060000] USB Mass Storage support registered.
[    3.060000] mice: PS/2 mouse device common for all mice
[    3.070000] TCP cubic registered
[    3.070000] NET: Registered protocol family 10
[    3.080000] NET: Registered protocol family 17
[    3.080000] RPC: Registered udp transport module.
[    3.090000] RPC: Registered tcp transport module.
[    3.120000] kjournald starting.  Commit interval 5 seconds
[    3.120000] EXT3 FS on sda2, internal journal
[    3.120000] EXT3-fs: mounted filesystem with writeback data mode.
[    3.120000] VFS: Mounted root (ext3 filesystem) on device 8:2.
[    3.120000] Freeing init memory: 124K
INIT: version 2.88 booting
[    3.370000] usb 1-1: new high speed USB device using oxnas-ehci and address 2
[    3.520000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    3.520000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.530000] usb 1-1: Product: USB2.0 Hub
[    3.540000] usb 1-1: configuration #1 chosen from 1 choice
[    3.540000] hub 1-1:1.0: USB hub found
[    3.550000] hub 1-1:1.0: 4 ports detected

 > Arch Linux ARM

 > http://www.archlinuxarm.org

   ------------------------------
:: Mounting Root Read-Only                                               [DONE]
:: Adjusting system time and setting kernel timezone                     [DONE]
:: Starting UDev Daemon                                                  [DONE]
:: Triggering UDev uevents                                               [DONE]
:: Loading Modules                                                       [BUSY] [    4.740000] Probing for Synopsis GMAC, unit 0
[    4.750000] eth0: Tuning GMAC 0 RGMII timings
[    4.760000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
[    4.870000] eth0: GMAC ver = 53, vendor ver = 18 at 0xed400000, IRQ 40
[    4.880000] eth0: Found PHY at address 3, type 0x001cc914 -> 10/100/1000
[    4.890000] eth0: Ethernet addr: 00:30:e0:00:00:00
[    4.890000] probe() eth0: Leon x2 clock
                                                                         [DONE]
:: Waiting for UDev uevents to be processed                              [BUSY] [    5.430000] VFS: Can't find ext3 filesystem on dev sda1.
[    5.440000] VFS: Can't find an ext2 filesystem on dev sda1.
                                                                         [DONE]
:: Bringing up loopback interface                                        [DONE]
:: Checking Filesystems                                                  [DONE]
:: Remounting Root Read/Write                                            [BUSY] [    5.690000] EXT3 FS on sda2, internal journal
                                                                         [DONE]
:: Creating mtab                                                         [DONE]
:: Mounting Local Filesystems                                            [DONE]
:: Activating Swap                                                       [DONE]
:: Configuring Time Zone                                                 [DONE]
:: Initializing Random Seed                                              [DONE]
:: Removing Leftover Files                                               [DONE]
:: Setting Hostname: alarm                                               [DONE]
:: Setting Locale: en_US.UTF-8                                           [DONE]
:: Setting Consoles to UTF-8 mode                                        [DONE]
:: Loading Keyboard Map: us                                              [DONE]
:: Saving dmesg Log                                                      [DONE]
INIT: Entering runlevel: 3
:: Setting MAC address                                                   [BUSY] FATAL: Module oxnas_led not found.
AMBER
GREEN
[    8.040000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
[    8.050000] CoPro offload is active on eth0
[    8.050000] Alloc'ing ARM descs 8192 bytes
[    8.060000] Alloc'ing CoPro parameters 36 bytes
[    8.060000] gmac gmac.0: firmware: requesting gmac_copro_firmware
[    8.100000] CoPro: Programming start address as 0xd000e000
[    8.210000] eth0: Resetting GMAC
[    8.210000] eth0: GMAC reset complete
[    8.220000] eth0: Setting Rx flow control thresholds for LAN port
[    8.780000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
[    9.280000] eth0: link down
[   11.240000] ADDRCONF(NETDEV_UP): eth0: link is not ready
                                                                         [DONE]
:: Starting Syslog-NG                                                    [DONE]
:: Starting Network                                                      [BUSY] [   12.780000] eth0: link up, 1000Mbps, full-duplex, not using pause, lpa 0xC1E1
[   12.780000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
                                                                         [DONE]
:: Mounting Network Filesystems                                          [DONE]
:: Starting crond daemon                                                 [DONE]
:: Starting Secure Shell Daemon                                          [DONE]
:: Starting OpenNTPD                                                     [DONE]

Arch Linux 2.6.31.6_SMP_820  (alarm) (ttyS0)

alarm login:
telzey
 
Posts: 58
Joined: Fri Dec 16, 2011 8:42 pm

PreviousNext

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 4 guests