LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2005, 05:21 AM   #1
RJEmery
Member
 
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31

Rep: Reputation: 15
Question Writing to a diskette


My frame of reference is W98, and so Linux is completely foreign to me. I am experimenting with Fedora Core 3, among other distros.

1) How do I go about formatting a diskette in /dev/fd0?
2) How do I go about writing a simple TXT file to a diskette, to be reread by a) a W98 machine and b) another Linux machine?
3) How do I go about reading a file on a diskette or copying it from there to my Linux system?
 
Old 04-13-2005, 05:23 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
You simply need to mount the diskette with a vfat (FAT32) filesystem. This will probably be as simple as this:
1) Insert the diskette
2) Type this command
Code:
mount /dev/fd0
Post back if that returns errors, preferably with the output of
Code:
cat /etc/fstab
3) It will probably be mounted automagically to a set directory -- probably /mnt/floppy
4) Copy whatever you wish to the directory it gets mounted to, then unmount the disk with this command
Code:
umount /dev/fd0
If you need more information, please post back with the output of cat /etc/fstab as mentioned above.

Last edited by scuzzman; 04-13-2005 at 05:25 AM.
 
Old 04-13-2005, 09:45 AM   #3
mugwump84
Member
 
Registered: Mar 2005
Distribution: Arch Linux
Posts: 61

Rep: Reputation: 15
To format a floppy...

You will need to su into root (I've tried several pleas for help, but no response. Try adding yourself to group floppy)

Once that's done:

Code:
fdformat /dev/fd0
mkdosfs /dev/fd0
I'm using mkdosfs because I assume you want to put this floppy into a Windows Machine.

Remember:
 
Old 04-13-2005, 10:56 AM   #4
RJEmery
Member
 
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Mugwump,

OK. I formatted the diskette as you suggested. I presume the 'mkdosfs' will still enable me to read/write to/from Linux systems as well as Windows systems.

Now, how do I copy to or from the diskette?

If I try "cp somefile.txt /dev/fd0", I get a message warning me about overwriting /dev/fd0. I don't think that is something I should do.
 
Old 04-13-2005, 11:44 AM   #5
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
Once you're done with formatting the floppy disk and you have a filesystem written on it, there is something else that must be done before you can write to it: mount it
Code:
su          --press Enter, enter root password, then press Enter again
mkdir /mnt/floppy
mount /dev/fd0 /mnt/floppy
Now you can write to your diskette by using
Code:
cp somefile /mnt/floppy
ls -al /mnt/floppy
instead of copying to /dev/fd0. When you're done with it, unmount the floppy with
Code:
umount /dev/fd0
And don't forget to also 'exit' the root account, which is use for all the steps above. If you want to be able to write to your diskette as a regular user, look into the 'man mount' documentation for options that can be passed to the mount command (such as umask).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot diskette phizix Linux - Newbie 10 08-19-2005 03:24 AM
boot diskette phizix Linux - Newbie 1 08-16-2005 03:41 PM
boot diskette insightsystems Linux - Laptop and Netbook 1 04-23-2005 01:42 AM
boot diskette SnowSurfAir Linux - Software 7 11-28-2003 11:53 PM
cd writing software which supports multisession writing jayakrishnan Linux - General 3 03-24-2003 06:51 AM


All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration