Skip to contentSkip to conversation

The ext3 way of journalling

DISCUSSION Bodo Eggert 4 participants 6 messages Jan 8, 2008 – Jan 12, 2008 8 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 12 lines · Tuomo Valkonen
Quoted 3 lines · Jan Engelhardt

"Power users" may still
use the index= option of sound card modules and wire it up in /etc/modprobe.d if they prefer.

Another very cryptic directory whose contents say nothing to me. Configuration files should be self-documenting and editable, instead having to be created based on long documentation. The simple /etc/modules -- which at least Debian's stock kernels do not use -- qualifies, but few other files these days do.

Quoted 7 lines
Quoted 1 line

You can guess my answer: udev will fix it.

And break everything else, such as my symlinks, permissions, etc. I'm not going to learn its cryptic special-case config files for such trivial tasks as creating a fucking symlink or change the permissions of a file, for which exist general purpose methods:
chmod, chown, ln -s.

Edit the start script, append your commands to create the links. Or edit the correct file in /etc/udev/rules.d to include the links.

Quoted 10 lines
Quoted 4 lines

Well what do you expect of it? The kernel does not keep USB port <-> SCSI device mappings. Neither USB device <-> SCSI device mapping, because not all USB ports or USB devices are mass-storage devices. It just is not the kernel's job.

Mapping everything to scsi nodes is brain damaged. The old hda, hdb, etc. mappings had somewhat clear correspondence between to physical evice addresses, and were easy to use without such complicated crap as udev. Of course, I'd prefer just device unique IDs being used, where possible... but I'm not going to suffer udev for that.

If you wire your devices to a named/numbered port, you can use one device node for each port. Therefore it's sane to create hda to hdd, fd0 to fd3, etc. But if you don't have a fixed mapping (USB), or if you'd have too many possible (and mostly unused) ports for the available amount of devices (SCSI), you can not create fixed numbers. Even for hde ..., you have no native ordering, you can only tell the first controller from the rest.

When the SCSI naming was created, there were at most 256 SCSI devices of each kind. Since each partition is a SCSI device, too, you had at most 16 disks of up to 15 partitions! This was later extended to 128 disks. If you'd hardcode the controller, linux would have been unable to support more than 8 SCSI controllers.

The result was the semi-random enumeration of the SCSI devices, and all the hacks trying to work around that. (google for Joerg Schilling lkml) Udev provides a clean way of naming the devices, using the static information from the devices or the path.

I agree that the current udev documentation makes it hard to even find the settings you'd like to change. That's because the documentation is meant for developers, while the configuration is themed by the distribution.

The udev files itself are as simple as possible. Imagine them to be <bloat>XML</bloat>, like the pile of HAL, DBUS and KDE automatically mounting my disks using the wrong settings into the wrong directory and forcing me to su in order to umount them! I temporarily beat that beast, but the kill is still on the TODO list. Maybe as soon as I find more^W usable^W documentation ...

Quoted 8 lines
Quoted 3 lines

May I remind you that the kernel also "loses" all your network interface configuration, routes, firewalling rules and all sysctl settings at boot (sic: reboot & powerdown).

But traditional /dev does not lose permissions and symlinks. udev tmpfs shadow brain damage does. You have to illogically and inconveniently edit udev's cryptic config files instead, and yet it in no way stops /dev from being modified.

You aren't stopped from directly poking the memory and crashing the systems either - if you are root. Or from deleting all nodes on a classic /dev. Don't do that then.

Quoted 6 lines
Quoted 4 lines

Nonsense. The kernel notices udev about all available hardware and udev will load modules. It has nothing to do with initrd, in fact, this very step of loading a gazillion of modules is done after initrd has passed control on to /sbin/init. At least, in opensuse.

I've never seen a system that would do so. And I won't use udev.

No system can load modules that are not on initrd, and only needed-for-boot modules are usually put on the initrd. The bulk of modules must be loaded from the real root. This seems to work quite well (except not here because I prefer to include all necessary drivers in the kernel.)

