Monday, August 18, 2008

How to mount an ISO file as a filesystem in AIX

In AIX you "dd" the ISO file into a raw LV, then mount the LV as a filesystem.

Here are the steps for copying the ISO named "image.iso" into "/cd1iso", a JFS filesystem:

1. Create a filesystem with size slightly bigger than the size of the ISO image. Do NOT mount the filesystem:
# /usr/sbin/crfs -v jfs -g rootvg -a size=800M -m/cd1iso -Ano -pro -tno -a frag=4096 -a nbpi=4096 -a ag=8

2. Get the logical volume name associated with the new filesystem:
# lsfs | grep cd1iso (assume it is /dev/lv00)

3. dd the ISO image into rlv00 (raw lv00):
# dd if=image.iso of=/dev/rlv00 bs=10M

4. Alter /cd1iso stanza in /etc/filesystems => vfs=cdrfs and options=ro (read-only)

dev = /dev/cd1_lv
vfs = cdrfs
log = /dev/loglv00
mount = false
options = ro
account = false

5. Mount the file system :
# mount /cd1iso

6. When finished, remove the filesystem:
# rmfs /cd1iso


/usr/sbin/crfs -v jfs -g rootvg -a size=800M ...


Anonymous said...

Thank you for the compilation.

- Jay

dordoka said...

If no lv is available, but you're using VIO Servers, a repository can be created in the VIO Server, then import the ISO and eventually create a virtual CD and present it to the desired partition.

Arlequín said...

Four hours and couting doing a ``dd'' for a 3.5+ GB ISO image.... :-(

NIM server running AIX 6.1, 1GB RAM, 0.5 processor units