From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Legoll Subject: [PATCH] Enhance USB install Date: Wed, 13 Jul 2016 16:24:08 +0200 Message-ID: <1468419848-15393-2-git-send-email-vincent.legoll@gmail.com> References: <1468419848-15393-1-git-send-email-vincent.legoll@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNL5N-0005EK-MH for guix-devel@gnu.org; Wed, 13 Jul 2016 10:24:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNL5L-0001JE-KF for guix-devel@gnu.org; Wed, 13 Jul 2016 10:24:24 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNL5L-0001Io-AA for guix-devel@gnu.org; Wed, 13 Jul 2016 10:24:23 -0400 Received: by mail-wm0-x244.google.com with SMTP id x83so6046031wma.3 for ; Wed, 13 Jul 2016 07:24:23 -0700 (PDT) In-Reply-To: <1468419848-15393-1-git-send-email-vincent.legoll@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: Vincent Legoll From: Vincent Legoll * doc/guix.texi (USB install): add download & verify subsection, add a section to explain how to boot a VM for guixsd installation Signed-off-by: Vincent Legoll --- doc/guix.texi | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 67ece1d..04de780 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20,6 +20,7 @@ Copyright @copyright{} 2015, 2016 Leo Famulari@* Copyright @copyright{} 2016 Ben Woodcroft@* Copyright @copyright{} 2016 Chris Marusich@* Copyright @copyright{} 2016 Efraim Flashner +Copyright @copyright{} 2016 Vincent Legoll Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -179,6 +180,7 @@ System Installation * Limitations:: What you can expect. * Hardware Considerations:: Supported hardware. * USB Stick Installation:: Preparing the installation medium. +* USB storage Installation in a VM:: Booting a VM with USB install image. * Preparing for Installation:: Networking, partitioning, etc. * Proceeding with the Installation:: The real thing. * Building the Installation Image:: How this comes to be. @@ -5931,6 +5933,7 @@ available. * Limitations:: What you can expect. * Hardware Considerations:: Supported hardware. * USB Stick Installation:: Preparing the installation medium. +* USB storage Installation in a VM:: Booting a VM with USB install image. * Preparing for Installation:: Networking, partitioning, etc. * Proceeding with the Installation:: The real thing. * Building the Installation Image:: How this comes to be. @@ -6030,7 +6033,35 @@ for a 32-bit GNU/Linux system on Intel-compatible CPUs. This image contains a single partition with the tools necessary for an installation. It is meant to be copied @emph{as is} to a large-enough -USB stick. +USB stick. It can also be used to install GuixSD in a QEmu virtual +machine (@pxref{USB storage Installation in a VM}). + +To download and verify this image, follow these steps: + +@enumerate +@item +Download the image & signature files using the @command{wget} command: + +@example +wget ftp://alpha.gnu.org/gnu/guix/guixsd-usb-install-@value{VERSION}.@var{system}.xz +wget ftp://alpha.gnu.org/gnu/guix/guixsd-usb-install-@value{VERSION}.@var{system}.xz.sign +@end example + +@item +Get the PGP key using the @command{gpg} command: + +@example +gpg --keyserver keys.gnupg.net --recv-keys 3D9AEBB5 +@end example + +@item +Check download integrity using the @command{gpg} command: + +@example +gpg --verify guixsd-usb-install-@value{VERSION}.@var{system}.xz.sig +@end example + +@end enumerate To copy the image to a USB stick, follow these steps: @@ -6058,6 +6089,64 @@ Once this is done, you should be able to reboot the system and boot from the USB stick. The latter usually requires you to get in the BIOS' boot menu, where you can choose to boot from the USB stick. +@node USB storage Installation in a VM +@subsection USB storage Installation in a VM + +To boot a QEmu virtual machine for installing GuixSD in a disk image, follow +these steps: + +@enumerate +@item +Prepare a disk image file for the GuixSD system using the @command{dd} command: + +@example +dd if=/dev/zero of=guixsd-x86_64-raw.img bs=1G count=5 +@end example + +@item +Or use the QEmu tool to create a qcow2 formatted image file using +the @command{qemu-img} command: + +@example +qemu-img create -f qcow2 guixsd-x86_64-raw.img 5G +@end example + +This will create a 5GB file. + +@item +Ensure your running kernel has the required CONFIG_BRIDGE option for the +network to work properly in the virtual machine: + +@example +zgrep CONFIG_BRIDGE= /proc/config.gz +CONFIG_BRIDGE=y +@end example + +If it is compiled as a module & loaded, it will also work: + +@example +zgrep CONFIG_BRIDGE= /proc/config.gz +CONFIG_BRIDGE=m +lsmod | grep ^bridge +bridge 117542 0 +@end example + +@item +Boot a virtual machine with the USB installation image + +@example +qemu-system-x86_64 -m 1024 -smp 1 -net default -net nic,model=virtio -boot menu=on \ + -drive file=guixsd-x86_64-raw.img \ + -drive file=guixsd-usb-install-@value{VERSION}.@var{system} +@end example + +In the VM console, quickly press the key to enter the boot menu. Then +press the <2> key and the key to validate your selection. + +@end enumerate + +You're now root in the VM, proceed with the installation process. + @node Preparing for Installation @subsection Preparing for Installation -- 1.9.1