[SOLVED] [Odroid-U3] How to boot from USB HDD

This forum is for supported devices using an ARMv7 Samsung SoC.

[SOLVED] [Odroid-U3] How to boot from USB HDD

Postby CPQR » Sun Feb 16, 2014 1:51 pm

Hello Everyone,
Just finished installing ArchARM on Odroid-U3. Having a Raspberry Pi with ArchARM on a 200 GB HDD, I was wondering if I could do the same with Odroid-U3.
I tried this viewtopic.php?f=47&t=6499 by changing the root to /dev/sda2 but it won't boot up.
So is there anyway I can install Arch on a USB HDD on Odroid-U3 ? There is no guide for ArchARM on odroid forums.
Last edited by CPQR on Mon Feb 17, 2014 8:20 am, edited 1 time in total.
CPQR
 
Posts: 3
Joined: Sun Feb 16, 2014 1:27 pm

Re: [Odroid-U3] How to boot from USB HDD

Postby WarheadsSE » Sun Feb 16, 2014 7:47 pm

$this->bbcode_second_pass_quote('CPQR', 'c')hanging the root to /dev/sda2 but it won't boot up.

Define.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [Odroid-U3] How to boot from USB HDD

Postby CPQR » Mon Feb 17, 2014 7:05 am

I made a file called boot.txt in /boot and put this:

$this->bbcode_second_pass_code('', '
fatload mmc 0:1 0x40008000 zImage
setenv bootargs "root=/dev/sda2"
bootm 0x40008000
')

Then I ran:

$this->bbcode_second_pass_code('', '
mkimage -A arm -C none -T script -n 'Custom Boot Script' -d boot.txt boot.scr
')

/dev/sda2 is second partiton of USB HDD with all the contents of /dev/mmcblk0p2
CPQR
 
Posts: 3
Joined: Sun Feb 16, 2014 1:27 pm

[SOLVED] [Odroid-U3] How to boot from USB HDD

Postby CPQR » Mon Feb 17, 2014 8:19 am

Okay I solved it. Thank god. The all boot process was starting before U3 could detect the USB HDD.

Here is what I did if anyone is interested.

1. SSHed into working Arch installation on Odroid-U3 (MicroSD)
2. Made a file boot.txt with following contents in /boot

$this->bbcode_second_pass_code('', '
cd /boot/
nano boot.txt
')

$this->bbcode_second_pass_code('', '
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/sda2 rootwait"
set bootdelay 4
save
boot
')

3. Made boot.scr with mkimage command

$this->bbcode_second_pass_code('', '
mkimage -T script -A arm -C none -n 'Custom Boot Script for U3' -d boot.txt boot.scr
')

4. Connected my USB HDD to Odroid-U3.
5. Formatted /dev/sda2 with ext4

$this->bbcode_second_pass_code('', '
mkfs.ext4 -L ArchARM /dev/sda2
')

6. Mounted /dev/sda2 to /mnt/sad2

$this->bbcode_second_pass_code('', '
mkdir /mnt/sda2
mount /dev/sda2 /mnt/sda2
')

7. Rsynced root of MicroSD to /dev/sda2 (TIP: Arch Wiki)

$this->bbcode_second_pass_code('', '
rsync -aAXv --progress --verbose --delete /* /mnt/sda2/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}
')

8. Rebooted

$this->bbcode_second_pass_code('', '
systemctl reboot
')

After login you can check with df -h what is your root partiton

TIP: You may need to install uboot-mkimage and rsync to use these steps
$this->bbcode_second_pass_code('', '
pacman -S uboot-mkimage rsync
')


$this->bbcode_second_pass_quote('', 'S')ources & Help:
1. http://odroid.us/mediawiki/index.php?ti ... _USB_Drive
2. https://wiki.archlinux.org/index.php/Fu ... with_rsync
CPQR
 
Posts: 3
Joined: Sun Feb 16, 2014 1:27 pm


Return to Samsung

Who is online

Users browsing this forum: No registered users and 0 guests