[beaglebone] Help on rootfs encryption for Beaglebone Green

Oh yeah we just fixed this issue too..

When your image is a single partition, the flasher will bomb when
writting a dual partition..

we've added a option to setup_sdcard.sh to fix this:

--enable-fat-partition

so it'll crate a dual partition base image..

For: 2016-09-04, grab the base file:

https://rcn-ee.online/rootfs/bb.org/testing/2016-09-04/iot/debian-8.5-iot-armhf-2016-09-04.tar.xz

extract it

You'll want to then update the "setup_sdcard.sh" here's the master:

https://github.com/RobertCNelson/omap-image-builder/blob/master/tools/setup_sdcard.sh

sudo ./setup_sdcard.sh --img-4gb bone --dtb beaglebone
--bbb-old-bootloader-in-emmc --rootfs_label rootfs --hostname
beaglebone --enable-cape-universal --enable-fat-partition

If you want it to flash the eMMC just add "--emmc-flasher" to the list
of options

Then just dd that bone-4gb.img to a microsd

Regards,

Ok I’ll try this.

Thank you

Sylvain

+beaglebone as it was the original thread

Hi Robert,

I may be doing something wrong, but following exactly what you proposed result in a lot of “Cannot mkdir: No space left on device” and “Cannot open: No such file or directory” while the script populate_rootfs. The last displayed line is “tar: Exiting with failure status due to previous errors”

I’ll try to understand if I did something wrong, but if you find something in the script let me know.

Sylvain

Hi Robert,

I put some debug output in the scripts (enormous script 0_0) and it seems
that when it creates the loop device to associate with device-mapper for
the rootfs it's giving it only 2MB.

The rootfs is certainly not going to fit in it. :slight_smile:

Sylvain

Hi Robert,

a very big thank for your help, but it is still not working.
I’ve traced the script and generated a pastebin http://pastebin.com/h9eRtZC1
We can see that sfdisk is creating a partition layout with 96MB fat partition for boot but then create a partition of only 3MB that will be used for rootfs.

This leads to the failures described earlier.
Do you have any idea why this is happening ?

Sylvain

Ah yes, this is a new problem, since we increased the 1MB hole to 4MB
at the start of the drive, (for an ever increasing u-boot)..

Our dual partition sfdisk command changed from:

sudo sfdisk /dev/sde <<-__EOF__
1M,12M,0xE,*

Okay, this is now fixed:

https://github.com/RobertCNelson/omap-image-builder/commit/25687c0a7f525b9b72627f1d69a80bfabfa3daf0

now just to port it to all the eMMC flasher's.. :wink:

Regards,

and now all the eMMC flashers have that fix too.. (along with a sync
of some of the generic stuff)

https://github.com/RobertCNelson/boot-scripts/commit/d9ac2858e78ef16cd86b5b3610f861ad880b3c00

Regards,