From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DMARC_MISSING, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from smtp.noos.fr (camus.noos.net [212.198.2.70]) by chiba.3jane.net (Postfix) with ESMTP id 1482F2019F7F for ; Wed, 20 Mar 2002 13:14:15 -0600 (CST) Received: (qmail 20664162 invoked by uid 0); 20 Mar 2002 19:10:23 -0000 Received: from unknown (HELO slow-dual) ([212.198.88.236]) (envelope-sender ) by 212.198.2.70 (qmail-ldap-1.03) with SMTP for ; 20 Mar 2002 19:10:23 -0000 From: "Christian HOFFMANN" To: gentoo-dev@gentoo.org Date: Wed, 20 Mar 2002 20:10:20 +0100 MIME-Version: 1.0 Subject: Re: [gentoo-dev] Further observations on moving root Message-ID: <3C98ECAC.5126.337C5B@localhost> Priority: normal References: <20020320041314.7E44D201A0C4@chiba.3jane.net> In-reply-to: <1016646934.4859.1.camel@nosferatu.lan> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 670939c2-f666-4293-b9a4-2cc41d9d6f63 X-Archives-Hash: 54bad7f9ffc9008f486c750aaf407eb7 Hello, I recently moved my root partition from one disk to the other and experienced the same problem with /dev. My solution is actualy simple, i did a mount /dev/hda3 /mnt/gentoo (hda3 being my old root partition) and moved the hard drive content with a tar cf | tar xfp from /mnt/gentoo to the new root. Working that way, I copied the actual hard drive file not the dynamic filesystems in /dev and /proc. I worked without any problem, I'm also using this trick to backup my system in a way similar of what is described in D.Robbins tutorial on devlopperworks. Regards > On Wed, 2002-03-20 at 06:15, Fuper wrote: > > If you ever might add a new disk drive and want to move the Gentoo > > root partition onto the new (maybe faster) drive then my struggles > > in doing that may be relevant to you. Copying the partition didn't > > just work --- I found that the /dev directory initialization was not > > obvious. > > > > I did conclude to my own satisfaction that the /sbin/rc script (v. 1.16) > > is in error at line 312 and should read as follows: > > 309 #we want devfsd running after a change of runlevel (if we return > > 310 #from runlevel 'single') > > 311 if [ -z "$(ps -A | grep devfsd)" ] && \ > > 312 [ -n "$(cat /proc/mounts | grep -e '/dev devfs')" ] > > 313 then > > 314 /sbin/devfsd /dev &>/dev/null > > 315 fi > > The distributed script had "cat mounts" and failed when devfsd > > was not already running. > > > > After reading the devfs FAQ and Robbins paper on devfs at > > IBM:developerWorks I concluded that a cleanly built root > > partition should have an empty /dev directory. It is entirely > > populated by devfs when that is "mounted" and accessed. > > > > BUT Gentoo linux, installed from build rc6 r14, crashes when > > booted from the same /boot partition but using a new root ("/") > > and an empty /dev (it had more interesting problems when > > I attempted to create a fully populated dev/ by copying the > > in-use /dev from the old root partition onto the new partition > > s.a. > > star -c /dev | star -x -C /mnt/partition # Don't do this > > > > I had to add the devfs mount option to the kernel so that > > the grub commands that had been > > root (hd0,0) > > kernel /boot/bzImage root=/dev/hda2 hdc=ide-scsi > > became now > > root (hd0,0) > > kernel /boot/bzImage root=/dev/sdb1 hdc=ide-scsi devfs=mount > > > > It is a mystery to me why it now becomes necessary to add > > the devfs=mount option to the grub kernel command, booting > > the same kernel using the same devfs.conf file and same > > root partition (but copied onto a new disk). If this is obvious > > to everyone else, then so be it; but maybe it is worth > > documenting that under some conditions it becomes > > necessary to add the kernel option. > > > > This is because /sbin/init needs /dev/initctl, and as we dropped > the initwrapper that created that if not existing, it fails when > a unmounted /dev do not contain it. > > > I hope that this is helpful. > > _______________________________________________ > > gentoo-dev mailing list > > gentoo-dev@gentoo.org > > http://lists.gentoo.org/mailman/listinfo/gentoo-dev > -- > > Martin Schlemmer > Gentoo Linux Developer, Desktop Team Developer > Cape Town, South Africa > > > _______________________________________________ > gentoo-dev mailing list > gentoo-dev@gentoo.org > http://lists.gentoo.org/mailman/listinfo/gentoo-dev > ------------------------------------------- Christian HOFFMANN