Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1020596

Bug#967918: [PATCH] Remount /cdrom read-write if it also happens to be used as /boot/efi

From Pete Batard <pete@akeo.ie>
Newsgroups linux.debian.bugs.dist, linux.debian.maint.boot
Subject Bug#967918: [PATCH] Remount /cdrom read-write if it also happens to be used as /boot/efi
Date 2020-08-05 01:50 +0200
Message-ID <AAeQV-6hl-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Package: partman-efi
Severity: important
Tags: d-i

Some installation processes (e.g. The installation of vanilla Debian 
ARM64 on a Raspberry Pi 4 in UEFI mode) greatly benefit from extracting 
the Debian installation files from mini.iso or netinst.iso into an ESP 
and then using that same ESP for the final system.

On the Raspberry Pi, the reason one might want to do that, outside of 
enabling the use of a single media as both the source and the target for 
the installation (which is a good enough reason per se, that applies to 
more that the Pi platform), is that it alleviates having to manually 
duplicate the necessary bootloader files and UEFI firmware that are 
necessary for the platform to boot, into a different target ESP.

However, since this results in /cdrom and /boot/efi sharing the same 
underlying device, and /cdrom is mounted read-only, the attempt to mount 
the ESP as /boot/efi in partman returns a fatal error (with the message: 
"The attempt to mount a file system with type vfat in SCSI1 (0,0,0), 
partition #1 (sda) at /boot/efi failed") due to the Linux kernel not 
allowing the same device to be mounted both ro and rw at the same time.

This patch fixes this in the script that sets the /boot/efi mount by:
* Detecting the underlying device used by the /cdrom mountpoint.
* Remounting /cdrom rw if that device is the same as the one that will
   be used to mount /boot/efi.

This patch was tested by modifying the partman-efi_84_arm64.udeb package 
from a recent nestinst testing ISO, and proceeding through an installation.

Also please note that, as per https://github.com/pftf/RPi4/issues/76, 
this is one of the very last showstopper we have to enable the use of 
*vanilla* Debian 11 installation ISOs to install the OS on the Raspberry 
Pi 4. As such so we would greatly appreciate if this patch could be 
reviewed and applied quickly.

Thank you,

/Pete

Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Bug#967918: [PATCH] Remount /cdrom read-write if it also happens to be used as /boot/efi Pete Batard <pete@akeo.ie> - 2020-08-05 01:50 +0200
  Bug#967918: (no subject) Aperture <aperture.sw@gmail.com> - 2020-08-07 13:00 +0200
    Bug#967918: (no subject) Steve McIntyre <steve@einval.com> - 2020-08-07 17:30 +0200

csiph-web