2010-02-25

Slitaz -- hexdump / dd



tux@alanyih:~$ sudo dd if=/dev/sda of=pt.img skip=446 bs=1 count=64
64+0 records in
64+0 records out
tux@alanyih:~$ ls -l *.img
-rw-r--r-- 1 root root 446 Feb 25 16:24 mbr.img
-rw-r--r-- 1 root root 512 Feb 25 18:31 mbr-pb.img
-rw-r--r-- 1 root root 32256 Feb 25 18:46 partition.img
-rw-r--r-- 1 root root 64 Feb 25 18:54 pt.img

tux@alanyih:~$ hexdump -C pt.img | cut -d ' ' -f 2-20
00 01 01 00 83 fe ff 95 3f 00 00 00 d7 07 e1 00
80 00 c1 96 07 fe ff ff 16 08 e1 00 6e 67 26 04
00 00 c1 ff 07 fe ff ff bf fa 3f 06 02 dc 02 1f
00 fe ff ff 83 fe ff ff 84 6f 07 05 3b 8b 38 01

tux@alanyih:~$

tux@alanyih:~$ sudo cfdisk -P r /dev/sda | tail -6
0x1B0: 00 00 00 00 00 00 00 00 B0 EB B1 F0 00 00 00 01
0x1C0: 01 00 83 FE FF 95 3F 00 00 00 D7 07 E1 00 80 00
0x1D0: C1 96 07 FE FF FF 16 08 E1 00 6E 67 26 04 00 FE
0x1E0: FF FF 07 FE FF FF BF FA 3F 06 02 DC 02 1F 00 FE
0x1F0: FF FF 83 FE FF FF 84 6F 07 05 3B 8B 38 01 55 AA

tux@alanyih:~$ sudo cfdisk -P t /dev/sda
Partition Table for /dev/sda

---Starting---- ----Ending----- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ----- ---- ---- ---- ----- ----------- -----------
1 0x00 1 1 0 0x83 254 63 917 63 14747607
2 0x80 0 1 918 0x07 254 63 5251 14747670 69625710
3 0x00 0 1 6527 0x07 254 63 38912 104856255 520281090
4 0x00 0 1 5252 0x83 254 63 6526 84373380 20482875
tux@alanyih:~$ sudo cfdisk -P s /dev/sda
Partition Table for /dev/sda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 14747669 63 14747670 Linux (83) None
2 Primary 14747670 84373379 0 69625710 HPFS/NTFS (07) Boot
4 Primary 84373380 104856254 0 20482875 Linux (83) None
3 Primary 104856255 625137344 0 520281090 HPFS/NTFS (07) None

.