* Create new EFI guixSD installaton from existing bios guixsd installation
@ 2022-02-17 0:03 Martin Castillo
0 siblings, 0 replies; 4+ messages in thread
From: Martin Castillo @ 2022-02-17 0:03 UTC (permalink / raw)
To: help-guix
[-- Attachment #1.1.1: Type: text/plain, Size: 3273 bytes --]
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.
grub-install wants 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 tried
[-- Attachment #1.1.2: liteon.scm --]
[-- Type: text/x-scheme, Size: 1583 bytes --]
;; This is an operating system configuration generated
;; by the graphical installer.
(use-modules (gnu))
(use-service-modules desktop networking ssh xorg)
(operating-system
(locale "de_DE.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "de" "neo"))
(host-name "geex")
(users (cons* (user-account
(name "mcd")
(comment "Martin")
(group "users")
(home-directory "/home/mcd")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
(packages
(append
(list (specification->package "nss-certs"))
%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-efi-bootloader)
(target "/boot/efi")
(keyboard-layout keyboard-layout)))
(swap-devices
(list (uuid "30bbe6de-b824-4d8a-bc12-3dc8c7b46467")))
(file-systems
(cons* (file-system
(mount-point "/")
(device
(uuid "8757ed03-b543-4416-8779-1fff91a4d027"
'ext4))
(type "ext4"))
(file-system
(mount-point "/boot/efi")
(device
(uuid "257E-79BA" 'fat32))
(type "vfat"))
%base-file-systems)))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Create new EFI guixSD installaton from existing bios guixsd installation
@ 2022-02-17 0:40 Martin Castillo
2022-02-17 13:33 ` Martin Castillo
2022-02-17 14:06 ` pelzflorian (Florian Pelz)
0 siblings, 2 replies; 4+ messages in thread
From: Martin Castillo @ 2022-02-17 0:40 UTC (permalink / raw)
To: help-guix
[-- Attachment #1.1.1: Type: text/plain, Size: 4492 bytes --]
[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 #1.1.2: liteon.scm --]
[-- Type: text/x-scheme, Size: 1583 bytes --]
;; This is an operating system configuration generated
;; by the graphical installer.
(use-modules (gnu))
(use-service-modules desktop networking ssh xorg)
(operating-system
(locale "de_DE.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "de" "neo"))
(host-name "geex")
(users (cons* (user-account
(name "mcd")
(comment "Martin")
(group "users")
(home-directory "/home/mcd")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
(packages
(append
(list (specification->package "nss-certs"))
%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-efi-bootloader)
(target "/boot/efi")
(keyboard-layout keyboard-layout)))
(swap-devices
(list (uuid "30bbe6de-b824-4d8a-bc12-3dc8c7b46467")))
(file-systems
(cons* (file-system
(mount-point "/")
(device
(uuid "8757ed03-b543-4416-8779-1fff91a4d027"
'ext4))
(type "ext4"))
(file-system
(mount-point "/boot/efi")
(device
(uuid "257E-79BA" 'fat32))
(type "vfat"))
%base-file-systems)))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Create new EFI guixSD installaton from existing bios guixsd installation
2022-02-17 0:40 Create new EFI guixSD installaton from existing bios guixsd installation Martin Castillo
@ 2022-02-17 13:33 ` Martin Castillo
2022-02-17 14:06 ` pelzflorian (Florian Pelz)
1 sibling, 0 replies; 4+ messages in thread
From: Martin Castillo @ 2022-02-17 13:33 UTC (permalink / raw)
To: help-guix
[-- Attachment #1.1: Type: text/plain, Size: 1204 bytes --]
I'm back.
On 17.02.22 01:40, Martin Castillo wrote:
> 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?
So I ran the install image in qemu with EFI firmware and ran through the
graphical installer. The guided graphical install failed, manually
running guix system init worked. You can find the outputs under [1].
Looks like a bug, but I have no idea how to give you more info.
To summarize:
1. I wish it would be possible to system init an efi system from a bios
system.
2. The guided gui installer should not fail when installing inside qemu
with EFI. The qemu cmdline was
$ qemu-system-x86_64 -m 2048 -smp 3 -enable-kvm \
-bios /usr/share/edk2-ovmf/x64/OVMF.fd \
-nic user,model=virtio-net-pci -boot menu=on,order=d \
-drive file=/dev/nbd1 \
-drive media=cdrom,file=guix-system-install-1.3.0.x86_64-linux.iso
Martin
[1]: https://seafile.zfn.uni-bremen.de/d/e9acc264718f4ae7b703/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Create new EFI guixSD installaton from existing bios guixsd installation
2022-02-17 0:40 Create new EFI guixSD installaton from existing bios guixsd installation Martin Castillo
2022-02-17 13:33 ` Martin Castillo
@ 2022-02-17 14:06 ` pelzflorian (Florian Pelz)
1 sibling, 0 replies; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2022-02-17 14:06 UTC (permalink / raw)
To: Martin Castillo; +Cc: help-guix
On Thu, Feb 17, 2022 at 01:40:19AM +0100, Martin Castillo wrote:
> Or can you only create an EFI system installation when you're already
> running on one?
Sadly yes, because for EFI the boot information is not stored on disk
but on the motherboard NVRAM. You need to boot with EFI to access it.
Except for installs on removable media, but grub-efi-bootloader does
not do that in Guix except for images.
Regards,
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-17 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 0:40 Create new EFI guixSD installaton from existing bios guixsd installation Martin Castillo
2022-02-17 13:33 ` Martin Castillo
2022-02-17 14:06 ` pelzflorian (Florian Pelz)
-- strict thread matches above, loose matches on Subject: below --
2022-02-17 0:03 Martin Castillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).