unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vincent Legoll <vincent.legoll@gmail.com>
To: guix-devel@gnu.org
Cc: Vincent Legoll <vincent.legoll@idgrilles.fr>
Subject: [PATCH] Enhance USB install
Date: Wed, 13 Jul 2016 16:24:08 +0200	[thread overview]
Message-ID: <1468419848-15393-2-git-send-email-vincent.legoll@gmail.com> (raw)
In-Reply-To: <1468419848-15393-1-git-send-email-vincent.legoll@gmail.com>

From: Vincent Legoll <vincent.legoll@idgrilles.fr>

* 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 <vincent.legoll@gmail.com>
---
 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 <F12> key to enter the boot menu.  Then
+press the <2> key and the <ENTER> 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

  reply	other threads:[~2016-07-13 14:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 14:24 Document how to install in a VM from USB image Vincent Legoll
2016-07-13 14:24 ` Vincent Legoll [this message]
2016-07-26 13:10   ` [PATCH] Enhance USB install Ludovic Courtès
2016-07-26 13:31     ` Vincent Legoll
2016-08-02 12:32   ` Ludovic Courtès
2016-08-03  0:32     ` ng0
2016-08-03  6:50     ` Vincent Legoll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468419848-15393-2-git-send-email-vincent.legoll@gmail.com \
    --to=vincent.legoll@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=vincent.legoll@idgrilles.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).