LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Floppy write probs are Gnome 2.4! (https://www.linuxquestions.org/questions/linux-software-2/floppy-write-probs-are-gnome-2-4-a-199905/)

jhecht 07-01-2004 09:50 AM

Floppy write probs are Gnome 2.4!
 
I've got a problem that my floppy is recognized as read-only, even though the 'puter formatted it (DOS). This is in Slackware 9.1, with Gnome 2.4 desktop.

Whether I drag-n-drop, or copy-n-paste, I cannot copy to the floppy either on the desktop, or in a terminal window inside Gnome. In all cases, I get an 'invalid parameters' dialogbox, even with the floppy mounted. However, the floppy DOES work with the Linux commandline.

I've looked at /etc/fstab & /etc/mtab and it seems the floppy is listed correctly. I get an 'invalid parameters' message when I try to drag-n-drop onto the floppy desktop icon. I am 'root' on this 'puter - no other users.

In fstab, the line for the floppy reads:
/dev/fd0 /mnt/floppy auto noauto,owner 0 0

In mtab, the line for the floppy reads:
/dev/fd0 /mnt/floppy umsdos rw,nosuid,nodev 0 0

And yes, the floppy tab is in the r-w position (grin).

A tech at one of the Linux support groups, a Mr. Jim Dixon has been helping me on this. At first I thought it was a Linux problem, but JD advised:

JD>OK, the first step is to verify that the floppy is working properly and that you can in fact copy files to it. To do so, you can use the mtools command set.

JD>Insert a known good floppy but do not mount it. Use the mcopy command to copy a file to the floppy (mcopy filename a: ). Verify that the file is present on the floppy with the mdir a: command and delete it with the mdel a:/filenamne command. If these commands work then you floppy drive and floppy are working properly.

I booted to the Linux commandline. followed JD's advice, and found I COULD write, read, and delete files on the floppy, but ONLY at the Linux commandline. JD then suggested:

JD>Anyway, your floppy is working fine, so see if you can cut and post directly to the folder or not.

I re-booted to Gnome, and tried that, but was NOT able to access the floppy, even after it was mounted, and described as such in a Gnome terminal window.

I'm too newbie a user to feel confident in compiling Gnome 2.6 myself. Is there any way I can PAY to get a compiled version of it on CD? I really LIKE Gnome, it's head-and-shoulders above all the other desktops I've tried, and it's FAST, I like fast (grin).

Or is there a fix for this problem in Gnome 2.4?

Thanks in advance for any help you can give me!

kilgoretrout 07-01-2004 11:09 AM

Try changing your fstab entry to:

/dev/fd0 /mnt/floppy auto codepage=850,user,sync,noauto,nosuid,nodev,unhide,iocharset=iso8859-1 0 0

If that doesn't work, post the output of :

$ ls -l /dev/fd0

jhecht 07-01-2004 02:40 PM

Thanks, I'll try that, and see what happens.

Pardon my newbishness, but should the new fd0 line(s) be inserted as two lines of text?
I'd like to get it right the first time.

UPDATE:

I tried inserting the text as written - replacing the existing fd0 line, and putting the new text in
as two lines - the second one starting with 'codepage'. That disabled my ability to right-click, and get a floppy icon on the desktop.

Then I tried it with the new text as one long line. I was able to create the floppy icon, but NOT to paste to it.

Running ls -l /dev/fd0 in a Gnome terminal window gives:
brw-rw---- 1 root floppy 2, 0 May 14 1996 /dev/fd0

Running 'mount' with no modifiers in a Gnome terminal window gives:
/dev/hda2 on / type reiserfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
proc on /proc type proc (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /mnt/floppy type umsdos (rw,noexec,nosuid,nodev,sync,codepage=850,unhide,iocharset=iso8859-1)

Any ideas?

kilgoretrout 07-01-2004 06:16 PM

It should be one line but the format here won't allow that cause it's too long.

Anyhow, you obviously have a permission problem. The floppy device owner is root, and the group is "floppy". I suspect that your not a member of the floppy group. Only root and members of the floppy group have rw access to the device. You can try changing the permissions on the file with:

$ su
<enter root password>
# chmod 666 /dev/fd0

That should give everyone rw access to the file. However, I'm not sure the permission change will stick through a reboot. /dev/fd0 is a device file which is just an abstract representation of the device. If you right click on any device file in /dev you will see that they are all have a listed size of "0". In a sense, they are not really there. Device files are recreated every time you boot. Try changing the permissions on the floppy device file, /dev/fd0 and see if it works. Then reboot and see if the permissions revert back(I've seen this happen). If that happens, post back and we can try adding you to the floppy group by editing the /etc/group file.

jhecht 07-01-2004 09:28 PM

Thanks again for your help! FWIW, I'm an ex audio engineer/tech, so if you have any audio questions to pay you back for your Linux help, feel free to ask. I switched to Windows/Macintosh computer support afterthe recording industry imploded... Now i'm trying to learn Linux for a variety of philosophical/political reasons. I hate what the Windoze and Macintrash OS's have become - bloatcode pigs, slow and they are still not stable...

I am the only user on this computer - it's my 'learn-Linux' box, and I AM 'root' already. So do the commands you suggested make any difference?

I put back my fstab file to the original format of:
/dev/fd0 /mnt/floppy auto noauto,owner 0 0

Should I leave it that way, or use the change you suggested?

From the Linux commandline, I tried:
# chmod 666 /dev/fd0

This was accepted, so I went 'startx', and got into Gnome.
I was still not able to write to my floppy. Should I put the floppy line in fstab back to the syntax you suggested?

Thanks!

kilgoretrout 07-01-2004 11:44 PM

It must be a gnome problem. When you go through the gnome interface(i.e. the gnome dektop mounting icon), it doesn't work; when you use the command line, apparently as any user it does(correct me if I'm wrong). Mtools similarly bypasses the gnome interface for accessing the floppy.

