Mounting ext2/3, FAT16/FAT32 and NTFS in Solaris 10

You might be using Solaris like me, and you might have some disk containing ext3 partitions on it that you want to mount. This can not be done out of the box on Solaris, since it doesn’t support ext2/3 and ntfs. But do not give up, the solution is here!

First off, note that it’s only read-only support for NTFS/ext2/ext3. It has full read/write support though for fat16/fat32.

Follow these simple steps:
Download these two packages:
http://www.belenix.org/binfiles/FSWpart.tar.gz
http://www.belenix.org/binfiles/FSWfsmisc.tar.gz

Unzip and install them:
gzcat FSWpart.tar.gz | tar xvf –
gzcat FSWfsmisc.tar.gz | tar xvf –
pkgadd -d . FSWpart
pkgadd -d . FSWfsmisc

Now run the prtpart tool on the disk you want to read partitions. You can see the devices Solaris has recognized through “echo|format”.

/usr/bin/prtpart /dev/rdsk/p0
example:
/usr/bin/prtpart /dev/rdsk/c2t1d0p0 -ldevs

This might result in something like this:

Fdisk information for device /dev/dsk/c2t1d0p0

** NOTE **
/dev/dsk/c2t1d0p0 – Physical device referring to entire physical disk
/dev/dsk/c2t1d0p1 – p4 – Physical devices referring to the 4 primary partitions
/dev/dsk/c2t1d0p5 … – Virtual devices referring to logical partitions

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

/dev/dsk/c2t1d0p1 Linux raid autodetect
/dev/dsk/c2t1d0p2 Linux swap
/dev/dsk/c2t1d0p3 Linux raid autodetect

To mount NTFS partition use
mount -F ntfs /dev/dsk/c2t1d0p /mnt/windows

To mount FAT 16 / FAT 32 partition use
mount -F pcfs /dev/dsk/c2t1d0p /mnt/windows

if the above command fails you can try the below option
prtpart /dev/dsk/c2t1d0p0 -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/c2t1d0p0:d /mnt/windows

To mount Ext2 / Ext3 partitions use
mount -F ext2fs /dev/dsk/c2t1d0p /mnt/linux

To unmount a partition use “umount ”
umount /mnt/linux

This also means you can share this folder to a branded zone running RedHat Enterprise Linux or CentOS, but remember that it’s read only…

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: