* Re: error message interpretation help?
@ 2004-02-03 8:56 beolach
2004-02-03 15:14 ` Ken Moffat
2004-02-04 22:41 ` James Miller
0 siblings, 2 replies; 6+ messages in thread
From: beolach @ 2004-02-03 8:56 UTC (permalink / raw)
To: jamtat; +Cc: linux-newbie
> 1) whether the /proc/partitions and /dev directory structure inconsistency
> could be related to renaming the fstab entry for the CD drive
Not directly. Both could possibly be caused by devfs, which is what is almost
definetly causing the /proc/partition & /dev inconsistency, and might be the
reason you needed to rewrite the cdrom entry in fstab. Both issues could be
caused by the changes in the naming scheme from non-devfs to devfs.
The /proc/partitions file major and minor numbers & the number of blocks for
each partition on your computer. The /dev directory should contain a special
device file for each partition with the same name as that in /proc/partitions.
The partition names in /proc/partition will be based on either the older
non-devfs naming scheme, which would be something like:
hda
hda1
hda2
hda3
or the new devfs naming scheme, which would be like:
ide/host0/bus0/target0/lun0/disc
ide/host0/bus0/target0/lun0/part1
ide/host0/bus0/target0/lun0/part2
ide/host0/bus0/target0/lun0/part3
The warning you are getting about the /proc/partition & /dev inconsistency
could be caused by devfs being compiled into the kernel (which would cause
/proc/partitions to use the devfs naming scheme), and either devfs being
mounted somewhere other than /dev, or devfs not being mounted at all (which
would cause the /dev directory NOT to use the devfs naming scheme). Because
in your second email you mention that /dev/cdrom links to /dev/cdrom0 which
in turn links to /dev/hdb, I'm guessing devfs is not mounted at all - devfs
will never make symlinks to symlinks, and also uses the naming scheme above.
Devfs not being mounted would be caused by the kernel being compiled with
CONFIG_DEVFS_FS=y, but CONFIG_DEVFS_MOUNT=n. You can fix this by either
recompiling the kernel with CONFIG_DEVFS_MOUNT=y or by passing devfs=mount
to the boot prompt, or by running "mount -t devfs none /dev". As soon as
you do get devfs mounted on /dev, you won't get that error when you run lilo.
> 2) why CD drives get device names on some (newer?) systems like /dev/cdrom
> instead of /dev/hdx?
The /dev/cdrom file is simply for readability and for consistancy across
different machines. On any given machine the cdrom could be any of the IDE
devices (/dev/hdX), so a program that needed to access the cdrom would look
first for /dev/cdrom, because there's really no way for a user-space program
to guess which IDE device was the cdrom. The /dev/cdrom file is most likely
just going to be a symlink to whichever IDE device the cdrom happens to be in
your system. Which of the IDE devices /dev/cdrom points to could be set in a
couple of ways, either by your distros setup or by devfs if you or your
distro uses it. In your second email, you said
> /dev/cdrom is a symlink pointing at /dev/cdrom0.
> /dev/cdrom0 is, in turn, a symlink pointing at /dev/hdb (which is the
> device I manually entered into fstab to get it mountable).
> ... I still can't see why a symlink should be needed for a CD drive, much
> less a symlink to a symlink: is this for the benefit of the user, the OS
> creator/compiler, the computer itself?
First off, as I went over with your warning about /proc/partitions not
matching /dev, you probably want to mount devfs on /dev. When you do devfs
will take care of all of the device files, and will make it so you will never
have more than one layer of symlinks (although AFIK that shouldn't hurt
anything). The symlinks you have now were probably put in for the reasons
above: readability and compatibility betweeen different machines. When you mount devfs, it start using a different naming scheme that will make a *lot*
of symlinks, for the same reasons that you have the symlinks you have now: readability and consistency betweeen different machines, and also for
compatibility with older (non-devfs) different naming scheme. Right now you
said you have:
/dev/hdb
/dev/cdrom0 -> /dev/hdb
/dev/cdrom -> /dev/cdrom0
Once you start using using devfs it should change to something like:
/dev/ide/host0/bus0/target1/lun0/cd
/dev/cdrom -> /dev/ide/host0/bus0/target1/lun0/cd
/dev/hdb -> /dev/ide/host0/bus0/target1/lun0/cd
/dev/cdroms/cdrom0 -> /dev/ide/host0/bus0/target1/lun0/cd
Notice that devfs will never make more than one layer symlinks (no symlink
to symlink to device file, only symlinks to device file). However there
should be no problem with using multiple symlink layers. I would suspect
that your problem with your fstab entry for the cdrom was caused by either
a broken symlink or a symlink to the wrong device file. The only danger in
having multiple layers in symlinks is that it increases the likelyhood of
having one of the links broken or incorrect.
Mounting devfs should solve both the lilo warning & will also automagically
handle any & all symlinks in /dev. If you want more info on devfs see the
documentation in /usr/src/linux/Documentaion/filesystems/devfs or online at
<http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html> Note: the
online FAQ is outof date for the latest 2.4 & 2.6 kernels. Depending on
which kernel version you use, devfs may or may not take over devpts. It did
for a while after it was first introduced, but in latter versions it was Your
fstab file doesn't have an entry for devpts, so most likly you'll be just
fine mounting devfs. But if after mounting devfs you have problems with
/dev/pts/*, try mounting devpts seperatly.
Well, that's my second novel for tonight. It's a sequel to my first, which
was to someone's general questions on devfs. Again, hope you enjoy,
Conway S. Smith
> I recently made some kernel changes and was fiddling with lilo.conf on a
> Debian Sid system. Of course I had to run "lilo" to get the changes to
> take effect. When I did, I got an error message that I'm not quite sure
> how to interpret. I'd like to ask some input here on what it means and on
> what I need to do to correct the problem. Here's what I got when I ran
> the command "lilo" from an xterm as root:
>
> --------------------------------------------------------
> [03:43:15]root@debian-sid root$ lilo
> Warning: '/proc/partitions' does not match '/dev' directory structure.
> Name change: '/dev/ide/host0/bus1/target0/lun0/disc' -> '/dev/hdc'
> Warning: /dev/hda is not on the first disk
> Added Linux-2.4.24 *
> Added Linux-2.2.20
> ---------------------------------------------------------
>
> I should mention that I had some problems mounting the CD drive on this
> machine initially. To make the CD drive mountable/accessible, I changed
> an fstab entry that pointed to the CD device. Here's my current fstab:
>
> -------------------------------------------------------------------
> [03:43:28]root@debian-sid root$ cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump>
> <pass>
> /dev/hda1 / ext2 errors=remount-ro 0 1
> /dev/hdd2 none swap sw 0 0
> proc /proc proc defaults 0 0
> /dev/fd0 /floppy auto user,noauto 0 0
> /dev/hdb /cdrom iso9660 ro,user,noauto 0 0
> /dev/hdc1 /home ext2 defaults 0 2
> /dev/hdd1 /usr ext2 defaults
> -----------------------------------------------------------------
>
> I believe I changed the entry that now reads "/dev/hdb /cdrom . . ."
> from something that was more like "/dev/cdrom /cdrom . . ." Could that
> be what's causing the inconsistency between /proc/partitions and the /dev
> directory structure? In general, I do not really understand the
> /dev/cdrom as opposed to /dev/hdx entry in fstab. I've seen it before,
> but I really can't conjecture what's going on with it, and why a CD drive
> wouldn't just be labelled the same way as an IDE disk. In any case,
> without changing the entry from /dev/cdrom to /dev/hdb, I was unable to
> access the drive (unable to mount it when it had a CD in it). Can someone
> please help clarify for me 1) whether the /proc/partitions and /dev
> directory structure inconsistency could be related to renaming the fstab
> entry for the CD drive and 2) why CD drives get device names on some
> (newer?) systems like /dev/cdrom instead of /dev/hdx?
>
> Thanks, James
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error message interpretation help?
2004-02-03 8:56 error message interpretation help? beolach
@ 2004-02-03 15:14 ` Ken Moffat
2004-02-04 22:41 ` James Miller
1 sibling, 0 replies; 6+ messages in thread
From: Ken Moffat @ 2004-02-03 15:14 UTC (permalink / raw)
To: beolach; +Cc: jamtat, linux-newbie
On Tue, 3 Feb 2004 beolach@comcast.net wrote:
> > 1) whether the /proc/partitions and /dev directory structure inconsistency
> > could be related to renaming the fstab entry for the CD drive
>
[snip useful explanations of how devfs is affecting /proc/partitions,
and symlinks for the cd]
Can I just say that I agree with all of this, apart from the
advice to mount / use devfs. Seems to me that if devfs has never been
mounted in the past, adding it to the kernel config now is a bug - it's
no longer maintained (certain race conditions are believed to be
unfixable, although many people run it without trouble). But see below.
As to why the cdrom was not accessible via /dev/cdrom, I've no idea.
Two levels of symlinks isn't a problem (look at shared libraries
sometime, foo.so -> foo.so.4 -> foo.so.4.0). If you've got strace
installed, you could always try
strace mount /dev/cdrom 2>trace
when you've got a CD in the drive, then look in the trace to work out
which of the errors is the one that matters. You might think banging
your head against a brick wall is easier and less painful, it depends a
bit on what is in the particular trace, some have a lot of error
messages for things that you wouldn't normally expect to succeed :)
But, turning this around, if /dev/cdrom was pointing to
/dev/cdroms/cdrom0, surely at least the installation kernel _was_ using
devfs ? In which case, maybe devfs _is_ appropriate to your setup.
Perhaps upgrading to Sid broke this. I'd be particularly concerned at
the lack of /dev/pts in your fstab, you'll need it if you either access
this machine via ssh, or if you open xterms.
Ken
--
Brighton tops UK Jedi league
http://www.theregister.co.uk/content/28/35186.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error message interpretation help?
2004-02-03 8:56 error message interpretation help? beolach
2004-02-03 15:14 ` Ken Moffat
@ 2004-02-04 22:41 ` James Miller
1 sibling, 0 replies; 6+ messages in thread
From: James Miller @ 2004-02-04 22:41 UTC (permalink / raw)
To: linux-newbie
On Tue, 3 Feb 2004 beolach@comcast.net wrote:
> The warning you are getting about the /proc/partition & /dev inconsistency
> could be caused by devfs being compiled into the kernel (which would cause
> /proc/partitions to use the devfs naming scheme), and either devfs being
> mounted somewhere other than /dev, or devfs not being mounted at all (which
> would cause the /dev directory NOT to use the devfs naming scheme). Because
> in your second email you mention that /dev/cdrom links to /dev/cdrom0 which
> in turn links to /dev/hdb, I'm guessing devfs is not mounted at all - devfs
> will never make symlinks to symlinks, and also uses the naming scheme above.
> Devfs not being mounted would be caused by the kernel being compiled with
> CONFIG_DEVFS_FS=y, but CONFIG_DEVFS_MOUNT=n. You can fix this by either
> recompiling the kernel with CONFIG_DEVFS_MOUNT=y or by passing devfs=mount
> to the boot prompt, or by running "mount -t devfs none /dev". As soon as
> you do get devfs mounted on /dev, you won't get that error when you run lilo.
Thanks for the info on devfs, which helps to fill in a bit between the
level of the documentation you provided a link for and what I'm currently
capable of processing (which is to say that the documentation, though
passing itself off as something basic, was over my head). I followed your
advice about doing "mount -t devfs none /dev", but I'm sorry to report
that it has introduced another error. I can't tell if it's fixed the
one it was supposed to have, though. After running that command, when I
issue "lilo" at the command prompt, I get
-----------------------------------
Fatal: raid_setup: stat("/dev/hda")
-----------------------------------
The computer continues to function normally, so far as I can tell,
notwithstanding.
Thanks, James
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* error message interpretation help?
@ 2004-02-02 22:01 James Miller
2004-02-02 23:47 ` Ken Moffat
0 siblings, 1 reply; 6+ messages in thread
From: James Miller @ 2004-02-02 22:01 UTC (permalink / raw)
To: linux-newbie
I recently made some kernel changes and was fiddling with lilo.conf on a
Debian Sid system. Of course I had to run "lilo" to get the changes to
take effect. When I did, I got an error message that I'm not quite sure
how to interpret. I'd like to ask some input here on what it means and on
what I need to do to correct the problem. Here's what I got when I ran
the command "lilo" from an xterm as root:
--------------------------------------------------------
[03:43:15]root@debian-sid root$ lilo
Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/ide/host0/bus1/target0/lun0/disc' -> '/dev/hdc'
Warning: /dev/hda is not on the first disk
Added Linux-2.4.24 *
Added Linux-2.2.20
---------------------------------------------------------
I should mention that I had some problems mounting the CD drive on this
machine initially. To make the CD drive mountable/accessible, I changed
an fstab entry that pointed to the CD device. Here's my current fstab:
-------------------------------------------------------------------
[03:43:28]root@debian-sid root$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump>
<pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hdd2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/hdb /cdrom iso9660 ro,user,noauto 0 0
/dev/hdc1 /home ext2 defaults 0 2
/dev/hdd1 /usr ext2 defaults
-----------------------------------------------------------------
I believe I changed the entry that now reads "/dev/hdb /cdrom . . ."
from something that was more like "/dev/cdrom /cdrom . . ." Could that
be what's causing the inconsistency between /proc/partitions and the /dev
directory structure? In general, I do not really understand the
/dev/cdrom as opposed to /dev/hdx entry in fstab. I've seen it before,
but I really can't conjecture what's going on with it, and why a CD drive
wouldn't just be labelled the same way as an IDE disk. In any case,
without changing the entry from /dev/cdrom to /dev/hdb, I was unable to
access the drive (unable to mount it when it had a CD in it). Can someone
please help clarify for me 1) whether the /proc/partitions and /dev
directory structure inconsistency could be related to renaming the fstab
entry for the CD drive and 2) why CD drives get device names on some
(newer?) systems like /dev/cdrom instead of /dev/hdx?
Thanks, James
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: error message interpretation help?
2004-02-02 22:01 James Miller
@ 2004-02-02 23:47 ` Ken Moffat
2004-02-03 1:31 ` James Miller
0 siblings, 1 reply; 6+ messages in thread
From: Ken Moffat @ 2004-02-02 23:47 UTC (permalink / raw)
To: James Miller; +Cc: linux-newbie
On Mon, 2 Feb 2004, James Miller wrote:
> I recently made some kernel changes and was fiddling with lilo.conf on a
> Debian Sid system. Of course I had to run "lilo" to get the changes to
> take effect. When I did, I got an error message that I'm not quite sure
> how to interpret. I'd like to ask some input here on what it means and on
> what I need to do to correct the problem. Here's what I got when I ran
> the command "lilo" from an xterm as root:
>
> --------------------------------------------------------
> [03:43:15]root@debian-sid root$ lilo
> Warning: '/proc/partitions' does not match '/dev' directory structure.
> Name change: '/dev/ide/host0/bus1/target0/lun0/disc' -> '/dev/hdc'
> Warning: /dev/hda is not on the first disk
> Added Linux-2.4.24 *
> Added Linux-2.2.20
> ---------------------------------------------------------
>
Looks like a warning, not an error. Lilo seems to have completed
successfully. <obligatory disclaimer> I don't use devfs, YMMV :) </>
> Can someone
> please help clarify for me 1) whether the /proc/partitions and /dev
> directory structure inconsistency could be related to renaming the fstab
> entry for the CD drive and 2) why CD drives get device names on some
> (newer?) systems like /dev/cdrom instead of /dev/hdx?
>
> Thanks, James
I imagine that fstab will never be taken into account when
/proc/partitions and /dev are compared. I would not be surprised if
it's purely an artefact of using devfs, or perhaps you are supposed to
_not_ use /dev/hdc with devfs.
As to naming the cdrom, /dev/cdrom will usually be a symlink to another
device (e.g. hdc or perhaps scd0 if your distro uses scsi emulation for
read and write). If you are using the ide driver, /dev/hdc or whichever
won't cause you problems. Distros usually get these things right, but
maybe you compiled your own kernel and used different options. Since
/dev/cdrom no longer works for you, where is it pointing (or,
exceptionally, which are the device major / minor numbers, and is it
char or block - I'm only asking so you can understand why it no longer
works :) ?
Ken
--
Brighton tops UK Jedi league
http://www.theregister.co.uk/content/28/35186.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error message interpretation help?
2004-02-02 23:47 ` Ken Moffat
@ 2004-02-03 1:31 ` James Miller
0 siblings, 0 replies; 6+ messages in thread
From: James Miller @ 2004-02-03 1:31 UTC (permalink / raw)
To: linux-newbie
On Mon, 2 Feb 2004, Ken Moffat wrote:
> As to naming the cdrom, /dev/cdrom will usually be a symlink to another
> device (e.g. hdc or perhaps scd0 if your distro uses scsi emulation for
> read and write). If you are using the ide driver, /dev/hdc or whichever
> won't cause you problems. Distros usually get these things right, but
> maybe you compiled your own kernel and used different options. Since
> /dev/cdrom no longer works for you, where is it pointing (or,
> exceptionally, which are the device major / minor numbers, and is it
> char or block - I'm only asking so you can understand why it no longer
> works :) ?
Thanks for your response, Ken, which only marginally makes sense to me
(not a criticism of you, but a statement of my poor grasp of things).
I've made a mental note of "devfs" and will try to be aware of how it may
apply to this matter. This is *not* a hand-compiled kernel (not by my
hand, anyway), but the latest 2.4.x kernel from Debian (apt-get install
kernel-image-2.4-686). /dev/cdrom is a symlink pointing at /dev/cdrom0.
/dev/cdrom0 is, in turn, a symlink pointing at /dev/hdb (which is the
device I manually entered into fstab to get it mountable). This is
totally baffling to me: a symlink pointing at a symlink? The logic
escapes me. What am I missing? Perhaps more importantly, what is the
*right* way to work with the cdrom on this machine? I should make the
disclaimer that the original fstab entry may have been /dev/cdrom0, rather
than /dev/cdrom - I just don't remember for sure. I still can't see why a
symlink should be needed for a CD drive, much less a symlink to a symlink:
is this for the benefit of the user, the OS creator/compiler, the
computer itself?
Thanks, James
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-04 22:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 8:56 error message interpretation help? beolach
2004-02-03 15:14 ` Ken Moffat
2004-02-04 22:41 ` James Miller
-- strict thread matches above, loose matches on Subject: below --
2004-02-02 22:01 James Miller
2004-02-02 23:47 ` Ken Moffat
2004-02-03 1:31 ` James Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox