Chinaunix

标题: 解决在Solaris 10 X86 下挂载ext分区的问题,特此分享 [打印本页]

作者: saky    时间: 2006-12-17 02:27
标题: 解决在Solaris 10 X86 下挂载ext分区的问题,特此分享
Usage: Mounting EXT2FS
----------------------
To mount an EXT2FS partition you first need to identify logical device name of
the partition. Execute /usr/bin/prtpart without arguments to see the physical
device name of your harddisk. It will be of the form: /dev/rdsk/cNdNp0.  This
will also display information about the entire partition table.

Note: For more info on prtpart execute prtpart -help

Now execute:
/usr/bin/prtpart /dev/rdsk/cNdNp0 -ldevs

to list out all the logical devices and the partition types. Your Linux
partitions will be listed as "Linux Native".

Now execute:
mount -F ext2fs <logical device name> <mountpoint>

to mount the EXT2FS partition.


主要命令: prtpart /dev/dsk/c0d0p0 -ldevs

输出 :
bash-3.00# prtpart /dev/rdsk/c0d0p0 -ldevs

Fdisk information for device /dev/rdsk/c0d0p0

** NOTE **
/dev/dsk/c0d0p0      - Physical device referring to entire physical disk
/dev/dsk/c0d0p1 - p4 - Physical devices referring to the 4 primary partitions
/dev/dsk/c0d0p5 ...  - Virtual devices referring to logical partitions

Virtual device names can be used to access EXT2 and NTFS on logical partitions

/dev/dsk/c0d0p1 IFS: NTFS
/dev/dsk/c0d0p2 WIN95 Extended(LBA)
/dev/dsk/c0d0p5 WIN95 FAT32(Upto 2047GB)
/dev/dsk/c0d0p6 IFS: NTFS
/dev/dsk/c0d0p7 Linux native
/dev/dsk/c0d0p8 Linux swap

/dev/dsk/c0d0p3 Solaris x86

然后:
bash-3.00# mount -F ext2fs /dev/dsk/c0d0p7 /mnt
bash-3.00# xlsmounts
  PHYSICAL DEVICE                 LOGICAL DEVICE      FS    PID         ADDR Mounted on
  /dev/dsk/c0d0p0                /dev/dsk/c0d0p7  ext2fs   1661  127.0.0.1:/ /mnt
bash-3.00#


大功告成!用了我一个多小时的时间找这个东西,特此分享!
需要用的软件:
http://www.genunix.org/distribut ... EADME.FSWfsmisc.txt http://www.genunix.org/distribut ... es/FSWfsmisc.tar.gz http://www.genunix.org/distribut ... iles/FSWpart.tar.gz

测试平台:Sun Solaris 10 X86, OpenSUSE 10.0.2

HOW TO Install
--------------
1) Install the FSWpart package

   Download http://www.belenix.org/binfiles/FSWpart.tar.gz
   Uncompress:  gunzip -c FSWpart.tar.gz | tar xvf -
   Install:  pkgadd -d . FSWpart

2) Install the FSWfsmisc package

   Download http://www.belenix.org/binfiles/FSWfsmisc.tar.gz
   Uncompress:  gunzip -c FSWfsmisc.tar.gz | tar xvf -
   Install:  pkgadd -d . FSWfsmisc
作者: znmbb    时间: 2007-06-19 17:38
没有prtpart命令
有什么办法吗




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2