From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ft9kt-0006xo-Gt for garchives@archives.gentoo.org; Wed, 21 Jun 2006 20:56:55 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k5LKt6qP013771; Wed, 21 Jun 2006 20:55:06 GMT Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.198]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k5LKoCFM011779 for ; Wed, 21 Jun 2006 20:50:13 GMT Received: by wx-out-0102.google.com with SMTP id t4so188446wxc for ; Wed, 21 Jun 2006 13:50:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Y+OXaFP7+GmpGLdlJjmZWkA0w1pEOUNdNsV6dJipOeKDXJwfZO4xkowvlmyIrPwr1JPzz+OpalSXi9nFFLU7cld/Nsyg4kWMwYkRg7iJbbZpdJDcM+XEGYGbPafI1r1PEKmFF7rrw4PBQBCffH9ChzqKHtynR0vwsMz20cHeRM8= Received: by 10.70.116.11 with SMTP id o11mr1764873wxc; Wed, 21 Jun 2006 13:50:12 -0700 (PDT) Received: by 10.70.91.13 with HTTP; Wed, 21 Jun 2006 13:50:12 -0700 (PDT) Message-ID: <7573e9640606211350o4042b571i514307d6ac242fc8@mail.gmail.com> Date: Wed, 21 Jun 2006 13:50:12 -0700 From: "Richard Fish" Sender: richard.j.fish@gmail.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] initramfs, network diskless boot, init process, problems with switchroot (pivot_root) In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 272f9aaa7668f212 X-Archives-Salt: 68676bc8-209a-440b-ac63-4e149559a2a5 X-Archives-Hash: fa90fb2506b776a9eaecae5fbd9349bc On 6/16/06, Claudinei Matos wrote: > I'd created an initramfs wich mount the nfs share and do the pivot_root > (actually switch_root from busybox) but the problem is exactly at this > moment, 'cause when I try to do the switch_root and start the real init from > the nfs share, the system appears to freeze but after some seconds it do > print a message "Rebooting System" and just reboot the machine. Sorry for the late reply...I've been on offline (vacation) for several days. pivot_root is specifically *not* allowed from an initramfs environment. What you want to do is simply mount the new root filesystem, chroot into it, and execute init. Something like: cd /new_root ; exec ./bin/chroot . ./sbin/init "$@" >dev/console &1 If you are *extremely* tricky, and use a symlinked /lib directory, you can actually delete everything from the initramfs before doing the chroot/init calls. Let me know if you need some more details on this. HTH, -Richard -- gentoo-user@gentoo.org mailing list