LIME2 HDD boot

Started by SzosszeNET, January 05, 2018, 08:34:45 PM

Previous topic - Next topic

SzosszeNET

Hello there,

Just wondering is it possible to move rootfs (/) to the a HDD attached to the SATA port and boot from there?

Just to clarify the SD card will be inserted with all the files, but the second partition will be /dev/sda1 instead of /dev/mmcblk0p2.

Tried to look around and found that it was suggested that it only takes one edit /boot/uEnv.txt (make it contain root=/dev/sda1 instead of /dev/mmcblk0p2) but also noticed that boot.cmd and boot.scr also contains "root=/dev/mmcblk0p2 which puzzles me a bit.

Anyone did move their rootfs to the SATA hdd?

Thank you in advance,

G

JohnS

You can't boot from it but could have it as root.

If all else fails, read linux-sunxi.org (about things like the boot rom).

John

SzosszeNET

Hello there,

Thank you for the answer, probably was confusing apologies. So indeed meant to have the scenario you described - the /boot vfat partition would be (is) on the SD card and the systems boots from it, but after looking to run the system off the sata.

Everything is in place so far - did create a new ext4 partition on the sata hdd, did rsync / to the new partition, updated /boot/uEnv.txt but after boot instead of /dev/sda1 /dev mmcblk0p2 is mounted. And finding references to root in other files was slightly confusing.  Currently using the a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_eMMC_rel_15.img.

Looking at linux-sunxi looks like that the A20 would boot entirely off SATA (http://linux-sunxi.org/Boot_Process) which might be an even better scenario, although just wanted to move the rootfs to decrease the wear of the SD card.


SzosszeNET

Ah,

Anyone else looking to accomplish this using the official olimex image -

edit /boot/boot.cmd and once the file reflects what you are looking for you need to recompile to a new /boot/boot.scr  (might want to copy the original file before overwriting just in case) via

mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

You'll probably need to install "u-boot-tools" package first as not installed by default (aptitude install u-boot-tools)

Still puzzled why modifying uEnv.txt does not work...as I've read it should be picked up before the script? Or if it's irrelevant probably it's just left in the image and does not do a thing...