I've debugged hotplug, too, and I found it was a wrapper around a wrapper around ... a script that would be supposed to load the required firmware, except it did neither load it nor provide a way to find out why it didn't. Each HOWTO mentioned a different directory to use, and a different filename. I'd have settled for manually loading the firmware, but hacking the scripts to pieces was finally easier than finding out how I was supposed to do that.

I did not need to install a firmware after this, therefore I don't know if udev is better, but it CAN'T be worse.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 5 lines · Matthias Schniedermeyer
Quoted 4 lines
Quoted 2 lines

Don't use udev then. Good old static dev works fine if you have a fixed set of devices.

It doesn't, with the unpredictable SCSI mapping insanity.

Quoted 8 lines

That what LABEL und UUID-Support in mount is for.

You label the filesystems (e2label for ext2 and ext3) and use that label to mount them

- fstab -

LABEL=root  /        xfs     defaults,noatime 0 1
LABEL=boot  /boot    ext2    defaults,noatime 0 2

What can happen if someone does tune2fs -Lroot /dev/usbstick and puts that stick into this system?

#10 lore raw
Quoted 2 lines · Bodo Eggert

What can happen if someone does tune2fs -Lroot /dev/usbstick and puts that stick into this system?

Don't know. I use UUIDs rather than LABELs. Having duplicated labels just means being careless. Having duplicate UUIDs should require being malicous.

--
Len Sorensen

#11 lore raw
Quoted 8 lines · Lennart Sorensen
Quoted 2 lines · Bodo Eggert

What can happen if someone does tune2fs -Lroot /dev/usbstick and puts that stick into this system?

Don't know. I use UUIDs rather than LABELs. Having duplicated labels just means being careless. Having duplicate UUIDs should require being malicous.

That's exactly what you have to assume for your users. Otherwise, you could remove any security feature from the system.

Signature · 4 lines
Fun things to slip into your budget
Not in a budget, but in an annual report:
An employee stole 500,000+. They accounted for it on the annual report as
'involountary employee relations expense'
#12 lore raw

Bodo Eggert <[email protected]> said on Sat, 12 Jan 2008 02:41:17 +0100 (CET):

Quoted 6 lines · Lennart Sorensen
Quoted 5 lines · Bodo Eggert
Quoted 3 lines

What can happen if someone does tune2fs -Lroot /dev/usbstick and puts that stick into this system?

Quoted 6 lines
Quoted 3 lines

Don't know. I use UUIDs rather than LABELs. Having duplicated labels just means being careless. Having duplicate UUIDs should require being malicous.

That's exactly what you have to assume for your users. Otherwise, you could remove any security feature from the system.

If they've got physical access to your machine, you've already lost.

Signature · 2 lines
TimC
A bug in the code is worth two in the documentation. --unknown
#13 lore raw
Quoted 7 lines · TimC

Bodo Eggert <[email protected]> said on Sat, 12 Jan 2008 02:41:17 +0100 (CET):

Quoted 6 lines · Lennart Sorensen
Quoted 5 lines · Bodo Eggert
Quoted 3 lines

What can happen if someone does tune2fs -Lroot /dev/usbstick and puts that stick into this system?

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Don't know. I use UUIDs rather than LABELs. Having duplicated labels just means being careless. Having duplicate UUIDs should require being malicous.

That's exactly what you have to assume for your users. Otherwise, you could remove any security feature from the system.

If they've got physical access to your machine, you've already lost.

As a last resort there is always the option to encrypt everything.

Of course you loose the LABEL & UUID support with that.

But i circumvented that by a custom udev script and marking the MBR in the documented 4 bytes for an ID that is used by said script to create an appropriate symlink.

Together with a matching autofs-conf i can still automatically mount all my >50 encrypted HDDs i have stacked on my shelf. :-)

Bis denn

Signature · 4 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.