1 |
On Sun, Mar 11, 2012 at 05:09:12AM -0400, Walter Dnes wrote: |
2 |
> This revision makes 2 changes... |
3 |
|
4 |
> A) The removal of udev is now standard instead of optional. udev-181 |
5 |
> and higher will be pulling in kmod, and anything else that kmod depends |
6 |
> on. Removing udev will avoid unnecessary cruft on your machine. |
7 |
|
8 |
> B) Splitting up step 3) into 3a) and 3b) for greater clarity as |
9 |
> requested in user feedback. |
10 |
|
11 |
> The usual warnings apply... |
12 |
> * this is a beta |
13 |
> * use a spare test machine |
14 |
> * if you don't follow the instructions correctly, the result might be |
15 |
> an unbootable linux |
16 |
> * even if you do follow instructions, the result might be an unbootable |
17 |
> linux |
18 |
|
19 |
Yep, I got the (effectively) unbootable machine: My LVM partitions didn't |
20 |
get mounted. My precaution against it was: (i) Copy my entire (working) |
21 |
root partition to a new partition. (ii) Edit the first line of the new |
22 |
/etc/fstab. (iii) Add a new entry to /etc/lilo.conf. It's handy having |
23 |
a small root partition. :-) |
24 |
|
25 |
> 1) Set up your kernel to support and automount a devtmpfs filesystem at |
26 |
> /dev |
27 |
|
28 |
> * If you prefer to edit .config directly, set |
29 |
> CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y |
30 |
|
31 |
> * If you prefer "make menuconfig", the route is as shown below. Note |
32 |
> that the "Autount devtmpfs..." option won't appear until you enable |
33 |
> "Maintain a devtmpf..." option. |
34 |
|
35 |
> make menuconfig |
36 |
> Device Drivers ---> |
37 |
> Generic Driver Options ---> |
38 |
> [*] Maintain a devtmpfs filesystem to mount at /dev |
39 |
> [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs |
40 |
|
41 |
> Once you've made the changes, rebuild the kernel. |
42 |
|
43 |
|
44 |
> 2) Set up for emerging busybox. busybox requires the "mdev" flag in |
45 |
> this situation. The "static" flag is probably also a good idea. In |
46 |
> file /etc/portage/package.use add the line |
47 |
|
48 |
> sys-apps/busybox static mdev |
49 |
|
50 |
> Now, "emerge busybox" |
51 |
|
52 |
|
53 |
> 3 a) Create /sbin/linuxrc containing at least |
54 |
|
55 |
> #!/bin/busybox ash |
56 |
> mount -t proc proc /proc |
57 |
> mount -t sysfs sysfs /sys |
58 |
> exec /sbin/init |
59 |
|
60 |
> This should be enough for most users. If you have an unusual setup, |
61 |
> you may need additional stuff in there. Remember to |
62 |
> "chmod 744 /sbin/linuxrc" to make it executable. |
63 |
|
64 |
I may have an unusual setup, but I don't think so. I've got my root |
65 |
partition as ext2 on /dev/sda5, and everything else under LVM. |
66 |
Otherwise, pretty standard. |
67 |
|
68 |
> In the bootloader "append" line, include "init=/sbin/linuxrc". If |
69 |
> you're using lilo remember to re-run lilo to implement the changes. If |
70 |
> you're using another bootloader, make the equivalant initialization. |
71 |
|
72 |
How do I know whether my /sbin/linuxrc actually ran? Maybe, I mean how |
73 |
can I be sure my "append = "init=/sbin/linuxrc"" actually worked? |
74 |
|
75 |
> 4) Remove udev from the services list, and replace it with mdev. Type |
76 |
> the following 2 commands at the command line |
77 |
> rc-update del udev sysinit |
78 |
> rc-update add mdev sysinit |
79 |
|
80 |
Done |
81 |
|
82 |
> 5) reboot to your new kernel. You're now running without using udev. |
83 |
|
84 |
Here's where I got problems. None of my LVM partitions got mounted. |
85 |
Here're a few lines of my bootup messages, just before the problem: |
86 |
|
87 |
* Setting up mdev as hotplug agent ... |
88 |
* Populating /dev with existing devices with mdev -s ... |
89 |
* Mounting /dev/pts ... |
90 |
* Mounting /dev/shm ... |
91 |
|
92 |
Enter runlevel: 3 |
93 |
* Setting up system clock using the hardware clock [UTC] |
94 |
* Setting up the Logical Volume Manager |
95 |
* Checking local filesystems |
96 |
/dev/sda5: clean, 6052/655360 files, 180423/2621440 blocks |
97 |
fsck.ext3: No such file or directory while trying to open /dev/vg/usr |
98 |
..... |
99 |
<and so on, for all my other partitions> |
100 |
|
101 |
> 6) Remove udev as per the following instructions... |
102 |
|
103 |
> * execute the following command at the commandline |
104 |
> emerge --unmerge sys-fs/udev |
105 |
|
106 |
> * In file /atc/portage/package.mask, append the line |
107 |
> sys-fs/udev |
108 |
> Create the file if it doesn't already exist. You now have a totally |
109 |
> udev-free machine |
110 |
|
111 |
Help would be appreciated. |
112 |
|
113 |
> -- |
114 |
> Walter Dnes <waltdnes@××××××××.org> |
115 |
|
116 |
-- |
117 |
Alan Mackenzie (Nuremberg, Germany). |