error message interpretation help?
Quoted 2 lines
1) whether the
/proc/partitionsand /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.
Quoted 2 lines
2) why CD drives get device names on some (newer?) systems like
/dev/cdrominstead 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
Quoted 6 lines
/dev/cdromis a symlink pointing at/dev/cdrom0./dev/cdrom0is, 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
Quoted 49 lines
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/hdais 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/partitionsand the /dev directory structure? In general, I do not really understand the/dev/cdromas opposed to/dev/hdxentry 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/cdromto/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/partitionsand /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/cdrominstead of/dev/hdx?
Quoted 1 line
Thanks, James
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines · On Tue, 3 Feb 2004 [email protected] wrote:
Quoted 2 lines
1) whether the
/proc/partitionsand /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
Signature · 8 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · On Tue, 3 Feb 2004 [email protected] 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/partitionsto 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
Quoted 8 lines
in your second email you mention that
/dev/cdromlinks to/dev/cdrom0which 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 withCONFIG_DEVFS_FS=y, butCONFIG_DEVFS_MOUNT=n. You can fix this by either recompiling the kernel withCONFIG_DEVFS_MOUNT=yor 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs