zoukankan      html  css  js  c++  java
  • gdisk转fdisk

    分区测试的时候发现之前用gdisk分区之后,就无法用fdisk进行分区了,哪怕格式化了也不行,通过fdisk 查看硬盘,发现硬盘都变成了GPT分区,无法通过fdisk进行分区操作,所以要通过parted 删除其GPT分区

    [root@docker-server-1 ~]# fdisk -l
    Disk /dev/sdb: 999.7 GB, 999653638144 bytes
    255 heads, 63 sectors/track, 121534 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000dac36

    Device Boot Start End Blocks Id System

    Disk /dev/sda: 999.7 GB, 999653638144 bytes
    255 heads, 63 sectors/track, 121534 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00048d6c

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 1306 10485760 83 Linux
    /dev/sda2 1306 3346 16384000 82 Linux swap / Solaris
    /dev/sda3 3346 121535 949353472 83 Linux

    1.选择sdc进行删除GPT分区操作

    [root@docker-server-1 ~]# parted /dev/sdc
    GNU Parted 2.1
    Using /dev/sdc
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted)

    2.通过mklabel建立msdos分区

    (parted) mklabel
    New disk label type? msdos
    Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue?
    Yes/No? Yes
    Warning: /dev/sdc contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand
    GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?
    Yes/No? Yes

    3.再次通过fdisk 查看sdc,就不会提示GPT分区了

  • 相关阅读:
    Linux线程信号
    有理想的程序员必须知道的15件事
    Linux下 mplayer 使用手册
    Winxp下 gvim 编程环境搭建
    在WPF中弹出右键菜单时判断鼠标是否选中该项
    F#基本类型——Discriminated Unions
    在WPF的TreeView中实现右键选定
    WPF TreeView tools
    F#基本类型——Structure
    增强了一下DownloaderPlus的视频转换功能
  • 原文地址:https://www.cnblogs.com/thelovelybugfly/p/11713727.html
Copyright © 2011-2022 走看看