GNU bug report logs - #47780
[installer] Trying to install to DVD leads to crash

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 14 Apr 2021 19:03:01 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47780 in the body.
You can then email your comments to 47780 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#47780; Package guix. (Wed, 14 Apr 2021 19:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 14 Apr 2021 19:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: <bug-guix <at> gnu.org>
Subject: [installer] Trying to install to DVD leads to crash
Date: Wed, 14 Apr 2021 21:02:09 +0200
[Message part 1 (text/plain, inline)]
Hello!

I’ve run an installation with:

  qemu-img create -f qcow2  /tmp/img.qcow2 2G
  qemu-system-x86_64 -enable-kvm -m 2048 \
    -cdrom /gnu/store/…-image.iso -hda /tmp/img.qcow2 \
    -boot d

where the image was obtained by running:

  guix system disk-image -t iso9660 --label=GUIX_x86_64-linux_1.2.1 \
    gnu/system/install.scm

The installer would propose me two target storage devices: hard disk and
CD/DVD.  I mistakenly chose the latter, which led to a crash (screenshot
attached).

Possible improvements are:

  1. gracefully handling this error;
  2. filtering out read-only storage devices from the menu.

Thoughts?

(This is with commit 863bd265e458d2761906770802716555c54e69a4.)

Ludo’.

[installer-crash.png (image/png, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#47780; Package guix. (Sun, 13 Jun 2021 12:28:03 GMT) Full text and rfc822 format available.

Message #8 received at 47780 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47780 <at> debbugs.gnu.org
Subject: Re: bug#47780: [installer] Trying to install to DVD leads to crash
Date: Sun, 13 Jun 2021 14:27:04 +0200
Hello Ludo,

> Possible improvements are:
>
>   1. gracefully handling this error;
>   2. filtering out read-only storage devices from the menu.
>
> Thoughts?

Thanks to David's help[1], I realized that the non-filtering of the
installation device was causing some of the (uuid->string #f) issues
users were experimenting.

With this commit: 154a4e046281c28e39b5016e965d3d937a2ea4a1, I improved
the install device detection by removing the device with the default
Guix System image ISO label.

Now this is fragile and won't work if the ISO label is modified like in
your use-case. I cannot find another reliable way to detect the
installation device in the "non-install-devices" procedure. Do you have
any better idea?

Thanks,

Mathieu

[1]: https://issues.guix.gnu.org/44872




Information forwarded to bug-guix <at> gnu.org:
bug#47780; Package guix. (Mon, 14 Jun 2021 12:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 47780 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47780 <at> debbugs.gnu.org
Subject: Re: bug#47780: [installer] Trying to install to DVD leads to crash
Date: Mon, 14 Jun 2021 14:32:04 +0200
Hi,

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

>> Possible improvements are:
>>
>>   1. gracefully handling this error;
>>   2. filtering out read-only storage devices from the menu.
>>
>> Thoughts?
>
> Thanks to David's help[1], I realized that the non-filtering of the
> installation device was causing some of the (uuid->string #f) issues
> users were experimenting.
>
> With this commit: 154a4e046281c28e39b5016e965d3d937a2ea4a1, I improved
> the install device detection by removing the device with the default
> Guix System image ISO label.

Nice.

> Now this is fragile and won't work if the ISO label is modified like in
> your use-case. I cannot find another reliable way to detect the
> installation device in the "non-install-devices" procedure. Do you have
> any better idea?

Does Parted provide a way to tell whether a storage device is read-only?
That would be ideal.

Thanks,
Ludo’.




Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Thu, 17 Jun 2021 09:19:01 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Thu, 17 Jun 2021 09:19:01 GMT) Full text and rfc822 format available.

Message #16 received at 47780-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47780-done <at> debbugs.gnu.org
Subject: Re: bug#47780: [installer] Trying to install to DVD leads to crash
Date: Thu, 17 Jun 2021 11:18:31 +0200
Hey,

> Does Parted provide a way to tell whether a storage device is read-only?
> That would be ideal.

Yes it does, but this is not enough for a reliable installation device
detection. In Qemu the installation device is /dev/sr0 that is
reported as read-only by parted.

Using real hardware, and an installation device on an USB drive, the
installation device is /dev/sd* and is not reported as read-only by
parted.

However, I found a better way to detect the installation device, that
relies on reading the root partition UUID from the command line.

I combined the read-only parted method and the UUID based installation
device detection in e12be802e02b3345a753e7ec1287852a7337a0a5. This seems
to work well for all my machines, plus for your VM use case.

Closing this one,

Thanks,

Mathieu




Information forwarded to bug-guix <at> gnu.org:
bug#47780; Package guix. (Sun, 20 Jun 2021 20:56:02 GMT) Full text and rfc822 format available.

Message #19 received at 47780-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 47780-done <at> debbugs.gnu.org
Subject: Re: bug#47780: [installer] Trying to install to DVD leads to crash
Date: Sun, 20 Jun 2021 22:55:09 +0200
Hi,

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

>> Does Parted provide a way to tell whether a storage device is read-only?
>> That would be ideal.
>
> Yes it does, but this is not enough for a reliable installation device
> detection. In Qemu the installation device is /dev/sr0 that is
> reported as read-only by parted.
>
> Using real hardware, and an installation device on an USB drive, the
> installation device is /dev/sd* and is not reported as read-only by
> parted.

I see.

> However, I found a better way to detect the installation device, that
> relies on reading the root partition UUID from the command line.
>
> I combined the read-only parted method and the UUID based installation
> device detection in e12be802e02b3345a753e7ec1287852a7337a0a5. This seems
> to work well for all my machines, plus for your VM use case.

That’s clever.  Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Jul 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.