From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755925AbbA3IEJ (ORCPT ); Fri, 30 Jan 2015 03:04:09 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:47097 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751939AbbA3IEI (ORCPT ); Fri, 30 Jan 2015 03:04:08 -0500 Date: Fri, 30 Jan 2015 09:04:00 +0100 From: Markus Pargmann To: Wouter Verhelst Cc: Paul Clements , nbd-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [Nbd] [RFC 4/4] nbd: Add support for nbd as root device Message-ID: <20150130080400.GD16879@pengutronix.de> References: <1421156665-27318-1-git-send-email-mpa@pengutronix.de> <1421156665-27318-5-git-send-email-mpa@pengutronix.de> <20150129234254.GD15853@grep.be> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q9KOos5vDmpwPx9o" Content-Disposition: inline In-Reply-To: <20150129234254.GD15853@grep.be> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:54:29 up 8 days, 22:01, 33 users, load average: 0.49, 0.45, 0.43 User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --q9KOos5vDmpwPx9o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Jan 30, 2015 at 12:42:54AM +0100, Wouter Verhelst wrote: > On Tue, Jan 13, 2015 at 02:44:25PM +0100, Markus Pargmann wrote: > > Adding support to nbd to use it as a root device. This code essentially > > provides a minimal nbd-client implementation within the kernel. It opens > > a socket and makes the negotiation with the server. Afterwards it passes > > the socket to the normal nbd-code to handle the connection. > >=20 > > The arguments for the server are passed via module parameter. The > > module parameter has the format > > '[:]/'. > > SERVER_IP is optional. If it is not available it will use the > > root_server_addr transmitted through DHCP. > >=20 > > Based on those arguments, the connection to the server is established > > and is connected to the nbd0 device. The rootdevice therefore is > > root=3D/dev/nbd0. >=20 > Not that I'm opposed to this, but you do realize that doing nbd-client > from initramfs or similar is possible, right? Most initramfs > implementations these days support it. Yes, that was the first idea how to implement a complete netboot for an embedded ARM device. However, an initramfs is at least around 1MB in size which has to be loaded using tftp. As the essential nbd-client connection setup and negotiation is quite small I decided to go with nbd-root support. Also it is quite useful to have nbd-root support much like nfsroot directly built-in for debugging purposes. It has the big advantage of booting/testing read-only filesystem images for embedded systems without the need for an initramfs. Best regards, Markus --=20 Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --q9KOos5vDmpwPx9o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUyzrvAAoJEEpcgKtcEGQQpD0P+wdaG5AcaNibx0hu3Uqz0hPb JplEX4dmNy3k4fRRGjqWEyUPyJDLpl8+mSkGnAN/XuIR8Lw1xQ6sgoOo757VoWB2 RHpD7I8OsGCdeORIzG6l+bDzvEWOsjUuxx/oqtJM61hxSyA5DM7GGsnHmnmig7N2 aaOnZW7fzslpXHbVfKWd6vEp/jvCV/r/MVVNeDW+YXQQyBJwgfzi+PmZ6rBkqQlI 1RD4iS6UhXfVgT+2ULKv74RNo4LqEtRBYW0Qn0Ev+uAF2O0XNoPuGncRdSl9JpkX le8sKIN0/ZUWPreT5Fj1o0UWdQAbJxC3b3+cazyd2rRwTyKwW2NaGzBNPGpH5Htl D0c2Gm3n26bWwx2WsOLKRmuRH+XfTTuK7rSu0yBgrfJ00mB89Ae30Y9w6B0wSyh+ a7lwkDwdIjpP486LQBTS9RXz7swaHmISqUA0yFVaHaKt1ycNfSP5HypfluZnhcvk nlYRL2PPd+dlFdvo/YsJgWG3eQFvRd83E+3eJdm/ZMDauuMhZx41TC2lzE7BQKXE nidF46ozMWkH+dhq9NkT2c4HU5sU228PEeqhbeJGecRIm93mVW2ijdJKRVuzyivR zQRJaqav2PQ1dUh1SGpAHhioTU2veJU54c0IwOzSs6G96g1iw9hREZera/F+j4Ro 2V5Id4GUCqU4XJsljbCs =pN8I -----END PGP SIGNATURE----- --q9KOos5vDmpwPx9o--