Changes between Version 5 and Version 6 of linux/blockdev


Ignore:
Timestamp:
12/03/2018 11:37:37 PM (6 years ago)
Author:
Cale Collins
Comment:

added umount step

Legend:

Unmodified
Added
Removed
Modified
  • linux/blockdev

    v5 v6  
    3030 * In this case, no other media is connected to the PC, and thus the microSD is /dev/sdb
    3131 * '''Note''' - If nothing besides /dev/sda comes up, please refer to the [#mmcblk0Imaging mmcblk0 section]
    32 
    33 2. Set the DEVICE variable to the proper device, example given is /dev/sdc:
     322. Un-mount volumes
     33{{{#!bash
     34umount ${DEVICE}?
     35}}}
     363. Set the DEVICE variable to the proper device, example given is /dev/sdc:
    3437{{{#!bash
    3538DEVICE=/dev/sdc
    3639}}}
    3740
    38 3. Partition device:
     414. Partition device:
    3942{{{#!bash
    4043printf "2048,,L,,\n" | sudo sfdisk -uS ${DEVICE}
     
    4245 * Here we create a single Linux (type 83) partition offset at 1MiB - you can adjust the parameters to create multiple partitions depending on your needs
    4346
    44 4. Format the partition as ext4
     475. Format the partition as ext4
    4548{{{#!bash
    4649sudo mkfs.ext4 ${DEVICE}1
     
    4851 * Note that if you put this into a script it has been found you need to have a second or so of a sleep following the {{{sfdisk}}} to allow the OS to re-scan the partition table before it will realize that the partition exists
    4952
    50 5. Mount the partition:
     536. Mount the partition:
    5154{{{#!bash
    5255sudo mount ${DEVICE}1 /mnt/disk
     
    5457 * Make sure /mnt/disk exists - this is simply a mount-point. If it does not exist, use the mkdir command to create it.
    5558
    56 6. Un-archive the rootfs tarball to the /mnt/disk location:
     597. Un-archive the rootfs tarball to the /mnt/disk location:
    5760{{{#!bash
    5861sudo tar -C /mnt/disk -xvf rootfs.tar.bz2
     
    6063 * If instead you have a rootfs directory created with {{{fakeroot}}} or {{{deboostrap}}} you can copy it with a {{{sudo cp -rupv rootfs/*  /mnt/disk}}}
    6164
    62 7. Unmount the partition:
     658. Unmount the partition:
    6366{{{#!bash
    6467sudo umount /mnt/disk
    6568}}}
    6669
    67 8. Remove the device from the PC and insert/connect to Gateworks SBC
     709. Remove the device from the PC and insert/connect to Gateworks SBC
    6871
    6972=== mmcblk0 Imaging ===