Code Sample |
Expert command (m for help): p Disk /dev/sdb: 255 heads, 63 sectors, 4462 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 80 1 1 0 254 63 1023 63 71681967 83 2 00 0 0 0 0 0 0 0 0 00 3 00 0 0 0 0 0 0 0 0 00 4 00 0 0 0 0 0 0 0 0 00 Expert command (m for help): v 5404 unallocated sectors |
Code Sample |
# fdisk -l Disk /dev/sdb: 36.7 GB, 36703934464 bytes 255 heads, 63 sectors/track, 4462 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 4462 35840983+ 83 Linux # mount -t ext2 /dev/sdb1 /mnt/sdb1 # df /mnt/sdb1 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb1 24169412 14475840 8465808 64% /mnt/sdb1 # df -h /mnt/sdb1 Filesystem Size Used Avail Use% Mounted on /dev/sdb1 24G 14G 8.1G 64% /mnt/sdb1 |
Code Sample |
# ./gpart.linux /dev/sdb Begin scan... Possible partition(Linux ext2), size(23979mb), offset(0mb) Possible partition(Linux swap), size(964mb), offset(23979mb) Possible partition(Linux ext2), size(1913mb), offset(24944mb) Possible partition(Linux ext2), size(8142mb), offset(26858mb) End scan. Checking partitions... Partition(Linux ext2 filesystem): primary Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Ok. Guessed primary partition table: Primary partition(1) type: 131(0x83)(Linux ext2 filesystem) size: 23979mb #s(49110640) s(63-49110702) chs: (0/1/1)-(1023/254/63)d (0/1/1)-(3056/254/61)r Primary partition(2) type: 130(0x82)(Linux swap or Solaris/x86) size: 964mb #s(1975992) s(49110705-51086696) chs: (1023/254/63)-(1023/254/63)d (3057/0/1)-(3179/254/60)r Primary partition(3) type: 131(0x83)(Linux ext2 filesystem) size: 1913mb #s(3919856) s(51086700-55006555) chs: (1023/254/63)-(1023/254/63)d (3180/0/1)-(3423/254/59)r Primary partition(4) type: 131(0x83)(Linux ext2 filesystem) size: 8142mb #s(16675464) s(55006560-71682023) chs: (1023/254/63)-(1023/254/63)d (3424/0/1)-(4461/254/57)r # ./gpart.linux -W /dev/sdb /dev/sdb [same thing with this at the end] Activate which partition (1..4, q to quit) : 3 Write this partition table (y,n) : y * Warning: partition table written, you should reboot now. |
Quote |
Ouch. How did that happen? |