[an error occurred while processing this directive]

Can I access Linux (ext2fs) partitions from Solaris?

Yes.
The Lxrun program (see the question elsewhere above on Lxrun)
includes software for
Linux ext2 read-only filesystem support from Solaris (mount/unmount)
is in file ext2fs.tar.gz.



  1. Obtain the ext2fs.tar.gz file.
    Make sure you have the version dated July 16, 2000 (115097 bytes).
    The earlier version dated April 23, 2000 (111226 bytes)
    never worked, at least for me (I use Solaris 8).
    You can obtain the latter (working) version from

    ftp://sun.drydog.com/pub/solaris/ext2fs.2000.7.16.tar.gz
    .
    If you get "ext2fs: undefined symbol 'vfs_devsearch'"
    messages in /var/adm/messages when you try and mount,
    you have the earlier (broken) version.


  2. Untar file
    "gzcat ext2fs.tar.gz | tar xvf -",
    and either rebuild from source (preferred) or use the prebuilt binaries.


  3. Become root and install the files under directory ext2fs/i386:

    cd ext2fs
    mkdir -p /usr/man/man7fs
    cp ext2fs.7fs /usr/man/man7fs
    cp mount_ext2fs.1m /usr/man/man1m
    cd i386
    /usr/sbin/install -m 755 -u root:sys ext2fs /usr/kernel/fs/
    /usr/sbin/install -m 755 -u root:sys -d /usr/lib/fs/ext2fs/
    /usr/sbin/install -m 555 -u root:bin mount /usr/lib/fs/ext2fs/
    /usr/sbin/modunload -i 0 # remove old ext2fs module, if present




  4. Make your mount point: "mkdir /linux"


  5. Find your Linux partition and try and mount it.
    For SCSI, mount it similar to this:

    /usr/sbin/mount -r -F ext2fs /dev/dsk/c0t0d0p1 /linux

    For ATAPI, mount it similar to this (no "t0"):

    /usr/sbin/mount -r -F ext2fs /dev/dsk/c0d0p1 /linux

    "c0d0p1" indicates fdisk partition 1 (2nd partition)
    on disk 0 of ATAPI controller 0.
    See the question above on mounting DOS filesystems for decoding
    /dev/dsk/c* device names.



  6. If you installed the ext2fs correctly and specified the correct partition,
    you should see something like this from mount, modinfo, and ls.
    (My linux partition is on the 2nd disk, 3rd partition.)

    # mount | grep /linux
    /linux on /dev/dsk/c0d1p2 read only/setuid/dev=1980052 on Sat Mar 31 14:57 2001
    # modinfo | grep ext2fs
    186 fe9688f1 5e98 19 1 ext2fs (Linux Second Extended Filesystem)
    # ls /linux
    bin etc lib proc sbin tmp
    boot home lost+found root var usr
    dev include mnt



  7. Once you found and mounted the correct linux partition, add
    and add an entry to /etc/vfstab similar to one of the following.
    For SCSI, it might look like this:


    /dev/dsk/c0t0d0p1 - /linux ext2fs - no ro



    For ATAPI, it might look like this (no "t0"):


    /dev/dsk/c0d0p1 - /linux ext2fs - no ro


    (Use "yes" instead of "no" if you want it mounted automatically at boot).


  8. Repeat for other linux filesystems, if desired.



Once you mount a ext2fs filesystem,
you can execute Linux programs using lxrun (see the question on lxrun, above).


For further information, see the
ext2fs(7fs) and mount_ext2fs(1m) man pages you installed above.






[an error occurred while processing this directive]