備分Beagleboard sd卡
a.首先執行fdisk -l, 可以看到我的sd卡是在/dev/sdb1跟/dev/sdb2,基本上只要備份sdb2的file system就夠了。
karose@karose-VirtualBox:~$ sudo fdisk -l
Disk /dev/sda: 21.8 GB, 21802237952 bytes
255 heads, 63 sectors/track, 2650 cylinders, total 42582496 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: 0x00079d59
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 39186431 19592192 83 Linux
/dev/sda2 39188478 42582015 1696769 5 Extended
/dev/sda5 39188480 42582015 1696768 82 Linux swap / Solaris
Disk /dev/sdb: 7860 MB, 7860125696 bytes
242 heads, 62 sectors/track, 1023 cylinders, total 15351808 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 198655 98304 e W95 FAT16 (LBA)
/dev/sdb2 198656 15351807 7576576 83 Linux
b.使用dd 把/dev/sdb2備份起來到home/backup下面。
sudo dd if=/dev/sdb2 | gzip -1 > /home/backup/sd_backup.img.gz
c.要還原就用下面的指令。
zcat sd_backup.img.gz > /dev/sdb
source:http://www.gigamegablog.com/2012/09/26/beaglebone-101-linux-tricks-for-backing-up-and-resizing-your-microsd-card/
留言