This was done by me when I tried to expand SD capacity from 8 to 16 GB. It's very simple and practical. After this backup-restore process done, you need to expand the file system so you can acquire full 16 GB on new SD card. So, let's begin..
Backup
1. Turn off RPi
2. Put SD card into card reader slot
3. Open up 'Terminal' app (from Application -> Utilities -> Terminal)
4. Type:
$ sudo bash5. Type in your password
6. Type these in sequence:
# mkdir -p ~/rpi/backups7. Check where your SD card is listed (e.g.: mine is listed as /dev/disk2s1)
# cd ~/rpi/backups
# df -h8. Eject your SD card:
# diskutil unmountDisk /dev/disk2s19. Backup your SD card to image file: (please note that you have to add 'r' before 'disk')
# dd if=/dev/rdisk2 of=~/rpi/backups/backup-today-rpi.img bs=1M10. When complete: (again, add 'r' before 'disk')
# diskutil eject /dev/rdisk2
Restore
1. Put new SD card into card reader slot
2. Check where your SD card is listed (e.g.: mine is listed as /dev/disk2s1)
# df -h3. Eject your SD card:
# diskutil unmountDisk /dev/disk2s14. Restore your image to new SD card:
# dd bs=1M if=~/rpi/backups/backup-today-rpi.img of=/dev/rdisk25. When complete:
# diskutil eject /dev/rdisk2
Expand Filesystem
1. Powering up your Raspberry Pi
2. Execute this command:
$ sudo raspi-config3. Choose 'Expand Filesystem"
4. Reboot
And you're done! :)
No comments:
Post a Comment
Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)