2 2
napo7

Armbian on external USB SSD

Recommended Posts

Hi

 

I managed to get armbian on my Amlogic S905W device.

I'd like to run the whole root fs on an external usb device (ssd).

I know how to format it to ext4, mount it, but I can't manage to boot linux on it :

I tried to modify the /etc/fstab file, but it seems that it's not the good place ?

Perhaps a file in /boot ?

Share this post


Link to post
Share on other sites

Hmmm Good question !

I don't know, I suppose in some /dev/mmc.... device ? It's the stock image (an x96 mini tv box)

 

I'm very comfident with linux on desktop, servers and rpi, but not with this kind of devices (uboot ?)

 

s905_autoscript contains :

setenv initrd_loadaddr "0x13000000"
setenv init_hdmi "logo=osd1,loaded,${fb_addr},${hdmimode} vout=${hdmimode},enable"
setenv condev "console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw ${init_hdmi} ${condev} fsck.repair=yes net.ifnames=0 mac=${mac}"
setenv boot_start booti ${kernel_loadaddr} ${initrd_loadaddr} ${dtb_mem_addr}
if fatload usb 0 ${initrd_loadaddr} uInitrd; then if fatload usb 0 ${kernel_loadaddr} zImage; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
if fatload usb 1 ${initrd_loadaddr} uInitrd; then if fatload usb 1 ${kernel_loadaddr} zImage; then if fatload usb 1 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
if fatload usb 2 ${initrd_loadaddr} uInitrd; then if fatload usb 2 ${kernel_loadaddr} zImage; then if fatload usb 2 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
if fatload usb 3 ${initrd_loadaddr} uInitrd; then if fatload usb 3 ${kernel_loadaddr} zImage; then if fatload usb 3 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;
if fatload mmc 0 ${initrd_loadaddr} uInitrd; then if fatload mmc 0 ${kernel_loadaddr} zImage; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;

 

Share this post


Link to post
Share on other sites

I've made :

dd if=/dev/data of=/dev/sda1

then

resize2fs /dev/sda1

 

edited /etc/fstab to change "/dev/root" to "/dev/sda1"

 

When I rebooted and typed "mount" to verify, root fs was still mounted from /dev/data...

 

Is /etc/fstab really used to mount rootfs ? I suppose It's a kernel commandline option in facts.

I suppose I have to change the s905_autoscript, but I don't know the syntax and how to modify it ? (it seems to contain binary data in header section ??)

Share this post


Link to post
Share on other sites
On 6/11/2018 at 9:59 PM, napo7 said:

I've made :

dd if=/dev/data of=/dev/sda1

then

resize2fs /dev/sda1

 

edited /etc/fstab to change "/dev/root" to "/dev/sda1"

 

When I rebooted and typed "mount" to verify, root fs was still mounted from /dev/data...

 

Is /etc/fstab really used to mount rootfs ? I suppose It's a kernel commandline option in facts.

I suppose I have to change the s905_autoscript, but I don't know the syntax and how to modify it ? (it seems to contain binary data in header section ??)

I don't understand why you are trying to install the system in eMMC from the beginning and then try to change the rootfs location ? Immediately write the system image to an external media and use it.

Share this post


Link to post
Share on other sites

Sorry :)

I didn't knew I could install the system on an external media... thought I could only be done on a sd card...

 

So, the instructions are just

write image on SSD, boot on SSD. done !?

Share this post


Link to post
Share on other sites

It worked. 

thanks !

In facts, SSD over USB 2.0 is anyway faster than internal MMC !!

I run a MYSQL server (for home automation), and it is 60 times faster to make 1000 "insert into" on the database on SSD than internal memory !

 

Thanks for your help...

 

Share this post


Link to post
Share on other sites
21 hours ago, napo7 said:

In facts, SSD over USB 2.0 is anyway faster than internal MMC !!

I run a MYSQL server (for home automation), and it is 60 times faster to make 1000 "insert into" on the database on SSD than internal memory !

This is weird. The result should be the exact opposite. If so, eMMC does not work correctly (there may be different reasons).

Share this post


Link to post
Share on other sites

I don't know the specifications of this eMMc, but i saw "cheap computers" with 32gb of MMC which was slower than a good Sandisk SSD.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2