Get the App
SLTechnology News&Howtos  ›  Development  › 

The method of mounting New hard disk on linux

Shulou Source: shulou.com Published: 2022-06-01 03:59:58 09月22日 Update

In this article Xiaobian for you to introduce in detail "linux mount new hard disk method", the content is detailed, the steps are clear, the details are handled properly, I hope this "linux mount new hard disk method" article can help you solve doubts, following the editor's ideas slowly in depth, together to learn new knowledge.

The copy code is as follows:

Fdisk-l

Disk / dev/sda: 10.7 gb, 10737418240 bytes

255 heads, 63 sectors/track, 1305 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x000af383

Device boot start end blocks id system

/ dev/sda1 * 1 1244 9992398 + 83 linux

/ dev/sda2 1245 1305 489982 + 5 extended

/ dev/sda5 1245 1305 489951 82 linux swap / solaris

Disk / dev/sdb: 5368 mb, 5368709120 bytes

255 heads, 63 sectors/track, 652 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000

Disk / dev/sdb doesn't contain a valid partition table

one

See that the newly added hard drive is / deb/sdb, but there is no partition table yet.

3. Zoning

The copy code is as follows:

Fdisk / dev/sdb

There are many options at this time, select m

Then select n

Then select p

Then select 1

After that, there are two options.

The copy code is as follows:

First cylinder (1-1014):

Last cylindet or + siza or + sizem or + sizek:

I chose the default, and then enter w, save, exit

4. Format Partition

The copy code is as follows:

Sudo mkfs-t ext3 / dev/sdb1

5. Mount partition

The copy code is as follows:

Sudo mkdir / www / / create a new mount point for matlab

Sudo mount / dev/sdb1 / www

Sudo df

6. Power on and mount automatically

The copy code is as follows:

Vi / etc/fstab / / modify this file, or use gedit

Then add to the end

The copy code is as follows:

Dev/sdb1 / www ext3 defaults 1 2

In this way, you can mount the www.

After reading this, the article "how to mount a new hard disk on linux" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself. If you want to know more about related articles, you are welcome to follow the industry information channel.

Tags: Code selection hard disk method article content proper two ideas files new knowledge more end format steps knowledge knowledge points articles details industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL NVidia vpn Shulou Technology