This is an old revision of the document!
Native Python auf EV3 mit VSCode
- SSH: user robot, pass maker
- hostnamectl set-hostname LEGO12
- Use
dd
with theconv=sparse
option. It will seek instead of write. Exactly what we need
# Get Info sudo fdisk -lu lego12.img Disk lego12.img: 14.84 GiB, 15931539456 bytes, 31116288 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: 0xf5e5f871 Device Boot Start End Sectors Size Id Type lego12.img1 8192 106495 98304 48M b W95 FAT32 lego12.img2 106496 31116287 31009792 14.8G 83 Linux # Mount Partition, -o Start*512, --sizelimit Sectors*512 sudo losetup -o 54525952 -b 512 --sizelimit 15877013504 /dev/loop16 lego12.img # Check filesystem sudo e2fsck -f /dev/loop16 # Resize filesystem sudo resize2fs /dev/loop16 3750000 # Mount filesystem mount /dev/loop16 /mnt # Zero out disk dd if=/dev/zero of=zero.txt bs=1M status=progress # Truncate image (size obtained from target SD-Card with fdisk -lu /dev/sda) truncate -s 15634268160 lego12.img