I have 4 ide Connectors on a Soyo 6BA+IV w/ HPT366 onboard chipset controller for IDEs. In linux they read ide0, ide1, ide2, ide3 but IDE3 is empty
Ok, so you have 1 hard disk, 1 cdrom and 1 cd re-writer. What controllers are they plugged into? I ask only because above you said two different things for windows/linux. (Did you move them around when you installed Linux?)
From the perevious post I understand this:
IDE 0: cdrom
IDE 1: cd-rw
IDE 2: Maxtor Hdd
IDE 3: empty
Am I correct?
Don't think I changed or disabled color ls in xterm but i am using eterm and don't see color codes
Ok, ls uses environment variables for using colours. If you take a look at /etc/DIR_COLORS you should be able to see the setup in there. Also /etc/profile and /etc/csh.login call the command eval `dircolors`
(with some options like -t, -s, -z or -b depending on which shell you're using) This 'dircolors' command uses the definitions in /etc/DIR_COLORS to set these environment variables up.
DIR_COLORS has entries for which 'terms' will accept colourization. xterm is listed, but eterm isn't. It's possible that eterm may support colour ls, but I'm no expert so I can't help you there. If you run an eterm and in it type xterm &
you should get a real
xterm which will support colours.
You could also try ls --color
and see what that does. In any event, ls -al
will list files which are links with the l
at the start and this is all you have to worry about. ls colours are just fancy stuff
Please write out the syntax for the command to delete these symlinks. I am afraid to delete cdrom or the hda and hdc entries in /dev.
ok, so you've listed /dev and found that /dev/cdrom and /dev/hdc are both links, pointing to each other? *shudder* There's nothing else to do but:
rm -f /dev/hdc
but leave /dev/cdrom where it is for now. You can type this command anytime you like. You don't need to be in any specific directory to type it, as we specified the full path /dev/hdc. If you want to, you could
rm -f hdc
See how we didn't specify the full path (with a leading /) Linux will then assume we want to delete hdc from the current directory (which is /dev since we changed into it before executing the rm command). It's probably best to always specify the full path, 'cause then you know you're telling Linux exactly the file/directory that you want it to delete. The -f
means "force" If the file or directory you are trying to delete is not "writable" linux will complain and possibly spit you back at the shell prompt without actually deleting the file/directory, or will prompt you "Do you really want to delete this write-protected file" or something like it.
I would suggest removing the /hda and /hdc links, as they will perform no useful task by the time we're done
I find the concepts Device Type Mount/Pts really confusing. It seemed logical the mount pt wld be the real device which to me is hdc and hda. Cdrom and Cdwriter are just the names for devices. During my escapade linux said that hdc is a file not dir???
On linux and unix "everything is a file or a stream
." This makes writing programs in unix a fairly simple thing. The /dev directory has a bunch of things which linux can treat either as a file (block device) or a stream (character device). Disks are block devices, and of course are handled like files. Some examples of stream (character) devices would be, "standard in" (most frequently the keyboard), "standard out" (most frequently the terminal), a network socket, a serial port and so on. A "device name" (such as /dev/hdc) is the name by which Linux refers to your computer hardware (devices). If you want to access that device you have to use the device name that Linux knows about. If you want to, you can write a program which can read from, or write to those files/streams, but commands like ls don't do that. (Actually, ls writes to stdout and that's the text you read as a result of the ls command.) You have to mount a block device in order to perform normal linux commands like ls, or cd on them.
Thus you have to mount the (block) "device" to a directory somewhere on your system (known as the mountpoint.)
If you type mount
(without any options) you will get a list of devices which are mounted and where they are mounted. You should notice that /dev/hde2 is mounted at / (assuming Linux is the 2nd partition on the disk. It may be hde3 or hde4 depending on how you partitioned your disk.) So even your linux partition has had to be mounted. This happens during the init
stage (in /etc/rc.d/rc.S like this /sbin/mount -a -v -t nonfs,nosmbfs
) You need to mount a filesystem device (ie /dev/hdc) on a directory or mountpoint. So to do this we need to replace your /dev/hdc first. To do this, login, su to root (su -
) and type the following commands:
Now if you ls -al /dev | grep hdc
you should have something like this:
brw-rw---- 1 root disk 22, 0 Jun 20 09:15 hdc
lrwxrwxrwx 1 root root 8 Jun 17 13:45 cdrom -> /dev/hdc
and possibly a list of other stuff with hdc in it (like hdc1 - hdc20) hdc is a b
lock device (file - notice it starts with a b?) and cdrom is a link to that device!! Now you see why we just left cdrom there before. So you should have your hdc back, and an alias for it, that's easy to remember. (That's the purpose of makeing /dev/cdrom a link to /dev/hdc. So you can remember /dev/cdrom easier than thinking "So, it's on ide controller 3, as a master, so it must be /dev/hda,b,c,d,e,f,g!! /dev/hdg.." all the time counting up on your fingers etc
) there is no need for /dev/cdrom. It's just an easy to remember alias.
So now we need to mount it somewhere. Perform an ls -al /
and have a look to see if there's a directory to mount something on. I think with slackware /cdrom is common. Traditionally, unix has a /mnt directory for this also. You should see mnt in the above listing. (WARNING: RedHat has directorys cdrom and floppy inside /mnt. Their convention is to mount your floppy device on /mnt/floppy and your cdrom on /mnt/cdrom. But we're using slackware, so we can be sure we will fit in with all the other unices out there
) If you don't have a suitable directory, you could make one:
for example. Now, keep in mind, it doesn't matter what the directory is called. You might name it /clown or /bathtub. Linux doesn't care. But you might name it /cdrw and then mount the cdrw device to it, and from then on you know that /cdrw is where to look for stuff from your cdrw drive! Got it?
The last step is to mount the disk.
mount -t iso9660 /dev/hdc /cdrw
But wait... didn't we make an alias (/dev/cdrom) so we didn't have to remember /dev/hdc? Yup! So you could substitute that into the command:
mount -t iso9660 /dev/cdrom /cdrw
ls -al /cdrw
Woohoo!! There's your stuff flying past (well ok maybe it's only a few lines
) You've re-made your hdc device file, and successfully mounted it. (Hopefully
) So, /dev/cdrom (or /dev/hdc) is the device, and /cdrw is the mountpoint, the place where you mounted it on the filesystem.
To explain the mount command. We're specifying 3 things.
- the filesystem type (iso9660)
- the device to be mounted
- the mountpoitn or place where we want the device to be mounted
If you ever want to mount some other device (like a dos floppy) you should be able to work out that it would be like this:
mount -t msdos /dev/fd0 /floppy
(assuming that you have a /floppy directory and you want it mounted there) See how easy it is? Once you flirt with unix enough some of those man pages will begin to make sense. You need to get the hang of man pages, and with that will come mastery of Unix/Linux
Phew! That's pretty verbose isn't it? Well I hope this gets your system cleaned up and your cdrom mounted so you can go ahead and play with slack 8.1
I'll leave it up to you to work out how to mount your other cdrom drive.