歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> BSD

學習NetBSD-掛載MSDOS分區

  掛載MSDOS分區很簡單:

# mount -t msdos /dev/wd0? /mnt

  真的那麼簡單?還記得在安裝過程中,到了"change BSD-disklabel partitions"的界面,居然在幾次安裝過程中有不一樣的情況.

  首先硬盤分區如下:

  

(wd0)ad0s1 128M  Fat32  # Grub
(wd0)ad0s2  20G  UFS2  # FreeBSD
(wd0)ad0s3  18G  FFSv2  # NetBSD

  理想情況下,MSDOS及UFS2的分區都會出現在安裝NetBSD的"change BSD-disklabel partitions"界面上.背運的情況下,是沒有出現.如果不出現的話,那麼系統的disklabel就沒有MSDOS及UFS2的分區信息,那上文的/dev/wd0?就無從說起.

  解決辦法:

  1.fdisk /dev/wd0,留意紅色部分.

  

Disk: /dev/wd0d
NetBSD disklabel disk geometry:
cylinders: 77520, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 78140160
BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 78140160
Partition table:
0: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
  start 63, size 256977 (125 MB, Cyls 0-16), Active
1: FreeBSD or 386BSD or old NetBSD (sysid 165)
  start 257040, size 41929650 (20473 MB, Cyls 16-2626)
2: NetBSD (sysid 169)
  start 42186690, size 35953470 (17555 MB, Cyls 2626-4864)
3: <UNUSED>

  2.disklabel -e wd0,手工加上紅色部分存盤即可.

  

16 partitions:
#    size  offset   fstype [fsize bsize cpg/sgs]
a:  1049328 42186690   4.2BSD  1024 8192 43728 # (Cyl. 41851*- 42892*)
b:  4195296 43236018    swap           # (Cyl. 42892*- 47054*)
c: 35953470 42186690   unused   0   0    # (Cyl. 41851*- 77519)
d: 78140160     0   unused   0   0    # (Cyl.   0 - 77519)
e: 28611072 47431314   4.2BSD  2048 16384 28584 # (Cyl. 47054*- 75438*)
f:  2097774 76042386   4.2BSD  2048 16384 21872 # (Cyl. 75438*- 77519)
g:  256977    63   MSDOS

Copyright © Linux教程網 All Rights Reserved