[SOLVED] - How to boot from sata

Started by PaceyIV, July 30, 2013, 09:46:54 PM

Previous topic - Next topic

PaceyIV

#15
The end.

To move the rootfs to sata hard drive (/dev/sda2) with the official kernel (with sata driver as module / no static) I do this:

1. create a ramdisk with inside the kernel module:

# apt-get install uboot-mkimage
# mkimage -A arm -T ramdisk -C none -n uInitrd -d initrd.img uInitrd


2. Put the uInitrd created at step 1 in the microSD boot partition (/dev/mmcblk0p1)

3. Add the uEnv.txt in the microSD boot partition with the text below:


baudrate=115200
console=ttyS0,115200
bootdelay=1
bootenv=uEnv.txt
bootscr=boot.scr
kernel=uImage
loglevel=8
panicarg=panic=10
root=/dev/sda2
extraargs=rootfstype=ext4 rootwait mac_addr=00:AE:99:A3:E4:AF
setargs=setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
boot_mmc=fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x41000000 ${kernel}; fatload mmc 0 0x45000000 uInitrd; bootm 0x41000000 0x45000000
uenvcmd=run setargs boot_mmc


4. copy rootfs partition from microSD /dev/mmcblk0p1 to the sata partition (/dev/sda2)


Thanks to everyone for the support!

XFer

Excellent work!!
Thanks for sharing!

sirionnetworks

thanks but,


apt-get install u-boot-mkimageboot-mkimage
E: Unable to locate package u-boot-mkimageboot-mkimage

PaceyIV


sickmind

Recent versions of the linux image doesn't have initrd.img, so "mkimage -A arm -T ramdisk -C none -n uInitrd -d initrd.img uInitrd" wouldn't work.

mickours

#20
Is the Initrd.img still mandatory for booting from SATA?

The last kernel does not provide it. Is someone knows how to generate it?

EDIT:
Ok I found out that with initramfs-tools debian package, runnin mkinitramfs give me the initrd.img that I need.