Mdev/ko

이 페이지를 작성한 목적은 리눅스의 udev 를 mdev로 바꾸는 방법을 문서로 남겨, initramfs 없이도 별도의 분할 영역을 만들 수 있게 하는데 있습니다. 작성자는 IceWM을 창 관리자로 하는 젠투 리눅스 배포판을 사용합니다. 여기 나와있는 설명에는 설정 조정 방법과 다른 배포판에 적용하는 방법도 들어있습니다.

시스템에서 mdev가 동작할까요?
프로그램은 완전한 구색을 갖춘 데스크톱 환경을 사용하지 않는 시스템 같은 곳에 알맞습니다. 참고로 데스크톱 환경에서는 아비워드, 파이어폭스, 김프, 그뉴메릭, 등을 꼭 실행할 필요는 없습니다. 그러나 KMail 같은 KOffice 프로그램은 KDE에 붙어 나옵니다. 일반적으로 KDE나 그놈을 사용할 때 는 적합하지 않습니다. 또한 LVM을 함께 사용하면 문제가 생길 수도 있습니다.

기본 젠투 프로파일을 활용하면 매우 잘 동작합니다:


 * default/linux/x86/13.0
 * default/linux/amd64/13.0

다음 명령으로 현재 사용하는 프로파일을 확인하십시오:

There is one more sanity check that Gentoo users can run to check for udev dependency.

무결성 검사
어떤 꾸러미가 udev에 의존하는지 대략적인 일반 정보를 확인하십시오. 출력 내용은 다음과 비슷해야합니다:

Add the following line to the file (which can be created if it does not exist yet):

Disable the  USE flag globally in :

USE 플래그를 넣어 모든 꾸러미를 다시 빌드하십시오.

If the only error that comes up is that Portage is not able to re-install udev as required by, proceed to the next stage. Otherwise, might be an hard dependency of one or more packages installed on the system.

ATI/AMD 바이너리 블롭
Some ATI/AMD Radeon cards require binary blobs. The Gentoo package pulls in all the binary blobs available at http://people.freedesktop.org/~ag5f/radeon_ucode/ to support many different models.

With all the binary blobs in the library directory, the kernel needs udev to figure out which one of the many binary blobs to load. If all but one of the binary blobs are removed, leaving only the correct one in the library directory, the binary blob is loaded automatically.

devtmpfs 커널 설정
devtmpfs 파일 시스템을 에서 지원하고 자동으로 마운트하도록 설정하십시오:

설정을 바꾸고 나면 커널을 다시 빌드하십시오 아직 다시 부팅하지 마십시오.

busybox 이머지
Make sure that the  USE flag is set for. The  USE flag is probably also a good idea. In the file, add the follwoing line:

Now, (re)install busybox:

Mounting devpts
The devpts filesystem exhibits non-standard behavior. It does not automount, at bootup, or with. An explicit command is required. The standard solution for udev-based systems is to run as root, and have the udev-mount script do the mounting at startup. An mdev-based system will probably not have udev installed. An alternative way to do this at bootup is to include the command in a shell script in. In this example, the file will be named

Another side-effect of not using udev-mount is that is only writable by root. The command is required to restore the standard behavior. This command will also be run from the script at startup.

Replace the udev service
Remove udev from the services list and replace it with mdev:

Reboot
Reboot to the new kernel. The system should now be running using mdev.

Cleanup
Remove udev from the system:

In the file (or a file in this directory), add.

This now results in a completely udev-free machine.

Rebuild the kernel
For libusb (and hence CUPS) to see the USB ports, set  and   in the kernel configuration. Also enable, despite the injunction in the cups-1.5.2 ebuild to disable it. When using, these items are found here:

Verify the presence of the new device nodes
A hierarchy of device nodes should be present under. When switching on the printer, a node for it should occur at. should run successfully, and this should display the printer's details.

Configure the printer in CUPS
Configure CUPS in the usual way. CUPS should find the printer, and will give it a URI like.

Linux modules missing at boot sequence
If Linux modules are required and not loaded on boot after migration, execute one or more of the following solutions:


 * Add Linux modules to


 * Compile modules into the Linux kernel, without the need of loading them on demand.


 * Write a custom module loader:

Install it as the hotplug handler instead of mdev. Note that the earlier this gets executed, the better. Consider naming this script, since that is the default value of (or change the default value in the kernel configuration).

Miscellaneous

 * mdev unlike udev does not support auto-modules loading. Use and put all the modules there that should be loaded (nvidia, wl, etc.). Also,  have their own   variables as it does not support . It might be necessary to move the module configuration to this location.


 * does not create nodes. Either manually create them or use  from lvm2. It is a good idea to add it after  in the init script.


 * Use mouse and keyboard drivers for xorg inputs. Evdev needs udev to be built. Mousedrv (for the mouse driver) may conflict with the synaptics driver when both are loaded.


 * The Kernel configuration option CONFIG_INPUT_EVDEV not only provides the keyboard and mouse as input device events, it will provide lid and button events to acpid as well.

External resources

 * mdev like a boss project.