分类:
2008-04-07 17:47:35
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
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#
大功告成!用了我一个多小时的时间找这个东西,特此分享!
测试平台:Sun Solaris 10 X86, OpenSUSE 10.0.2
HOW TO Install
1) Install the FSWpart package
Download Uncompress: gunzip -c FSWpart.tar.gz | tar xvf - Install: pkgadd -d . FSWpart
2) Install the FSWfsmisc package
Download Uncompress: gunzip -c FSWfsmisc.tar.gz | tar xvf - Install: pkgadd -d . FSWfsmisc