Jump to content

What happens when booting with SATA drive connected?


barish

Recommended Posts

Hi! The jessy vanilla image works fine, but when I boot the Olinuxino Micro with a SATA HDD connected, I don't have ethernet/ssh access anymore. Even reboot _without_ the HDD doesn't work, I need to restore the content of /boot with an SD-card-reader to make it work again.

 

Sorry, I am (yet) not really into sunxi/uboot/kernel topics, so maybe there's a simple explanation to this behaviour?

Link to comment
Share on other sites

My first thing on the check list would be power supply. Is it powerful enough - Can you try with another one?

 

Second thought. Have you finish the installation part? Waited for first auto-reboot? Have you made clean power off? 

Plug a monitor or serial comm to see what's going on.

Link to comment
Share on other sites

Thanks for quick reply. The power is fine. I've been running the board with Olimex kernel and SATA system drive for more than half a year now (I've had problems with corrupted storage though so I want to try out a different kernel).

 

Your image on the SD card is working fine as long as I don't boot with connected SATA drive. I am not sure if I can plug in the SATA on a running board, I believe I shouldn't? This would be another approach though.

 

I have now put the original /boot content onto the SD card and could boot with this again. So I have access to all the logs, maybe you have an idea where to look? The onboard LED (green) came on normally, so I think the boot process at least started (but didn't arrive at ssh-deamon start?)

 

BTW, on the SATA HDD, there's a complete debian wheezy installed, but this shouldn't affect the boot process, should it?

 

I ordered a UART-USB interface yesterday, but haven't got it yet, so I have no serial access so far. If I find time I can pull out the board and try to connect it to a screen/keyboard, but at the moment I only have remote access.

Link to comment
Share on other sites

Strange. When you'll have a serial console, edit boot.cmd, change from whatever to: 

console=ttyS0,115200

and 

loglevel=7

And paste a boot log. This would be the best way to diagnose what's going on. Perhaps you will solve it when you saw the error.

Link to comment
Share on other sites

Ok, I finally connected with UART, and there I get a login. Only ethernet doesn't work. The console output during boot:


U-Boot SPL 2015.07-armbian-sun7i (Oct 11 2015 - 17:51:25)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2



U-Boot 2015.07-armbian-sun7i (Oct 11 2015 - 17:51:25 +0200) Allwinner Technology


CPU:   Allwinner A20 (SUN7I)

I2C:   ready

DRAM:  1 GiB

MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1

*** Warning - bad CRC, using default environment


Setting up a 1024x768 vga console

Error: no valid bmp image at 66000000

In:    serial

Out:   vga

Err:   vga

SCSI:  SUNXI SCSI INIT

Target spinup took 0 ms.

AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode

flags: ncq stag pm led clo only pmp pio slum part ccc apst 

Net:   eth0: ethernet@01c50000

starting USB...

USB0:   USB EHCI 1.00

USB1:   USB OHCI 1.0

USB2:   USB EHCI 1.00

USB3:   USB OHCI 1.0

scanning bus 0 for devices... 1 USB Device(s) found

scanning bus 2 for devices... 1 USB Device(s) found

Hit any key to stop autoboot:  2  1  0 

6944 bytes read in 162 ms (41 KiB/s)

switch to partitions #0, OK

mmc0 is current device

Scanning mmc 0:1...

Found U-Boot script /boot/boot.scr

1973 bytes read in 201 ms (8.8 KiB/s)

## Executing script at 43100000

0 bytes read in 121 ms (0 Bytes/s)

27924 bytes read in 343 ms (79.1 KiB/s)

5535136 bytes read in 607 ms (8.7 MiB/s)

Kernel image @ 0x46000000 [ 0x000000 - 0x5475a0 ]

## Flattened Device Tree blob at 49000000

   Booting using the fdt blob at 0x49000000

   Using Device Tree in place at 49000000, end 49009d13


Starting kernel ...


Uncompressing Linux... done, booting the kernel.

Does this help? Is there an easier way to make the SD card working again (with ethernet) then to restore the whole /boot from the image? Via the UART connection?

Link to comment
Share on other sites

I'm sorry, I double checked, but this is what I did: I opened boot.cmd with nano and changed (in the setenv bootargs line) console=tty1 to console=ttyS0 and loglevel=1 to loglevel=7, saved the changes, then I entered "mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr" resulting in:

Image Name:   
Created:      Thu Jan  1 10:01:13 2015
Image Type:   ARM Linux Script (uncompressed)
Data Size:    1911 Bytes = 1.87 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 1903 Bytes = 1.86 kB = 0.00 MB

and did a reboot.

Link to comment
Share on other sites

Hi,

 

on my R1, armbian 4.5 and 4.7 did also NOT boot with SATA connected...( I have a 2A openmoko_:-)-usb-charger )

I had to change my dts/dtb-file wich I  compiled on R1 with kernel 4.2.6 for my R1 .

sed -i 's/ahci: sata@01c18000 {/ahci: sata@01c18000 {\n\t\t\ttarget-supply = \<\&reg_ahci_5v\>;/g' arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts

crreating and replacing the armbian-lamobo-dtb with my compiled one, my R1  did boot with my and armbian-mailline-kernel again when SATA connected.

 

regards

Link to comment
Share on other sites

Sorry for not testing for so much time, it was quite a bad situation with the Olinuxino at work all the time.

 

But I have good news: I just downloaded the latest Jessie-image, and the problem seems to be solved, I can boot with attached SATA drive without any issues.

 

Thanks a lot for the ongoing development!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines