SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I read a bunch of threads about mounting CD's and I couldn't find anything to help me out.
My cdrw drive is /dev/hda and my cdrom is /dev/hdc.
What I want to do is change the pointer for /dev/cdrom to point at /dev/hdc, and I want to add a device /dev/cdrw that points to /dev/hda.
Is this possible? I tried creating a symlink /dev/cdrw that points to /dev/hda, but when I try to mount it I get "mount: special device hda doesn't exist." Is the /dev/cdrom more than just a symlink? From the way it looks, I should be able to create the /dev/cdrw symlink, include it in fstab, and mount away...but it doesn't work. Any ideas?
Uh oh. I may have screwed up my /dev/hda and /dev/hdc. When I looked at man ln, it said that the correct syntax was:
ln [source] [destination], so I did:
ln -s /dev/hda /dev/cdrw
ln -s /dev/hdc /dev/cdrom
But when I check the permissions for /dev/hda and /dev/hdc, they're listed as lrwxrwxrwx, like somehow they became links. The rest of the dev/hd* have permissions brw-rw----
heh. hahaha. this seems like it may be a problem.... since my /dev/cdrom is also a lrwxrwxrwx link pointing right back at /dev/hdc. Same with /dev/cdrw pointing to /dev/hda. Hooray for recursive symlinks (or special devices according to mount). Anyone have any idea how I might restore my /dev/hdc and /dev/hda back to their proper states?
No, the problem is in the first character of the permission. The usual "b" has been replaced by "l". Meaning that the original /dev/hda and /dev/hdc block device files have been replaced by sym links, rendering them useless. There is no longer a /dev file referring to either of my CD drives, just the recursive links:
/dev/hda <--> /dev/cdrw
/dev/hdc <--> /dev/cdrom
I need to find out if there's a way to restore the original /dev/hda and /dev/hdc files. I've found some references to the /dev/MAKEDEV script by googling, but from what I can tell, it's only for making links or new devices. Although, ls -l does list some of the settings for /dev files. Instead of the file size, ls -l shows two numbers representing the major and minor device number (used for kernel IO).
If someone could post the results of:
ls -l /dev/hd[a,c]
I may be able to rebuild the files using the mknod command. (I guess it's another option for building a device file, according to my googling. You just need the major and minor device numbers).
Thanks for the help.
Ok, it's all fixed. mknod worked. I just had to google to find the right major and minor device numbers. I did have to change the group of both files however--they were both created in the root group rather than disk group
Then I made the proper symlinks:
/dev/cdrw -> /dev/hda
/dev/cdrom -> /dev/hdc
What's weird though, is my fstab. I had to leave the devices listed as /dev/hda and /dev/hdc. When I had them listed as /dev/cdrom and /dev/cdrw in fstab and issued a "mount cdrom" or "mount cdrw" I got an error: device hda not listed in fstab blah blah.
Anyway, it all works with a simple "mount cdrom" or "mount cdrw" Beautiful. Now to see if I can mount them as anything other than root.
LOL at the crazy type solution. That probably would have been easier...I've never even heard of udev... oh well.
And I lied about "mount cdrom" haha that only works when I'm in the /dev directory. I gave up root privileges and thought I broke it again....until I realized that I wasn't in the /dev directory anymore. Working like a charm...thanks for the help everybody.