root@lxf:~# fdisk -l /dev/sde
Disk /dev/sde: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders, total 62333952 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/sde1 8192 62333951 31162880 c W95 FAT32 (LBA)
root@lxf:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sde1 31154688 32 31154656 1% /media/3832-3435
root@lxf:~# umount /media/3832-3435
root@lxf:~# dd if=/mnt/tmp/sde.dat of=/dev/sde bs=4096
482816+0 records in
482816+0 records out
1977614336 bytes (2.0 GB) copied, 425.841 s, 4.6 MB/s
root@lxf:~# fdisk -l /dev/sde
Disk /dev/sde: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 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/sde1 19456 543744 262144+ 83 Linux
/dev/sde2 543745 1068033 262144+ 83 Linux
/dev/sde3 1068034 3862527 1397247 b W95 FAT32
root@lxf:~# parted /dev/sde
GNU Parted 2.3
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Multi Flash Reader (scsi)
Disk /dev/sde: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 9961kB 278MB 268MB primary ext4
2 278MB 547MB 268MB primary ext4
3 547MB 1978MB 1431MB primary fat32
(parted) resize
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Partition number? 3
Start? [547MB]?
End? [1978MB]? -1
(parted) p
Model: Multi Flash Reader (scsi)
Disk /dev/sde: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 9961kB 278MB 268MB primary ext4
2 278MB 547MB 268MB primary ext4
3 547MB 31.9GB 31.4GB primary fat32
(parted) quit
Information: You may need to update /etc/fstab.
root@lxf:~# fdisk -l /dev/sde
Disk /dev/sde: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 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: 0x0005bb3f
Device Boot Start End Blocks Id System
/dev/sde1 19456 543744 262144+ 83 Linux
/dev/sde2 543745 1068033 262144+ 83 Linux
/dev/sde3 1068034 62333950 30632958+ b W95 FAT32
root@lxf:~#