Ramon....wow, great post! I've archived it under Ramon's_Rants
(as suggested by someone in an earlier thread on modems).
Anyhow, Dale's fstab lines w/supermount are not wrong, just
different than the normal syntax we are used to. In fact
supermount (along with its associated fstab lines) works fine on
my system. But like the device icons in KDE they are defaulted
to vfat file systems. In fact, it appears to me that supermount
dosen't work with ext2 (or possibly any other fs than vfat, I've
only tried ext2) file systems.
There's a KDE filetype called 'File system device' that is used
in KDE to mount, unmount and access filesystems. The default
filesystem in all removable media devices except cdroms seems to
be vfat. In fact adding another filesytem type to the icon
complicates the process enough so that I don't do that (after
experimenting a while) any more on my system. If I have an ext2
formatted zip or floppy or ls-120 to mount I open a console and
use mount/umount.
Well the same basic approach seems to be valid when the system
uses supermount, the only difference is you can't really unmount
a supermounted device/disc. So you can't use the same mount
point because you just get the error:
mount: /dev/fd0 already mounted or /mnt/floppy busy
But if you mount to a directory that isn't associated with a
supermount fstab line, the device/disc with ext2 (or, I imagine,
any non vfat filesystem) mounts just fine. For instance:
mount -t ext2 /dev/fd0 /mnt/floppy_ext2
Of course you'll still get the KDE error applet in KDE saying:
Could not list directory contents
fill:/mount/floppy
if you try and navigate to the supermount-associated directory
in Kwm (while the non-vfat disc is in the drive or with no media
at all in the drive). If you try and access the
supermount-associated directory (with either a non-vfat disc or
no disc at all in the drive) in a console you'll also get errors
like:
bash: cd: /mnt/floppy: Input/output error
or
ls: /mnt/floppy: Input/output error
Something else worth noting is that the new KDE desktop icons
associated with supermounted devices are not the old 'File
system device' type, but simply a '.kdelnk' pointing to the
mount point.
I realize that probably none of the above helps Dale in finding
out why his system is having mount problems, but I thought the
info was worth adding to the archives. I hope I've been clear.
Alan
Ramon Gandia wrote:
>
> Dale Morris wrote:
> >
> > I first posted this to the Newbie list, but got no reply. Hopefully, someone
> > here can help.
> > I just decided to give Mandrake 7.0 a try after using Redhat 6.1 for about a
> > month and a half. Here's my problem:
> > When I try to mount floppies I made with Redhat 6.1, I get an error
> > message, "could not list directory contents, file/mnt/floppy.." what do I
> > need to do to -- "So many idiots.. get this working correctly. I'm amazed
> > that I can't mount a ext2 floppy. I so few comets.." edited the fstab as
> > follows: H Henry /dev/hda1 /boot ext2 defaults 1 2 /dev/hda5 / ext2
> > defaults 1 1 /dev/hda6 swap swap defaults 0 0 /dev/hda7 /home ext2
> > defaults 1 2 /mnt/floppy /mnt/floppy supermount fs=vfat,ext2 dev=/dev/fd0
> > 0 0 none /proc proc defaults 0 0 none /dev/pts devpts mode=0620 0 0
> > /mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
> >
> > (I added ext2 in fs=..)
>
> Therefore, your current floppy line in /etc/fstab looks like this:
>
> /mnt/floppy /mnt/floppy supermount fs=vfat,ext2 dev=/dev/fd0 0 0
>
> That is clearly wrong. It should be this:
>
> /dev/fd0 /mnt/floppy auto sync,user,noauto,nosuid,nodev,unhide
> 0 0
>
> Or even just this:
>
> /dev/fd0 /mnt/floppy ext2 noauto 0 0
> ^^^^^^^^ ^^^^^^^^^^ ^^^^ ^^^^^^ ^^^^
> item 1 item 2 item 3 item 4 item 5
>
> item 1 = physical device. MUST be in /dev in this case /dev/fd0
> you are using a mount point in item 1, which will not work.
>
> item 2 = mount point. Classically /mnt/floppy but you could
> use any blank or empty directory you want. Some peope use
> /drive_A
> or something similar. Just create an empty directory and use it.
> In most Linux distros, /mnt/floppy is the default. But make sure
> it actually exists BEFORE you try mounting something to it.
>
> item 3 = file system type. Could be msdos, could be ext2 or
> could be "auto" for automatic detection of the file type in
> the floppy. Auto was not allowed here until recently, when
> auto-detection was implemented for floppy mounts.
>
> item 4 These are options, and there are many. In the second
> example above, "noauto" means not to mount the floppy
> automatically
> when it is inserted in the drive. When a floppy is inserted in
> the drive, it closes a tiny switch which can be detected by the
> operating system, which can then mount it. MSDOS and Win95 are
> examples of OS's that do this, but you should know that this is
> just by design and is not inherent. You have to make the OS
> recognize the floppy. In the example above, noauto means
> that you have to explictly give the 'mount' command.
>
> Item 5 has to do with when fsck checks your drive for file
> type errors.
>
> Here are ways to mount things. Depends if you have a valid
> fstab file that allows the shortcut.
>
> prompt# mount /mnt/floppy
>
> In this case, the mount command will look at /etc/fstab for
> /mnt/floppy in the mount point column. It will see that this
> is associated ONLY with /dev/fd0 and will attempt to mount
> that drive to that mount point using the parameters in /etc/fstab.
>
> If /mnt/floppy does not exist, or is associated with a different
> device that is detected, then it will exit with an error message.
> See below.
>
> prompt# mount -t ext2 /dev/fd0 /mnt/floppy
>
> Thjis is more explicit. It tells the mount command to mount
> the device or drive /dev/fd0 to the mount directory or point
> called /mnt/floppy and to do it as an ext2 file system.
>
> Note that this command is much more flexible. Here are some
> bizarre possibilities:
>
> Let us say you have /mnt/floppy as well as /mnt/cdrom, which
> is typical of most systems. You also have a /home directory,
> also typical.
>
> Let us also assume that there is NO CD in the CD drive.
>
> Try these for fun:
>
> prompt# mount -t ext2 /dev/fd0 /mnt/cdrom
> prompt# cd /mnt/cdrom
> prompt# ls (see that the floppy is mounted under /mnt/cdrom.
> hehehehe.
>
> prompt# mount -t ext2 /dev/fd0 /home
> prompt# cd /home
> prompt# ls
>
> Note that here, the contents of the floppy are now readable as
> /home. Waht happened to your /home directory??!! &^& Well, no
> problem, just do
>
> prompt# cd /
> prompt# umount /home
> and all is back to normal.
>
> Now take a blank, unformatted floppy and put it in the drive.
>
> prompt# cd /
> prompt# fdformat /dev/fd0H1440
> prompt# mke2fs -c /dev/fd0 1440
> prompt# mount -t ext2 /dev/fd0 /mnt/floppy
> prompt# cd /etc
> prompt# cp profile /mnt/floppy (drive light goes on)
> prompt# cd /mnt/floppy
> prompt# ls -la (see two things: "profile" and "lost+found"
> prompt# cd / (you cannot unmount when in the directory).
> prompt# umount /mnt/floppy
> prompt# ls -la /mnt/floppy (should say 0 files) OK.
> prompt# cp /etc/bashrc /mnt/floppy (copy this text file over)
> prompt# ls -la /mnt/floppy (should show ONLY "bashrc")
> prompt# mount -t ext2 /dev/fd0 /mnt/floppy
> prompt# ls -la /mnt/floppy (will show "profile" "lost+found" but
> NOT "bashrc".
> prompt# umount /mnt/floppy
> prompt# ls -la /mnt/floppy (now shows "bashrc" oNLY)
>
> Ain't that the cat's meow?
>
> Now, if you have /etc/fstab set up correctly, you can use the
> abbreviated command:
>
> prompt# mount /mnt/cdrom
> instead of the longer command
> prompt# mount -t ext2 /dev/fd0 /mnt/floppy
> but please note that it depends on what /etc/fstab has in it
> regarding the floppy device.
>
> On thing that you have to be VERY CAREFUL of when you edit
> /etc/fstab.
> MAKE CERTAIN that none of the lines wrap. Each line MUST begin
> in /dev/whatever and end in 0 0 or the two digits for fsck. If
> they wrap, so you have something like this ANYWHERE:
>
> /dev/fd0 /mnt/floppy ext2
> noauto 0 0
>
> as two lines, your system will NOT BE BOOTABLE. If you are using
> the pico editor on /etc/fstab, be absolutely certain that you
> use the -w option and that you check for line wraps with more,
> less
> or cat. This is absolutely CRITICAL:
>
> prompt# cd /etc
> prompt# pico -w fstab
>
> Another file you don't want to screw up with line wraps is the
> /etc/inittab file. There are actually many such files in the
> system, but those two will prevent booting, so don't say that
> Ramon encouraged experimenting and did not warn you. You can
> usually get back in with "linux single" at the LILO prompt or
> with a rescue disk. So I suggest you create a backup of these
> files first. Then if you screw up, go in as rescue mode and
> recopy the files. Example:
>
> prompt# cd /etc
> prompt# cp fstab fstab.bak (creates a copy of it as fstab.bak)
> prompt# pico -w fstab (lets assume you screw fstab up)
> Reboot. Does not boot.
> Go into rescue mode.
> bash# cd /etc
> bash# pwd (make sure you are in etc)
> bash# mv fstab.bak fstab
>
> or, a lengthier alternative:
> bash# mv fstab fstab.bad
> bash# mv fstab.bak fstab
>
> Reboot.
>
> In the later case, you have fstab.bad that you can peruse to
> discover the error of your ways.
>
> Play around. Worse comes to worse, you will get some training
> in OS rescue, something totally lacking in Windows 95/98.
>
>
> --
> Ramon Gandia ============= Sysadmin ============== Nook Net
> http://www.nook.net [EMAIL PROTECTED]
> 285 West First Avenue tel. 907-443-7575
> P.O. Box 970 fax. 907-443-2487
> Nome, Alaska 99762-0970 ==== Alaska Toll Free. 888-443-7525