在linux下安装并加载使用新硬盘

一、过程步骤

1、#kudzu //检测新硬件,这一步必须!

2、#fdisk -l //查看是否找到新的硬盘,查看硬盘代号。

3、#fdisk /dev/sdb //为新硬盘分区,例如分成sdb1

#mkfs.ext3 /dev/sdb1 //把新硬盘格式化成ext3格式

4、#mkdir /disk2 //创建新的挂载点

5、#mount /dev/sdb1 /disk2/ //手动挂载分区,把硬盘挂到/disk2目录下。

6、#vi /etc/fstab

/dev/sdb1 /disk2 ext3 auto 1 2 //设置为开机自动挂载分区。

二.详细过程

2、

查看硬盘代号

[root@AMD-LINUX ~]# 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: 0×0007d856

Device Boot Start End Blocks Id System

/dev/sda1 * 1 25 200781 83 Linux

/dev/sda2 26 1305 10281600 8e Linux LVM

Disk /dev/sdb: 2147 MB, 2147483648 bytes <=新硬盘

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0×00000000

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

Disk /dev/dm-0: 9395 MB, 9395240960 bytes

255 heads, 63 sectors/track, 1142 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0×00000000

Disk /dev/dm-0 doesn’t contain a valid partition table

Disk /dev/dm-1: 1073 MB, 1073741824 bytes

255 heads, 63 sectors/track, 130 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0×30307800

Disk /dev/dm-1 doesn’t contain a valid partition table

3、fdisk 分区

[root@AMD-LINUX ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0×623223a1.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p <=显示信息

Disk /dev/sdb: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0×623223a1

Device Boot Start End Blocks Id System

Command (m for help): n <=新建分区

Command action

e extended

p primary partition (1-4)

p <=新建主分区

Partition number (1-4): 1 <=分区号为1,即/dev/sdb1

First cylinder (1-261, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):

Using default value 261

Command (m for help): p <=显示分区信息

Disk /dev/sdb: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0×623223a1

Device Boot Start End Blocks Id System

/dev/sdb1 1 261 2096451 83 Linux

Command (m for help): w <=保存退出

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

时间: 2024-08-03 16:57:30

在linux下安装并加载使用新硬盘的相关文章

模块怎样加载-Linux下模块怎样 加载

问题描述 Linux下模块怎样 加载 我看了下/lib/modules/*/kernel/net/drive下有r8169.ko网卡驱动.可是不知道怎么加载到内核里面 解决方案 linux下网卡驱动安装全过程 转载,希望可以帮到你 好不容易有个时间研究Linux,便从同学那里拿了RH9的安装盘来装(后来听到有人说RH9已经很老了,现在都用FC.我倒是觉得用什么发行版都不是很重要,至少很多东西我都还没弄懂,追求版本似乎没什么意思).原本以为安装会像以往那样顺利,后来却发现网卡没有识别出来.也就是说

php ssh2 so core-Linux下,PHP加载ssh2.so时,报core dump

问题描述 Linux下,PHP加载ssh2.so时,报core dump 在php下扩展安装ssh2已经两天了.一直以为是php没有找到ssh2路径的问题.后来-w了一下,结果报错说找不到libssh2.so,然后我就把libssh2的lib目录添加到LD_LIBRARY_PATH中了. 结果运行php -i时就给直接core掉了.于是我怀疑是不是libssh2的问题. 但是网上只有libssh2这一个版本啊. 我的linux信息: CST 2014 x86_64 GNU/Linux CentO

shell-linux下curl -b 加载 cookie 的问题求救

问题描述 linux下curl -b 加载 cookie 的问题求救 要加载的cookie文件: .e.test.cn TRUE / FALSE 1428635701 CRM_ADMIN %1B%A7h4z%A9_I%08%91%CAc%7D%18%1D%EB .test.cn TRUE / FALSE Q u%3D%25O5%25PR%25O4%25S0%25O5%25PR%25O4%25S0%25O7%25N2%25O7%25N2%25PO%25PQ%26n%3DCUC%25O1%25R0%

在Linux下安装显卡驱动程序

程序     { 相信大多数人在安装Linux时遇到的第一个难题,就是Linux不认你的显卡.而显卡安装不正确或胡乱选一个驱动程序安上则难以进入X Window.即使勉强进去了,因为分辨率太低,桌面上的文字和图片都放大了好几倍,仍无法使用.我的Linux是Red Hat,显卡是Trident Blade 3D,属于Linux不认识之列.于我是四处找资料,经过一段时间的摸索,终于成功地安装了显卡驱动.现在我就把经验写出来,好让大家都能顺利进入X Window,领略Linux的风采.    一.下载

32位Linux下安装64位Hadoop的问题

问题描述 32位Linux下安装64位Hadoop的问题 本人最近在学习Hadoop, 使用的版本为2.5.2,目前已经在Linux环境下搭建好了. 但是现在在hadoop中建立上传文件目录时,碰到如下问题: 在/hadoop-2.5.2/bin下执行: ./hdfs dfs -mkdir -p ~/hdfile 之后报出错误提示信息: Java HotSpot(TM) Client VM warning: You have loaded library /home/wluser/hadoop-

linux下安装php扩展memcache的方法_Linux

memcache 的工作就是在专门的机器的内存里维护一张巨大的hash表,来存储经常被读写的一些数组与文件,从而极大的提高网站的运行效率,减轻后端数据库的读写压力. 实验环境:centos 6.6 x86_64 LAMP环境搭建完毕:php版本5.6.8.apache版本2.4.12    1.在安装memcached之前需要安装libevent支持: # wget http://syslab.comsenz.com/downloads/linux/libevent-1.4.12-stable.

Linux下安装Redis教程详解

安装Reids   Redis下载地址:http://www.redis.io/download # wget http://download.redis.io/releases/redis-2.8.13.tar.gz # cd redis-2.8.13/ # make zmalloc.o: In function `zmalloc_used_memory': /usr/local/webserver/redis-2.8.13/src/zmalloc.c:226: undefined refer

Windows XP下IE浏览器加载项管理

什么是Internet Explorer加载项? Internet Explorer加载项是一些为了方便和有效的浏览而加载到浏览器上的组件.常见的加载项包括附加的工具条,动态鼠标指针,股市信息和广告拦截器(如3721的IE工具)等等. 加载项如何加载到你的计算机上的? 很多的加载项来自Internet.大多来自Internet的加载项在下载到你的计算机本地之前需要经过你的许可.但也有些会在你未知的情况下下载并加载.这通常是由于你允许了某个特定站点的所有下载,或者是由于这个加载项是某个你之前已经安

Linux下安装MySQL出现“ls: /var/lib/mysql/*.pid: 没有那个文件或目录”

环境 RedHat Linux 9 + VWWare 8.0 + SSH 3.2.9 + Putty 0.62 + MySQL 3.2 + MySQL 5.5 问题 Linux下安装MySQL出现如下错误: warning: MySQL-server-5.5.28-1.linux2.6.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ##########################################