I don't use gnome all that much so I can't help you much here. A few things to try that might shed some light on the problem. You seem to indicate that your running gnome as root and having these problems. That makes most linux geeks totally freak. It's a very insecure practice but I'm sure you heard all that already. You could try setting up an ordinary nonroot user and see if you have the same problem. Another thing to try. Boot into gnome, mount a floppy in a console and see if you can transfer files to the floppy through the gnome file manager, Nautilus. You can do that by taking any file in your home directory less than 1.44MB, and see if you can copy it to the floppy mount point, /mnt/floppy, in nautilus after you mounted the floppy in the console. You can also try creating another floppy mounting icon by right clicking on the gnome dektop. IIRC you will get a menu with the option to create a new icon for a drive.

To answer your question. If your running as root, it's not a permission problem. The fstab entry I gave you was premised on that suposition so there is no need to change it back.

jhecht 07-02-2004 10:00 AM

KT>Another thing to try. Boot into gnome, mount a floppy in a console and see if you can transfer files to the floppy through the gnome file manager, Nautilus...

Clever idea, tried it - same 'invalid parameters' errormessage.


KT>You can also try creating another floppy mounting icon by right clicking on the gnome dektop. IIRC you will get a menu with the option to create a new icon for a drive...

Tried this many times, always the 'invalid parameters' errormessage.

KT>You seem to indicate that your running gnome as root and having these problems. That makes most linux geeks totally freak. It's a very insecure practice but I'm sure you heard all that already.

If this were a regular setup, I'd totally agree. But this is my learn-Linux computer. I am the ONLY user - no one else even has physical access to it. It's hard enough to learn the commands and structure, without having to remember who I am right now. If I am root, I can break anything, but I can also fix anything... After the system itself is working, I'll set up levels of security. Make a sort of sense?

KT>You could try setting up an ordinary nonroot user and see if you have the same problem

Ah, now THAT is a great reason to set up another account (grin). I'll do it and post the results back here.

Kilgore Trout - isn't that from a Kurt Vonnegut booK? Which one?




jhecht 07-04-2004 12:34 PM

MORE TESTS

Tried booting into KDE, to see if I could write to the floppy in a different desktop environment. No luck, but the errormessage said 'could not change permissions'. Yet the permissions wwere listed as '-rw-r--r--'. And 'rw' is read/write, isn't it? Could this be an X Windows problem, rather than a Gnome one?

Also tried creating a non-root user, to see if that changed anything - but it didn't.

I ordered the Dropline Gnome CD's. as BitTorrent is not working for me ATM - don't know why. Expect to have them late next week.

I also got a USB floppy drive (used, but in perfect shape). It works fine on my Windoze 'puter. What is the ritual for installing it on my Linux box? Or point me toward a howto on the subject? Thanks!

Andrew Benton 07-04-2004 01:35 PM

Try taking out the word owner from your fstab line. As root I can mount floppies, read and write to them with the line

/dev/fd0 /mnt/floppy auto noauto 0 0

in /etc/fstab. I see in man mount that "The owner option is similar to the user option, with the restriction that the user must be the owner of the special file." A floppy formatted in DOS wouldn't have any user set as owner, hence, no owner can read or write to it.

