Wednesday, 14 August 2013

Mount ISO Image File on AIX

Mount ISO Image File on AIX

The usual mount -o ro,loop image.iso /mnt/iso/, which you’re used to on Linux, can’t be used on AIX. On AIX you dd the ISO file into a raw Logical Volume, then mount the LV as a filesystem. Here are the steps for copying the ISO named image.iso into the folder /mnt/iso/ (a JFS filesystem):
1. Create a filesystem with size slightly bigger than the size of the ISO image. Do NOT mount the filesystem yet. Here I assume we’re dealing with a DVD ISO image ~ 4.7G:
# crfs -v jfs -g rootvg -a size=5000M -m/mnt/iso -Ano -pro -tno
Based on the parameters chosen, the new /mnt/iso JFS file system
is limited to a maximum size of 134217728 (512 byte blocks)

New File System size is 10354688
2. Get the logical volume name associated with the new filesystem:
# lsfs | grep iso
/dev/lv01 -- /mnt/iso jfs 10354688 ro no no
(we see that the logical volume name is lv01)
3. dd the ISO image into lv01 (raw lv01):
# dd if=/path/to/image.iso of=/dev/lv01 bs=100M
10+1 records in.
10+1 records out.

4. Mount the file system:
# mount -v cdrfs /mnt/iso
(Note the filesystem type! Unlike the crfs command above, where we used -v jfs, now we use -v cdrfs)
5. Do whatever you do with the files in /mnt/iso.
6. When finished, unmount the filesystem:
# umount /mnt/iso
7. And finally, remove the filesystem:
# rmfs /mnt/iso
rmlv: Logical volume lv01 is removed.

No comments:

Prasanta Kumar Behera. Mob- 8147470101