Ubuntu hard disk loading records

Source: Internet
Author: User
First, add a hard disk (SCSI type) to the VM ). Sudo is required to execute some management commands in Ubuntu, which is too troublesome. Directly reset the root password and switch to the root operation. 1. view the partition: fdisk-l/dev/sda (the first hard disk is automatically selected during installation)/dev/sda1Linux (logical partition) /dev/sda2Extend (extended partition)/dev/sda5Linux

First, add a hard disk (SCSI type) to the VM ).

Sudo is required to execute some management commands in Ubuntu, which is too troublesome. Directly reset the root password and switch to the root operation.

1. View partitions:

Fdisk-l

/Dev/sda (the first hard disk, with automatic partitioning selected during installation)

/Dev/sda1 Linux (logical partition)

/Dev/sda2 extended partition)

/Dev/sda5 Linux Swap (temporary Swap zone)

/Dev/sdb (the second hard disk is not partitioned yet, prompting that the partition table is not included)

Physical partitions use a, B... Number. Each physical hard disk can have up to four primary logical partitions (or extended partitions). Therefore, in an automatic partition, the first logical Partition Number in the extended partition sda2 starts from 5.

2. Partition sdb:

Fdisk/dev/sdb

Select m: view the command.

Select n: add a new partition

Select p: Add a logical partition. The default start value is 1. The end value is + 2048 M, that is, 2 GB is allocated to the first logical partition.

Select p: View partitions. A new partition sdb1 is added.

Select w: Keep partition table information

3. format:

Run fdisk-l to view the number of sdb1 instances added to sdb, and then run the format command.

Mkfs-t ext3/dev/sdb1

4. Mount: Put it under/media. You can see this directory on the desktop later.

Mkdir/media/sdb1

Mount/dev/sdb1/media/sdb1

Use df to view (df-m). The size of/dev/sdb1 is 1946, and the directory is/media/sdb1.

5. Add to automatic mounting: Modify/etc/fstab

#/Dev/sdb1
/Dev/sdb1/media/sdb1 ext3 defaults 0 0

6. Restart. A disk is displayed on the desktop.

Shutdown-r now

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.