Changes between Version 5 and Version 6 of FreeBSDOnEmbeddedDevice
- Timestamp:
- Feb 2, 2012, 10:24:07 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FreeBSDOnEmbeddedDevice
v5 v6 5 5 6 6 = Initial disk configuration = 7 {{{ 8 #!sh 9 ## Hack to find memory card and have partion entries re-read 10 # - No cards: 11 # dd: /dev/da0: Device not configured 12 # - Inactive card: 13 # dd: /dev/da4: Operation not permitted 14 # - Active card: 15 # 0+0 records in 16 # 0+0 records out 17 # 0 bytes transferred in 0.000018 secs (0 bytes/sec) 18 }}} 19 build# ls /dev/da? | xargs -I %%DA%% -n 1 dd if=/dev/zero of=%%DA%% count=0 20 build# setenv DA /dev/da0 7 Please do mind I create a 6G image to be used at a 8G CF disk as making it exactly fit, causes issues if sectors are wearing out. I create 2 x 2G partitions for the OS (and backup OS) and 1 x 1G partition for various configuration files and other shared stuff. 21 8 22 Hack to __really__ have all old partition information is detroyed:23 build# dd if=/dev/zero of=$DA bs=1m count=19 Hack to reload the usb card reader to reread partition tables: 10 build# usbconfig -d `usbconfig | awk -F : '/Mass/ {print $1}'` reset 24 11 25 build# fdisk -BI $DA 26 build# echo "a: * * 4.2BSD" | bsdlabel -R -B -m i386 ${DA}s1 /dev/stdin 27 build# newfs ${DA}s1a 28 build# mount ${DA}s1a /mnt 12 build# truncate -s 6GB embedded.img 13 build# MD=`mdconfig embedded.img` 29 14 15 build# gpart create -s MBR md0 16 build# gpart add -t freebsd -s 2G 17 build# gpart add -t freebsd -s 2G 18 build# gpart add -t freebsd -s 1G 19 build# newfs md0s1 md0s2 md0s3 30 20 = Disk population = 31 21