Boot from sata disk after power up

Started by asimko, July 30, 2014, 05:39:59 PM

Previous topic - Next topic

asimko

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!

MBR

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?

asimko

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?

hnb2907

#3
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.