免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1360 | 回复: 7
打印 上一主题 下一主题

linux下如何加载Freebsd6 的UFS分区和Solaris的分区 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-06 20:12 |只看该作者 |倒序浏览
我的FC5装在扩展分区,freebsd,solaris各占一个主分区,如何能在FC5下访问UFS和Solaris的分区呢?
对于UFS的我试过mount -t ufs /dev/sda2 /mnt/a 这种命令,不行啊,这两种操作系统是在主分区下分slice的,可是fc5只能识别到主分区,识别不到slice阿?

论坛徽章:
0
2 [报告]
发表于 2006-09-06 23:41 |只看该作者
原帖由 cockroachzl 于 2006-9-6 20:12 发表
我的FC5装在扩展分区,freebsd,solaris各占一个主分区,如何能在FC5下访问UFS和Solaris的分区呢?
对于UFS的我试过mount -t ufs /dev/sda2 /mnt/a 这种命令,不行啊,这两种操作系统是在主分区下分slice的,可是 ...


http://bbs.chinaunix.net/viewthread.php?tid=718160

==

论坛徽章:
0
3 [报告]
发表于 2006-09-08 00:46 |只看该作者
那请问solaris分区的-t后的参数是什么?

论坛徽章:
0
4 [报告]
发表于 2006-09-08 00:49 |只看该作者
还有,怎么知道我的内核是否支持ufs文件系统,谢谢

论坛徽章:
0
5 [报告]
发表于 2006-09-08 08:44 |只看该作者
原帖由 cockroachzl 于 2006-9-8 00:46 发表
那请问solaris分区的-t后的参数是什么?


都是使用 -t ufs,只是你要自己传入 -o ufstype=xxxx 项目。这个 mount manpage 都可以找到,您可以自己先看看。


  1. Mount options for ufs
  2.        ufstype=value
  3.               UFS is a file system widely used in different operating systems.
  4.               The problem are differences among implementations.  Features  of
  5.               some  implementations are undocumented, so its hard to recognize
  6.               the type of ufs automatically.  That's why the user must specify
  7.               the type of ufs by mount option.  Possible values are:

  8.               old    Old  format  of  ufs,  this  is  the  default, read only.
  9.                      (Don't forget to give the -r option.)

  10.               44bsd  For   filesystems   created   by   a   BSD-like    system
  11.                      (NetBSD,FreeBSD,OpenBSD).

  12.               sun    For filesystems created by SunOS or Solaris on Sparc.

  13.               sunx86 For filesystems created by Solaris on x86.

  14.               hp     For filesystems created by HP-UX, read-only.

  15.               nextstep
  16.                      For  filesystems  created  by  NeXTStep (on NeXT station)
  17.                      (currently read only).

  18.               nextstep-cd
  19.                      For NextStep CDROMs (block_size == 2048), read-only.

  20.               openstep
  21.                      For  filesystems  created  by  OpenStep  (currently  read
  22.                      only).   The  same filesystem type is also used by Mac OS
  23.                      X.

复制代码
还有,怎么知道我的内核是否支持ufs文件系统,谢谢


要支援,系统就是:

1. 编译核心时有 bsd partition 的支援,可以参阅编译核心时于 Filesystem 项目内的 Partition Types,可以选:


  1. │[*]   PC BIOS (MSDOS partition tables) support
  2.   │ │[*]     BSD disklabel (FreeBSD partition tables) support
复制代码


2. 编译核心时于 Filesystem 项目内的 Miscellaneous filesystem,可以选:

  1. <M> UFS file system support (read only)
复制代码


简单说,开机跑 dmesg 自己确认一下,一般会看到像是:


  1. Partition check:
  2.      hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >
复制代码


若你的 freebsd 分割区是划分在 hda4 上,那有看到 hda9 与 hd10 这类那就是 kernel 支援 bsd partition了。

剩下就是 mount 动作,是否支援 ufs filesystem,mount 时会告诉你。不支援就是 kernel don't support .. 的提示。

==

论坛徽章:
0
6 [报告]
发表于 2006-09-13 00:31 |只看该作者
我看了man mount,有个问题,怎么没有你说的ufstype = ufs2.

还有,我输入命令
( sda2: <bsd: sda7 sda8 >
     sda3: <solaris: [s0] sda9 [s1] sda10 [s2] sda11 >)
# mount -t ufs -o ufstype=44bsd /dev/sda7 /mnt/bsd
显示
mount: wrong fs type, bad option, bad superblock on /dev/sda7,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
换了
# mount -t ufs -o ufstype=44bsd /dev/sda7 /mnt/bsd
还是一样,又把sda7 换成sda8还是一样的信息
我的内核不是自己编译的,yum下来的,是不是kernel
不支持呢?
再次感谢!

论坛徽章:
0
7 [报告]
发表于 2006-09-13 02:35 |只看该作者
原帖由 cockroachzl 于 2006-9-13 00:31 发表
我看了man mount,有个问题,怎么没有你说的ufstype = ufs2.


manpage 没更新。

还有,我输入命令
( sda2: <bsd: sda7 sda8 >
     sda3: <solaris: [s0] sda9 [s1] sda10 [s2] sda11 >)
# mount -t ufs -o ufst ...


你的 freebsd 6 使用 ufs2 档案系统是吧 ? 那要使用 ufstype=ufs2,不是 44bsd。

另外可以阅读:

http://kerneltrap.org/node/3431

==

[ 本帖最后由 kenduest 于 2006-9-13 03:01 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2006-09-16 20:00 |只看该作者
freebsd 和 solaris 分区都加载成功了,原来要指定为只读,加 -r  或 -o   ro   
mount -t ufs -o ufstype=ufs2,ro /dev/sda7 /mnt/bsd
mount -t ufs -o ufstype=sunx86,ro /dev/sda9 /mnt/sun
谢谢多次耐心的指导
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP