Saturday, April 10, 2010

mounting CDROMs,ISOs and windows share in un*xs

In general its the mount command then some option for what the cdrom (or other) filesystem then some read-only option, then the device, then the mount point

AIX
mount -v cdrfs -o ro /dev/cd0 /mnt/cdrom
##### mount an .iso image ####128M PPs on hdisk2
mklv -y cdlv -s n -L /dev/cdlv vg00 $(du -m dvd1.iso|awk '{print int($1+128)"M"}') hdisk2 ; dd if=dvd.iso of=/dev/cdlv ; mount -v cdrfs -o ro /dev/cdlv /mnt/iso

NB: pretty bad eh and you need enough space on disk2 to copy it to, and it takes ages. I wrote this 1 liner in a post to usenet and I see its all over the net now as the way to mount in AIX 5.3 eg http://dbaspot.com/forums/aix/368597-poor-mount-iso-aix.html

I guess you should really do it from the VIO server these days http://ibmsystemsmag.blogs.com/aixchange/2008/01/more-on-virtual.html

or like this
http://www.ibm.com/developerworks/wikis/display/WikiPtype/AIXV53MntISO

or in AIX6 like this
loopmount -i cdrom.iso -o "-V cdrfs -o ro" -m /mnt

Linux
mount -t iso9660 -r /dev/hdb /mnt/cdrom
##### mount an .iso image ####
mount -o loop dvd.iso /mnt/iso

Solaris
mount -F hsfs -r /dev/dsk/c0t6d0s2 /mnt/cdrom
##### mount an .iso image ####
lofiadm -a dvd.iso; mkdir /mnt/sol ; mount -t hfs /dev/lofi/1 /mnt/iso
HP-UX*
mount -t cdfs -o ro /dev/dsk/cqd1s0 /mnt/cdrom

Windows!!! you can mount SMB/(Windows shares) to Linux with just the mount command:
### Linux
mount -t smbfs -o username=billy,password=apple22,workgroup=CORP //fileserver/fileshare /mnt/windowsdrive

### AIX

root@[scatst]/>mount -v cifs -n scadc01/temp02/temp02 -o wrkgrp=sca01,uid=205,fmode=750 /Sapinterface /scadc01

This basically says put the CIFS(windows SMB) share /Sapinterface from node scadc01 with login user=temp02 and password=temp02 with domain=sca01 on the AIX box as /scadc01 with read, write and execute permission for the user with UID=205


The Microsoft Services for Unix (SFU) help has all of this information and step by step howtos but basically on your side you need to:-

Log on as a member of the Domain Admins group of the server's domain
Install Server for NFS Authentication (and SFU etc)
[Server for NFS Authentication must be installed on every domain
controller in any domain containing users who will access files
through Server for NFS]
Log on as a member of the (local) Administrators group.
Install Server for NFS
Configure user authentication. Install "User Name Mapping" on at least
one server in the network and then specify the User Name Mapping
server that Server for NFS should use for authentication.

Check Server for NFS service, is running
On windows Services For unix shell:-
nfsshare scadev=C:/sharefolder root=

Then on AIX we can:-
mount -v nfs3 -n /share /mnt/share

wont go into samba - its all over the net and

No comments:

Post a Comment