LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1008|回复: 2

请问如何在Linux下挂载ufs文件系统??

[复制链接]
发表于 2003-11-20 17:55:28 | 显示全部楼层 |阅读模式
我的Linux内核已经添加了UFS文件系统支持。
直接执行
mount -t ufs -o ufstype=44bsd,ro /dev/hdc1 /mnt
执行mount可以看到已经挂载上了,但是
挂载的/mnt 目录是空的。
发表于 2003-11-20 18:24:22 | 显示全部楼层
are u sure it's /dev/hdc1 ???

try to do a sfdisk -l with your device to be sure as follow:

[root@linux1 cards]# sfdisk -l /dev/hda

Disk /dev/hda: 2434 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1   *      0+      9      10-     80293+  83  Linux
/dev/hda2       2305    2433     129    1036192+  82  Linux swap
/dev/hda3         10    2304    2295   18434587+  83  Linux
/dev/hda4          0       -       0          0    0  Empty

otherwise, try to do a df -h or mount

the correct syntaxe at /etc/fstab will be
/dev/hdaX  /mnt/bsd    ufs  ro,noauto,users,ufstype=44bsd 0 0

good luck.
 楼主| 发表于 2003-11-20 19:23:20 | 显示全部楼层
Spring:~# sfdisk -l /dev/hdc

Disk /dev/hdc: 3649 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hdc1   *      0+   3648    3649-  29310561   a5  FreeBSD
/dev/hdc2          0       -       0          0    0  Empty
/dev/hdc3          0       -       0          0    0  Empty
/dev/hdc4          0       -       0          0    0  Empty
/dev/hdc5          0+    152-    153-   1228800  
/dev/hdc6        152+   3648    3497-  28081761  
Spring:~#
我的hdc分区时选择的是使用整个硬盘,然后在里面创建了,一个1.2G的swap
和一个大ufs分区

Spring:~# mount -t ufs -o ufstype=44bsd,ro /dev/hdc6 /mnt/  
mount: wrong fs type, bad option, bad superblock on /dev/hdc6,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)

Spring:~# mount -t ufs -o ufstype=44bsd,ro /dev/hdc1 /mnt/
Spring:~# mount
/dev/hda5 on / type reiserfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda6 on /usr type reiserfs (rw)
/dev/hda7 on /var type reiserfs (rw)
/dev/hda8 on /tmp type reiserfs (rw)
/dev/hda10 on /ftp type reiserfs (rw)
/dev/hda11 on /www type reiserfs (rw)
/dev/hdc1 on /mnt type ufs (ro,ufstype=44bsd)
Spring:~#ls /mnt
Spring:~#
我用的是FreeBSD-4.9-stable , Linux-2.4.22的内核。
Spring:~#cfdisk /dev/hdc
                                                       cfdisk 2.12

                                                  Disk Drive: /dev/hdc
                                            Size: 30020272128 bytes, 30.0 GB
                                  Heads: 255   Sectors per Track: 63   Cylinders: 3649

      Name              Flags            Part Type       FS Type                  [Label]               Size (MB)
-----------------------------------------------------------------------------------------------------------------------
      hdc1              Boot              Primary        FreeBSD                                         30014.05        










       [Bootable]  [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]  [  Quit  ]  [  Type  ]  [ Units  ]
       [ Write  ]

                                      Toggle bootable flag of the current partition
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表