help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing Guix System on an OVH VPS (Virtual Private Server)


From: Maxim Cournoyer
Subject: Re: Installing Guix System on an OVH VPS (Virtual Private Server)
Date: Mon, 02 Sep 2024 10:20:38 +0900
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Edouard,

Edouard Klein <edou@rdklein.fr> writes:

> Hi Maxim,
>
> Good job ! It must not have been easy to come up with a series of steps
> that actually work...

Getting GRUB installed correctly proved a bit challenging; so was
dealing with the limited amount of disk space in the rescue
environment. I tried many things before arriving to the solution I
detailed; thanks for sharing yours!

> The method I use for https://guix-hosting.com/ is somewhat different and
> does not require partitionning the disk but has the disadvantage of
> ending up with an ext4 drive instead of btrfs, which now that I have
> space problems with the store (mitigated by some aggressive gc-ing see
> https://the-dam.org/docs/explanations/GarbageCollection.html), may be
> nice to have.
>
> A single pass of btrfs-convert may solve that later problem however.

This is quick and works, but for some reason GRUB couldn't find the disk
or was erroring out after doing so, so you may have to chroot to
reconfigure the system from there (which would have the GRUB
install/config refreshed).

> Here is the method, jottled down quickly, please forgive me if I did not
> take the time to publish it properly and sooner.
>
> On your main machine, create an image of the system you want on your
> VPS, or use the base install image from the GNU Guix website:
>
> guix system image /tmp/baseGS.scm
>
> Reboot your VPS in rescue mode, then in the rescue system, run:
>
> : apt update
> : apt install qemu-utils  # Do it first otherwise no space left to do it after
> : rm /var/cache/apt/archives/*
> : wget $TOTO # The image created earlier, you can also scp it from your
> main machine to the rescue.
> : qemu-img dd if=gs.qcow2 bs=4M of=/dev/sdb  -O raw

That's pretty cool; I tried something similar using a mbr-raw image
(compressed with zstd) and had some issues with it (GRUB wouldn't find
the disk or something).  I think you may be able to replace the 'rm'
command above with 'apt clean'.

>
> Resize the partition
> : fdisk /dev/sdb
> then d, n, p, w to recreate the partition till the end of the disk
> Resize the FS
> : resize2fs /dev/sdb2
>
> # I guesse here is where btrfs-convert would be appropriate
>
> From there you can reboot into Guix and it should work.
>
> As for the system I use (minimal-ovh) from my channel as a base:
>
>
> https://gitlab.com/edouardklein/guix/-/blob/beaverlabs/beaver/system.scm?ref_type=heads#L171
>
> which looks mostly like yours.
>
>
> Again I apologize for not publishing it sooner, I guess it would have
> saved you some troubles.

No worries, it was "fun" figuring it out myself, and the linode cookbook
entry provided the virtio_scsi missing module solution.

It'd be nicer to have a proper machine type for OVH, I don't know if
their API would allow for it (I see we have a
digital-ocean-machine-type for 'guix deploy', although I have no idea
how that works) .

-- 
Thanks,
Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]