Gentoo Archives: gentoo-dev

From: Fuper <futurist@×××××××××××××××.com>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Further observations on moving root
Date: Tue, 19 Mar 2002 22:13:14
Message-Id: 20020320041314.7E44D201A0C4@chiba.3jane.net
In Reply to: [gentoo-dev] Moving root by Fuper
1 If you ever might add a new disk drive and want to move the Gentoo
2 root partition onto the new (maybe faster) drive then my struggles
3 in doing that may be relevant to you. Copying the partition didn't
4 just work --- I found that the /dev directory initialization was not
5 obvious.
6
7 I did conclude to my own satisfaction that the /sbin/rc script (v. 1.16)
8 is in error at line 312 and should read as follows:
9 309 #we want devfsd running after a change of runlevel (if we return
10 310 #from runlevel 'single')
11 311 if [ -z "$(ps -A | grep devfsd)" ] && \
12 312 [ -n "$(cat /proc/mounts | grep -e '/dev devfs')" ]
13 313 then
14 314 /sbin/devfsd /dev &>/dev/null
15 315 fi
16 The distributed script had "cat mounts" and failed when devfsd
17 was not already running.
18
19 After reading the devfs FAQ and Robbins paper on devfs at
20 IBM:developerWorks I concluded that a cleanly built root
21 partition should have an empty /dev directory. It is entirely
22 populated by devfs when that is "mounted" and accessed.
23
24 BUT Gentoo linux, installed from build rc6 r14, crashes when
25 booted from the same /boot partition but using a new root ("/")
26 and an empty /dev (it had more interesting problems when
27 I attempted to create a fully populated dev/ by copying the
28 in-use /dev from the old root partition onto the new partition
29 s.a.
30 star -c /dev | star -x -C /mnt/partition # Don't do this
31
32 I had to add the devfs mount option to the kernel so that
33 the grub commands that had been
34 root (hd0,0)
35 kernel /boot/bzImage root=/dev/hda2 hdc=ide-scsi
36 became now
37 root (hd0,0)
38 kernel /boot/bzImage root=/dev/sdb1 hdc=ide-scsi devfs=mount
39
40 It is a mystery to me why it now becomes necessary to add
41 the devfs=mount option to the grub kernel command, booting
42 the same kernel using the same devfs.conf file and same
43 root partition (but copied onto a new disk). If this is obvious
44 to everyone else, then so be it; but maybe it is worth
45 documenting that under some conditions it becomes
46 necessary to add the kernel option.
47
48 I hope that this is helpful.

Replies

Subject Author
Re: [gentoo-dev] Further observations on moving root Martin Schlemmer <azarah@g.o>