Changes between Version 5 and Version 6 of FreeBSDOnEmbeddedDevice


Ignore:
Timestamp:
Feb 2, 2012, 10:24:07 AM (13 years ago)
Author:
Rick van der Zwet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FreeBSDOnEmbeddedDevice

    v5 v6  
    55
    66= 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
     7Please 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.
    218
    22 Hack to __really__  have all old partition information is detroyed:
    23 build# dd if=/dev/zero of=$DA bs=1m count=1
     9Hack to reload the usb card reader to reread partition tables:
     10build# usbconfig -d `usbconfig | awk -F : '/Mass/ {print $1}'` reset
    2411
    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
     12build# truncate -s 6GB embedded.img
     13build# MD=`mdconfig embedded.img`
    2914
     15build# gpart create -s MBR md0
     16build# gpart add -t freebsd -s 2G
     17build# gpart add -t freebsd -s 2G
     18build# gpart add -t freebsd -s 1G
     19build# newfs md0s1 md0s2 md0s3
    3020= Disk population =
    3121