Mount an ISO on Solaris 10 as a loopback file system?

When mounting Solaris 10 10/08 from a self-burned DVD fails, it is possible to mount the ISO file as a loopback file system.  To do this is quite simple:

# lofiadm -a sol-10-u6-ga1-sparc-dvd.iso /dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# cd /mnt
# ls
boot                         License
Copyright                    platform
installer                    Solaris_10

How to manually mount CD/DVD-ROM in Solaris

Recently while trying to build a Solaris JumpStart server, I encountered an error in reading the home-burnt DVD-ROM disk of Solaris 10 10/08.  There are many threads out on the internet that talk about the same difficulty and issue.  To circumvent the issue, I needed to manually mount the DVD-ROM.  To do this, you first need to disable the volmgmt software in Solaris.  Since I am running Solaris 10, the command is simple:

# svcadm disable volfs
# svcs volfs
STATE          STIME    FMRI
disabled        7:26:01 svc:/system/filesystem/volfs:default
# ps -ef |grep vol
    root 10189   926   0 07:26:10 pts/1       0:00 grep vol

Once that is done, you should be able to mount the DVD-ROM using the following command:

# mount -F hsfs -o ro /dev/sr0 /cdrom
# cd /cdrom
# ls
Copyright                    License                      boot                         platform
JDS-THIRDPARTYLICENSEREADME  Solaris_10                   installer

Once done, don't forget to re-enable volume management.  That is done by:

# svcadm enable volfs
# svcs volfs
STATE          STIME    FMRI
online          8:33:21 svc:/system/filesystem/volfs:default

How to delete undeletable files in Vista/Windows Server 2008

Following a recent installation of Windows Server 2008 on top of Windows XP, I had difficulty in removing some of the old files that got left behind. Several directories in the root of drive c: were not accessible due to user permissions.  The steps for removing the files were very straight forward.

For Files:

takeown /f file_name /d y icacls file_name /grant administrators:F

For Directories (will perform action recursively):

takeown /f directory_name /r /d y icacls directory_name /grant administrators:F /t

Fetch xml content with wget and rename the output?

Recently I needed to fetch Bind 9 statistics from a newly installed Bind 9.5.0-P2 server using wget.  To fetch the statistics and have the output file named 'bind.xml', I performed the following command:

wget -O bind.xml

How do I prepare a DVD-RAM disk for mounting on Linux?

In a previous FAQ, I showed how to mount a DVD-RAM drive.  Well, you must first prepare the disk for mounting, and put a filesystem on it.  To do this, download the udftools from Sourceforge or use the YUM RPM installer on Fedora to install the latest version out there.

Once the software is installed, its a single command to prepare the drive and new media:

[root@localhost ~]# mkudffs --media-type=dvdram /dev/sr0
start=0, blocks=16, type=RESERVED
start=16, blocks=3, type=VRS
start=19, blocks=237, type=USPACE
start=256, blocks=1, type=ANCHOR
start=257, blocks=16, type=PVDS
start=273, blocks=1, type=LVID
start=274, blocks=2236173, type=PSPACE
start=2236447, blocks=1, type=ANCHOR
start=2236448, blocks=239, type=USPACE
start=2236687, blocks=16, type=RVDS
start=2236703, blocks=1, type=ANCHOR

Once the new drive is prepared with the partition, it is now mountable.  If you run fdisk on the device such as /dev/sr0, you should see that there is a single Extended partition.  In my case, it created /dev/sr0p1.  The mount command worked flawlessly after that sequence.

How to mount a DVD-RAM drive in Fedora Linux?

The first thing you have to do is identify which is the proper device that "maps" to the DVD-RAM drive.  You can do this via the "dmesg" command or examining the boot information in the /var/adm/messages file.  In my case my DVD-RAM drive was /dev/sr0.  First I created a mount point:

mkdir -p /mnt/dvdram

next, I added the following line into the /etc/fstab file:

/dev/sr0                /mnt/dvdram     udf     rw,nosuid,uhelper=hal,uid=500  0 0

Once that is done, you can mount the drive usign the mount command or rebooting the system.  I tested the mount command first by:

mount /mnt/dvdram
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sr0 on /mnt/dvdram type udf (rw,nosuid,uhelper=hal,uid=500)