Stevens
02/28/17 9:54 PM >>>
Issue is 3 spare drives from 172MB to 800MB size that I cannot use until I get the copied partition resized down to 172MB. The copied partitions are on drives that are too thick to fit into his laptops. It's always something ...
In case it helps, these are notes that I have on resizing .img files created by dd: Mounting: https://yaoq.gitbooks.io/starter-kit-for-pcduino8-uno-user-guide/content/pos... root@countryside:/data/exclude/nfs# fdisk -l pcduino8.img Disk pcduino8.img: 1677 MB, 1677721600 bytes 255 heads, 63 sectors/track, 203 cylinders, total 3276800 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000b9be4 Device Boot Start End Blocks Id System pcduino8.img1 2048 73727 35840 83 Linux pcduino8.img2 73728 139263 32768 83 Linux Units: sectors of 1 x 512 = 512 bytes (512 is from the I/O size above) mount -v -o offset=1048576 -t vfat pcduino8.img /mnt/img/one mount -v -o offset=37748736 -t ext4 pcduino8.img /mnt/img/two (can also try 'auto' instead of vfat, ext4, etc.) Create a blank .img file: http://sirlagz.net/2012/06/20/how-to-resize-partitions-on-an-image-file/ dd bs=1M count=3600 if=/dev/zero of=test.img Copy the first XXXX bytes of an img file to the new .img file: dd bs=1M count=3600 if=orig.img of=test.img Shrink and copy an sd card: Shrink the partition down using gparted. Partition table entries are not in disk order. Disk /dev/sdc: 7.3 GiB, 7780433920 bytes, 15196160 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000b9be4 Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 73727 71680 35M 83 Linux /dev/sdc2 73728 139263 65536 32M 83 Linux /dev/sdc3 139264 1777663 1638400 800M 83 Linux For the count= in the line below, do: (sectors * sector_size) / copy_block_size (1638400 * 512) / 4096 root@probook:/home/christopher/Desktop# dd if=/dev/sdc of=pcduino8_small.img bs=4096 count=204800 204800+0 records in 204800+0 records out 838860800 bytes (839 MB) copied, 52.2033 s, 16.1 MB/s -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org