Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Supermount Installation and Setup
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Fri Jan 02, 2004 9:33 am    Post subject: Supermount Installation and Setup Reply with quote

I have seen Supermount mentioned several times on these forums, but never saw a complete how-to on setting it up, so here I am submitting it myself. For a quick background, suppermount 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-dev-sources which has supermount/bootsplash and a few other things. You could also use the vanilla sources and the patch from http://supermount-ng.sourceforge.net (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:

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.

Code:

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:

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.

Code:

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.

Well that's it. Knowing me I probably left a lot out, leave me some feedback on whether or not it works and/or anything you would add. I will be editing this as feedback comes in (or if I think of something as I made this up from memory).


Last edited by wolvenwraith on Sat Jan 03, 2004 7:45 am; edited 4 times in total
Back to top
View user's profile Send private message
Krigare
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 92
Location: ::1

PostPosted: Fri Jan 02, 2004 10:37 am    Post subject: Reply with quote

This seems like a good idea to try..
_________________
Together we are strong.
Back to top
View user's profile Send private message
at6
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2002
Posts: 78
Location: /dev/null

PostPosted: Fri Jan 02, 2004 3:21 pm    Post subject: wow, it works great! Reply with quote

hey wolvenwraith,

thx for this great tutorial. now watching dvd's or listening to cd's is much more comfortable.
go home "mount /mnt/dvd" ;)

marc
_________________
debian: stable but lame! suse: unstable and lame! gentoo: stable and only 4 geeks!
Gadget tests!
Back to top
View user's profile Send private message
darkcoder
Apprentice
Apprentice


Joined: 09 May 2003
Posts: 253
Location: Lynchburg, VA

PostPosted: Fri Jan 02, 2004 7:36 pm    Post subject: Reply with quote

thanks for the tutorial, but I have one question. For the floppy I use a similar configuration and it works, but readonly.

This is my fstab
Code:
/dev/hda1                       /mnt/windows    ntfs user,rw,exec,uid=1000,gid=100,umask=700 0 0
/dev/hda2                       /boot                  ext3                  noauto,noatime    1 2
/dev/hda3                       /                           reiserfs          noatime,notail        0 1
/dev/hda4                       none                   swap               sw                             0 0
/dev/cdroms/cdrom0   /mnt/cdrom      supermount      user,ro,fs=auto,exec,dev=/dev/cdroms/cdrom0     0 0
/dev/fd0                          /mnt/floppy        supermount      user,rw,fs=auto,dev=/dev/fd0    0 0
proc                                 /proc                      proc            defaults      0 0
usbdevfs                        /proc/bus/usb     usbdevfs        auto,user,devmode=0666,devgid=85        0 0
none                                 /dev/pts               devpts          defaults
0 0
none                                 /dev/shm            tmpfs           defaults
0 0

_________________
Not bleeding edge.... No pain no game :twisted:
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Fri Jan 02, 2004 11:19 pm    Post subject: Reply with quote

Try This

Code:

/dev/fd0                          /mnt/floppy        supermount      fs=auto,dev=/dev/fd0,--,user,rw    0 0


I believe supermount needs the filesystem options and the supermount options to be separated in fstab. Give this a shot, and if it works, let me know and I'll toss it in the how-to.

Believe it or not, I don't have a floppy on this system I can try it with.

--edit
see next post below


Last edited by wolvenwraith on Sat Jan 03, 2004 12:35 am; edited 1 time in total
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Fri Jan 02, 2004 11:21 pm    Post subject: Reply with quote

oh and I almost forgot. Thanks for all the feedback guys :)
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Fri Jan 02, 2004 11:26 pm    Post subject: Reply with quote

darkcoder wrote:
thanks for the tutorial, but I have one question. For the floppy I use a similar configuration and it works, but readonly.


You really should avoid double posting, or at the very least warn people when you do.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Fri Jan 02, 2004 11:32 pm    Post subject: Reply with quote

wolvenwraith wrote:
Try This
Code:

