Click to See Complete Forum and Search --> : /dev/fd0, I screwed it up.... please help
Grant
03-15-2001, 03:49 PM
Hi there,
I was having problems copying files from my floppy, and in a fit of rage I did this-
rm /dev/fd0
ooops..
How do I get this back? I was trying to unmount it and it wouldn't so I got a little upset and stupid :)
Any help that you can offer would be great!
Thanks a lot.
Grant
§ilhouette
03-15-2001, 04:02 PM
mount /dev/fd0 /mnt/floppy
you might need to be root.
Grant
03-15-2001, 04:26 PM
Thanks,
but when I run that (as root) I get-
mount: speciald device /dev/fd0 does not exist
Any ideas?
Thanks again
Grant
*Ouch!*
Look in /dev; if you find a program called MAKEDEV there, you're in luck. Running it will restore the floppy device settings.
If you don't find it in dev, do "find / -name MAKEDEV"; it might live in another directory.
[ 15 March 2001: Message edited by: DMR ]
Molecule Man
03-15-2001, 05:30 PM
I thought it was:
mknod /dev/fd0
but then I might be thinking of something else. This does illustrate why being root all the time is bad though. :rolleyes:
Grant
03-15-2001, 05:34 PM
I am sorry to ask so many questions, but I did find MAKEDEV* in the /dev directory but I can't seem to figure out how to run it.
I have tried everything I can think of but no go.
What would the command line be?
Thanks a lot, I really appreciate the help.
MBMarduk
03-15-2001, 05:40 PM
Did you read the manpage for it if it exists?
(Think not...)
Otherwise try MAKEDEV --help or -h or -?
Grant
03-15-2001, 05:53 PM
Yes actually I did, thanks for asking.
The --help doesn't give you any info at all. The man pages do give you more info, but I am a complete newbie (hence the reason I am at linuxnewbie.org).
I have tried ./MAKEDEV fd0
./MAKEDEV fd0H1440
I am missing something.
When I run ./MAKEDEV fd0
I get a message that says -
don't know how to make device "fd0"
I tried to run the mknod command and that didn't work either. I am reading the info mknod file right now, the man and --help didn't make any sense to me.
Grant
03-15-2001, 06:02 PM
I think that mknod is the way to go (not that I know anything), but it is looking for more information than I can give it.
It appears that the command line would be-
mknod /dev/fd0 b
but it says major and minor device numbers must be specified
Any ideas on this?
Thanks for your help guys
Grant
"Eagles may soar, but weasels don't get sucked into jet engines"
§ilhouette
03-15-2001, 06:39 PM
Both MAKEDEV and mknod will do the same thing. MAKEDEV is a little easier, since it's a script that will create the devices for you. If I issue a ls -l /dev/fd0 on my machine, it gives me 2,0 So, the major number is 2 and the minor number is 0. The major number tells it what type the device is, and the minor number tells what instance it is. In /usr/src/linux/Documentation/devices.txt it lists all of the different types of devices...but you'd only need to go there if you are very into hardware, or just wanted to pretend you were. :)
So, getting back to your problem, if you issue (as root) a 'MAKEDEV -v fd0<Enter>' it should automatically create all the standard floppy devices. If you wanted to take a stab at mknod, you should be able to say 'mknod fd0 b 2 0 <Enter>'
HTH
Grant
03-15-2001, 07:17 PM
THANKS!
the MAKEDEV still didn't work, but the -
mknod command did!
Thanks a lot, I really appreciate your help!