help-guix
[Top][All Lists]
Advanced

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

Create new EFI guixSD installaton from existing bios guixsd installation


From: Martin Castillo
Subject: Create new EFI guixSD installaton from existing bios guixsd installation
Date: Thu, 17 Feb 2022 01:40:19 +0100

[Sorry about the uncomplete message I (might?) have sent earlier.]

Hi,

I want to create a bootable guixsd installation for an EFI x86-64 computer. But I don't want to use the installation disk, but create that from an existing guixsd system. The existing system is a BIOS system (and I'm running it inside qemu).

The new system will be installed on a black harddrive, so I will call it 'black'. (But note, that I haven't connected it yet. I'm using a qcow image instead.) I manually partitioned the black drive, I created a fat, swap and ext4 partition with the same uuids as in the system configuration 'liteon.scm' and mounted the / and efi partition:
sdb             8:16   0 111,8G  0 disk
├─sdb1          8:17   0   549M  0 part  /mnt/boot/efi
├─sdb2          8:18   0   7,5G  0 part
└─sdb3          8:19   0 103,8G  0 part  /mnt


Inside the existing system I ran:
$ guix system init liteon.scm /mnt/
... downloaded everything. errord out because of missing rights
$ sudo guix system init liteon.scm  /mnt/
Passwort:
/gnu/store/69gsk4rzz7gfa73qpzj2rfw5hs9d3pl5-system
/gnu/store/ay76p7yzy90r0yi3fg4s8c2sg8c36j7y-grub.cfg

Betriebssystem unter „/mnt/“ wird initialisiert …
Nach „/mnt“ kopieren …
populating '/mnt'...
substitute: Liste der Substitute von „https://ci.guix.gnu.org“ wird aktualisiert … 100.0%
Folgende Ableitungen werden erstellt:
    /gnu/store/42afgd18szcic0hiqmqqvnvnwl7gxkd1-install-bootloader.scm.drv
    /gnu/store/akdppfv8bfyx3qzkjb2hzphlvp7ncq9r-module-import.drv
    /gnu/store/bnjl98z303ax2qx8iwai3dhgzsfnsgsm-module-import.drv

1,4 MB werden heruntergeladen
module-import-compiled 689KiB 2.3MiB/s 00:00 [##################] 100.0% module-import-compiled 689KiB 2.6MiB/s 00:00 [##################] 100.0% /gnu/store/akdppfv8bfyx3qzkjb2hzphlvp7ncq9r-module-import.drv wird erstellt … /gnu/store/bnjl98z303ax2qx8iwai3dhgzsfnsgsm-module-import.drv wird erstellt … /gnu/store/42afgd18szcic0hiqmqqvnvnwl7gxkd1-install-bootloader.scm.drv wird erstellt … guix system: error: '/gnu/store/mb7sg4q398ikdlx56whp2p8msa8pyakw-grub-efi-2.04/sbin/grub-install --boot-directory /mnt/boot --bootloader-id=Guix --efi-directory /mnt/boot/efi' exited with status 1; output follows:


/gnu/store/mb7sg4q398ikdlx56whp2p8msa8pyakw-grub-efi-2.04/sbin/grub-install: Fehler: /gnu/store/mb7sg4q398ikdlx56whp2p8msa8pyakw-grub-efi-2.04/lib/grub/i386-pc/modinfo.sh existiert nicht. Bitte geben Sie --target oder --directory an.

/gnu/store/mb7...-grub-efi-2.04/lib/grub/i386-pc/ does not exist,
/gnu/store/mb7...-grub-efi-2.04/lib/grub/x86_64-efi/ does exist.

grub-install seems to want an explicit target architecture. I didn't find anything in the guix-doc (the bootloader documentation). So I just tried to manually edit and run the failing command: $ sudo /gnu/store/mb7sg4q398ikdlx56whp2p8msa8pyakw-grub-efi-2.04/sbin/grub-install --boot-directory /mnt/boot --bootloader-id=Guix --efi-directory /mnt/boot/efi --target=x86_64-efi
Passwort:
x86_64-efi wird für Ihre Plattform installiert.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
/gnu/store/mb7sg4q398ikdlx56whp2p8msa8pyakw-grub-efi-2.04/sbin/grub-install: Fehler: efibootmgr schlug beim Registrieren des Boot-Eintrags fehl: Datei oder Verzeichnis nicht gefunden.

Then I thought: Maybe do everythung but installing the bootloader. And then try to chroot into /mnt and run guix system reconfigure.

$ sudo guix system init --no-bootloader liteon.scm  /mnt/
(Unfortunately, this copies everything again. Is there a way to prevent this? Or did the earlier guix system everything it would do with --no-bootloader, before it failed installing the bootloader?)


At this point, /mnt/{bin,run} were both empty. I expected /mnt/bin/sh and /run/current-system to exist!?
I checked the target of /mnt/var/guix/profiles/system and ran
$ sudo chroot /mnt/ /gnu/store/87kif...-bash/bin/sh
# . /var/guix/profiles/system/profile/etc/profile

But here I did not know how to proceed? There is no grub-install in this chrooted /gnu/store(, which is weird, because a complete system should contain all files to update itself, right?).

What am I missing?
Or can you only create an EFI system installation when you're already running on one?

Thanks,
Martin Castillo

Attachment: liteon.scm
Description: Text Data

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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