Gentoo Archives: gentoo-server

From: Andrew Gaffney <agaffney@g.o>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Remotely upgrading kernel: replacing devfs with udev
Date: Wed, 17 Jan 2007 13:04:28
Message-Id: 45AE1E47.4050201@gentoo.org
In Reply to: [gentoo-server] Remotely upgrading kernel: replacing devfs with udev by "Einar S. Idsø"
1 Einar S. Idsø wrote:
2 > Hi,
3 >
4 > *Problem:*
5 > I have a number of hosts spread around the country running the 2.6.12
6 > kernel. I need to upgrade to 2.6.18, which requires udev to replace
7 > devfs. Is there any way I can prepare /dev for this upgrade so the hosts
8 > will boot without human interaction/booting with CD-ROM?
9
10 It *should* be as easy as emerging udev and rebooting. The init scripts default
11 to udev by default.
12
13 > *Details:*
14 > When I previously upgraded my own laptop a year or so ago, this led to
15 > the lack of certain dev-nodes upon boot (/dev/console and /dev/null, I
16 > believe), causing a kernel panic. I fixed that by booting with cd-rom
17 > and recreating the necessary nodes, as described in section 3 here:
18 > http://www.gentoo.org/doc/en/udev-guide.xml
19
20 These initial devices likely didn't exist in the past since devfs ran from the
21 kernel and operated on a virtual filesystem. Udev works completely different. It
22 runs entirely from userland and populates a tmpfs. Until that tmpfs is created
23 and udev started, those few initial nodes are requires for the init scripts.
24
25 > This is of unfortunately not an option for my hosts since the majority
26 > don't run any form of LOM, and getting a tech to stand by each host,
27 > boot the Rescue-CD and do all sorts of stuff is a major hassle.
28 >
29 > *Possible solution:*
30 > I think a possible solution may be to do the following while the host is
31 > still running its old kernel:
32 >
33 > mount --bind / /mnt/point
34 > cd /mnt/point/dev
35 > mknod -m 660 console c 5 1
36 > mknod -m 660 null c 1 3
37 > cd /
38 > umount /mnt/point
39 >
40 > Will/should this work? If not: Any other suggestions?
41
42 Yes, this should do the trick. Although, the -m is likely not needed. If you are
43 going to use it, here's the nodes from my / (pre-udev) for reference:
44
45 crw------- 1 root tty 5, 1 Nov 13 2005 console
46 crw-rw-rw- 1 root root 1, 3 Nov 13 2005 null
47
48 --
49 Andrew Gaffney http://dev.gentoo.org/~agaffney/
50 Gentoo Linux Developer Installer Project
51 Today's lesson in political correctness: "Go asphyxiate on a phallus"
52 --
53 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] Remotely upgrading kernel: replacing devfs with udev "Einar S. Idsø" <esi@××××××××.no>