From: Roland Everaert <r.everaert@protonmail.com>
To: Thiago Jung Bauermann <bauermann@kolabnow.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re : Re: Librem Mini with pureboot/head don't boot GuixSD
Date: Wed, 01 Sep 2021 11:04:18 +0000 [thread overview]
Message-ID: <srdKmF7tpmscyavAL1lKwbo-VQJmrg_6r2ryYDFxIVCNb9lsBemcxEQ-ZOrgkoyN_dMJfmCWtDfG6AqUy4pvyQ3ZzNguOWW_4-MVKpfRI1Q=@protonmail.com> (raw)
In-Reply-To: <1661974.YvECvzcvlD@popigai>
Hello again,
I am slowly moving forward with this topic.
I manage to reinstall GuixSD on the librem Mini. But, now I am having issues with configuring GuixSD to add an entry to the bootloader menu, so, I can tell HEADS to actually use the kernel in the separate partition mounted to /boot. I discover that HEADS, actually, read the content of grub.cfg to propose a list of system to boot on.
Without the form (menu-entries), in the bootloader definition, 'reconfigure' runs fine. So what am I doning wrong?
When the form (menu-entries) is not present, the only notable thing is that the system does not mount the partition ("15dd9d6b-801b-4c57-b2dd-8712405d54e1") to /boot, as a part of the reconfigure operation and the fact that the copy of the kernel files should happen after the reconfigure. However, after rebooting the system, the partition is mounted properly, so it is only during the reconfigure that the partition has not been mounted. Is this intentional?
When executing reconfigure with the file pasted below, I got a huge backtrace. Below is the head of the backtrace.
Backtrace:
16 (primitive-load "/root/.config/guix/current/bin/guix")
In guix/ui.scm:
2185:7 15 (run-guix . _)
2148:10 14 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 13 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
820:3 12 (_)
800:4 11 (call-with-status-report _ _)
In guix/scripts/system.scm:
1228:4 10 (_)
In ice-9/boot-9.scm:
1752:10 9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
658:37 8 (thunk)
1320:8 7 (call-with-build-handler #<procedure 7fab87073450 at g…> …)
2108:24 6 (run-with-store #<store-connection 256.99 7fab87069910> …)
In guix/scripts/system.scm:
1252:15 5 (_ _)
807:9 4 (perform-action reconfigure #<<image> name: #f format:…> …)
In gnu/bootloader/grub.scm:
496:13 3 (grub-configuration-file #<<bootloader-configuration> …> …)
In srfi/srfi-1.scm:
241:2 2 (map _ _)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure map: Wrong type argument: (#<<menu-entry> label: "GNU with Linux-Libre 5.13.12" device: #<<uuid> type: ext4 bv: #vu8(141 147 13 97 214 101 77 110 183 1 83 125 191 171 22 162)> device-mount-point: "/" linux: #<file-append #<package linux-libre@5.13.12 gnu/packages/linux.scm:759 7fab8a058000> "/ bzImage"> linux-arguments: ("--root=8d930d61-d665-4d6e-b701-537dbfab16a2" #<gexp (string-append "--system=" #<gexp-input #<<operating-system> kernel: #<package linux-libre@5.13.12 gnu/packages/linux.scm:759 7fab8a058000> kernel-loadable-modules: () kernel-arguments: ("modprobe.blacklist=usbmouse,usbkbd" "quiet") hurd: #f bootloader: #<<bootloader-configuration> bootloader: #<<bootloader> name: grub package: #<package grub@2.06 gnu/packages/bootloaders.scm:90 7fab8a226780> installer: #<gexp (lambda (bootloader device mount-point) (let ((grub (string-append bootloader "/sbin/grub-install")) (install-dir (string-append mount-point "/boot"))) (
Below is my config.scm content:
(use-modules (gnu) (guix build utils))
(use-service-modules desktop networking ssh xorg)
(for-each (lambda (file)
(let ((target (string-append "/boot/" (basename file))))
(unless (file-exists? target)
(format #t "copying '~a' to /boot...~%" file)
(copy-recursively file target
#:log (%make-void-port "w")))))
;; /run/current-system/kernel is a profile. The trick
;; below allows us to get at its actual directory name,
;; which is what 'grub.cfg' refers to.
(list (dirname
(canonicalize-path "/run/current-system/kernel/bzImage"))
(dirname (canonicalize-path "/run/current-system/initrd"))))
(operating-system
(locale "fr_BE.utf8")
(timezone "Europe/Brussels")
(keyboard-layout
(keyboard-layout "us" "altgr-intl"))
(host-name "dark-dwarf")
(users (cons* (user-account
(name "roland")
(comment "Roland")
(group "users")
(home-directory "/home/roland")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
(packages (append (map specification->package
'("nss-certs" "restic" "gnupg"))
%base-packages))
(services
(append
(list (service xfce-desktop-service-type)
(service openssh-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services))
(bootloader
(bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/sdb"))
(keyboard-layout keyboard-layout)
(menu-entries
(menu-entry
(label "Guix for Pureboot")
(device (uuid "15dd9d6b-801b-4c57-b2dd-8712405d54e1"))))))
(swap-devices
(list (uuid "22be707b-6a27-4f14-81cb-6a1a9c6d2c12")))
(file-systems
(append (list (file-system
(mount-point "/")
(device
(uuid "8d930d61-d665-4d6e-b701-537dbfab16a2"
'ext4))
(type "ext4"))
(file-system
(mount-point "/boot")
(dependencies (list "/"))
(device
(uuid "15dd9d6b-801b-4c57-b2dd-8712405d54e1"
'ext4))
(type "ext4")))
%base-file-systems) ))
Roland Everaert
---
Use the F.O.S.S., Luke
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le vendredi 20 août 2021 à 00:39, Thiago Jung Bauermann <bauermann@kolabnow.com> a écrit :
> Hello Roland,
>
> Em quinta-feira, 19 de agosto de 2021, às 11:57:45 -03, Roland Everaert
>
> escreveu:
>
> > I manage to successfuly copy the needed files to /boot using the `for each` loop from ‘%copy-kernel-and-initrd’, Thank You.
>
> That’s great!
>
> > However, I need to resize (i.e. reduce) the root filesystem so /boot can
> >
> > live in its own one. Currently, copying the kernel files too /boot is
> >
> > useless, as HEAD will scan and sign all the files in /, anyway.
> >
> > Did you have any article discussing such process?
> >
> > I find plenty of articles about increasing the root partition, but, none
> >
> > to reduce it.
> >
> > As the root partition cannot be unmounted online, I need to know if there
> >
> > is a simple way to "switch to an offline mode of sort". For example, I
> >
> > could map a minimal root FS in memory and chroot to it. An other
> >
> > possibility is to copy a guix system to a USB drive and boot from it.
> >
> > The USB option seems the easiest, but the one with the RAMFS seems neat.
> >
> > What are the recommandations of the fine folks on this ML, for such
> >
> > operation?
>
> I don’t have any resource about how to shrink a partition and its
>
> filesystem. I would boot into some distro’s live image and do it from
>
> there.
>
> Shrinking a partition is dangerous and error-prone because there are two
>
> steps:
>
> 1. Shrink the filesystem
> 2. Shrink the partition
>
> If you get the size calculation wrong in step 2 you’ll end up cutting off
>
> the end of your filesystem and thus corrupt it.
>
> So I believe the recommended practice is to always shrink the partition to
>
> be slightly bigger than the filesystem to make sure you don’t take that
>
> risk. You can then optionally grow back the filesystem to fill the slack
>
> space (filesystem resizing tools can automatically calculate the correct
>
> size to fill the partition).
>
> Since this is a risky operation, you have to make sure you have backups of
>
> everything. And since you need to do that, to be honest what I would
>
> really do is wipe everything out, repartition the disk to the new layout
>
> and then restore from backups...
>
> --
>
> Thanks,
>
> Thiago
>
next prev parent reply other threads:[~2021-09-01 11:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 10:59 Librem Mini with pureboot/head don't boot GuixSD Roland Everaert via
2021-08-12 17:05 ` Tobias Geerinckx-Rice
2021-08-14 11:23 ` Re : " Roland Everaert via
2021-08-14 19:30 ` Thiago Jung Bauermann
2021-08-19 14:57 ` Re : " Roland Everaert
2021-08-19 22:39 ` Thiago Jung Bauermann
2021-09-01 11:04 ` Roland Everaert [this message]
2021-09-01 16:21 ` Tobias Geerinckx-Rice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='srdKmF7tpmscyavAL1lKwbo-VQJmrg_6r2ryYDFxIVCNb9lsBemcxEQ-ZOrgkoyN_dMJfmCWtDfG6AqUy4pvyQ3ZzNguOWW_4-MVKpfRI1Q=@protonmail.com' \
--to=r.everaert@protonmail.com \
--cc=bauermann@kolabnow.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.