Changes between Version 5 and Version 6 of linux/blockdev
- Timestamp:
- 12/03/2018 11:37:37 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
linux/blockdev
v5 v6 30 30 * In this case, no other media is connected to the PC, and thus the microSD is /dev/sdb 31 31 * '''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: 32 2. Un-mount volumes 33 {{{#!bash 34 umount ${DEVICE}? 35 }}} 36 3. Set the DEVICE variable to the proper device, example given is /dev/sdc: 34 37 {{{#!bash 35 38 DEVICE=/dev/sdc 36 39 }}} 37 40 38 3. Partition device:41 4. Partition device: 39 42 {{{#!bash 40 43 printf "2048,,L,,\n" | sudo sfdisk -uS ${DEVICE} … … 42 45 * 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 43 46 44 4. Format the partition as ext447 5. Format the partition as ext4 45 48 {{{#!bash 46 49 sudo mkfs.ext4 ${DEVICE}1 … … 48 51 * 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 49 52 50 5. Mount the partition:53 6. Mount the partition: 51 54 {{{#!bash 52 55 sudo mount ${DEVICE}1 /mnt/disk … … 54 57 * Make sure /mnt/disk exists - this is simply a mount-point. If it does not exist, use the mkdir command to create it. 55 58 56 6. Un-archive the rootfs tarball to the /mnt/disk location:59 7. Un-archive the rootfs tarball to the /mnt/disk location: 57 60 {{{#!bash 58 61 sudo tar -C /mnt/disk -xvf rootfs.tar.bz2 … … 60 63 * If instead you have a rootfs directory created with {{{fakeroot}}} or {{{deboostrap}}} you can copy it with a {{{sudo cp -rupv rootfs/* /mnt/disk}}} 61 64 62 7. Unmount the partition:65 8. Unmount the partition: 63 66 {{{#!bash 64 67 sudo umount /mnt/disk 65 68 }}} 66 69 67 8. Remove the device from the PC and insert/connect to Gateworks SBC70 9. Remove the device from the PC and insert/connect to Gateworks SBC 68 71 69 72 === mmcblk0 Imaging ===