/dev/fd0                          /mnt/floppy        supermount      fs=auto,dev=/dev/fd0,--,user,rw    0 0


You will run into problems if you specify an actual device on a supermount drive. The first entry should be "none" rather than "/dev/fd0".

/usr/src/linux/Documentation/filesystems/supermount.txt wrote:
WARNING: in the above description `none' is literal word. While device
is ignored by supermount itself, using real files in this place (real
device name or mount point directory name) is known to cause problems.
Some programs - fuser is one of them - will try to descend into filesystem
if dev can be statted, thus making supermount to attempt to access media.
This is annoying at best - in the worst case it can take very long time
during startup or shutdown.

_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Sat Jan 03, 2004 12:34 am    Post subject: Reply with quote

woops I didn't catch that, I copy/pasted that over from his original line. but you're right, it should be like this.

Code:

none                          /mnt/floppy        supermount      fs=auto,dev=/dev/fd0,--,user,rw    0 0
Back to top
View user's profile Send private message
searcher
Apprentice
Apprentice


Joined: 13 Mar 2003
Posts: 175
Location: NL

PostPosted: Sat Jan 03, 2004 1:11 am    Post subject: Reply with quote

If you don't want to use the gentoo-dev-sources, but rather your own kernel/patchset, you can download the patch from here.

Make sure your `/usr/src/linux' symlink is pointing to the right sources, and copy the patch to this directory (# being a root prompt).
Code:
# cp supermount-2.0.3-2.6.0.patch.gz /usr/src/linux

next, gunzip the patch:
Code:
# gunzip supermount-2.0.3-2.6.0.patch.gz

Now you will need to patch the kernel sources, by typing:
Code:
# patch -p1 < supermount-2.0.3-2.6.0.patch

You will get some output saying which files are patched. From here you can pick up again on the original poster's howto.
~searcher
_________________
You are unique ... just like everyone else.
Back to top
View user's profile Send private message
OneOfOne
Guru
Guru


Joined: 28 May 2003
Posts: 368

PostPosted: Sat Jan 03, 2004 2:57 am    Post subject: Reply with quote

searcher wrote:
If you don't want to use the gentoo-dev-sources, but rather your own kernel/patchset, you can download the patch from here.

