Linux Disk Management

Source: Internet
Author: User
I. how to fix the primary boot record corruption of Liunx: ddif = devzeroof = devsdabs


I. how to fix the failure of the Master Guide record of Liunx: dd if =/dev/zero of =/dev/sda bs = unit size count = count use this command to destroy the master boot record.

Repair process:

1: Restart

A. saving the CD

B. network saving

2: Enter rescue installed system mode

3. enter the shell mode.

4: chroot/mnt/sysimage

5: grub-install/dev/sda boot records are saved.

II. Disk partitioning

1: enter the command fdisk/dev/sdb to partition the disk/dev/sdb.

Enter the command m to display all commands to the menu

P: Display partition table information

N start partitioning and select the partition type

W. Save the partition information and exit

2: view the disk partition information fdisk-l/dev/sda


3: format the disk and create a file system.

Mkfs. ext4/dev/sdb1 note! Only one partition can be formatted here, and the entire disk cannot be formatted using mkfs. ext4/dev/sdb. In this way, all the partitions will disappear and need to be divided again.

4: the difference between the parted command and the fdisk command is that the maximum partition size of a fdisk is 2 TB, which takes effect after the parted is divided!

5: run the partpreb command after Partitioning. you do not need to restart to read the partition table information again. you can use the partpreb command when restarting the server is prohibited.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.