免费注册 查看新帖 |

Chinaunix

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

[OpenBSD] openbsd怎样mount linux系统 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-01-11 16:06 |只看该作者 |倒序浏览
我使用openBSD系统想mount一个linux系统,但是不行,报如错误:
#
# fdisk wd1                                                            
Disk: wd1       geometry: 5169/240/63 [78165360 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
#: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: 83      0  32  33 -     67 206  30 [        2048:     1024000 ] Linux files*
1: 8E     67 206  31 -   5169 137  57 [     1026048:    77137920 ] Linux LVM   
2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
#
#
# disklabel wd1
# /dev/rwd1c:
type: ESDI
disk: ESDI/IDE disk
label: WDC WD400EB-42CP
uid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 240
sectors/cylinder: 15120
cylinders: 5169
total sectors: 78165360
boundstart: 0
boundend: 78165360
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         78165360                0  unused                  
  i:          1024000             2048  ext2fs                  
  j:         77137920          1026048 unknown                  
#
#
# mount -a /dev/wd1i /mnt/use
mount_ext2fs: /dev/wd1i on /mnt/use: specified device does not match mounted device
#
#
# mount -a /dev/wd1j /mnt/use
mount_ffs: /dev/wd1j on /mnt/use: Invalid argument
#
/mnt/use是我在/mnt下建的一个目录。不知我哪里错了请大家指点。

论坛徽章:
0
2 [报告]
发表于 2011-01-11 16:21 |只看该作者
我用openBSD再mount一个freebsd系统好像也不对,是如下结果:
# fdisk wd1
Disk: wd1       geometry: 5169/240/63 [78165360 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
#: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: A5      0   1   1 -   5169 159  63 [          63:    78165297 ] FreeBSD     
1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
# disklabel wd1
# /dev/rwd1c:
type: ESDI
disk: ESDI/IDE disk
label: ST340015A      
uid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 240
sectors/cylinder: 15120
cylinders: 5169
total sectors: 78165360
boundstart: 0
boundend: 78165360
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         78165360                0  unused                  
  i:         78165297               63 unknown                  
# mount -a /dev/wd1i /mnt/use
mount_ffs: /dev/wd1i on /mnt/use: Device busy
#

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
3 [报告]
发表于 2011-01-11 23:00 |只看该作者
for example:
mount -t ext2fs /dev/ad6s3 /home1

论坛徽章:
2
亥猪
日期:2014-03-19 16:36:35午马
日期:2014-11-23 23:48:46
4 [报告]
发表于 2011-01-12 00:30 |只看该作者
一个是内核里有没有把支持文件系统编译进去
另一个是内核支不支持被加载的linux文件系统

论坛徽章:
0
5 [报告]
发表于 2011-01-12 11:05 |只看该作者
本帖最后由 czjin 于 2011-01-12 11:18 编辑

感谢两位版主的回复,我再继续试试。以下是mount -t ext2fs /dev/wd1i /mnt/use结果:
#: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: 83      0  32  33 -     67 206  30 [        2048:     1024000 ] Linux files*
1: 8E     67 206  31 -   5169 137  57 [     1026048:    77137920 ] Linux LVM   
2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         78165360                0  unused                  
  i:          1024000             2048  ext2fs                  
  j:         77137920          1026048 unknown
#                  
# mount -t ext2fs /dev/wd1i /mnt/use
mount_ext2fs: /dev/wd1i on /mnt/use: specified device does not match mounted device
# mount -t ext2fs /dev/wd1j /mnt/use
mount_ext2fs: /dev/wd1j on /mnt/use: Input/output error
#

论坛徽章:
0
6 [报告]
发表于 2011-01-17 21:38 |只看该作者
我在openbsd的FAQ中看到的。
14.16.1 - The partitions are not in my disklabel! What should I do?
If you install foreign filesystems on your system (often the result of adding a new operating system) after you have already installed OpenBSD, a disklabel will already be present, and it will not be updated automatically to contain the new foreign filesystem partitions. If you wish to use them, you need to add or modify these partitions manually using disklabel(.
As an example, I have modified one of my existing ext2 partitions: using Linux's fdisk program, I've reduced the size of the 'o' partition (see disklabel output above) to 1G. We will be able to recognize it easily by its starting position (offset: 6437251 and size (13783707). Note that these values are sector numbers, and that using sector numbers (not megabytes or any other measure) is the most exact and safest way of reading this information.

Before the change, the partition looked like this using OpenBSD's fdisk( utility (leaving only relevant output):

# fdisk wd0
. . .
Offset: 64372455        Signature: 0xAA55
         Starting       Ending       LBA Info:
#: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
0: 83 4007   1  1 - 4864 254 63 [    64372518:    13783707 ] Linux files*
. . .

As you can see, the starting position and size are exactly those reported by disklabel( earlier. (Dont' be confused by the value indicated by "Offset": it is referring to the starting position of the extended partition in which the ext2 partition is contained.)
After changing the partition's size from Linux, it looks like this:

# fdisk wd0
. . .
Offset: 64372455        Signature: 0xAA55
         Starting       Ending       LBA Info:
#: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
0: 83 4007   1  1 - 4137 254 63 [    64372518:     2104452 ] Linux files*
. . .

Now this needs to be changed using disklabel(. For instance, you can issue disklabel -e wd0, which will invoke an editor specified by the EDITOR environment variable (default is vi). Within the editor, change the last line of the disklabel to match the new size:
  o:       2104452      64372518  ext2fs

Save the disklabel to disk when finished. Now that the disklabel is up to date again, you should be able to mount your partitions as described above.
You can follow a very similar procedure to add new partitions.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP