fdisk实例

    技术2022-07-10  191

    —sudo fdisk /dev/sdx

    —Command (m for help): p Disk /dev/sdd: 28.9 GiB, 30979129344 bytes, 60506112 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 Disklabel type: dos Disk identifier: 0x00000000

    Device Boot Start End Sectors Size Id Type /dev/sdd1 4096 16781311 16777216 8G b W95 FAT32 /dev/sdd2 16781312 31116287 14334976 6.9G 83 Linux

    —Command (m for help): d Partition number (1,2, default 2): 1 Partition 1 has been deleted.

    —Command (m for help): d Selected partition 2 Partition 2 has been deleted.

    —Command (m for help): p Disk /dev/sdd: 28.9 GiB, 30979129344 bytes, 60506112 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 Disklabel type: dos Disk identifier: 0x00000000

    —Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p):

    Using default response p. Partition number (1-4, default 1): First sector (2048-60506111, default 2048): 4096

    Last sector, +sectors or +size{K,M,G,T,P} (4096-60506111, default 60506111): +8G

    Created a new partition 1 of type ‘Linux’ and of size 8 GiB. Partition #1 contains a vfat signature.

    Do you want to remove the signature? [Y]es/[N]o: N

    —Command (m for help): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p):

    First sector (16781312-60506111, default 16781312): Last sector, +sectors or +size{K,M,G,T,P} (16781312-60506111, default 60506111): +6.9G

    Created a new partition 2 of type ‘Linux’ and of size 6.9 GiB. Partition #2 contains a ext3 signature.

    Do you want to remove the signature? [Y]es/[N]o: N

    —Command (m for help): p

    Disk /dev/sdd: 28.9 GiB, 30979129344 bytes, 60506112 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 Disklabel type: dos Disk identifier: 0x00000000

    Device Boot Start End Sectors Size Id Type /dev/sdd1 4096 16781311 16777216 8G 83 Linux /dev/sdd2 16781312 31207423 14426112 6.9G 83 Linux

    —Command (m for help): t Partition number (1,2, default 2): 1 Hex code (type L to list all codes): b

    Changed type of partition ‘Linux’ to ‘W95 FAT32’.

    —Command (m for help): p Disk /dev/sdd: 28.9 GiB, 30979129344 bytes, 60506112 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 Disklabel type: dos Disk identifier: 0x00000000

    Device Boot Start End Sectors Size Id Type /dev/sdd1 4096 16781311 16777216 8G b W95 FAT32 /dev/sdd2 16781312 31207423 14426112 6.9G 83 Linux

    Processed: 0.263, SQL: 9