LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-17-2002, 03:52 PM   #1
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Rep: Reputation: 50
Symlink Mess! Can't Mount Cdrom!!!


Got my hands on a Slackware8.1b2 ISO someone burned for me and its burning up my hands. But I can't ugrade. Can't mount cdrom! Was trying to setup Cdrom hdc dma 33 and Cdrwriter hda udma66. Created all kinds of Symlinks in every syntax combo I could think of. Now I can't mount Cdrom or Cdwr ??? Hellllp!!!

Any help is appreciated. Thanks

Last edited by NightSky; 05-18-2002 at 08:05 PM.
 
Old 05-18-2002, 09:00 PM   #2
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
1. What sort of hard disk do you have? (ide or scsi)
2. Where are hard disks and cdrom's installed on your (ide) bus? (eg hdd is primary mast, cdroms are secondary mast + slave)
3. What symlinks did you make?
 
Old 05-18-2002, 09:26 PM   #3
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
where are symlinks stored?

They are all master ea on its own channel:
Windows:
Maxtor hdrive ide3 hde
cdrom ide1 hdc
cdrw ide2 hda
Slackware8:
Maxtor hddrv ide2
cdrom ide0
cdrw ide1
Symlinks i tried to make where btw cdrom -> hdc and cdr -> hda
but different combonations of ln -s /dev/hdc cdrom
ln -s /dev/hdc /dev/cdrom
ln -s /dev/cdrom /dev/hdc
ln -s /dev/cdrom /hdc etc etc etc same thing with ln -s /dev/hda /dev/cdr tried cdrom0 and cdrom1 and god knows what else I came up with was up for 2 nights and it just kept getting worse! lol Where are the symlinks stored and how do I clean them up?

Last edited by NightSky; 05-18-2002 at 09:28 PM.
 
Old 05-18-2002, 11:24 PM   #4
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
Re: where are symlinks stored?

Quote:
Originally posted by NightSky
They are all master ea on its own channel:
Windows:
Maxtor hdrive ide3 hde
cdrom ide1 hdc
cdrw ide2 hda

Slackware8:
Maxtor hddrv ide2
cdrom ide0
cdrw ide1
Ok. Umm. Let me just verify this is talking about physical drivers plugged into cables going to controllers on your motherboard or PCI slots?

Cause you're saying you have 4 ide controllers( 0, 1, 2 and 3)? And you changed which controllers they were plugged into when you run/install windows? (Maybe I'm just confused? )

