BBB USB Hard drive boot - help

344 views
Skip to first unread message

Tomasz Lipiński

unread,
Aug 21, 2015, 2:53:03 AM8/21/15
to BeagleBoard
Welcome,

As for the beggining i would like to say tha im new to BeagleBoard enviroment , so please be patient.
I`m really curious if it is possible to use external USB hard drive (with own power supply) to use as main drive after boot sequence on BeagleBoard Black rev c.
I tried to follow up those instructions : 
but they seem to be a little bit outdated sadly ... 
For now i have used following image flashed into eMMC : 



Any help with that matter would be much appreciated.

Maxim Podbereznyy

unread,
Aug 21, 2015, 8:23:43 AM8/21/15
to beagleboard

What's the problem to mount a hdd after Linux booted?

21 Авг 2015 г. 9:53 пользователь "Tomasz Lipiński" <tomasz.li...@gmail.com> написал:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Aug 21, 2015, 12:29:40 PM8/21/15
to beagl...@googlegroups.com
The concepts are pretty much the same, except now days you'd probably use bootz instead of bootm. So the mkimage step wouldn't be needed.

http://www.embeddedhobbyist.com/2013/07/beaglebone-black-usb-boot/

Tomasz Lipiński

unread,
Aug 21, 2015, 2:00:35 PM8/21/15
to beagl...@googlegroups.com
Thanks for the guide William, i tried  it out but encountered some problems with it ...
I have connected USB drive to the BBB and booted it normally , after that i stared using commands you indicated for formating the hard drive :
"sudo dd if=/dev/zero of=/dev/sda bs=1024 count=1024"

"sudo fdisk /dev/sda" then "n p 1 default default , t 83 p w"

"sudo parted --script /dev/sda set 1 boot on sudo mkfs.ext4 /dev/sda1 -L rootfs"

But i`m receiving "invalid option -- 'L'" ...
Note that i have changed 'sdc' to 'sda' , beacuse this is how it is visible on BBB.


And in uEnv.txt (that is located /boot/uEnv.txt) file i need to add following lines : 

"

 uenvcmd=usb start;
    bootpart=0:1
    bootdir=/boot
    loaduimage=load usb ${bootpart} 0x80200000 /boot/uImage
    loadfdt=load usb ${bootpart} 0x815f0000 /boot/am335x-boneblack.dtb
    mmcroot=/dev/sda1 ro rootwait
    mmcboot=echo Booting from USB ...; run mmcargs; bootz 0x80200000 0x815f0000
"
It`s just the same as changes you indicated on blog , but changed "bootm" to "bootz"


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/peVCFCPfNr0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best Regards,
Tomasz Lipiński
Mobile : 500-001-420

William Hermans

unread,
Aug 21, 2015, 4:02:24 PM8/21/15
to beagl...@googlegroups.com
loaduimage=load usb ${bootpart} 0x80200000 /boot/uImage

This above is wrong. First you need to understand what a linux mage is.

i386

william@debian-can:~/can-dev/ipc-server$ ls /boot/
config-3.2.0-4-486  initrd.img-3.2.0-4-486  vmlinuz-3.2.0-4-486
grub                System.map-3.2.0-4-486

The above is for an i386 / x86 PC

No idea what image you have on your BBB, but on two of mine . . .

debian@beaglebone:~$ ls /boot/uboot/
App          Docs     ID.txt       MLO         scripts    u-boot.img  zImage
autorun.inf  Drivers  initrd.img   README.htm  SOC.sh     uEnv.txt
debug        dtbs     LICENSE.txt  README.md   START.htm  uInitrd


william@xanbustester:~$ ls /boot/uboot/
MLO                         config-4.2.0-rc4-bone2  u-boot.img  uEnv.txt.bak             zImage
System.map-4.2.0-rc4-bone2  dtbs                    uEnv.txt    vmlinuz-4.2.0-rc4-bone2

Anyway, starting to see my point ? You need to know what a kernel image is, and how to spot it. Then that is what loadimage= needs to point to.

tomasz.li...@gmail.com

unread,
Aug 21, 2015, 7:47:14 PM8/21/15
to BeagleBoard
Welcome,

As for the beggining i would like to say tha im new to BeagleBoard enviroment , so please be patient.
I`m really curious if it is possible to use external USB hard drive (with own power supply) to use as main drive after boot sequence on BeagleBoard Black rev c.
I tried to follow up those instructions : 

Tomasz Lipiński

unread,
Aug 27, 2015, 6:13:06 AM8/27/15
to beagl...@googlegroups.com
sorry for such late response but i was quite consumed with getting mono winforms running on BBB ...
Thanks for the tips , i learned some new things thanks to them , but the resolution to HDD was pretty easy , all i had to do was add in my "/uEnv.txt" file following arguments :

uenvcmd=usb start;echo Booting from USB ...;run loadall; run mmcargs; echo debug: [${bootargs}] ... ; echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};
echo command is not needed but wanted it to be in place for debuging measures :)

Of course before this i had to format hard drive correctly and change fstab on it, but it`s described in your guide pretty nicely :)
Thanks again for help !

Roger Quadros

unread,
Sep 17, 2015, 7:23:51 AM9/17/15
to beagl...@googlegroups.com
Hi,
Do you have the kernel and rootfs on the usb hard-disk or only the rootfs?

In either case you need to modify the u-boot startup environment to
1) start usb
"usb start"

2) load kernel from usb drive to dram (if kernel is located on usb disk)
"ext4load scsi 0:2 ${loadaddr} /boot/zImage"
assuming the kernel image is in 2nd partition which is ext4 type and located at /boot/zImage.

3) load DT from usb drive to dram
"ext4load scsi 0:2 ${fdtaddr} /boot/am335x-boneblack.dtb

assuming the DT blob is in 2nd partition which is ext4 type and located at /boot/am335x-boneblack.dtb.

4) update linux boot arguments "bootargs" to point to the right rootfs dev. e.g. (root=/dev/sda2)
"setenv bootargs console=${console} ${optargs} root=/dev/sda2"

5) stop usb
"usb stop"

6) boot the kernel.
"bootz ${loadaddr} - ${fdtaddr}

Good luck!

cheers,
-roger
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com <mailto:beagleboard...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages