LinuxSir.cn,穿越时空的Linuxsir!

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

这个分区要怎样mount?

[复制链接]
发表于 2005-5-4 10:33:51 | 显示全部楼层 |阅读模式
Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         609     4891761    7  HPFS/NTFS
/dev/hda2             610        8397    62557110    f  W95 Ext'd (LBA)
/dev/hda3   *        8398        9965    12589920   bf  Unknown
/dev/hda5             610        1825     9767488+   b  W95 FAT32
/dev/hda6            1826        3735    15342043+   b  W95 FAT32
/dev/hda7            3736        3786      409626   82  Linux swap
/dev/hda8            3787        4570     6297448+  83  Linux
/dev/hda9            4571        5223     5245191   83  Linux
/dev/hda10           5224        8397    25495123+   b  W95 FAT32

这是我的分区情况,其中hda5-10为扩展分区。在Solaris下
hda5、hda6我可以用:mount -F pcfs /dev/dsk/c0d0p2:1 /mnt/WinD和mount -F pcfs /dev/dsk/c0d0p2:2 /mnt/WinE,mount上去。但是hda10试了从c0d0p2:1到c0d0p2:10都mount不上去,说文件系统格式不对。到底要怎样才能mount上去?另:在Solaris下怎样mount ext3分区?在Linux下怎样mount Solaris分区?
我装了三个系统winxp+FC3+Solaris。
发表于 2005-5-4 14:57:18 | 显示全部楼层
大多在这里了。

http://www.sun.drydog.com/faq/9.html

用FAT32作为中转是个好主意,直接写操作别的文件系统有些危险。

另:你的solaris是个啥版本的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-4 15:33:22 | 显示全部楼层
看了一下,/dev/hda10 5224 8397 25495123+ b W95 FAT32是扩展分区,但在Linux分区后面,按顺序应该是:c0d0p2:6,我试过了mount不上去。(我的是Solaris 10正式版)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-4 16:49:01 | 显示全部楼层
按照:http://www.sun.drydog.com/faq/9.html  的说法,重新编译内核。 并且确保
       CONFIG_UFS_FS=y
       CONFIG_SOLARIS_x86_PARTITION=y
但还是mount不上(Linux下)Solaris 分区,系统提示:mount: wrong fs type, bad option, bad superblock on /dev/hda3,
       or too many mounted file systems
。不知道是不是我理解错误?下面是它的原话:
Can I access Solaris/x86 partitions from Linux?

Yes. Read-only access is available. You need to have Linux 2.1.x or greater. To see if your Linux kernel recognizes Solaris partitions, type the following on Linux: dmesg | grep solaris

You should get something like this:

hda: hda1 hda2 <solaris: [s0] hda5 [s1] hda6 [s2] hda7 [s3] hda8
[s5] hda9 [s6] hda10 [s7] hda11 >

This says that Solaris lives in the 2nd partition (hda2), slices 0 to 7. These Solaris slices are mapped to virtual partitions hda5 to hda11.

To mount a partition, type something like this:

   mount -r -t ufs -o ro,ufstype=sunx86 /dev/hda5 /mnt

This will mount the root slice (s0) on /mnt read-only.

Warning: Softlinks that are relative to root (e.g., /usr/local pointing to /local) will point to the wrong place. To avoid this problem, change these links in Solaris to relative soft-links (e.g., /usr/local to ../local).

This can be automated with /etc/fstab. If you don't want the partitions mounted at boot, add ",noauto" after "defaults,ro" (no space). If you want non-root users to be able to mount partitions, add ",user" (careful!):

# /etc/fstab
# . . .
#Device     Mount                FS                        Fsck Mount at   
#to mount   point                type Options              pass boot # Slice
/dev/hda5   /solaris             ufs  defaults,ro,ufstype=sun 0 0    # s0
/dev/hda8   /solaris/var         ufs  defaults,ro,ufstype=sun 0 0    # s6
/dev/hda9   /solaris/opt         ufs  defaults,ro,ufstype=sun 0 0    # s3
/dev/hda10  /solaris/usr         ufs  defaults,ro,ufstype=sun 0 0    # s5
/dev/hda11  /solaris/export/home ufs  defaults,ro,ufstype=sun 0 0    # s7
# Note: slice s2, by convention, indicates the whole disk

If, when you type "dmesg" above, you don't see Solaris partitions recognized, you might have to rebuild your Linux kernel. Be sure to specify "y" in /usr/src/linux/.config when you type "make config":

       CONFIG_UFS_FS=y
       CONFIG_SOLARIS_x86_PARTITION=y

Linux 2.2 has experimental write support to Solaris partitions. If you get this message when mounting in read-write mode: "... ufs_read_super: fs needs fsck" then UFS function ufs_read_super somehow decided the fs isn't clean, and therefore set the RDONLY bit. Type something like this to re-mount in read/write mode (replace "hda5" with your file system):

   mount -o remount,rw /dev/hda5

There's another linux kernel configuration question, CONFIG_SMD_DISKLABEL, that applies only to Sparc Solaris disks, which are in yet another format. The answer to that question doesn't matter for Solaris/x86 filesystems.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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