Mdev: Difference between revisions

From Alpine Linux
(mark as draft)
(add device manager category)
Line 3: Line 3:
== mdev ==
== mdev ==


Mdev is the default device manager on Alpine Linux. It is provided by busybox as alternative to [https://man.archlinux.org/man/udev.7 systemd's udev].
Mdev is the default [[:Category:Device_Manager|device manager]] on Alpine Linux. It is provided by busybox as alternative to [https://man.archlinux.org/man/udev.7 systemd's udev].
Mdev is '''not''' a drop in replacement for udev. See [[eudev]] for that instead. Mdev lacks some features which makes it not recommended for a full blown desktop enviroment.
Mdev is '''not''' a drop in replacement for udev. See [[eudev]] for that instead. Mdev lacks some features which makes it not recommended for a full blown desktop enviroment.


Line 61: Line 61:
* [https://wiki.gentoo.org/wiki/Mdev Gentoo wiki Mdev]
* [https://wiki.gentoo.org/wiki/Mdev Gentoo wiki Mdev]
* [https://git.busybox.net/busybox/plain/docs/mdev.txt mdev doc]
* [https://git.busybox.net/busybox/plain/docs/mdev.txt mdev doc]
[[Category:Device_Manager]]

Revision as of 11:14, 21 September 2023

This material is work-in-progress ...

This is almost complete but needs testing that it works when followed as a step by step guide.
(Last edited by Sertonix on 21 Sep 2023.)

mdev

Mdev is the default device manager on Alpine Linux. It is provided by busybox as alternative to systemd's udev. Mdev is not a drop in replacement for udev. See eudev for that instead. Mdev lacks some features which makes it not recommended for a full blown desktop enviroment.

Installation

The easy way to setup mdev is throught the setup script. For custom installation see the manually section. Note that this is only recommended for advanced users.

Setup Script

The alpine-conf package privides setup-devd to easily install and setup device managers.

Install alpine-conf if not already.

# apk add alpine-conf

Setup mdev.

# setup-devd mdev

Manually

Mdev is provided by the busybox package which is pre installed on any alpine installation. To run mdev the OpenRC init scripts are required too. If it isn't already installed install it:

# apk install busybox-mdev-openrc


Before starting mdev you need to disable eudev.

Note: I have no idea what happens if you don't


Enable the mdev service.

# rc-update add mdev sysinit

# rc-update add hwdrivers sysinit

Todo: verify need of the hwdrivers service


If you are not running in a chroot you will also want to start mdev.

# rc-service mdev start

# rc-service hwdrivers start

Disable

Warning: Disabling mdev without setting up a different device manager can result in an unusable system.


To disable mdev when using a different device manager like eudev you need to stop and remove the service.

# rc-service mdev stop

# rc-update delete mdev sysinit


You might also want to uninstall the init scripts since they are not used anymore.

# apk del busybox-mdev-openrc

Custom network interfaces

See Custom network interface names

USB Printer

See mdev hacks for USB printers

Raspberry Pi Bluetooth Speaker

See Raspberry Pi Bluetooth Speaker

See Also