Mount ext3 drives in Solaris

From Wiki
Jump to: navigation, search

Here is how to mount ext3/ntfs/fat32 partitions in OpenSolaris.

  • Download packages
 FSWpart
 FSWfsmisc
 Note these are packages for x86 Solaris .
  • unzip the packages and install it
gzcat FSWpart.tar.gz | tar xvf -
gzcat FSWfsmisc.tar.gz | tar xvf -
pkgadd -d . FSWpart
pkgadd -d . FSWfsmisc
  • Now run the prtpart tool
/usr/bin/prtpart

It would result in following output

Fdisk information for device /dev/rdsk/c7t0d0p0

Block Size : 512 bytes
Controller : usbif,class8
Disk       : sd
Capacity   : 149 GB
 
#  start block  # nblocks    startCylSecHd endCylSecHd   OSType
 1: 0000000063   0312576642     0/ 1/ 1    ff/ff/fe      Linux native

Now note the disk id. In the above example its "/dev/rdsk/c7t0d0p0"

Now run

/usr/bin/prtpart /dev/rdsk/c7t0d0p0 -ldevs

Fdisk information for device /dev/rdsk/c7t0d0p0

** NOTE **
/dev/dsk/c7t0d0p0      - Physical device referring to entire physical disk
/dev/dsk/c7t0d0p1 - p4 - Physical devices referring to the 4 primary partitions
/dev/dsk/c7t0d0p5 ...  - Virtual devices referring to logical partitions

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

/dev/dsk/c7t0d0p1	Linux native

The above command scan you hard-disk and displays all available filesystems. Note the required filesystems to be mounted.

To mount NTFS partition use

mount -F ntfs  /dev/dsk/c1d0p<number> /mnt/windows

To mount FAT 16 / FAT 32 partition use

mount -F pcfs  /dev/dsk/c1d0p<number> /mnt/windows

If the above command fails you can try the below option

prtpart /dev/dsk/c1d0p0 -fat

the above command should list the available PCFS / FAT partitions in colon notation, then use the same for mounting (eg)

mount -F pcfs  /dev/dsk/c1d0p0:d /mnt/windows  

To mount Ext2 / Ext3 partitions use

mount -F ext2fs /dev/dsk/c7t0d0p1 /mnt/linux

To unmount a partition use "umount <directory>"

umount /mnt/linux