# alsactl not found

## Timmer

In spite of the subject, this isn't an ALSA problem, I don't think.  It's really a udev problem.  When my computer is booting, I get a couple of warnings very early in the boot process that udev can't find alsactl.  The reason for this is obvious: the partition that it's on has not yet been mounted.

What I can't figure out though, is how to make these messages go away.  I can't find them in a udev rule anywhere (it's possible that I'm looking in the wrong place)/  Basically I'd like them to go away - either by making udev check later in the process (like *after* it's mounted all of my partitions) or just not check at all. (sound still works after udev fails, so I figure it can't be that important)

Oh, this started with udev-168, I think, and has continued with 171, if that matters any.

Any pointers would be helpful.  TIA

----------

## Timmer

replying to my own post -- I finally found the right set of udev rules.  I believe the one I'm looking to change is /lib64/udev/rules.d/90-alsa-retore.rules.  But I'm not really sure how I should be changing it, so help with that would be appreciated.

----------

## greyspoke

 *Timmer wrote:*   

> replying to my own post -- I finally found the right set of udev rules.  I believe the one I'm looking to change is /lib64/udev/rules.d/90-alsa-retore.rules.  But I'm not really sure how I should be changing it, so help with that would be appreciated.

 

There is a bug about it and also a similar one for VirtualBox.

I am not sure either is other than an annoyance.  rc reports that it has adjusted the levels once the alsasound init script has run.  And I can access my usb stick from VirtualBox (the rule kicks in OK when I plug it in, maybe it is needed for devices that are there from startup).

Can't say I agree with the comments that it isn't a bug,  if you happen to have /opt and/or  /usr on separate partitions and don't want to change your disk arrangement just now it is inconvenient. A bit of a mystery what the alsa rule is for, if the init script for alsasound is anything to go by a lot more is required to get sound working properly than loading the driver and adjusting the levels.  Maybe just delete the rule if the messages really annoy you?

Udevd (or rather its rules) seems to be doing things that don't belong that early in the startup process.

----------

## mathfeel

Yes, I think it is kind of strange that having /usr, /opt in separate partition is considered a "bug".  Use an init-RAMFS and mount /usr right after mounting / would be a work-around.

----------

## greyspoke

Just resurrecting this to say I have discovered an answer to this (of sorts) here.  The direction things are going, if /usr is not on your root partition you will have to load it early in an initramfs to stop this.

----------

## sphakka

Hi there,

 *greyspoke wrote:*   

>  The direction things are going, if /usr is not on your root partition you will have to load it early in an initramfs to stop this.

 

Ouch, that's pretty annoying. I personally managed to live *without* an initramfs, except for special cases such as booting from an external USB HD; thus udev forcing me either to move back /usr into the root partition or using an initrams is an unacceptable regression  :Sad: 

Here comes my question: given that everything looks fine on my system, notwithstanding some udev warnings at boot, should I suppose that those issue are fixed by udev-postmount?

Cheers,

  ^s

----------

## depontius

Another fix would be to have the ebuild which installs alsactl install it into /bin instead of /usr/bin.

I hear the talk about how separate / and /usr is "broken", but sometimes I think those are desktop-centric people talking, and they haven't considered other options like nfs-shared /usr, etc.

----------

## sphakka

 *depontius wrote:*   

> Another fix would be to have the ebuild which installs alsactl install it into /bin instead of /usr/bin.
> 
> I hear the talk about how separate / and /usr is "broken", but sometimes I think those are desktop-centric people talking, and they haven't considered other options like nfs-shared /usr, etc.

 

You're possibly referring to this discussion: https://bugs.gentoo.org/show_bug.cgi?id=372317.

And you're right. There's plenty of scenarios where one needs separate partitions, indeed.

Even though using udev-postmount looks "inelegant" to someone, that's IMHO better than placing  accessory (i.e., not necessary for booting) stuff into /.

I wonder if there's a way to _delay_ a udev rule until a given condition, or _bind_ it to a given runlevel...

For now, I'd be happy to have confirmation that udev-postmount will keep doing its job.

^s

----------

## depontius

Would another option be some sort of hook to install such commands into the initramfs, or do we really have 3 timing realms here:

1 - initramfs present, no persistent filesystems at all

2 - root present, initramfs gone, no other persistent filesystems present

3 - initramfs gone, all persistent filesystems present

Which brings two thoughts:

1 - keep initramfs available after root is mounted, and don't let it disappear until all persistent filesystems are mounted

2 - add another initramfs, containing the stuff needed between mounting root and everything else.

----------

## aCOSwt

 *sphakka wrote:*   

> ...Ouch, that's pretty annoying...

 

+1   :Evil or Very Mad: 

I think this udev thing forcing specific partitioning schemes or initramthing is taking us far from the beloved and intelligent UnixLike's motto :

Provide tools ! Not policy !

----------

## depontius

 *aCOSwt wrote:*   

>  *sphakka wrote:*   ...Ouch, that's pretty annoying... 
> 
> +1  
> 
> I think this udev thing forcing specific partitioning schemes or initramthing is taking us far from the beloved and intelligent UnixLike's motto :
> ...

 

I blame it on an influx of Windows refugees.  I cast the same blame for Wayland's utter lack of regard (Who would possibly want that!!!) of network transparency as something important.

Maybe I'm in error on that one, but that's where i start.

----------

## j_c_p

Same for me after the KDE 4.8.0 upgrade.

----------

## greyspoke

Well I have now fixed an initramfs that mounts /usr, but realised it ought to be checked, which means having a static e2fsck (which I had to compile from source and is big) in the initramfs, all getting rather cumbersome just to prevent a few messages that appear to be nowt but an annoyance (until bigger issues crop up).

Whilst doing this it occurred to me there may be other ways (other than trying to bodge the udev juggernaut that is):

 - in the initramfs, temporarily chroot to / to do the checking and mounting, thus keeping the initramfs small and having access to all the tools on your hard disc

 - direct your initramfs to an intermediate init on your root partition somewhere that performs early mounts and then hands over to /sbin/init

 - create a service "earlymounts" to put in runlevel sysinit and tell it to happen before udev?

of course, these occurred to me after I had gone through the faff of doing it in the initramfs.

Would these work?

----------

