For those of you that get it, please forgive me for being long winded - feel 
free to press the delete key now! 

...But...

If you're having difficulties with supermount settings when you change 
between 2.2.x and 2.4.x kernels, I hope this message is of some assistance.



1.  Take a look at /etc/rc.d/init.d/mandrake_everytime

2.  Find these lines ...

    if grep -q '^\/.*supermount.*' /etc/fstab && \
        [ ! -f "/lib/modules/$(uname -r)/fs/supermount.o" ] && [ -x 
/usr/bin/perl ];then
        action "Disabling Supermount" /usr/sbin/supermount -i disable
    fi

3.  Decipher the code...
------------------------------------------------------
a)  If /etc/fstab contains the string "supermount"
 (yeah- a bit over simplified, $(man grep) for the absolute truth) then...

b)  Check to see if the supermount module is not in "/lib/modules/$(uname 
-r)/fs/supermount.o".   (also make sure /usr/bin/perl can be executed)

c)  if the module wasn't there, then disable supermount
------------------------------------------------------
------------------------------------------------------

To understand c) above, look at the man pages for supermount
$> man supermount

The -i option indicates that modifications are to be made to /etc/fstab
The disable option indicates that supermount entries are to be removed

If you want to get really comfortable with how your /etc/fstab file is 
getting changed, try the supermount command without the -i option.  This (as 
you saw in the man page viewed in step 4) will output changes to stdout 
instead of updating /etc/fstab.

#> supermount enable
#> supermount disable

------------------------------------------------------
Summary....
------------------------------------------------------

Mandrake installs the supermount module in...
"/lib/modules/$(uname -r)/fs/supermount.o

The 2.4.x kernel places the supermount module in...
/lib/modules/$(uname -r)/kernel/fs/supermount/supermount.o

*** Notice the DIFFERENT PATH to supermount.o. ***

  When you boot into 2.4.x the code in /etc/rc.d/init.d/mandrake_everytime 
removes the supermount.  The next time you boot into a 2.2.x kernel, there is 
no longer a supermount in /etc/fstab therefore the file is left untouched [ 
see a) above ].

------------------------------------------------------
Solution...
------------------------------------------------------
If you changed /etc/rc.d/init.d/mandrake_every_time you could solve this 
"problem"

(both of these should occupy one line)
-        [ ! -f "/lib/modules/$(uname -r)/fs/supermount.o" ] && [ -x 
/usr/bin/perl ];then

+        [ ! -f "/lib/modules/$(uname -r)/fs/supermount.o" -a  ! -f 
"/lib/modules/$(uname -r)/kernel/fs/supermount/supermount.o"
  ] && [ -x /usr/bin/perl ];then

------------------------------------------------------

(Thanks to Tom Brinkman for the details that I expounded upon)


> Hey
> Thanks for the reply, but my problem is not that the supermount.o module
> is not found. It is, that the '/etc/fstab' file is rewritten. What I like
> to have is these 4 lines:
>
> /mnt/fd0 /mnt/fd0 supermount fs=vfat,dev=/dev/fd0 0 0
> /mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
> /mnt/cdrom2 /mnt/cdrom2 supermount fs=iso9660,dev=/dev/cdrom2 0 0
> /mnt/ls120 /mnt/ls120 supermount fs=vfat,dev=/dev/hdd 0 0
>
> so I edit the file to hold these lines, but after the next boot, they are
> changed to:
>
> /dev/fd0        /mnt/fd0        vfat
> sync,nosuid,noauto,user,nodev,unhide       0 0
> /dev/cdrom      /mnt/cdrom      iso9660
> ro,nosuid,noauto,exec,user,nodev        0 0
> /dev/cdrom2     /mnt/cdrom2     iso9660
> ro,nosuid,noauto,exec,user,nodev        0 0
> /dev/hdd        /mnt/ls120      vfat nosuid,noauto,nodev,user   0 0
>
> What can I do, to prevent this to happen?
>
> Thanks in advance
> Mogens Jæger.

Reply via email to