1 |
Hello, |
2 |
|
3 |
I recently moved my root partition from one disk to the other and |
4 |
experienced the same problem with /dev. |
5 |
|
6 |
My solution is actualy simple, i did a mount /dev/hda3 /mnt/gentoo |
7 |
(hda3 being my old root partition) and moved the hard drive content |
8 |
with a tar cf | tar xfp from /mnt/gentoo to the new root. Working that |
9 |
way, I copied the actual hard drive file not the dynamic filesystems in |
10 |
/dev and /proc. |
11 |
|
12 |
I worked without any problem, I'm also using this trick to backup my |
13 |
system in a way similar of what is described in D.Robbins tutorial on |
14 |
devlopperworks. |
15 |
|
16 |
Regards |
17 |
|
18 |
> On Wed, 2002-03-20 at 06:15, Fuper wrote: |
19 |
> > If you ever might add a new disk drive and want to move the Gentoo |
20 |
> > root partition onto the new (maybe faster) drive then my struggles |
21 |
> > in doing that may be relevant to you. Copying the partition didn't |
22 |
> > just work --- I found that the /dev directory initialization was not |
23 |
> > obvious. |
24 |
> > |
25 |
> > I did conclude to my own satisfaction that the /sbin/rc script (v. 1.16) |
26 |
> > is in error at line 312 and should read as follows: |
27 |
> > 309 #we want devfsd running after a change of runlevel (if we return |
28 |
> > 310 #from runlevel 'single') |
29 |
> > 311 if [ -z "$(ps -A | grep devfsd)" ] && \ |
30 |
> > 312 [ -n "$(cat /proc/mounts | grep -e '/dev devfs')" ] |
31 |
> > 313 then |
32 |
> > 314 /sbin/devfsd /dev &>/dev/null |
33 |
> > 315 fi |
34 |
> > The distributed script had "cat mounts" and failed when devfsd |
35 |
> > was not already running. |
36 |
> > |
37 |
> > After reading the devfs FAQ and Robbins paper on devfs at |
38 |
> > IBM:developerWorks I concluded that a cleanly built root |
39 |
> > partition should have an empty /dev directory. It is entirely |
40 |
> > populated by devfs when that is "mounted" and accessed. |
41 |
> > |
42 |
> > BUT Gentoo linux, installed from build rc6 r14, crashes when |
43 |
> > booted from the same /boot partition but using a new root ("/") |
44 |
> > and an empty /dev (it had more interesting problems when |
45 |
> > I attempted to create a fully populated dev/ by copying the |
46 |
> > in-use /dev from the old root partition onto the new partition |
47 |
> > s.a. |
48 |
> > star -c /dev | star -x -C /mnt/partition # Don't do this |
49 |
> > |
50 |
> > I had to add the devfs mount option to the kernel so that |
51 |
> > the grub commands that had been |
52 |
> > root (hd0,0) |
53 |
> > kernel /boot/bzImage root=/dev/hda2 hdc=ide-scsi |
54 |
> > became now |
55 |
> > root (hd0,0) |
56 |
> > kernel /boot/bzImage root=/dev/sdb1 hdc=ide-scsi devfs=mount |
57 |
> > |
58 |
> > It is a mystery to me why it now becomes necessary to add |
59 |
> > the devfs=mount option to the grub kernel command, booting |
60 |
> > the same kernel using the same devfs.conf file and same |
61 |
> > root partition (but copied onto a new disk). If this is obvious |
62 |
> > to everyone else, then so be it; but maybe it is worth |
63 |
> > documenting that under some conditions it becomes |
64 |
> > necessary to add the kernel option. |
65 |
> > |
66 |
> |
67 |
> This is because /sbin/init needs /dev/initctl, and as we dropped |
68 |
> the initwrapper that created that if not existing, it fails when |
69 |
> a unmounted /dev do not contain it. |
70 |
> |
71 |
> > I hope that this is helpful. |
72 |
> > _______________________________________________ |
73 |
> > gentoo-dev mailing list |
74 |
> > gentoo-dev@g.o |
75 |
> > http://lists.gentoo.org/mailman/listinfo/gentoo-dev |
76 |
> -- |
77 |
> |
78 |
> Martin Schlemmer |
79 |
> Gentoo Linux Developer, Desktop Team Developer |
80 |
> Cape Town, South Africa |
81 |
> |
82 |
> |
83 |
> _______________________________________________ |
84 |
> gentoo-dev mailing list |
85 |
> gentoo-dev@g.o |
86 |
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev |
87 |
> |
88 |
|
89 |
------------------------------------------- |
90 |
Christian HOFFMANN <hoffmann@××××.fr> |