Subject: bug#47780: closed (Re: bug#47780: [installer] Trying to install to DVD leads to crash)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 17 Jun 2021 09:19:01 +0000

Your bug report

#47780: [installer] Trying to install to DVD leads to crash

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
47780: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47780
GNU Bug Tracking System
Contact [email-masked] with problems

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

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

Subject: [installer] Trying to install to DVD leads to crash
From: Ludovic Courtès <[email-masked]>
To: <[email-masked]>
Date: Wed, 14 Apr 2021 21:02:09 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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’.