Skip to contentSkip to conversation

2.6.0-test1 devfs question

DISCUSSION Balram Adlakha 2 participants 3 messages Jul 25, 2003 – Jul 26, 2003 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw
Quoted 16 lines

Hello,

I'm currently running at 2.6.0-test1-mm2-O8 and I wanted to give devfs a shot. I recompiled the kernel with the following settings:
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set

As I read through the documentation (btw, devfs=nomount is mentioned in configure help but not in Documentation/filesystems/devfs/boot-options) I got the understanding that this shouldn't make any difference to the system right? After booting with this kernel there were lots of proper devfs devices in my dmesg (host0/ide0... scsi0/...) however, the system didn't came up (couldn't mount rootfs). It didn't even work when I enabled CONFIG_DEVFS_MOUNT.

Quoted 5 lines

I'm not sure whether this is a bug in mount/nomount of devfs or if it's somewhere my fault/setup (root on raid1, various lvm2 devices on raid1/0 devices)

Any help would be greatly appreciated.

You need to change your /etc/fstab to reflect the new devfs device names,
ex: "/dev/discs/disc0/part1" instead of "/dev/hda1". You can also use devfsd (or some alternative) to make synlinks to the older devices and retain permissions etc... Also, without devfsd you cannot expect module autoloading as modules can't be automatically loaded when theres no device requesting them (in this case the device simply doesn't exist until module is loaded)

#1 lore raw
Quoted 20 lines · Balram Adlakha
Quoted 19 lines

Hello,

I'm currently running at 2.6.0-test1-mm2-O8 and I wanted to give devfs a shot. I recompiled the kernel with the following settings:
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set

As I read through the documentation (btw, devfs=nomount is mentioned in configure help but not in Documentation/filesystems/devfs/boot-options) I got the understanding that this shouldn't make any difference to the system right? After booting with this kernel there were lots of proper devfs devices in my dmesg (host0/ide0... scsi0/...) however, the system didn't came up (couldn't mount rootfs). It didn't even work when I enabled CONFIG_DEVFS_MOUNT.

I'm not sure whether this is a bug in mount/nomount of devfs or if it's somewhere my fault/setup (root on raid1, various lvm2 devices on raid1/0 devices)

Quoted 5 lines
Quoted 1 line

Any help would be greatly appreciated.

You need to change your /etc/fstab to reflect the new devfs device names,
ex: "/dev/discs/disc0/part1" instead of "/dev/hda1". You can also use devfsd (or some alternative) to make synlinks to the older devices and retain permissions etc... Also, without devfsd you cannot expect module autoloading as modules can't be automatically loaded when theres no device requesting them (in this case the device simply doesn't exist until module is loaded)

wait a second, this is a dumb thing to do. I do not want to migrate over to devfs yet. I wanted to give it a shot and look around a bit. What I haad in mind was mounting it on /dev2 or similar. Enabling this option and converting my whole system is not a migration path. That's just plain luck (might be easy for plain ide/scsi disks, but whatabout metadevices like lvm and raid?). It is written in the documentation that devfs comes with most backwards compatibility. I expected there to be things like /dev/md0 and such for compatibility.
OTOH what's CONFIG_DEVFS_MOUNT for then? If devices get named the other way round I *have* to mount it anyway, haven't I? I think improvements must happen here in order to make devfs usable.

Signature · 3 lines
Regards,

Wiktor Wodecki
#2 lore raw
Quoted 7 lines · Balram Adlakha
Quoted 6 lines · Wiktor Wodecki
Quoted 4 lines · Balram Adlakha

The old naming scheme is (quite) depricated. Firstly, devfs shows only those devices which are probed (have a driver), secondly the devices are sorted in an easy to understand directory heirarchy to reduce clutter.
Theres a devfs daemon called devfsd which is actually (almost) a part of a working devfs system. Using devfsd, you can autoload modules even while using devfs, and it also creates symlinks to older device name if that is specified in the /etc/devfsd.conf file.
It is your choice if you want to use devfs or not, linux is all about choice. If you don't like the new naming scheme, you can edit a few lines in the devfs source and change the scheme. Or you can have devfs mounted in another place (like /dev2) and create a script which creates symlinks from /dev2 to /dev with your own preferred names, and you can edit /etc/rc.d/rc.sysinit to run the script on bootup. Or you can continue using the old device inodes...Some people still prefer them.

Quoted 6 lines
Quoted 5 lines

I understand that and I greatly appreciate the new naming scheme. However it would have been nice if I could have bootet just up and look at it without changing my core system files (I regard /etc/fstab as core). Nevermind, I might give it another shot on a testing system.

You won't need to update /etc/fstab if you use devfsd and its configured to create old device names in /dev...

ah! This should be placed somewhere in a FAQ or so. As I've read through the docs this isn't mentioned anywhere. This of course solves all my concerns about devfs. Will try it again soon.
Thanks for enlightment :-)

Signature · 3 lines
Regards,

Wiktor Wodecki