From 1278b6666ea5474fa0d5f1fd04bb5d8aaf4bcf4b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 8 Dec 2017 08:26:44 +0000 Subject: Add post on running a Bytemark server with GuixSD --- posts/bytemark_server_with_guixsd.mdwn | 148 +++++++++++++++++++++ .../add-cloud-server-operating-system.png | 1 + posts/bytemark_server_with_guixsd/bytemark.svg | 1 + posts/bytemark_server_with_guixsd/cfdisk-1.png | 1 + posts/bytemark_server_with_guixsd/cfdisk-2.png | 1 + posts/bytemark_server_with_guixsd/cfdisk-3.png | 1 + posts/bytemark_server_with_guixsd/guix.svg | 1 + .../guixsd-install-0.14.0.x86_64-linux.iso | 1 + .../bytemark_server_with_guixsd/installer-boot.png | 1 + 9 files changed, 156 insertions(+) create mode 100644 posts/bytemark_server_with_guixsd.mdwn create mode 120000 posts/bytemark_server_with_guixsd/add-cloud-server-operating-system.png create mode 120000 posts/bytemark_server_with_guixsd/bytemark.svg create mode 120000 posts/bytemark_server_with_guixsd/cfdisk-1.png create mode 120000 posts/bytemark_server_with_guixsd/cfdisk-2.png create mode 120000 posts/bytemark_server_with_guixsd/cfdisk-3.png create mode 120000 posts/bytemark_server_with_guixsd/guix.svg create mode 120000 posts/bytemark_server_with_guixsd/guixsd-install-0.14.0.x86_64-linux.iso create mode 120000 posts/bytemark_server_with_guixsd/installer-boot.png diff --git a/posts/bytemark_server_with_guixsd.mdwn b/posts/bytemark_server_with_guixsd.mdwn new file mode 100644 index 0000000..fb60ee2 --- /dev/null +++ b/posts/bytemark_server_with_guixsd.mdwn @@ -0,0 +1,148 @@ +[[!meta title="Bytemark server with GuixSD"]] + +[[!img bytemark.svg link="https://www.bytemark.co.uk/r/cbaines" align="middle" ]] + +I've been using [[Bytemark|https://www.bytemark.co.uk/r/cbaines]] for a while +now, both personally and professionally, and one thing that has got me +excited recently is running GuixSD on Bytemark VMs. + +A while back, I installed GuixSD on a Bytemark VM first by creating a +VM on Bytemark using Debian as the operating system, then installing +Guix within Debian, then using that installation of Guix to install +GuixSD over the top of Debian. + +[[!img guix.svg link="https://www.gnu.org/s/guix" align="right" ]] + +This "over the top" approach works surprisingly well, you just have to +remove a few key files from Debian before rebooting, to ensure GuixSD +is able to boot. It does have several disadvantages though, its quite +slow to install GuixSD this way, and you have to manually clean out +the Debian related files. + +Bytemark do support inserting ISO images in to the VMs, which can be +used to install operating systems. Up until recently, Guix didn't have +an ISO installer, but now, with the 0.14.0 release, there is one +available. + +In case you're interested, here is a quick description of what this +involves. You might want to follow along with the full +[[system installation documentation|https://www.gnu.org/software/guix/manual/html_node/System-Installation.html]] +at the same time. + +# Step 1: Create a new cloud server + +I selected mostly the defaults: 1 core, 1 GiB of RAM, 25 GiB of SSD +storage. For installing GuixSD, select None for the operating system. + +[[!img add-cloud-server-operating-system.png ]] + +# Step 2: Insert the GuixSD installer ISO + +Open up the server details, and click the yellow "Insert CD" button on +the left. + +Pop in a URL for the installation image. It needs to be decompressed, +unlike the image you can download from the Guix website. + +To make this easier, I've provided a link to a decompressed image +below. Obviously using this involves trusting me, so you might want to +decompress the image yourself and upload it somewhere. + + https://www.cbaines.net/posts/bytemark_server_with_guixsd/guixsd-install-0.14.0.x86_64-linux.iso + +# Step 3: Boot in to the installer + +After that is done, click the VNC button for the server to the top +right, and once the window for that opens up, click the red "Ctrl + +Alt + Delete" button to trigger the system to restart. This should get +it to boot in to the installation image. + +[[!img installer-boot.png ]] + +# Step 4: Setup networking + +Run the following commands to bring up the network interface, and get +an IP address. + + ifconfig eth0 up + dhclient eth0 + +# Step 5: (Optional) Start the SSH daemon + +If you're happy using the web based console, the you can continue +doing that. However, the installer includes a ssh-daemon service which +can be used to continue the installation process over SSH. + +If you want to use this, use the passwd command to set a password for +the root user, and then start the ssh-daemon service. + + passwd + herd start ssh-daemon + +After doing this, you can find out the IP address, either from the +Bytemark panel, or by running: + + ip addr + +Once you have the IP address, login to the machine through SSH and +continue with the installation process. + +# Step 6: Partition the disk + +Select the default partitioning type, gpt. + +Create a "2M" BIOS Boot partition, and then a 25GB Linux filesystem. + +After that select the "[ Write ]" option, and then the "[ Quit ]" +option. + +[[!img cfdisk-1.png ]] +[[!img cfdisk-2.png ]] +[[!img cfdisk-3.png ]] + +# Step 7: Create and mount the root filesystem + + mkfs.ext4 -L root /dev/vda1 + mount LABEL=root /mnt + +# Step 8: Write the configuration + + mkdir /mnt/etc + cp /etc/configuration/bare-bones.scm /mnt/etc/config.scm + +I then edited this file with nano, mostly as using zile with C-n for +move down kept opening new browser windows. + + - Changed the hostname and timezone + - Set the bootloader target to "/dev/vda" + - Changed the filesystem device to root + - Set the name of the user + - Change the home directory + +# Step 9: Start the cow-store service + + herd start cow-store /mnt + +# Step 10: Run guix system init + + guix system init /mnt/etc/config.scm /mnt + ... + Installation finished. No error reported. + +If this works succesfully, you should see the above message at the +end. + +# Finish: Reboot in to GuixSD + +Reboot, and then remove the CD from the system using the Bytemark +panel. + + reboot + +If you run in to any trouble, there is a IRC channel (#guix on +Freenode) and a +[[mailing list|https://www.gnu.org/software/guix/contact/]] where you +can ask for [[help|https://www.gnu.org/software/guix/help/]]. + +Also, while this guide may go out of date, if you do have any +suggestions or corrections, you can email me about them. diff --git a/posts/bytemark_server_with_guixsd/add-cloud-server-operating-system.png b/posts/bytemark_server_with_guixsd/add-cloud-server-operating-system.png new file mode 120000 index 0000000..e2c1f48 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/add-cloud-server-operating-system.png @@ -0,0 +1 @@ +../../.git/annex/objects/76/JK/SHA256E-s51867--0e861ea305a56812bd27a04737c3dbf6ed965db08fa70832589affd53c0836b0.png/SHA256E-s51867--0e861ea305a56812bd27a04737c3dbf6ed965db08fa70832589affd53c0836b0.png \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/bytemark.svg b/posts/bytemark_server_with_guixsd/bytemark.svg new file mode 120000 index 0000000..fe0bd87 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/bytemark.svg @@ -0,0 +1 @@ +../../.git/annex/objects/V4/Gx/SHA256E-s2584--98c99fd8234b46e98bafad65d0e43248b55aa3909ce6f03da0b0e6923e2ddb7a.svg/SHA256E-s2584--98c99fd8234b46e98bafad65d0e43248b55aa3909ce6f03da0b0e6923e2ddb7a.svg \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/cfdisk-1.png b/posts/bytemark_server_with_guixsd/cfdisk-1.png new file mode 120000 index 0000000..68b3fb3 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/cfdisk-1.png @@ -0,0 +1 @@ +../../.git/annex/objects/Xx/52/SHA256E-s4798--0a767d1a0dcad05adb2d485ce9bd5599d8297b8d4887e4abdb735b403cd13e2d.png/SHA256E-s4798--0a767d1a0dcad05adb2d485ce9bd5599d8297b8d4887e4abdb735b403cd13e2d.png \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/cfdisk-2.png b/posts/bytemark_server_with_guixsd/cfdisk-2.png new file mode 120000 index 0000000..1b78290 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/cfdisk-2.png @@ -0,0 +1 @@ +../../.git/annex/objects/Wm/mW/SHA256E-s5946--ee96b9e6c46d330ca0606281019bfd912a35718fdce60cc4eab63f27d12c04b1.png/SHA256E-s5946--ee96b9e6c46d330ca0606281019bfd912a35718fdce60cc4eab63f27d12c04b1.png \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/cfdisk-3.png b/posts/bytemark_server_with_guixsd/cfdisk-3.png new file mode 120000 index 0000000..07d1313 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/cfdisk-3.png @@ -0,0 +1 @@ +../../.git/annex/objects/2v/qG/SHA256E-s9110--28d346d87f6d7b8c06e9c42dc38f0a55ad90457cca8bb24525d40f8c9fa93d1c.png/SHA256E-s9110--28d346d87f6d7b8c06e9c42dc38f0a55ad90457cca8bb24525d40f8c9fa93d1c.png \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/guix.svg b/posts/bytemark_server_with_guixsd/guix.svg new file mode 120000 index 0000000..020cb3c --- /dev/null +++ b/posts/bytemark_server_with_guixsd/guix.svg @@ -0,0 +1 @@ +../../.git/annex/objects/W9/kv/SHA256E-s102959--decf5f063871ed1b18d6b598e6c448302e6bca95f18b45894f91d4d36ae902fc.svg/SHA256E-s102959--decf5f063871ed1b18d6b598e6c448302e6bca95f18b45894f91d4d36ae902fc.svg \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/guixsd-install-0.14.0.x86_64-linux.iso b/posts/bytemark_server_with_guixsd/guixsd-install-0.14.0.x86_64-linux.iso new file mode 120000 index 0000000..f506d39 --- /dev/null +++ b/posts/bytemark_server_with_guixsd/guixsd-install-0.14.0.x86_64-linux.iso @@ -0,0 +1 @@ +../../.git/annex/objects/xq/Vk/SHA256E-s1187651584--e258ab3363589bcf3bbf2286198a5cdec7e02d3a678551e7a30db62b70c74926.iso/SHA256E-s1187651584--e258ab3363589bcf3bbf2286198a5cdec7e02d3a678551e7a30db62b70c74926.iso \ No newline at end of file diff --git a/posts/bytemark_server_with_guixsd/installer-boot.png b/posts/bytemark_server_with_guixsd/installer-boot.png new file mode 120000 index 0000000..7a5bfdf --- /dev/null +++ b/posts/bytemark_server_with_guixsd/installer-boot.png @@ -0,0 +1 @@ +../../.git/annex/objects/xF/17/SHA256E-s15826--d3c1b4bc181740945e29bdea8da9930748e81c82410fd007dcb92f685efb4881.png/SHA256E-s15826--d3c1b4bc181740945e29bdea8da9930748e81c82410fd007dcb92f685efb4881.png \ No newline at end of file -- cgit v1.2.3