Solaris: Mount an ISO file
Solaris has the ability to mount an ISO file, just like you stuck in a DVD into the drive. You need to first create the software device that is "mountable" and then mount it, so there are two basic commands.
The two files in this example are located in /root/
sol-10-u6-ga1-sparc-dvd.iso
sol-10-u6-ga1-x86-dvd.iso
Create a directory to mount the ISOs to. I like to create a directory off of root (/) called lofi. So when you are done, you will have /lofi. "cd" into /lofi and create two directories, one for each of the solaris types, sol10-sparc sol10-x86 ... so when you are done ... you will have /lofi/sol10-sparc and /lofi/sol10-x86.
The files you need are in /root, so the lofi command will look like this
# lofiadm -a /root/sol-10-u6-sparc-dvd.iso /dev/lofi/1
# lofiadm -a /root/sol-10-u6-x86-dvd.iso /dev/lofi/2
Note the device number change at the end. Now let's mount them to the directories we created. Remember to "mount" something, the directory has to already exist.
The command below mounts the sparc image. The -F is the filesystem type, in this case it is High Sierra File System (HSFS) also known as a type of CD/DVD file system.
The -o are options that you can add ... in this case we want to specify read-only so the system or users don't think otherwise.
# mount -F hsfs -o ro /dev/lofi/1 /lofi/sol10-sparc
# mount -F hsfs -o ro /dev/lofi/2 /lofi/sol10-x86
So now you can cd into the directories and nab file as needed.
When you are finished you reverse the steps to get rid of the configuration:
Unmount the lofi devices
# umount /lofi/sol10-sparc (make sure you aren't in the directory or it won't unmount)
# umount /lofi/sol10-x86
To see the devices that are registered in lofi, just type
# lofiadm
Block Device File
/dev/lofi/1 /root/sol-10-u6-ga1-sparc-dvd.iso
/dev/lofi/2 /root/sol-10-u6-ga1-x86-dvd.iso
To remove the devices:
# lofiadm -d /dev/lofi/1 (you can enter either the device name or file name)
# lofiadm -d /dev/lofi/2
Issue the command lofiadm again ... it should be empty ...
Enjoy!

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home