Subject: bug#40590:

From: "Keyhenge" <[email-masked]>
Date: Sun, 12 Apr 2020 22:46:42 -0400

Hi, I'm a new Guix user (well, trying to be) and am trying to 
install
Guix onto my desktop machine. Unfortunately, I'm getting four 
errors in
the installer which are preventing me from installing it. Also, 
apologies
if I format this wrong, this is my first time mailing in a bug 
report.

Info about my machine:
CPU: AMD Ryzen 2700X
GPU: AMD 5700 XT
SSD: Samsung SSD 860 2TB
Memory: 32GB

The first error comes when trying to partition the SSD via the 
graphical
installer, choosing a guided installation. This will happen 
choosing with
or without encryption, and with or without a separate /home 
partition.

In ice-9/boot-9.scm:
  829:9 19 (catch srfi-34 #procedure 2ea60c0 at
./gnu/installer/steps.scm:144:7()> #procedure 2e251e0 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 18 (catch srfi-34 #procedure 2eb8440 at
./gnu/installer/steps.scm:144:7()> #procedure 2f27e60 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 17 (catch srfi-34 #procedure 2eb8240 at
./gnu/installer/steps.scm:144:7()> #procedure 2f27e10 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 16 (catch srfi-34 #procedure 2eb8040 at
./gnu/installer/steps.scm:144:7()> #procedure 2f27dc0 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 15 (catch srfi-34 #procedure 286e200 at
./gnu/installer/steps.scm:144:7()> #procedure 17468c0 at
./gnu/installer/steps.scm:144:7 (key c)> _)
In ./gnu/installer/steps.scm
  182:21 14 (_)
In ./gnu/installer/newt/partition.scm:
  755:33 13 (run-partitioning-page)
