unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47780: [installer] Trying to install to DVD leads to crash
@ 2021-04-14 19:02 Ludovic Courtès
  2021-06-13 12:27 ` Mathieu Othacehe
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2021-04-14 19:02 UTC (permalink / raw)
  To: 47780

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

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


[-- Attachment #2: the crash --]
[-- Type: image/png, Size: 141297 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47780: [installer] Trying to install to DVD leads to crash
  2021-04-14 19:02 bug#47780: [installer] Trying to install to DVD leads to crash Ludovic Courtès
@ 2021-06-13 12:27 ` Mathieu Othacehe
  2021-06-14 12:32   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2021-06-13 12:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 47780


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47780: [installer] Trying to install to DVD leads to crash
  2021-06-13 12:27 ` Mathieu Othacehe
@ 2021-06-14 12:32   ` Ludovic Courtès
  2021-06-17  9:18     ` Mathieu Othacehe
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-14 12:32 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47780

Hi,

Mathieu Othacehe <othacehe@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47780: [installer] Trying to install to DVD leads to crash
  2021-06-14 12:32   ` Ludovic Courtès
@ 2021-06-17  9:18     ` Mathieu Othacehe
  2021-06-20 20:55       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2021-06-17  9:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 47780-done


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47780: [installer] Trying to install to DVD leads to crash
  2021-06-17  9:18     ` Mathieu Othacehe
@ 2021-06-20 20:55       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-06-20 20:55 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 47780-done

Hi,

Mathieu Othacehe <othacehe@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’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-20 20:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 19:02 bug#47780: [installer] Trying to install to DVD leads to crash Ludovic Courtès
2021-06-13 12:27 ` Mathieu Othacehe
2021-06-14 12:32   ` Ludovic Courtès
2021-06-17  9:18     ` Mathieu Othacehe
2021-06-20 20:55       ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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