big sigh and many questions.

Geoff Shang gshang at uq.net.au
Fri Oct 4 08:01:59 EDT 2002


Hi Anna:

On Thu, 3 Oct 2002, Anna Schneider wrote:

> First, I did get a couple of tutorial, I think they are tutorial, Red Hat
> CD's with my system, but I don't know how to access them.  I have to do
> something with mount don't I, but I do I know what I'm mounting, and how
> do I know which device is designated as what, and once I get the CD
> writer/reader mounted, how do I read the information it has?

OK.  First, to mount a device, you have to be root.  Second, you  need to
find out what device you need to mount ... unless you've already found out.

check in /etc/fstab to see if there's an entry that looks like this:

/dev/cdrom  /cdrom auto defaults,noauto,ro 0 0

If you have, then mounting will be easy.  All you'll need to type is:

mount cdrom

and it'll mount it on the stipulated mountpoint (in this case, /cdrom).

If you don't have a line like this in your /etc/fstab file, you'll need to
do a bit more investigation.

1.  Determine which device is your CD ROM.  If you know already, skip to
number 2.  First, see if you have a device called /dev/cdrom.  This is
usually a link to the proper device name that's used for convenience.  Type
the following to check:

ls -l /dev/cdrom

If you get something like:

ls: /dev/cdrom: No such file or directory

Then you don't have a /dev/cdrom device.  If you do have one, you'll get
something that looks like this:

lrwxrwxrwx    1 root     root            8 Nov  7  2001 /dev/cdrom -> /dev/hdb

You don't need to take a note of the /dev/hdb or whatever it's linked to,
since you'll be able to use /dev/cdrom to refer to it.

If you don't have a /dev/cdrom link, we need to look still further.  Type:

dmesg |more

Here you'll see all that stuff you hear at boot-up which tells you a lot
about your system.  Look for lines like this:

hdd: ATAPI CD-ROM DRIVE 24X MAXIMUM, ATAPI CDROM drive

and

hdd: ATAPI 20X CD-ROM drive, 120kB Cache

hmmm.  They;re a bit contradictory.  ah well.  Anyway you'll notice the hdd
at the front of the line (can you tell this came from a different machine
from the first example?).  hdd is the device name for the CD ROM.
Depending on your setup, it'll either be something like HDA through HDD, or
SCD0 or something.

NOTE: If you don't see anything like this at all in dmesg, then chances are
that your CD ROM is not being identified and if so, none of the below is
going to help you at all.

2.  OK, we've figured out what device the CD ROM is.  Now what?

Ok, to mount a filesystem, you need both a device to mount and a place on
which to mount it.  Most distributions have directories set aside for this
sort of thing, like /mnt and /cdrom. but you can call them whatever you
want.  Just so long as it's an empty directory somewhere.
I'll use /cdrom as it's convenient and says what it is.  To mount your
CDROM, ensure you have a data disk in the drive, then type:

mount /dev/hdd /cdrom

Substitute hdd for the device name for your cdrom device.  And yes, if you
have a /dev/cdrom link then by all means use that.

Providing all went well, you'll be returned to your command prompt.  At
this point, you'll now have the contents of the CD available under your
mount point.  so if there's a file called README in the root directory of
the CD, it'll be listed as /cdrom/README providing you mounted it on
/cdrom.  to explore it fully, you'll probably want to cd to the directory
you've mounted the CDROM on and use ls and such to see what's there.

While the CD is mounted, you won't be able to eject the CD.  So you'll want
to unmount it at some point.  to do this, make sure you're not in any of
the directories being used by that device (i.e. if you've mounted it on
/cdrom then make sure you're not in the /cdrom directory or any of its
subdirectories).  then type:

umount /cdrom

or whatever the mountpoint is you've used.

3.  OK.  I had to go digging for the devicename and now I can mount and
unmount my CD using it.  But you referred to some conveniences to make this
simpler?

Yes.  If you don't have a /dev/cdrom link to your CD device, you can make
it by, as root typing:

ln -s /dev/hdd /dev/cdrom

Of course, if your CD ROM is another device then type that instead of
/dev/hdd.  This is a good thing to do as many programs look for /dev/cdrom
when wanting to use the CD ROM device.

If you do this, you'll be able to type commands like:

mount /dev/cdrom /cdrom

If you want to be able to just type "mount /cdrom" then you'll want an
entry in /etc/fstab.  Mine looks like this:

/dev/cdrom  /cdrom auto defaults,noauto,ro 0 0

You can probably just cut and paste this example if you want to mount it on
/cdrom.

