Thetargos
2006-07-12, 03:57 PM CDT
Has any one else noticed that some older Loki installers that copy stuff from the CDs to the HDD don't work as they used to in Fedora Core 5? I have found that this is because of the new way Fedoa mounts removable drives, especially optical media like CDs and DVDs.
I got struck by this problem when the other day I wanted to install Neverwinter Nights onto a friends computer. She owns the game, and I'm trying to convert her to Linux (as she's an avid NWN player). So I installed FC5 on her computer, I could not get NWN installed, a closer inspection at the installer (the installer was found over at: http://icculus.org/~ravage/nwn/) revealed it tried to make use of the standard mount points for the CD rom media (/media/cdrecorder|cdrom, /mnt/cdrom, etc). Since Fedora Core 5 uses this new way to mount devices, and what you actually see is the name of the volume as its mount point (which should make it easier in the long run to write installers for specific disk versions), the disks could not be found, and hence exited with an error that there was a problem decompressing the contents from CD 1...
Looking around apparently other Loki installers for other programs that require the media to be accessible through one of the standard mount points might be affected as well...
So I got to think what would be the best way to solve this problem, and still be able to use the installer... The easiest solution seems to be adding the old /media/cdrecorder|cdrom lines to /etc/fstab and install as root. There is a problem, though as since there is no pam control for this mechanism any more only root will able to mount and umount the drives, which can be problematic with multiple disk programs (NWN, UT2003/4).
Another way to solve this problem is by adding another test for the paths already present in the scripts, this could be something as simple as:
if [ `mount | grep iso9660 | awk {print $3}` = $VOLUME_NAME | $VOLUME_NAME_LIST ]
then
SETUP_CDROM=`mount | grep iso9660 | awk {print $3}`
The mount statement could even be made into a variable to make it simpler to read, something like VOL_NAME=`mount | grep iso9660 | awk {print $3}` or the like. This method has a problem that will need to be worked out, though... What if a user has more than one optical drive and has several inserted CD/DVD media on them? How to descern which to use? Even if they are the disks of a multi disk program... maybe a function to deal with this would be more appropriate.
I'm not sure if others have found that Loki installers have trouble finding CD media or not..
I got struck by this problem when the other day I wanted to install Neverwinter Nights onto a friends computer. She owns the game, and I'm trying to convert her to Linux (as she's an avid NWN player). So I installed FC5 on her computer, I could not get NWN installed, a closer inspection at the installer (the installer was found over at: http://icculus.org/~ravage/nwn/) revealed it tried to make use of the standard mount points for the CD rom media (/media/cdrecorder|cdrom, /mnt/cdrom, etc). Since Fedora Core 5 uses this new way to mount devices, and what you actually see is the name of the volume as its mount point (which should make it easier in the long run to write installers for specific disk versions), the disks could not be found, and hence exited with an error that there was a problem decompressing the contents from CD 1...
Looking around apparently other Loki installers for other programs that require the media to be accessible through one of the standard mount points might be affected as well...
So I got to think what would be the best way to solve this problem, and still be able to use the installer... The easiest solution seems to be adding the old /media/cdrecorder|cdrom lines to /etc/fstab and install as root. There is a problem, though as since there is no pam control for this mechanism any more only root will able to mount and umount the drives, which can be problematic with multiple disk programs (NWN, UT2003/4).
Another way to solve this problem is by adding another test for the paths already present in the scripts, this could be something as simple as:
if [ `mount | grep iso9660 | awk {print $3}` = $VOLUME_NAME | $VOLUME_NAME_LIST ]
then
SETUP_CDROM=`mount | grep iso9660 | awk {print $3}`
The mount statement could even be made into a variable to make it simpler to read, something like VOL_NAME=`mount | grep iso9660 | awk {print $3}` or the like. This method has a problem that will need to be worked out, though... What if a user has more than one optical drive and has several inserted CD/DVD media on them? How to descern which to use? Even if they are the disks of a multi disk program... maybe a function to deal with this would be more appropriate.
I'm not sure if others have found that Loki installers have trouble finding CD media or not..