[installer] Trying to install to DVD leads to crash

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 14 Apr 2021 21:02
(address . bug-guix@gnu.org)
87sg3sd70u.fsf@inria.fr
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’.
M
M
Mathieu Othacehe wrote on 13 Jun 2021 14:27
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 47780@debbugs.gnu.org)
87czsqgdbb.fsf@gnu.org
Hello Ludo,

Toggle quote (7 lines)
> 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

L
L
Ludovic Courtès wrote on 14 Jun 2021 14:32
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 47780@debbugs.gnu.org)
8735tky6d7.fsf@gnu.org
Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (15 lines)
>> 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.

Toggle quote (5 lines)
> 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’.
M
M
Mathieu Othacehe wrote on 17 Jun 2021 11:18
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 47780-done@debbugs.gnu.org)
877disc0ig.fsf@gnu.org
Hey,

Toggle quote (3 lines)
> 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
Closed
L
L
Ludovic Courtès wrote on 20 Jun 2021 22:55
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 47780-done@debbugs.gnu.org)
878s349ryq.fsf@gnu.org
Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (11 lines)
>> 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.

Toggle quote (7 lines)
> 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’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 47780
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