Last active
April 7, 2025 02:36
-
-
Save ScottJWalter/3cfb278e2b3c4d1c9dbdf8322a2782f9 to your computer and use it in GitHub Desktop.
Copy a linux (lfs) sd card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Identify /dev/??? device of card | |
sudo fdisk -l | |
# if mounted (boot), must unmount | |
sudo umount /dev/???? | |
# create image ... | |
sudo dd if=/dev/???? of=./sd_card.img bs=4M status=progress && sync | |
# ... and wait ... this gonna take time. | |
# to create new card, reverse the stream ... | |
sudo dd of=/dev/???? if=./sd_card.img bs=4M status=progress && sync | |
# ... and wait even more (this time it's longer). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment