Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: asimko on July 30, 2014, 05:39:59 PM

Title: Boot from sata disk after power up
Post by: asimko on July 30, 2014, 05:39:59 PM
Hello everybody,

we have problem booting to sata disk straight after boot up olimex a20, even if we have everything setup properly. We have boot.scr pointed to /dev/sda1 and also fstab is pointed to sda1. Everything works after soft reset (reboot command), but if we turn off power and than start again, it will boot from sdcard anyway.
Do you have any suggestion how to fix this?

Thank you!
Title: Re: Boot from sata disk after power up
Post by: MBR on August 05, 2014, 11:08:40 PM
This look like a problem with the disk ininitalization, some harddisks need delays after the hard poweron. If your harddisk is externally powered, try to power it firts and turn on the A20 after a few seconds (when the disk finishes its initialization). Have you tried another harddisk model/manufacturer?
Title: Re: Boot from sata disk after power up
Post by: asimko on August 18, 2014, 03:09:30 PM
Hard disk is powered from olimex board (but tried also externally powered disk). Yes I already tried another model, result is still the same ... For now I have programmed script, that is rebooting the board if it is not booted from hard drive, but this is not a solution. Do you have any other suggestions?
Title: Re: Boot from sata disk after power up
Post by: hnb2907 on August 18, 2014, 09:06:08 PM
I have a number of A20's booting the olimex A20 debian image from a SATA disk. 

There is an option "bootdelay" in uEnv.txt in the boot partition that sets the delay time before the bootloader starts to boot.  Maybe this will help if your disk is taking longer to be ready at power-up.

My "uEnv.txt" looks like this, and I have no problems booting from cold:

baudrate=115200
console=ttyS0,115200
bootdelay=3
bootenv=uEnv.txt
bootscr=boot.scr
kernel=uImage
loglevel=8
panicarg=panic=10
root=/dev/sda2
extraargs=rootfstype=ext4 rootwait
setargs=setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
boot_mmc=fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x41000000 ${kernel}; bootm 0x41000000
uenvcmd=run setargs boot_mmc


If the uEnv.txt file doesn't exist on /dev/mmcblk0p1 try creating it, with these settings.

My disks are Hitachi GST Travelstar 5K1000, although I've tried a few others, without problem.


Cheers,
Chris.