危险 数据盘为windwos分区,为了你的数据安全,请手动挂载,本脚本不执行任何操作。

本文介绍了如何在Linux系统中将原本格式为NTFS的Windows数据盘转换为Linux兼容的ext3格式,并通过执行脚本进行挂载。首先使用`fdisk -l`查看磁盘信息,然后使用`mkfs.ext3`命令格式化数据盘,最后通过执行特定脚本进行自动挂载。
摘要由CSDN通过智能技术生成

原系统为windwos

更换linux 后 磁盘挂载失败

1.进入终端

# fdisk -l

Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0cf56450

Device     Boot Start      End  Sectors Size Id Type
/dev/vda1  *     2048 83886046 83883999  40G 83 Linux


Disk /dev/vdb: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x02f07826

Device     Boot Start       End   Sectors Size Id Type
/dev/vdb1        2048 104855551 104853504  50G  7 HPFS/NTFS/exFAT

vda 为系统盘

vdb为数据盘

2.更换数据盘为linux 格式

mkfs.ext3 /dev/vdb

执行后会提示

Proceed anyway? (y,N)    y

等待完成就行

3.执行挂载命令

Centos:

yum install wget -y && wget -O disk.sh http://download.bt.cn/tools/disk.sh && bash disk.sh

 Ubuntu:

wget -O disk.sh http://download.bt.cn/tools/disk.sh && sudo bash disk.sh

Debian: 

wget -O disk.sh http://download.bt.cn/tools/disk.sh && bash disk.sh

默认挂载/www目录,如需挂载其他目录在挂载命令后加上挂载目录即可,务必以/为开头,以下挂到/website目录为例

wget -O disk.sh http://download.bt.cn/tools/disk.sh && bash disk.sh /website

 执行命令后会提示

Do you want to try to mount the data disk to the /www directory?(y/n):   

y

等待挂载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值