If you have just the standard IDE controllers (2 connectors on your motherboard) you really only have Primary master (hda) and Primary slave (hdb) on the first cable, and Secondary master (hdc) and Secondary slave (hdd) on the second cable. You need to set your drives as master and slave pair respectively (ie you can't have 2 masters on one cable. You can only have 1 master and 1 slave)

If you have your hard drive plugged into the first cable, and jumpered as master it will be /dev/hda. If you partition it into partitions like this, your partitions in linux will look like this:

Code:
  Partition #  | Os Installed  | Linux device name
---------------+---------------+------------------
        1      |    Windows    |   hda1
        2      |     Linux     |   hda2
        3      |  Linux Swap   |   hda3
And so on.

Quote:
Symlinks i tried to make where btw cdrom -> hdc and cdr -> hda
but different combonations of ln -s /dev/hdc cdrom
ln -s /dev/hdc /dev/cdrom
ln -s /dev/cdrom /dev/hdc
ln -s /dev/cdrom /hdc etc etc etc same thing with ln -s /dev/hda /dev/cdr tried cdrom0 and cdrom1 and god knows what else I came up with was up for 2 nights and it just kept getting worse! lol Where are the symlinks stored and how do I clean them up?
Right. if you do

ls -al /dev

you should see all the symlinks you made. (They should look something like this):

Code:
lrwxrwxrwx    1 root     root            7 Jun 11  2002 cdrom -> /dev/hda
lrwxrwxrwx    1 root     root            7 Jun 11  2002 cdrom0 -> /dev/hda
lrwxrwxrwx    1 root     root            7 Jun 11  2002 cdrom1 -> /dev/hdc
And so on.

Firstly you'll notice the l at the very beginning of lrwxrwxrwx. This means it's a link.

Second, cdrom, cdrom0, cdrom1 and the rest (of the links) should be in light blue if you're using a PC video card, or a colour (x)term and you've not disabled color ls or changed the colors in your (x)term The light blue color is another indicator that a file is a link The yellow (?) (in this case /dev/hda, /dev/hda and /dev/hdc) means the real device which is linked to. (Dark blue is a directory, green is an executable and so on)

If you just do a ls /dev you should notice an @ sign on the end of any symlinks (ie cdrom@)

So if you want to delete symlinks you may delete all those blue entries.

Sometimes you may have made a symlink to a non-existant file or device. In this case it's likely to look like white flashing text on a red background. This is a broken symlink, and you can delete it.

ln -s /dev/cdrom /hdc would make /hdc in the root directory, so try

ls -al /

and look for similar occurances there.

ln -s /dev/cdrom /dev/hdc is a bit of a worry. You're trying to make /dev/hdc a link to /dev/cdrom. /dev/cdrom is usually the link and /dev/hdc is the real device which should exist already. So if you just typed this command it should have failed. However, if you used the force option or you deleted the existing /dev/hdc and then tried to make the link, you would have overwritten your /dev/hdc If this is the case you will have to use /dev/MAKEDEV to re-create any devices you overwrote or deleted.

Why were you making symlinks? If you want to mount the cd-rom (makes it like another directory on your hard disk effictively, letting you browse the directory, but wouldn't perform an upgrade, or boot from the cdrom) you can follow the below info. If you want to boot from the disk and perform the upgrade, you just need to put the cdrom in the drive, and enable cdrom booting in the BIOS and then reboot your computer.

In order to mount a cd, you don't need any of those symlinks. You could simply use the following command:

mount -t iso9660 /dev/hdc /cdrom

assuming these things:
  • You have a directory called cdrom in the / directory to mount cdroms under (ls -al / and look for cdrom)
  • Your cdrom drive is the one plugged into the second cable and configured as master
  • The filesystem on the CD-ROM is iso9660 (which it is for slack cd's )
  • You are logged in as root, and thus have permissions to mount/unmount filesystems.

If you've previously just typed mount /cdrom or something this is the reason:

The file /etc/fstab has a list of devices, the filesystem they use and where to mount them. So when you wrote mount /cdrom it looked in /etc/fstab and found that /dev/hdc was mounted on there using the iso9660 filesystem. If it doesn't find an entry, it will fail and no mount will occur. This is basically just a shortcut so you don't have to type out the full mount -t iso9660 /dev/hdc /cdrom command. This may explain why making links into the / directory didn't have any effect.

Hope this helps,

tifkat
 
Old 05-19-2002, 11:49 AM   #5
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Thanks lots Tifkat, your info is just what I was looking for. Except 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. IDE3 & 4 are UDMA66 ergo hrddrv is on ide3 = hde... when i do dmesg i get HPT366 is native controller but not working at 100% - think I have to add the specific Linux patch for High Point 366 - but i don't know how yet.
IDE1 & 2 = UDMA33 - cdrom and cdrw
My system is dualboot win98 & slackware8 Linux and i use Loadlin to boot Slack.

Last edited by NightSky; 05-19-2002 at 11:56 AM.
 
Old 05-19-2002, 02:18 PM   #6
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Don't think I changed or disabled color ls in xterm but i am using eterm and don't see color codes. How can I enable it? Hey you can find me in irc us openproject #ljr ThanksTikat
 
Old 05-19-2002, 04:09 PM   #7
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Tifkat, I found them all and chnged to xterm too... where can i read about the color codes? 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 .
Here are the links i made:

ls -al /dev = Cdrom-> /dev/hdc & hdc -> /dev/cdrom

ls /dev = cdrom@ & hdc@

ls -al / = hda-> /dev/cdr & hdc-> /dev/cdrom1

What dir should I be in when I rm these, and what needs to be the syntax?

I created the symlinks cause I read somewhere and people suggested I try it to get my cdrom and cdrwriter working. I was up for a cple of nights and just thought that if I had the right combination I cld link hdc > cdrom and hda > cdwriter. How would I know if I wrote over or erased hdc? 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 ??? So I thought I wld make it a Dir since it is the actual device. Anyway I am much closer to where I want to be than I was thanks to you. U know man pages and books seem to obscure functionality with abstract theoretical concepts and diff tutorials say dif things about the same process also contingent on various distros - which is what makes linux - linux too
 
Old 05-19-2002, 07:50 PM   #8
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
Quote:
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?
Quote:
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
Quote:
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 do this:

cd /dev
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
Quote:
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:

cd /dev
./MAKEDEV hdc


Now if you ls -al /dev | grep hdc you should have something like this:

Code:
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 block 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:

mkdir /cdrw

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.
  1. the filesystem type (iso9660)
  2. the device to be mounted
  3. 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.

cheers,

tifkat
 
Old 05-19-2002, 11:30 PM   #9
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
A thousand thank you Tifkat,
I just forgot to mention that I wrote to the root dir - cdr and cdrom. So that if at # ls I get: GNUstep cdr cdrom loadlin16b.txt loadlin16b.zip minicom.log nsmail

Think I have to remove cdr and cdrom frm # What you say? Thank you I will work with what u gave me until I hear from you next... You write with such clarity are you a teacher? In any case you are a good teacher
 
Old 05-19-2002, 11:37 PM   #10
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
If cdrom and cdr are links, remove them. If they are directories, why not use them as your mount points? Assuming of course they are /cdr and /cdrom not ~/cdr and ~/cdrom (where ~ is your home directory... /root for root, /home/blah for user blah )

# is a command prompt and it means you're logged in as root, it doesn't mean anything about which directory you are in. If you're not logged in as root you will have % or $ for your command prompt.

to find out your current directory, try pwd

No I'm not a teacher, but thanks for the compliment

tifkat

Last edited by tifkat; 05-19-2002 at 11:42 PM.
 
Old 05-20-2002, 12:07 AM   #11
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
tifkat... it was the root dir they were in and I went into mc and deleted them that way... i believe i removed everything i made including hdc ... which i may have removed before this last episode w/ cdrom mounting.... anyway
did ./MAKEDEV hdc and yahooo cdrom mounted w/ mount cdrom ....
You are number1!!! Now I am rushing through the rest of your instructions
to begin grappling with slack8.1b2 iso cd.... You have a few hrs to hangout
with on icq or irc How much by the hr? lol That is as an instructor.

Last edited by NightSky; 05-20-2002 at 12:10 AM.
 
Old 05-20-2002, 12:18 AM   #12
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
I don't see you on irc I'm connected to irc.au.openprojects.net and I'm on #ljr, but I see no nightsky

tifkat
 
Old 05-20-2002, 12:21 AM   #13
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Tifkat, read the part about RH conventions and guess what I created mnt/ its in with cdrom/ when I ls -al / ROFL Guess I was talking to someone using RH Guess I can go ahead and rm /mnt too LOLOL
 
Old 05-20-2002, 03:35 PM   #14
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
k... Now how do we upgrade from current slackware8 to 8.1beta2 using this iso cd i have... There are three folders on the cd ISO,
Kernel, and Slackwar - yes that is how the folder is named. What do I need to do?
 
Old 05-20-2002, 09:43 PM   #15
tifkat
Member
 
Registered: May 2002
Location: Perth, Australia
Distribution: Slack, RH, *BSD, Tru64/DECUnix/OSF1/Ultrix, Solaris/SunOS...
Posts: 36

Rep: Reputation: 16
Hey,

Where did you/your friend find this ISO? I found it recently, but now I can't seem to

Yay!! I found it again. Bit out of date though.. April 23 (April 13 for the beta2 iso) Anyway, here it is:

http://ftp.eu.net/pub/linux/slackware/current-iso/

tifkat

Last edited by tifkat; 05-21-2002 at 02:43 AM.
 
  


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
What first upgrade kernel or upgrade slack 10.0 to current Kelean Slackware 7 01-16-2005 06:54 PM
Slackware-current ISO(s) Astro Slackware 8 06-13-2004 02:10 PM
Slackware current iso laurentbon Slackware 5 08-14-2003 10:19 AM
why does compiler matter? slack8.1 & current doublefailure Slackware 1 03-13-2003 11:31 PM
How current is slackware .iso? mcleodnine Slackware 3 01-14-2003 11:09 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration