Filesystems Part Deux


 
Thread Tools Search this Thread
Operating Systems Solaris Filesystems Part Deux
# 1  
Old 02-15-2005
Filesystems Part Deux

In reading Ralph's pervious post I came accross a question. Say you have two hard drives in your system. One is running Solaris 10 and the other is Linux on ext2 FS. Is it possible to mount the linux using Solaris and transfer files?

Thanks,
Robert
# 2  
Old 02-15-2005
Quote:
(9.17) Will Linux programs run on Solaris 2/x86?

The Lxrun program, originally written for SCO, is now available on Solaris/x86. The Lxrun emulator allows one to execute Linux binaries, both in ELF and a.out Linux formats. Linux ext2 read-only filesystem support from Solaris (mount/unmount) is included with ext2fs.tar.gz.

To install, first install package SFWlxrun from the Solaris Software Companion CD. Setup or mount a ext2fs filesystem, say at /linux (as explained in a question below on ext2fs).
Reference: http://www.sun.drydog.com/faq/9.html

Quote:
(9.23) 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 for your version of Solaris. Note that this software is not supported and may contain bugs. Use at your own risk.
* Solaris 10 ("Solaris Express" pre-release, 7/2004): ext2fs.solaris10.tar.gz,
* Solaris 9: ext2fs.solaris9.tar.gz,
* Solaris 8: ext2fs.solaris8.tar.gz,
* Solaris 7: ext2fs.solaris7.tar.gz

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

3. Become root and install the files under directory ext2fs/i386. by running "./getext2fs" as root from the source directory downloaded above.

4. Install the man pages:

cp ext2fs.7fs /usr/share/man/man7fs
cp mount_ext2fs.1m /usr/share/man/man1m

5. Make your mount point. For example: "mkdir /linux"

6. 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 and the question below on decoding /dev/dsk/c* device names.

7. 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

8. 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).

9. 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.

[Thanks to Pete Shanahan for the Solaris 10 port, Paul Floyd for the Solaris 9 port, and Mike Sullivan for the Solaris 8 port. Neither I nor they take any responsibility for errors with this software.]
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies

2. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

3. Shell Programming and Scripting

filesystems > 70%

I need a scrip that will show me the filesystems that are greater than 70%...but not sure how to filter using the df -h | grep Thank you for your help!! (6 Replies)
Discussion started by: eponcedeleonc
6 Replies

4. Shell Programming and Scripting

Joindre deux fichier avec deux champs de jointure

Hello, I come to you asking you a hand on a script that I have performed on a unix server. I have two files that I have to concatenate in a single line. The first file is created like this: mag;code_art;campagne;st_juillet;st_aout;etc The second file is created like this:... (7 Replies)
Discussion started by: steph70
7 Replies

5. Shell Programming and Scripting

comparing part of header with part of detailed records.

Hi there, I am lil confused with the following issue. I have a File, which has the following header: IMSHRATE_043008_101016 a sample detailed record is :9820101 A982005000CAVG030108000000000000010169000MAR 2008 9820102 MAR 2008 D030108 ... (1 Reply)
Discussion started by: cmaroju
1 Replies

6. HP-UX

Target LUNs plus que deux sur un SAN de 2 fabrics

salut admin, Normalement mon serveur doit voir un de mes LDEV à partir de deux chemins sur le SAN et ainsi lui attribuer seulement deux Target LUNs. Or il lui en a attribué 8!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Très bizzare! Auriez vous une idée. Merci pour votre aide appréciée (2 Replies)
Discussion started by: hmaiida
2 Replies

7. Shell Programming and Scripting

Filesystems GT 95%

Hi How can I only print the file systems that are more than 95% full. I used the df -k output and tried to check for each file system and then print only the ones that meet the criteria... But my solution seems cloodgie ... (3 Replies)
Discussion started by: YS2002
3 Replies

8. UNIX for Advanced & Expert Users

filesystems resizing

I want to resize my filesystem partitions. Reason is that I have 11GB of disk space unused by Unix which divvy reveals. Is there a way I could resize my filesystems without doing a reinstallation. The secondary problem is that the boot image is too large for a diskette (5MB). I'm running SCO... (10 Replies)
Discussion started by: sshokunbi
10 Replies

9. UNIX for Advanced & Expert Users

Filesystems

my partner change the server's ip address and now i can't to mount the oracle's filesystem, what i do? i don't want to reinstall Unix. My unix is SCO UNIX 5.0.5 (9 Replies)
Discussion started by: marun
9 Replies
Login or Register to Ask a Question