Deploy Ubuntu Beagle Bone Black Image From USB SSD using Powered USB hub

9 views
Skip to first unread message

chris....@star3.com

unread,
Nov 5, 2019, 2:07:47 PM11/5/19
to BeagleBoard
I am attempting to do the following using the Beagle Bone Black Rev C:

  1. Boot the Beagle Bone Black from a USB hard drive.
  2. Run autorun.sh automatically to apply a Ubuntu-18.04.img.gz image file to the Beagle Board Black.
  3. Reboot into Unbuntu after the image has been applied.
Note: My end goal is to have the Beagle Bone Black configure so it can be recovered using a .img.gz file from a USB SSD without using a micro SD card since they can be easily lost.  A micro SD card can be used to configure the board initially if necessary. 

Problems:
  • Can someone recommend a way to force u-boot to start USB automatically and attempt to boot from USB SSD every time?  Note: I am using a powered USB hub.
  • BuildRoot executes /etc/init.d/S99autorun and looks for the autorun.sh on a micro SD card.  Can someone recommend a way to edit this file so it points to sda1?

I have successfully completed the following using the USB serial connector:
  1. Power on the Beagle Bone Black and press spacebar to abort autoboot.
  2. Manually execute the following commands from uboot to boot from a USB hard drive formatted as FAT32.
    • usb start
    • bootpart=0:1
    • bootdir=/
    • fatload usb 0:1 ${loadaddr} /uImage
    • fatload usb 0:1 ${fdtaddr} /am335x-boneblack.dtb
    • setenv bootargs console=${console} ${optargs}
    • bootm ${loadaddr} - ${fdtaddr}
  3. Execute the following commands in autorun.sh file:
    • echo timer > /sys/class/leds/beaglebone\:green\:usr0/trigger
    • dd if=/dev/sda1 bs=16M |gzip -c > /mnt/Ubuntu-18.04.img.gz
    • sync
    • echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger
  • 4. Reboot Beagle Bone Black into Unbuntu.
I downloaded the files for applying the image from the following link:

The following article mentions creating a script and running it from a micro SD card:



Reply all
Reply to author
Forward
0 new messages