Just before I move on.  I've listed a number of things you need to do as
root, and there'll be more further down.  Remember when you're root, most
of the safety features are over-ridden.  So it's vital that you make sure
you've typed commands correctly before you run them, as if you mess up it
might be difficult to undo.

> second, I'm still having modem problems.  I can dial in with ppp okay, but
> then I can't seem do telnet or ssh, and I don't know where their config
> files are, or their how-to files.  I means I've skimmed the info pages on
> them but it's all jibberish to me.  When I try ssh, I get something about
> host name resolution failure, and telnet just can't find the host.  Now,
> from my non-ppp account on Drizzle, I often telnet to the catalog ofr the
> Washington Talking Book and Braille Library, and that works fine, but when
> I even tried doing that on my Linux machine, I couldn't.  It couldn't find
> it or something, but I'm wondering if it's actually a problem on my end.

It is.  As you may have guessed, your linux machine is unable to turn the
host names you give it into IP addresses.  This is because it is probably
not configured to ask a DNS server about it.

There's a couple of ways to deal with this.  The simplest way is to get the
IP addresses of the DNS servers your ISP uses and put them in
/etc/resolv.conf like so:

nameserver 61.9.208.14
nameserver 61.9.208.15
nameserver 61.9.192.15

You may need to ask your ISP for the addresses, but since you have a shell
account on your ISP, then you can probably find out yourself what their DNS
servers are.  Since many programs need to be able to read the resolver
file, try typing (on your shell account):

cat /etc/resolv.conf

I just tried it on a shell I use and I can do it.  this will make life easy
for you as you'll be able to cut and paste the nameserver entries from
their file into yours.  Of course, you'll need to connect to your shell
account while in LInux to do this, but if you can get the IP address of the
host machine then you should be able to telnet to that IP address since it
won't need to be looked up.

Many ISPs configure PPP to tell your machine the addresses of their DNS
servers automatically.  As you will have seen on the speakup list, there's
a few ways to deal with this and I think different distros do different
things.  I like the scripts that Debian has, and will probably even post
them to the list for others to grab if they wish.

If you want to get tricky and run your own DNS server, either to just cache
DNS results or even provide names to other computers on ;your network, you
can do so, though this is a bit of an exact science and is a whole new area
to research.

> This doesn't make any sense does it.  I can't do anything.  Every time I
> try I go backwards.  I don't understand the the info pages because they
> are so terminology ladend.  I can't find help on the things I need because
> I don't know where to look.

OK.  No it does make sense.  The info pages are more a source of reference
than anything else, which is why they can be cryptic.  A good place to get
some help is the howto documents at the linux documentation project at
http://www.linuxdoc.org.  They can also be a bit presumptuous about what
you know, and they nearly always tell you how to do things without
reference to any conveniences your distribution might have.  So you might
want to also do what you've already done, ask questions here.

> Oh, and I can only access my moem as root, not
> as anther user and I can find where to change that because I don't know
> what to look for.

I'm guessing this is because you don't have permissions to access your
serial port.  Usually distributions have a good access structure built
into them, so it's easiest to just go along with it.  So look to see the
permissions on your serial device.  If your modem is on ttyS0 (com1) type:

ls -l /dev/ttyS0

If your modem is on ttyS1 (com2) type:

ls -l ttyS1

Note the capital S in both examples.  I'll show you what mine looks like:

crw-rw----    1 root     dialout    4,  64 Jun 13  2001 /dev/ttyS0

Now, you'll see that both root and the dialout group have read and write
permission on the serial port.  so you want to put your user account in the
dialout group.  Edit /etc/group and look for the line with dialout.  It'll
look something like this:

dialout:x:20:

Now, add your account to the group by putting it at the end of the line (no
spaces).  So mine would look like this:

dialout:x:20:geoff

If I wanted more than one user in a group, I'd add them to the end with a
comma seperating the names like so:

dialout:x:20:geoff,anna

Once you've done this, save the file.  Changes will not take effect until
you log your user account in again, so if you're already logged in as the
user account, logout and log back in again.

If you ever want to see what groups you're in, type "groups".  Note that
PPP is a bit complex and it might take a few group additions to sort out
all the permissions.  But you don't want any old user to be able to fiddle
with the PPP link, do you.

> Can anyone sort through this and give me pointers.  This is starting to
> throw my life into chaos.

I hope I've been of help.  Since you're used to shell accounts, you're one
step ahead of some.  Let me know if I can be of any further help.

Geoff.


-- 
Geoff Shang <gshang at uq.net.au>
ICQ number 43634701

Make sure your E-mail can be read by everyone!
http://www.betips.net/etc/evilmail.html

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html






More information about the Speakup mailing list