jhecht 07-04-2004 02:45 PM

AB>Try taking out the word owner from your fstab line. As root I can mount floppies, read and write to them with the line
/dev/fd0 /mnt/floppy auto noauto 0 0

Putting your line in disabled the floppy option on the Gnome desktop (sigh). Nice try, though.

Further, something I did - not sure what - changed my fstab line to
/dev/fd0 /mnt/floppy auto auto,user 0 0

As opposed to what I'd posted earlier
/dev/fd0 /mnt/floppy auto noauto,owner 0 0

But none of them work. Is it worth my while to wipe out the install and do it again? It seems that this problem has stumped quite a few people... Thing is, the floppy works at the Linux commandline.

Andrew Benton 07-04-2004 04:37 PM

So when you say "disabled the floppy option on the Gnome desktop" do you mean you want to be able to put in a floppy disk, click on a floppy disk icon on your desktop and then drag and drop stuff into the window that opens? To do that you need to apply the supermount patch to your kernel and then recompile it (after you've enabled the supermount option with make menuconfig). Without the supermount patch the only option is to mount the disk with commands. I think the supermount patch is great. I like the convenience of it. I just tried the fstab line above to see if it would work. This is the line I normally use for my floppy (not that I use it much - there's not a lot you can get on a floppy)

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

It won't work if you've not patched your kernel http://supermount-ng.sourceforge.net/

jhecht 07-04-2004 05:22 PM

The Gnome desktop default is to have no floppy or CD incon. Right-clicking on the desktop gives a menu option which is called 'Disks'. Slide into 'Disks', and you see the option to mount a floppy or a CD.

After the disk(s) are mounted, they can be unmounted by right-clicking on the disk icon(s) and selecting 'Eject' from the menu options presented.

All this stuff works - but the floppy opens as read-only. This is also true in other desktops, but NOT true at the Linux commandline. there, the floppy is read-write.

When I changed the fstab line to the one you suggested, the 'Disks' submenu did NOT contain the floppy option, only the CD. When I went back to the earlier fstab line, the floppy option returned. Clear now?

I'd love to get supermount working, but think I should try to get plain vanilla mount working first. I'm too newbie to feel safe compiling my kernal right now...

kilgoretrout 07-07-2004 11:06 AM

Here's your output for ls -l /dev/fd0:

brw-rw---- 1 root floppy 2, 0 May 14 1996 /dev/fd0

This indicates that only root and members of the floppy group have read/write permissions on /dev/fd0, i.e. your floppy drive. I suspect your nonroot user may not be a member of the floppy group. You can try adding your user to the floppy group. You can do so by editing your /etc/group file. Open this file in any text editor and look for a line that looks something like this:

floppy:x:19:

The syntax for this file is:

groupname:group_password:group id no.:members

The password field is used to allow nongroup members to access a group owned file by giving a password. It is rarely used and "x" indicates no password. Your group id number is probably different than mine. It's something that's assigned by the system to the group. To add your nonroot user to the floppy group you simply edit the above line like so:

floppy:x:19:<username>

There should be no whitespace between the ":" and the username. You'll probably have to log out and log back in for the new setting to take effect. Give it a try and see if it works.

jhecht 07-07-2004 02:57 PM

Thanks for your reply, but, as indicated earlier in this thread:
JH>I am the only user on this computer - it's my 'learn-Linux' box, and I AM 'root' already. So do the commands you suggested make any difference?

I know it's risky to run as root - but I am the only user, and the only one with physical access to the computer. If I'm root, yes, I can break anything - but I can also fix anything without having to worry who I am at the moment. Make sense?

I apologize for not making that clear early in the thread. Any other ideas?

kilgoretrout 07-07-2004 07:00 PM

Sorry. Thought you were still fooling around with your nonroot user. Try booting into your gui as root. Then, insert a floppy in the drive open a console and run:

# mount /mnt/floppy
# cp <insert any file in your home directory less than 1.44MB> /mnt/floppy

I'm curious to see if you get an error when running the above from a console launched from within your gui. If you do get an error and you get no error when running the same commands when you boot up in a text mode, then I would suspect that your gui is launching some automounter service that is not working properly and is interfering with the mount command. I didn't think slack had any automounters for removable media by default, but it's been a while since I've run slack. "Magicdev" is a typical automount service used in many distros. You can see if it's running in your gui mode by opening a console from within the gui and running:

# ps aux | grep magicdev

That should ouput the line where the magicdev service is running if it exists.


All times are GMT -5. The time now is 08:50 PM.