From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 5/NYCo+bpV7xWAAA0tVLHw (envelope-from ) for ; Sun, 26 Apr 2020 14:32:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GAH8A5ebpV5pUwAAbx9fmQ (envelope-from ) for ; Sun, 26 Apr 2020 14:32:55 +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 7051D942E91 for ; Sun, 26 Apr 2020 14:32:53 +0000 (UTC) Received: from localhost ([::1]:60450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSiKw-0005Dq-Qg for larch@yhetil.org; Sun, 26 Apr 2020 10:32:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58334) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSiKU-0005Cj-Bj for help-guix@gnu.org; Sun, 26 Apr 2020 10:32:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSiKT-0002MQ-1c for help-guix@gnu.org; Sun, 26 Apr 2020 10:32:22 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:39426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSiKS-0002ME-Gj for help-guix@gnu.org; Sun, 26 Apr 2020 10:32:20 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 29AAF213C9; Sun, 26 Apr 2020 14:32:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07OUQT7FIX1J; Sun, 26 Apr 2020 14:32:17 +0000 (UTC) Received: from laptop (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 3E434213C0; Sun, 26 Apr 2020 14:32:15 +0000 (UTC) From: Simon South To: Vagrant Cascadian Subject: Re: Building installation image for ROCK64 References: <87sgh9iz1v.fsf@simonsouth.net> <877dyl7mn0.fsf@yucca> Date: Sun, 26 Apr 2020 10:31:32 -0400 In-Reply-To: <877dyl7mn0.fsf@yucca> (Vagrant Cascadian's message of "Sat, 11 Apr 2020 14:12:03 -0700") Message-ID: <87o8reb9ob.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 10:32:18 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Received-From: 64.68.200.34 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: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Scan-Result: default: False [-1.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.55768815106373]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.20), country: US(-0.00), ip: 209.51.188.17(-0.56)]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[simon@simonsouth.net,help-guix-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[simonsouth.net:email]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[simonsouth.net]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: NWDamVM9rE24 Vagrant, Thanks to help from you, Pierre Langlois and a few others on IRC I've had Guix System running on my ROCK64 for a while now. I thought I'd follow up with the configuration I used and some notes in case it's helpful to someone else down the road: I started with an existing GNU/Linux distribution (Armbian Bionic, though almost any should work fine) installed on my ROCK64's internal eMMC module, to which I added Guix using the installer script linked from chapter 2 of the Guix manual. >From there, log in to the ROCK64 as the superuser. Using fdisk, prepare a microSD card (/dev/mmcblk0) with a GPT partition table and a single partition beginning at sector 2,048. Format the partition (/dev/mmcblk0p1) as ext4, then mount it at /mnt. Create /mnt/etc and write a configuration file like the one below (perhaps changing the timezone and locale and adding a user account) to /mnt/etc/config.scm. Then, making sure the Guix build daemon is running, have Guix populate the microSD card with guix system init /mnt/etc/config.scm /mnt Once this completes the card will contain a bootable Guix System image. Power off the ROCK64, place a jumper over the pins behind the power LED to disable the eMMC clock, and power on the machine again. It should boot from the card into Guix System. >From there, the OS can be installed to the eMMC module through a complicated dance: Using another computer connected to the ROCK64 via its serial interface, hit Enter during startup to reach the U-Boot prompt, then carefully (!) remove the jumper from the ROCK64 to re-enable its eMMC module and enter "boot" to finish booting into Guix. Edit /etc/config.scm to replace "/dev/mmcblk0" with "/dev/mmcblk1" (the eMMC module), then repeat the steps above (making the same substitution) to prepare the module and install a fresh copy of the OS. The configuration file below is fairly minimal but adds a DHCP client and OpenSSH server to the base services so the ROCK64 can be accessed easily once it's connected to a network. Importantly, it also adds an NTP service to set the date and time at startup. The ROCK64 has no RTC battery and defaults to 1 January 2016 as the date at each boot, which causes "guix pull" to fail with an SSL-certificate error until the clock is set properly. (Note OpenNTPD itself ocassionally fails to set the clock and it may be necessary to run "sudo herd restart ntpd" manually after booting.) Thanks again to you and everyone else who helped me reach this point. ---------- (use-modules (gnu) (gnu bootloader u-boot) (gnu system nss)) (use-package-modules certs linux ntp) (use-service-modules networking ssh) (operating-system (host-name "rock64") (timezone "America/Toronto") (locale "en_CA.utf8") (bootloader (bootloader-configuration (bootloader u-boot-rock64-rk3328-bootloader) (target "/dev/mmcblk0"))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (kernel-arguments '("console=ttyS2,1500000")) (file-systems (cons* (file-system (mount-point "/") (device "/dev/mmcblk0p1") (type "ext4")) %base-file-systems)) (packages (append (list nss-certs) %base-packages)) (services (append (list (service dhcp-client-service-type) (service openntpd-service-type (openntpd-configuration (allow-large-adjustment? #t))) (service openssh-service-type)) %base-services))) -- Simon South simon@simonsouth.net