HOWTO Supermount

From Gentoo Linux Wiki

Jump to: navigation, search
This page is a candidate for deletion 
Reason given: Supermount is old, not in userspace and has ivman as an alternative. Should be deprecated.
If you disagree with its deletion, please explain why on its discussion page.
If you intend to fix it, please remove this notice, but do not remove this notice from articles that you have created yourself.
Make sure no other pages link here and check the page's history before deleting.
This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

For a quick background, supermount is a way of automatically mounting removable disk drives (floppys, cd-roms, dvd-roms, etc) without having to manually mount them or using some sort of KDE/Gnome on-the-fly (u)mount magic. Because of the nature of supermount, it allows you to eject the drive while it is mounted (if it's reading it blocks it) and will automatically handle the appropriate mounting/unmounting.

The first step is to acquire a kernel which has the appropriate kernel patch on it. I just went ahead and grabbed the gentoo-sources which has supermount/bootsplash and a few other things. You could also use the vanilla sources and the patch from supermount@sourceforge (also has more information on the supermount-ng).

If you want to patch the kernel yourself, first make sure that /usr/src/linux is the kernel you wish to patch. Copy the patch to /usr/src/linux and apply using the following commands.

Code: Patch the kernel
# cp supermount-2.0.3-2.6.0.patch.gz /usr/src/linux
# cd /usr/src/linux
# gzcat supermount-2.0.3-2.6.0.patch.gz | patch -p1

You will get a listing of the files that were patched and if there were any errors it'll tell you. Keep in mind that the patch will not work on all pre-patched kernels as another patch could break this patch.

Next step is to be sure to enable the appropriate option in the kernel. It is sorta hidden and I couldn't find it without looking through the .config file.

Linux Kernel Configuration: Name of Config
File systems  --->
Pseudo filesystems --->
<*> Supermount removable media support


I have mine built in to the kernel, but it might also be a good idea to build it as a module so that if it crashes it doesn't take your kernel down with it.

Before you reboot with your new kernel, make the directories for your mount points

Code: Create mountpoints
# mkdir /mnt/dvd
# mkdir /mnt/cdrw
# mkdir /mnt/floppy

and edit your /etc/fstab file to include the following entries. Make sure the mount points here go along with the mount points we just created above.

File: /etc/fstab
none      /mnt/dvd        supermount      fs=auto,dev=/dev/cdroms/cdrom1    0 0
none      /mnt/cdrw       supermount      fs=auto,dev=/dev/cdroms/cdrom0    0 0
none      /mnt/floppy     supermount      fs=auto,dev=/dev/fd0,--,user,rw   0 0

Now you can reboot.

The layout for this should be fairly self explanatory. I've never had to use anything but "auto" for the fstype and of course your device point to the device of your drive. The second option is your mount point. Make sure that the first field is "none" as having the device name in this field may cause things to be slow.

[edit] See Also

Personal tools
In other languages