In ./gnu/installer/parted.scm:
  1010:14 12 (auto-partition! #<<disk> bytestructure: 
  #<bytestructure
0x185ba50>>#:scheme _)
  863:17 11 (loop _ 3905980593 1048575)
  771:25 10 (mkpart #<<disk> bytestructure: #<bytestructure 
  0x185ba50>> _
#:previous-partition _)
In parted/structs.scm
  552:19 9 (pointer->partition _)
  132:3 8 (pointer->bytestructure #<pointer 0x0> 
  #<bytestructure-descriptor
0x31071c0>)
In unknown file:
  7 (pointer->bytevector #<pointer 0x0> 88 #<undefined> 
  #<undefined>)
In ice-9/boot-9.scm:
  751:25 6 (dispatch-exception 5 null-pointer-error 
  ("pointer->bytevector"
"null pointer dereference" () ()))
In ice-9/eval.scm:
  619:8 5 (_ #(#(#<directory (guile-user) 1253140> #<<installer> 
  name: newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> final-...>) ...))
  619:8 4 (_ #(#(#(#<directory (guile-user) 1253140> #<<installer> 
  name:
newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> f...>) ...) #))
In ice-9/ports.scm:
  462:17 3 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/eval.scm:
  619:8 2 (_ #(#(#<directory (guile-user) 1253140> 
  null-pointer-error
("pointer->bytevector" "null pointer dereference" () ())) 
#<output:
/tmp/last-installer-error 12>))
  159:9 1 (_ #(#(#<directory (guile-user) 1253140> 
  null-pointer-error
("pointer->bytevector" "null pointer dereference" () ())) 
#<output:
/tmp/last-installer-error 12>))
In unknown file:
  0 (make-stack #t)
ice-9/eval.scm:159:9: In procedure pointer->bytevector: null 
pointer
dereference

The second error I get unfortunately doesn't have an error 
message, and
comes when trying to do a manual partition via the graphical 
installer.
I'll be able to make a boot partition (around 512 MB) just fine, 
but when
trying to make a partition on the rest of the disk (or even most 
of it),
the installer will immediately reset and take me back to picking 
the
language.

I then tried the CLI installation method which fared quite a bit 
better.
For one, I got past the partitioning stage, mounted the partitions 
to the
appropriate places, and made a configuration. It even gets through 
most of
the installation progress, but unfortunately fails on what seems 
to be the
very last step, initializing the operating system under /mnt, 
specifically
populating /mnt. bootloader-installer fails with the following 
error:

Initializing operating system under '/mnt'...
copying to '/mnt'...
populating '/mnt'...
error: '/gnu/store/[hash]-grub-efi-2.02/sbin/grub-install 
--boot-directory
/mnt/boot --bootloader-id=Guix --efi-directory /mnt/boot/efi' 
exited with
status 1; output follows:
  Installing for x86_64-efi platform.
  Could not prepare Boot variable: No such file or directory
  /gnu/store/[hash]-grub-efi-2.02/sbin/grub-install: error: 
  efibootmgr
failed to register the boot entry: Input/output error.
guix system: error: failed to install bootloader
/gnu/store/[hash]-bootloader-installer

If you head back to the graphical install after this, you'll be 
treated to
another error when trying to pick your locale/keymap.

In ice-9/eval.scm:
  619:8 19 (_ #(#(#<directory (guile-user) 133e140> #<<installer> 
  name: newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> final-...>) #))
In ice-9/boot-9.scm:
  829:9 18 (catch #t #<procedure 294a2e0 at ice-9/eval.scm:330:13 
  ()>
#<procedure 294a140 at ice-9/boot-9.scm:1048:2 _> _)
In ice-9/eval.scm:
  619:8 17 (_ #(#(#(#<directory (guile-user) 133e140> 
  #<<installer> name:
newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> fi...> ...)) ...))
  626:19 16 (_ #(#(#(#<directory (guile-user) 133e140> 
  #<<installer> name:
newtinit: #<procedure init ()> exit: #<procedure exit ()> 
exit-error:
#<procedure exit-error (file key args)> fi...> ...)) ...))
In ./gnu/installer/steps.scm:
  189:6 15 (run-installer-steps #:steps _ #:rewind-strategy _ 
  #:menu-proc _)
In ice-9/boot-9.scm:
  829:9 14 (catch srfi-34 #<procedure 2e79b80 at
./gnu/installer/steps.scm:144:7()> #<procedure 2df4320 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 13 (catch srfi-34 #<procedure 2efaf80 at
./gnu/installer/steps.scm:144:7()> #<procedure 2df4050 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 12 (catch srfi-34 #<procedure 2efad40 at
./gnu/installer/steps.scm:144:7()> #<procedure 2df4000 at
./gnu/installer/steps.scm:144:7 (key c)> _)
  829:9 11 (catch srfi-34 #<procedure 2efab40 at
./gnu/installer/steps.scm:144:7()> #<procedure 2ff1fa0 at
./gnu/installer/steps.scm:144:7 (key c)> _)
In ./gnu/installer/keymap.scm:
  163:7 8 (_ _)
In unknown file:
  7 (scm-error misc-error #f "~A" ("Unable to locate keymap update 
  file")
#f)
In ice-9/boot-9.scm:
  751:25 6 (dispatch-exception 4 misc-error (#f "~A" ("Unable to 
  locate
keymap update file") #f))
In ice-9/eval.scm:
  619:8 5 (_ #(#(#<directory (guile-user) 133e140> #<<installer> 
  name: newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> final-...>) ...))
  619:8 4 (_ #(#(#(#<directory (guile-user) 133e140> #<<installer> 
  name:
newt
init: #<procedure init ()> exit: #<procedure exit ()> exit-error:
#<procedure exit-error (file key args)> f...>) ...) #))
In ice-9/ports.scm:
  462:17 3 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/eval.scm:
  619:8 2 (_ #(#(#<directory (guile-user) 133e140> misc-error (#f 
  "~A"
("Unable to locate keymap update file") #f)) #<output:
/tmp/last-installer-error 17>))
  159:9 1 (_ #(#(#<directory (guile-user) 133e140> misc-error (#f 
  "~A"
("Unable to locate keymap update file") #f)) #<output:
/tmp/last-installer-error 17>))
In unknown file:
  0 (make-stack #t)
ice-9/eval.scm:159:9: Unable to locate keymap update file

Some side notes:
- I've redownloaded, verified through gpg, and dd'd the iso onto 
  my USB a
couple of times to ensure it wasn't just a bad download
- While I have NixOS on another SSD, these errors persist even 
  when I
physically remove it, so I don't think there's any /dev/sdX 
ordering issues
involved.
- Doing the partitions via CLI, then going back through the manual 
  install
process results in normal behavior up until the grub-install error
- Restarting the graphical installer after the grub-install error, 
  then
going to the CLI will let you see that all of the partitions have 
been
unmounted, except for the root partition which will instead be 
mounted to
/tmp and have a guix-install folder.
- When viewing what's under /mnt/boot/efi, you'll get the path
/mnt/boot/efi/EFI/Guix/grubx64.efi. This seems like a weird path 
to me with
efi/EFI, but I don't really have experience with tinkering with 
grub.
Changing the path to be /mnt/boot/efi/Guix/grubx64.efi doesn't 
change the
bootloader error.
- I've transcribed the above errors by hand, but since they seem 
  to be
exporting the output to /tmp, there's got to be a better way. Is 
it
possible to email this list from inside the installation image?