From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QDoDHuYSCV/QagAA0tVLHw (envelope-from ) for ; Sat, 11 Jul 2020 01:16:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EKThGeYSCV9pVgAAB5/wlQ (envelope-from ) for ; Sat, 11 Jul 2020 01:16:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B83A940E6F for ; Sat, 11 Jul 2020 01:16:21 +0000 (UTC) Received: from localhost ([::1]:37762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ju47n-0006nT-8J for larch@yhetil.org; Fri, 10 Jul 2020 21:16:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ju47c-0006nH-Ne for help-guix@gnu.org; Fri, 10 Jul 2020 21:16:09 -0400 Received: from mx1.dismail.de ([78.46.223.134]:9727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ju47Y-0004u9-QL for help-guix@gnu.org; Fri, 10 Jul 2020 21:16:08 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id a2e7b69c for ; Sat, 11 Jul 2020 03:16:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:in-reply-to:references; s=20190914; bh=R1 wNRgXh/EBxxe8/1yOvhtCUIHyDJ6DTbZWZ65kZEfQ=; b=LBAnbYEc3f1X3xoLcO GzA1AdYq2FsVpAExBHvY+DT46M6Q2WiMgVbKl0AOP1yCaVij4wRwgX/NCU8wmplr tXhTLcQx/ssN1VuzpilbwdZF88UYmn0pHrlinmZed11ECRn6O+LBZ4IVpgLF7Rdj 7nEXFSM7cPYn2Fkv8X4aa3ojWYgg+9kZsQXaRWozUVq/3cOwGGwIMUhNGROO0bQE rQllX7FNResifIpOpwRhetetHyCIQeZYIQcwri+NfSEBTlvdFOl+FJ+nTfB9wXMq 9QSE2tynIchrJ3HuYiqmWrPJ6sHMYnDtE3h83DXeNhboY8+1BRYwtO7Q42IlKfEO pqAg== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id c9de9390 for ; Sat, 11 Jul 2020 03:16:00 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 1b35fde9 for ; Sat, 11 Jul 2020 03:16:00 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 40835655 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 11 Jul 2020 03:15:59 +0200 (CEST) MIME-Version: 1.0 Date: Sat, 11 Jul 2020 01:15:59 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.14.0a From: jbranso@dismail.de Message-ID: <7c32ae519b2f431e353b2a3f4495601b@dismail.de> Subject: Re: Installing Guix on Linode: a how-to To: help-guix@gnu.org In-Reply-To: <322811df4e5685c75bf592938027bed3@dismail.de> References: <322811df4e5685c75bf592938027bed3@dismail.de> <8736617e85.fsf@disroot.org> <87y2ntbogr.fsf@dustycloud.org> Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/10 20:41:37 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=LBAnbYEc; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: 0RebiRQo4EiP Ok I sent it to guix-patches.=0A=0Ahttps://lists.gnu.org/archive/html/gui= x-patches/2020-07/msg00294.html=0A=0AJuly 10, 2020 6:17 PM, jbranso@disma= il.de wrote:=0A=0A> I will volunteer to add this to the guix cookbook. If= I don't send a patch in a week or so, then=0A> that means I got lazy and= decided not to do it.=0A> =0A> July 8, 2020 7:57 PM, "Gary Johnson" wrote:=0A> =0A>> Can someone add this tutorial to = the Guix Cookbook? I've been wondering=0A>> about how to do this for some= time now, and it would be great to have it=0A>> saved somewhere obvious = like that for future reference.=0A>> =0A>> Thanks,=0A>> Gary=0A>> =0A>> C= hristopher Lemmer Webber writes:=0A>> =0A>>> Hi!= I finally got Guix running on Linode! I'm excited about it!=0A>>> Here's= the process (thanks to jackhill on freenode for helping me figure=0A>>> = out all the stuff involving the bootloader!). It's very bullet-point'y,= =0A>>> but here's the steps I took:=0A>>> =0A>>> - Start with a Debian (o= r whatever) server. Be sure to add your ssh=0A>>> key for easy login. We'= ll be using the default distro as a way to=0A>>> bootstrap Guix.=0A>>> - = Power it down.=0A>>> - In the Disks/Configurations tab, resize the Debian= disk to be=0A>>> smaller, maybe 30GB or something.=0A>>> - "Add a disk",= with the following:=0A>>> - Label: "Guix"=0A>>> - Filesystem: ext4=0A>>>= - Set it to the remaining size=0A>>> - Next to the "configuration" that = comes with the default image,=0A>>> press "..." and select "Edit", then o= n that menu add to=0A>>> /dev/sdc the "Guix" label=0A>>> - Now "Add a Con= figuration", with the following:=0A>>> - Label: Guix=0A>>> - VM Mode: Par= avirtualization (the default?? don't know if this matters)=0A>>> - Kernel= : Grub 2 (it's at the bottom! This step is *IMPORTANT*)=0A>>> - Block dev= ice assignment:=0A>>> - /dev/sda: Guix=0A>>> - /dev/sdb: swap=0A>>> - Roo= t device: /dev/sda=0A>>> - Turn off all the filesystem/boot helpers=0A>>>= - Now power it back up, picking the Debian configuration=0A>>> - Once it= 's booted up, ssh root@=0A>>> - Run the "install gui= x form binary installer" steps:=0A>>> - $ sudo apt-get install gpg=0A>>> = - $ wget https://sv.gnu.org/people/viewgpg.php?user_id=3D15145 -qO - | gp= g --import -=0A>>> - $ wget https://git.savannah.gnu.org/cgit/guix.git/pl= ain/etc/guix-install.sh=0A>>> - $ chmod +x guix-install.sh=0A>>> - $ ./gu= ix-install.sh=0A>>> - $ guix pull=0A>>> =0A>>> - Now it's time to write o= ut a config for the server. The key stuff is=0A>>> below, save as guix-co= nfig.scm:=0A>>> =0A>>> #+BEGIN_SRC scheme=0A>>> (use-modules (gnu)=0A>>> = (guix modules))=0A>>> (use-service-modules networking=0A>>> ssh)=0A>>> (u= se-package-modules admin=0A>>> certs=0A>>> package-management=0A>>> ssh= =0A>>> tls)=0A>>> =0A>>> (operating-system=0A>>> (host-name "my-server")= =0A>>> (timezone "America/New_York")=0A>>> (locale "en_US.UTF-8")=0A>>> ;= ; This goofy code will generate the grub.cfg=0A>>> ;; without installing = the grub bootloader on disk.=0A>>> (bootloader (bootloader-configuration= =0A>>> (bootloader=0A>>> (bootloader=0A>>> (inherit grub-bootloader)=0A>>= > (installer #~(const #t))))))=0A>>> (file-systems (cons (file-system=0A>= >> (device "/dev/sda")=0A>>> (mount-point "/")=0A>>> (type "ext4"))=0A>>>= %base-file-systems))=0A>>> =0A>>> (initrd-modules (cons "virtio_scsi" ; = Needed to find the disk=0A>>> %base-initrd-modules))=0A>>> =0A>>> (users = (cons (user-account=0A>>> (name "janedoe")=0A>>> (group "users")=0A>>> ;;= Adding the account to the "wheel" group=0A>>> ;; makes it a sudoer.=0A>>= > (supplementary-groups '("wheel"))=0A>>> (home-directory "/home/janedoe"= ))=0A>>> %base-user-accounts))=0A>>> =0A>>> (packages (cons* nss-certs ;f= or HTTPS access=0A>>> openssh-sans-x=0A>>> %base-packages))=0A>>> =0A>>> = (services (cons*=0A>>> (service dhcp-client-service-type)=0A>>> (service = openssh-service-type=0A>>> (openssh-configuration=0A>>> (openssh openssh-= sans-x)=0A>>> (password-authentication? #f)=0A>>> (authorized-keys=0A>>> = `(("janedoe" ,(local-file "janedoe_rsa.pub"))=0A>>> ;; Is this a good ide= a? Well if you don't add it=0A>>> ;; you have to manually set your user's= password=0A>>> ;; via the glish console...=0A>>> ("root" ,(local-file "j= anedoe_rsa.pub"))))))=0A>>> %base-services)))=0A>>> #+END_SRC=0A>>> =0A>>= > - Replace the following fields in the above configuration:=0A>>> - (hos= t-name "my-server") ; replace with your server name=0A>>> - (name "janedo= e") ; replace with your username=0A>>> - ("janedoe" ,(local-file "janedoe= _rsa.pub")) ; here too=0A>>> - Note the same above for root, which I don'= t feel great about, but=0A>>> otherwise you'll need to log in via the lin= ode "glish" console to=0A>>> log in as root and set the user's initial pa= ssword before you can=0A>>> start using sudo (is there another way around= this?)=0A>>> =0A>>> - Save your ssh public key (~/.ssh/id_rsa.pub) as=0A= >>> _rsa.pub or whatever in the same directory=0A>>> = =0A>>> - Mount the guix drive:=0A>>> $ mkdir /mnt/guix=0A>>> $ mount /dev= /sdc /mnt/guix=0A>>> =0A>>> - Due to the way we set things up above, we d= on't install Grub=0A>>> completely, just our grub configuration file. So = we need to copy=0A>>> over some of the other Grub stuff that's already th= ere:=0A>>> $ mkdir -p /mnt/guix/boot/grub=0A>>> $ cp -r /boot/grub/* /mnt= /guix/boot/grub/=0A>>> =0A>>> - Now initialize the Guix installation:=0A>= >> $ guix system init guix-config.scm /mnt/guix=0A>>> =0A>>> - Ok, power = it down!=0A>>> - Now from the linode console, select boot and select "Gui= x"=0A>>> =0A>>> - Once it boots, you should be able to log in via ssh! (T= he server=0A>>> config will have changed though.)=0A>>> =0A>>> - Be sure = to set your password and root's password.=0A>>> =0A>>> - Horray! At this = point you can shut down the server, delete the=0A>>> Debian disk, and res= ize the Guix to the rest of the size.=0A>>> Congratulations!=0A>>> =0A>>>= BTW, if you save it as a disk image right at this point, you'll have an= =0A>>> easy time spinning up new Guix images!=0A>>> =0A>>> Let me know if= this guide helps you!=0A>> =0A>> --=0A>> GPG Key ID: 7BC158ED=0A>> Use `= gpg --search-keys lambdatronic' to find me=0A>> Protect yourself from sur= veillance: https://emailselfdefense.fsf.org=0A>> =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> () ascii ribbon campai= gn - against html e-mail=0A>> /\ www.asciiribbon.org - against proprietar= y attachments=0A>> =0A>> Please avoid sending me MS-Office attachments.= =0A>> See http://www.gnu.org/philosophy/no-word-attachments.html