Make sure your `/usr/src/linux' symlink is pointing to the right sources, and copy the patch to this directory (# being a root prompt).
Code:
# cp supermount-2.0.3-2.6.0.patch.gz /usr/src/linux

next, gunzip the patch:
Code:
# gunzip supermount-2.0.3-2.6.0.patch.gz

Now you will need to patch the kernel sources, by typing:
Code:
# patch -p1 < supermount-2.0.3-2.6.0.patch

You will get some output saying which files are patched. From here you can pick up again on the original poster's howto.
~searcher

just a tip, you can do : gzcat supermount-2.0.3-2.6.0.patch.gz | patch -p1

peace
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Sat Jan 03, 2004 6:52 am    Post subject: Reply with quote

There we go, updated the how-to with information on patching your own kernel and the floppy line. Thanks for all this feedback, in due time we could have a pretty comprehensive how-to here. Also, if you notice anything that doesn't make sense or typos/etc let me know too, cause this will always be improved.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Sat Jan 03, 2004 7:19 am    Post subject: Reply with quote

Looking back at the edits (and trying to view with a n00b's eye) it occurs to me that some will not clue in to the fact that each entry needs to be on a single line. Maybe some of the spaces should be deleted so it fits on one line.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Sat Jan 03, 2004 7:47 am    Post subject: Reply with quote

Added the spaces in and the reminder that you need to create your mount points. Noticed some people thought that supermount created the mount points automatically somewhere else on the forums.
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Wed Jan 07, 2004 5:46 am    Post subject: KDE/Gnome Reply with quote

I use KDE and I remember a long time ago I used Mandrake with KDE and somehow it made icons pop up on the desktop as soon as they were mounted, or if something like a USB driver was plugged in. I know Mandrake uses supermount, so how is this done? I'm getting a compact flash reader in a few days, and I think it would be pretty cool if I could plug it in, have it mounted automatically, and see an icon pop up on my desktop....

I just thought info about this would be a great addition to the HOWTO in progress.
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Wed Jan 07, 2004 7:35 am    Post subject: Reply with quote

The problem with this I've noticed is that the DE thinks that it is ALWAYS mounted, since, in a way, it is. So the problem is that in gnome the icons are always on your desktop, and if there's something in there, they just show up. KDE didn't give me any icons for them for some reason, but I'm sure it would be the same way. I just made static links to the directory for KDE.

However, if someone does have a solution to this, I would be interested as well. Would be a nice thing to have on top of all the supermount-niceness.
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 1:32 am    Post subject: rebooting? Reply with quote

why is rebooting necessary? It is isn't necessary for other fstab changes...
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Jan 08, 2004 1:40 am    Post subject: Reply with quote

Rebooting is required if you recompiled your kernel with supermount support. It wouldn't be needed only to change the fstab.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 1:43 am    Post subject: Reply with quote

Hmm, I'm pretty sure supermount is in my kernel, and I know I rebooted. Let me look at my fstab again and make sure the syntax is all good
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 1:44 am    Post subject: Reply with quote

I think I probably do have to reboot, so supermount knows what /mnt/ points to watch for activity.
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Jan 08, 2004 1:53 am    Post subject: Reply with quote

No, you can just mount the points. For example, if you edited your fstab to include a new supermount point:
Code:
none /mnt/foo supermount dev=/dev/foo

rather than rebooting you just call:
Code:
mount /mnt/foo

and the kernel will appropriately update supermount. :)

Edit:

Just a note, since I've seen people who said they had problems with games etc. with supermount enabled on certain drives. You can temporarily disable supermount for a particular mountpoint using a similar method:
Code:
umount /mnt/foo

temporarily disables supermount for /dev/foo. You can then mount it and unmount it manually all you want. When you want supermount to resume automatic operation on /dev/foo make sure it is unmounted and remount it with supermount:
Code:
umount /dev/foo
mount /mnt/foo

supermount will be back in business.
_________________
Kent

Planes are dangerous, get out of 'em quick


Last edited by FreeFly42 on Thu Jan 08, 2004 1:57 am; edited 1 time in total
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 1:55 am    Post subject: Reply with quote

oh boy, now I'm getting this:

Code:
root@sidicpc22 mnt # mount cdrom
Segmentation fault
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 1:58 am    Post subject: Reply with quote

This is what I have in fstab

Code:

none                    /mnt/cdrom      supermount      fs=auto,dev=/dev/cdroms/cdrom0,--,ro,user       0 0
none                    /mnt/floppy     supermount      fs=auto,dev=/dev/fd0,--,rw,user 0 0
Back to top
View user's profile Send private message
wolvenwraith
n00b
n00b


Joined: 28 Dec 2003
Posts: 67
Location: Someplace, Somewhere

PostPosted: Thu Jan 08, 2004 1:59 am    Post subject: Reply with quote

Code:

phil@banshee phil $ cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   usbfs
nodev   usbdevfs
nodev   futexfs
nodev   tmpfs
nodev   pipefs
nodev   eventpollfs
nodev   binfmt_misc
nodev   devpts
        ext3
        ext2
nodev   ramfs
        iso9660
nodev   devfs
nodev   nfs
        udf
nodev   supermount
nodev   rpc_pipefs
        vfat
        msdos


check for the supermount line, that'll tell you if you have supermount support in the kernel.
Also, for debugging purposes, you might want to just try building supermount as a module. Also check your dmesg for other errors.
Back to top
View user's profile Send private message
dgrant
Apprentice
Apprentice


Joined: 28 May 2003
Posts: 158
Location: Vancouver, BC, Canada

PostPosted: Thu Jan 08, 2004 2:07 am    Post subject: Reply with quote

It looks like supermount is there. I'll try to re-build the kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum