QEMU image downloaded from website fails to reconfigure with current config

  • Open
  • quality assurance status badge
Details
2 participants
  • Leon Deml
  • Josh Simmons
Owner
unassigned
Submitted by
Leon Deml
Severity
normal
L
L
Leon Deml wrote on 18 Mar 18:42 +0100
(address . bug-guix@gnu.org)
9744b5e72745351c525785dfc6929d57@posteo.net
Dear guix,

Your work on a functional package manager has perked my interest and
compelled me to try it out for myself. Unfortunately GNU Guix doesn't
run on Fedora due to the dependence on nscd, I thus had to resort to
downloading your qcow2 image available at
I checked the signature and ran the image with the following command
(which I copied from the reference manual page on running GNU Guix on a
virtual machine, with the difference that I increased the amount of
memory because the system couldn't do a «guix pull» without freezing
and invoking the OOM killer):

Toggle quote (7 lines)
> qemu-system-x86_64 \
> -nic user,model=virtio-net-pci \
> -enable-kvm -m 4096 \
> -device virtio-blk,drive=myhd \
> -drive
> if=none,file=guix-system-vm-image-1.4.0.x86_64-linux.qcow2,id=myhd

However I noticed that every time I run «guix system reconfigure», I
get a file system check failure and am dumped into a bournish shell
when I reboot. I therefore tried to see what happens if I simply do
«guix pull», followed by «sudo guix system reconfigure
/run/current-system/configuration.scm» without doing anything else,
which from what I understand should always work. However, this also
leads to a file system check failure on reboot.

At the beginning of the system reconfigure command output, there's this
warning:

Toggle quote (2 lines)
> guix system: warning: cannot determine provenance for current system

And at the end of the output there is:

Toggle quote (14 lines)
> shepherd: Evaluating user expression (and (defined? (quote transient?))
> (map (# ?) ?)).
> The following derivation will be built:
> /gnu/store/zadlv1c08flw782s2vgii264pvh6a3d1-upgrade-shepherd-services.scm.drv
>
> building
> /gnu/store/zadlv1c08flw782s2vgii264pvh6a3d1-upgrade-shepherd-services.scm.drv...
> guix system: warning: exception caught while executing 'eval' on
> service 'root':
> error: service: unbound variable
> guix system: warning: some services could not be upgraded
> hint: To allow changes to all the system services to take effect, you
> will need to reboot.

I have sent you the last few lines in an attachment. (it only contains
the last lines, because the xfce-terminal doesn't remember that much
output and because I couldn't figure out how to get tee to save all
output)

On reboot I get the following (transcribed, since I don't know how I
can copy-paste the vm output to the host machine):

Toggle quote (18 lines)
> loading kernel modules...
> e2fsck: Bad magic number in super-block while trying to open /dev/vda1
> /dev/vda1:
> The superblock could not be read or does not describe a valid
> ext2/ext3/ext4
> filesystem. If the device is valid and it really contains an
> ext2/ext3/ext4
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt and you might try running e2fsck with an alternate
> superblock:
> e2fsck -b 8193 <device>
> or
> e2fsck -b 32768 <device>
>
> /dev/vda1 contains a vfat file system labelled 'GNU-ESP'
> File system check on /dev/vda1 failed
> Spawning Bourne-like REPL.

If in the boot menu I choose to run an old configuration, the error
does not occur.

I hope this report will be of help.

Regards,

Leon Deml
building /gnu/store/6mkv2icidhcg2n3bi17mkxdbnrc0xzjh-shepherd-console-font-tty3.go.drv...
building /gnu/store/mvxf94kvqqbvi3j5h1b9yb8xz04lq3ap-shepherd-console-font-tty4.scm.drv...
building /gnu/store/pddnrsijg4n4lcsn7rzy6q8zj8v10xv7-shepherd-console-font-tty5.scm.drv...
building /gnu/store/56g894zflwins7fdqs0gnpq7likyws55-shepherd-console-font-tty4.go.drv...
building /gnu/store/mvsiwz941inaawawqsnx0jywghj7drfa-shepherd-console-font-tty5.go.drv...
building /gnu/store/zd51ic7c2pyxnyc01qpv0rss7wzhh723-shepherd-console-font-tty6.scm.drv...
building /gnu/store/v07s70a8j4wllizgjpydhwfhd0mnb7q3-shepherd-xorg-server-xorg-server-vt7.go.drv...
building /gnu/store/622y4mmyfxzvjqc4r720ijkjrax5m54f-shepherd-console-font-tty6.go.drv...
building XDG desktop file cache...
building /gnu/store/0k77fc6mdy1dnhca6465zs8iag1drq3a-shepherd.conf.drv...
building XDG MIME database...
building /gnu/store/1czd4g6px4hqd490nmsmm0nmskngh87p-boot.drv...
building profile with 54 packages...
building /gnu/store/33jicjshclw5jvzsq5gi69b24mx3c9kz-system.drv...
building /gnu/store/mw4fdbrqgr0hdw8swsjk39mwlc7anyak-grub.cfg.drv...
/gnu/store/i76pxy1cz69k85bs94f1jfgy43cm4lwm-system
/gnu/store/qlm0zx37fc7vjpm405lnk03ivw7q75i2-grub.cfg

activating system...
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/z7g7700d30rc6l5m8f3bvbs97f2gg58y-switch-to-system.scm.drv
/gnu/store/af5jdmaxnykgjry324fdyj4ldy2qzbg8-module-import.drv
/gnu/store/zhbv7hmip9svnxiirjfm8zmsrza1x8g9-module-import.drv

2.2 MB will be downloaded
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
building /gnu/store/af5jdmaxnykgjry324fdyj4ldy2qzbg8-module-import.drv...
module-import 1KiB 82KiB/s 00:00 ???????????????????? 100.0%
module-import-compiled 1.1MiB 727KiB/s 00:01 ???????????????????? 100.0%
module-import-compiled 1.1MiB 1.1MiB/s 00:01 ???????????????????? 100.0%
building /gnu/store/z7g7700d30rc6l5m8f3bvbs97f2gg58y-switch-to-system.scm.drv...
making '/gnu/store/i76pxy1cz69k85bs94f1jfgy43cm4lwm-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/wq0hxzrilhzbindarcan60l27dwdxmll-etc...
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/nfvg06bb8najn45qzwlnl0991q1wmbi5-install-bootloader.scm.drv
/gnu/store/62qi3cp6986liwd6phxri86lyvk2kq21-module-import.drv
/gnu/store/p1c0ncs16aal0rs77bkhpy7jqjmz49hy-module-import.drv

1.3 MB will be downloaded
module-import-compiled 619KiB 693KiB/s 00:01 ???????????????????? 100.0%
module-import-compiled 619KiB 1.0MiB/s 00:01 ???????????????????? 100.0%
building /gnu/store/62qi3cp6986liwd6phxri86lyvk2kq21-module-import.drv...
building /gnu/store/p1c0ncs16aal0rs77bkhpy7jqjmz49hy-module-import.drv...
building /gnu/store/nfvg06bb8najn45qzwlnl0991q1wmbi5-install-bootloader.scm.drv...
guix system: bootloader successfully installed on '(/dev/vda)'
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
0.0 MB will be downloaded
module-import-compiled 23KiB 470KiB/s 00:00 ???????????????????? 100.0%
shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
The following derivation will be built:
/gnu/store/zadlv1c08flw782s2vgii264pvh6a3d1-upgrade-shepherd-services.scm.drv

building /gnu/store/zadlv1c08flw782s2vgii264pvh6a3d1-upgrade-shepherd-services.scm.drv...
guix system: warning: exception caught while executing 'eval' on service 'root':
error: service: unbound variable
guix system: warning: some services could not be upgraded
hint: To allow changes to all the system services to take effect, you will need to reboot.
J
J
Josh Simmons wrote on 2 Jun 17:36 +0200
(address . 69891@debbugs.gnu.org)
CAKf=PtS16tSoGYi0=SDvKwn3KsCf+uLt578+Xsmx9V0ARwXOvA@mail.gmail.com
I also hit this same issue with the QEMU image and have made some progress:

- Folks in IRC logs had mentioned that Shepherd added support for the
"service" interface in 0.10 (
maybe there was a 0.9 compatibility layer that was removed at some point
between the release of 0.10 and the current day, so I did a `guix
time-machine --commit=72a0d835 -- pull` and reconfigure. That did appear to
get around the "service" interface Shepherd error that OP mentioned in
their report.

- For the magic number disk issue, it appears that the bootloader is
mistakenly (???) configured to boot from /dev/vda1 with the
grub-bootloader. When I changed it to /dev/vda2 (the root partition of the
QEMU image) it booted successfully. /dev/vda1 appears to be an EFI
partition, so maybe `grub-efi-bootloader` should be used instead?

Hope this helps others, too!

-Josh
Attachment: file
J
J
Josh Simmons wrote on 3 Jun 01:57 +0200
Re: QEMU image downloaded from website fails to reconfigure with current config
(address . 69891@debbugs.gnu.org)
CAKf=PtRJ+JEQEYP-UMXyp4Ff0EpbttMwwnWJQUFKf2seEkxm5w@mail.gmail.com
A couple of clarifications on the last update, sent it a bit quickly before
turning in for the night ^^;

The time-machine commit I arbitrarily chose as the Shepherd 0.10.2 release
commit:
No idea if the issue is actually with one of the more recent Shepherd
versions or some other package, though. As I'd mentioned in the previous
comment, wondering if a more recent package is relying on the `service`
interface being defined without declaring a specific dependency on
Shepherd>0.10? Either way, running an incremental pull+reconfigure to
shortly after Shepherd 0.10's release, then a present-day pull+reconfigure
appeared to fix it.

For the bootloader issue, I copied /run/current-system/configuration.scm to
/etc/config.scm and made the following update to the `file-systems` section
before the above reconfigures:

```
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/vda"))
(terminal-outputs '(console))))
(file-systems (cons (file-system
(mount-point "/")
(device "/dev/vda2") ;; <- Updated from /dev/vda1
(type "ext4"))
%base-file-systems))
```

Again, I'm doubtful this is the _right_ fix, but worked for me! Happy to
have an updated Guix VM now :)

Cheers,
Josh

On Mon, Jun 3, 2024 at 12:36?AM Josh Simmons <josh.simmons@gmail.com> wrote:

Toggle quote (21 lines)
> I also hit this same issue with the QEMU image and have made some progress:
>
> - Folks in IRC logs had mentioned that Shepherd added support for the
> "service" interface in 0.10 (
> https://logs.guix.gnu.org/guix/2024-03-12.log#133456). I took a stab that
> maybe there was a 0.9 compatibility layer that was removed at some point
> between the release of 0.10 and the current day, so I did a `guix
> time-machine --commit=72a0d835 -- pull` and reconfigure. That did appear to
> get around the "service" interface Shepherd error that OP mentioned in
> their report.
>
> - For the magic number disk issue, it appears that the bootloader is
> mistakenly (???) configured to boot from /dev/vda1 with the
> grub-bootloader. When I changed it to /dev/vda2 (the root partition of the
> QEMU image) it booted successfully. /dev/vda1 appears to be an EFI
> partition, so maybe `grub-efi-bootloader` should be used instead?
>
> Hope this helps others, too!
>
> -Josh
>
Attachment: file
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69891@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69891
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch