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=-0.1 required=5.0 tests=DMARC_NONE,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from ubermail.mweb.co.za (ubermail.mweb.co.za [196.2.53.169]) by chiba.3jane.net (Postfix) with ESMTP id BEF0B200B260 for ; Wed, 20 Mar 2002 12:02:42 -0600 (CST) Received: from [196.30.180.211] (helo=nosferatu.lan) by ubermail.mweb.co.za with esmtp (Exim 3.22 #2) id 16niPF-0000dC-00 for gentoo-dev@gentoo.org; Wed, 20 Mar 2002 17:53:42 +0200 Subject: Re: [gentoo-dev] Further observations on moving root From: Martin Schlemmer To: Gentoo-Dev In-Reply-To: <20020320041314.7E44D201A0C4@chiba.3jane.net> References: <20020319015020.344272015D8D@chiba.3jane.net> <20020320041314.7E44D201A0C4@chiba.3jane.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 20 Mar 2002 19:55:16 +0200 Message-Id: <1016646934.4859.1.camel@nosferatu.lan> Mime-Version: 1.0 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: 13f05efb-c6f1-4e9f-9cbd-d29218042188 X-Archives-Hash: 10c60a5d0c01370a3fb2f446dc619d06 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