BeagleBone Black MMC ordering clashes
Dr. Rolf Jansen
rj at obsigna.com
Fri Mar 10 14:47:45 UTC 2017
Am 10.03.2017 um 10:30 schrieb Otacílio de Araújo Ramos Neto <otacilio.neto at bsd.com.br>:
> Dear
>
> Coud tou please indicate to me where you found the procedure to install FreeBSD in BBB flash memory?
>
> []'s
> -Otacilio
It's not exactly that I found the procedure anywhere, I simply did it in accordance to the common sense of an experienced FreeBSD user.
1. Start the BBB using a FreeBSD installation on the SD card.
2. Partition the internal flash -- note, this will destroy the factory installation:
# gpart -F destroy mmcsd1
# gpart create -s MBR mmcsd1
# gpart add -b 8192 -s 8192 -t fat32 mmcsd1
# gpart add -s 7536640 -t freebsd mmcsd1
# gpart add -s 7536640 -t freebsd-ufs mmcsd1s2
# gpart set -a active -i 1 mmcsd1s1
3. Create the file systems:
# newfs_msdos -L boot /dev/mmcsd1s1
# newfs -ntUE -L system /dev/mmcsd1s2a
# tunefs -a enable /dev/mmcsd1s2a
4. Configure the snapshot image as virtual memory disk,
assuming the unpacked image is present in the working dir:
# mdconfig -a -t vnode -f FreeBSD-12.0-CURRENT-arm-armv6-BEAGLEBONE-20170309-r314972.img -u 0
5. Copy over the U-BOOT data:
# mount_msdosfs -o noatime /dev/md0s1 /media
# mount_msdosfs -o noatime /dev/mmcsd1s1 /mnt
# cp -p /media/* /mnt
# umount /mnt
# umount /media
6. As a Prerequisite, install the filesystem cloning tool
// I use the tool sysutils/clone, and it can be installed either from the ports:
# cd /usr/ports/sysutils/clone
# make install clean
// or install it directly from the GitHub repository:
# mkdir ~/bin
# cd ~/bin
# ln -s /usr/bin/svnliteversion svnversion
# cd
# svnlite checkout https://github.com/cyclaero/clone/trunk/ clone
# cd clone
# make install clean
7. Copy over the FreeBSD Installation
# mount -o noatime /dev/md0s2a /media
# mount -o noatime /dev/mmcsd1s2a /mnt
# clone -c rwoff /media /mnt
# umount /mnt
# umount /media
# mdconfig -d -u 0
8. Edit /etc/fstab so it gets the following content:
/dev/ufs/system / ufs rw 1 1
/dev/label/boot /boot/msdos msdosfs rw,noatime 0 0
tmpfs /tmp tmpfs rw,mode=1777,size=50m 0 0
9. Shutdown the BBB, remove the SD card, then restart.
The BBB should now start from the internal flash. If it does not, then perhaps I have forgotten a crucial step in the above procedure.
Best regards
Rolf
More information about the freebsd-arm
mailing list