unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Document how to install in a VM from USB image
@ 2016-07-13 14:24 Vincent Legoll
  2016-07-13 14:24 ` [PATCH] Enhance USB install Vincent Legoll
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2016-07-13 14:24 UTC (permalink / raw)
  To: guix-devel


Here is a patch attempting to help newbies like me to try
GuixSD without the burden of installing guix on their current
operating system.

This explains how to use the USB image to boot a VM and be able
to install GuixSD in a disk image.

Please review, any comments appreciated.

This is my first texinfo edition.
This is my first try at GuixSD.

So please be gentle...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Enhance USB install
  2016-07-13 14:24 Document how to install in a VM from USB image Vincent Legoll
@ 2016-07-13 14:24 ` Vincent Legoll
  2016-07-26 13:10   ` Ludovic Courtès
  2016-08-02 12:32   ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Vincent Legoll @ 2016-07-13 14:24 UTC (permalink / raw)
  To: guix-devel; +Cc: Vincent Legoll

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Enhance USB install
  2016-07-13 14:24 ` [PATCH] Enhance USB install Vincent Legoll
@ 2016-07-26 13:10   ` Ludovic Courtès
  2016-07-26 13:31     ` Vincent Legoll
  2016-08-02 12:32   ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2016-07-26 13:10 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel, Vincent Legoll

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> From: Vincent Legoll <vincent.legoll@idgrilles.fr>
>
> * doc/guix.texi (USB install): add download & verify subsection,

Sorry for the delay!  First some comments on the verification, which I
think should be treated in a separate commit:

>  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

I took a slightly different approach in commit
debc6360e111e8efc8a938b2aef28e5b3616ada8, where I essentially copied the
text from “Binary Installation”.

I’ll comment on the rest later.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Enhance USB install
  2016-07-26 13:10   ` Ludovic Courtès
@ 2016-07-26 13:31     ` Vincent Legoll
  0 siblings, 0 replies; 7+ messages in thread
From: Vincent Legoll @ 2016-07-26 13:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Vincent Legoll

> I took a slightly different approach in commit
> debc6360e111e8efc8a938b2aef28e5b3616ada8, where I essentially copied the
> text from “Binary Installation”.

OK, I saw that duplication, but only after I sent the patch for review...

> I’ll comment on the rest later.

Thanks

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Enhance USB install
  2016-07-13 14:24 ` [PATCH] Enhance USB install Vincent Legoll
  2016-07-26 13:10   ` Ludovic Courtès
@ 2016-08-02 12:32   ` Ludovic Courtès
  2016-08-03  0:32     ` ng0
  2016-08-03  6:50     ` Vincent Legoll
  1 sibling, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-08-02 12:32 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel, Vincent Legoll

Hi Vincent,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> 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

I pushed this as commit c8b543741f422ecf41e7635c6a1c40b3bd55947a, with
several modifications.

> +@node USB storage Installation in a VM
> +@subsection USB storage Installation in a VM

Changed the title to “Installing GuixSD in a Virtual Machine”.

> +To boot a QEmu virtual machine for installing GuixSD in a disk image, follow
> +these steps:

s/QEmu/QEMU/

> +@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

I removed this bit because in my experience it’s not necessary.  Or am I
overlooking something?

> +@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.

Added a couple of @kbd.

> +@end enumerate
> +
> +You're now root in the VM, proceed with the installation process.

Added cross-ref to “Running GuixSD in a VM”.

This is a valuable addition, but I guess many people want to try GuixSD
in a VM first.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Enhance USB install
  2016-08-02 12:32   ` Ludovic Courtès
@ 2016-08-03  0:32     ` ng0
  2016-08-03  6:50     ` Vincent Legoll
  1 sibling, 0 replies; 7+ messages in thread
From: ng0 @ 2016-08-03  0:32 UTC (permalink / raw)
  To: Ludovic Courtès, Vincent Legoll; +Cc: guix-devel, Vincent Legoll

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Vincent,
>
> Vincent Legoll <vincent.legoll@gmail.com> skribis:
>
>> 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
>
> I pushed this as commit c8b543741f422ecf41e7635c6a1c40b3bd55947a, with
> several modifications.
>
...
>
>> +@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
>
> I removed this bit because in my experience it’s not necessary.  Or am I
> overlooking something?

Do you mean the bit above or below your statement? The above might be
necessary to check for custom kernels on for example Gentoo based
systems as the host.
A check if what's about to be run is supported is good.
Or do I fail to see why you ommited this? Can you explain why it is not
necessary in your experience?

>
>> +@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
...
> Thank you!
>
> Ludo’.
>

-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Enhance USB install
  2016-08-02 12:32   ` Ludovic Courtès
  2016-08-03  0:32     ` ng0
@ 2016-08-03  6:50     ` Vincent Legoll
  1 sibling, 0 replies; 7+ messages in thread
From: Vincent Legoll @ 2016-08-03  6:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Vincent Legoll

>> +@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
>
> I removed this bit because in my experience it’s not necessary.  Or am I
> overlooking something?

My experience is exactly the inverse: I first didn't have it in my kernel, and
couldn't install guixsd just because of that. guixsd needs network to install,
and you need CONFIG_BRIDGE (in the host's kernel) for network to be available
in the VM.

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-03  6:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 14:24 Document how to install in a VM from USB image Vincent Legoll
2016-07-13 14:24 ` [PATCH] Enhance USB install Vincent Legoll
2016-07-26 13:10   ` 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

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).