BSD下添加格式化硬盘

 FREEBsd

FreeBSD分区描述符为从
" a " " h " 的8个字母。根据惯例,分区 " c " 被保留用作描述整个磁盘, " a " 用作标识根分区, " b " 用作标识交换分区。对于新添加的硬盘,我们常常只建立一个分区,标识为 " e "
IDE硬盘标记为ad,而SCSI硬盘标记为da,从0开始计数

dmesg 查看是否找到新硬件

/ stand / sysinstall

configure
-- fdisk   设置好保存退出后
configure
-- lable   


mount 
/ dev / ad1s1  / disk1 /  (挂载硬盘1到 / disk1 / 目录下,该目录必须存在)
vi 
/ etc / fstab (加入 / dev / ad1s1               / disk1          ufs     rw               1         1 ,这样开机重启就可以自动挂载了)

NetBsd

dmesg 查看硬件信息
#  disklabel -I -i sd2
# partition> ?    

partition >   ?
?         print  this menu
C       make partitions contiguous
E       
print  disk label and current partition table
I       change label information
N       name the label
P       
print  current partition table
Q       quit
R       rounding (c)ylinders (s)ectors
W       
write  the current partition table
[a
- p]   define named partition
partition
>    

partition
>  p
Filesystem type [
? ] [unused] :   ?
Supported file 
system  types :
        
4 . 1BSD          ccd             jfs              System  V
        
4 . 2BSD          Eighth Edition  Linux Ext2      unknown
        
4 . 4LFS          FILECORE        MSDOS           unused
        ADOS            HFS             NTFS            Version 
6
        Apple UFS       HPFS            RAID            Version 
7
        boot            ISO9660         swap            vinum
Filesystem type [
? ] [unused] :   4 . 2BSD 
Start offset (
' x '  to start after partition  ' x ' ) [0c ,  0s ,  0M] :   0
Partition size (
' $ '   for  all remaining) [ 20778 . 9c ,  35843670s ,   17501 . 8M] :  $
 p
:    35843670           0       4 . 2BSD       0       0       0    #  (Cyl.      0 -  20778*)
partition >  N
Label name 
: sd2a 
#  partition> W
# Label disk [n] Y  完成后
# newfs /dev/sd2a
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值