Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / supermount.txt
blob3639862a2d4ac11772a23cdee5bf2197527b3970
1 TITLE:          Supermount Hint
2 LFS VERSION:    ALL
3 AUTHOR:         Dave Watson <djwatson@u.washington.edu>
5 SYNOPSIS:
6         This hint explains how to get supermount and install it.
7         Supermount is a kernel patch that allows one to use removable 
8         media without mounting/unmounting it.
10 HINT:
12         First off, a little background.   As far as I know, the newest
13 supermount that exists 'officially' is for version 2.4.0 of the kernel.   There
14 also exists a version for 2.4.5, ported by Jonas Berlin.   Also, Mandrake has
15 a version of supermount in their 8.1 relase, with kernel 2.4.8.  These are the 
16 latest patches I could find, so you need to be using one of these kernel
17 versions, or do the porting yourself.
19 Update 20/4/03:
20         Moritz Moeller-Herrmann says one can find patches for 2.4.20 kernels
21         here: http://members.optusnet.com.au/ckolivas/kernel/
23 Update 14/5/02:
24        Michael Monreal pointed out that supermount patches agains the linus'
25 tree can be found at the address below for 2.4.18.   Also, it seems
26 -jp7 patchset has removed the supermount patch for the time being, the
27 link is marked below as (old), so use the new link for the time
28 being.   Also noted that supermount should be added to the 2.5 tree soon.
30 Update 20/3/02: 
31        Michael Wu was kind enough to let me know that there is now a new supermount
32 available for kernel versions 2.4.18 (may work on other close relatives also).
34 Download
35 --------
36 You can download supermount here:
37 2.4.5   http://outerspace.dyndns.org/html/personal_pages/xkr47/kernel-patches/
38 2.4.0   http://www.geocities.com/alexismikhailov/supermount.html
39 2.4.8   http://www.linux-mandrake.com/
40 2.4.18  (old) http://infolinux.de/jp7
41 2.4.18  http://people.mandrakesoft.com/~quintela/supermount/
42 2.4.20  http://members.optusnet.com.au/ckolivas/kernel/004_supermount_030408_ck_2.4.20.patch.bz2
44 As far as I know Mandrake has not released a seperate patch for the 2.4.8 
45 kernel, so the whole Mandrake linux kernel must be used.   Personally I use
46 kernel 2.4.18.
48 New kernels can be gotten here:
50 http://www.kernel.org/
52 Make sure you download the correct version.
54 Installation
55 ------------
57 Unpack the kernel somewhere under /usr/src, just like you did for the book.
58 For this example, we'll be using /usr/src/linux-2.4.5.   Put the supermount
59 patch in /usr/src.   After the kernel is unpacked, change into the directory:
61 cd /usr/src/linux-2.4.5
63 Then, apply the supermount patch...
65 Kernels 2.4.5 and earlier:
67 patch -Np1 -i ../supermount-0.5.3-2.4.5.diff
69 Kernel 2.4.18 and newer:
70 [new]
71 Apply all patches at the web-address given above that pertain to your
72 kernel version (either 2.4.18 or 2.4.18-pre8).
74 [jp7 -- old]
75 You need the jp7 patchset, and after bunzip *bz2 in the patchset
76 directory, you need to install patches 22-27, or all of them, to make it work.
77 Something like this should work to apply all the patchs:
78 patch -p1<../directory/to/patches/[00-99]*
80 Finally, follow the kernel installation as in the lfs book, but make sure you
81 enable the option 'Supermount removable media support' under 'file systems'
82 when you configure the kernel.   After you build/install the kernel, your'e 
83 done!
85 Configuration
86 -------------
87 The only file you should need to edit is /etc/fstab.  To enable supermount
88 support for a cdrom, do something like this:
90 /dev/hdc /mnt/cdrom supermount fs=iso9660,dev=/dev/hdc 0 0
92 This will mount device hdc on /mnt/cdrom (this directory must exist), using
93 the supermount file system, allow users to mount/umount it (no su'ing needed),
94 tell supermount to mount using iso9660 filesystem, and then tell supermount 
95 where the device is.  This is only an example, change the paramaters to your 
96 needs.   Here is another example for a floppy:
98 /dev/fd0 /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0
100 Same as before, but use fd0, mount on /mnt/floppy, and use the vfat filesystem.
102 More detailes on exactly what options can be passed are available under the kernel
103 tree in Documentation/filesystems/supermount.txt, after the tree has been patched.
105 Using
106 -----
107 Simple.  After you have everything set up correctly, simply change to 
108 /mnt/cdrom, or any directory you specified in /etc/fstab, and if there is 
109 media in the drive it will be automatically mounted.  Unmounting is even more
110 simple....just eject the cd or floppy!   Commands such as cp or mv will not
111 return until they finish with the write, so as long as no commands are running
112 on the device, it is ok to remove them.
114 Corrections
115 -----------
116 If you notice something wrong here, please let djwatson@u.washington.edu
117 know so that he can fix it.  I personally have only tested supermount on kernels
118 2.4.5 and 2.4.18, so I know both of these work.   I have also seen a working
119 Mandrake distro, and I know it works there...but I haven't tested it myself.
121 Thanks
122 ------
123 Michael Monreal for letting my know about 2.4.18 version for linus' kernel.
124 Michael Wu for letting me know about 2.4.18-jp7 supermount version.