New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP flagging, name partitions in 300_format_usb_disk.sh #1292
Conversation
(1) Change EFI partition from primary to ESP, (2) name partitions, (3) Set boot_flag to "esp" for EFI systemd-boot (4) Make log message more explicit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ProBackup-nl Need to verify this before I can approve it
I find it quite handy when
|
Regarding "modern" flags like 'esp' or 'legacy_boot': Older 'parted' on older Linux distributions do not support them, cf. The current code errors out when parted fails to set a flag. Accordingly I think there could be code that retries if ! parted -s $RAW_USB_DEVICE set 1 $boot_flag on >&2 ; then # try a traditional flag as fallback if ! parted -s $RAW_USB_DEVICE set 1 boot on >&2 ; then Error "Could not make first partition bootable on '$RAW_USB_DEVICE'" fi fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is currently not sufficiently
fail-safe when an older parted is used
that does not support those settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Older versions require a primary partition; I'm afraid ESP is a rather new addition.
@gdha ESP is in parted since release 3.2 (2014-07-28). |
@@ -77,14 +80,19 @@ case "$USB_DEVICE_PARTED_LABEL" in | |||
boot_flag="boot" | |||
;; | |||
"gpt") | |||
boot_flag="legacy_boot" | |||
# For modern UEFI/GPT booting set ESP boot_flag | |||
if [[ -d /sys/firmware/efi/efivars && -f /boot/EFI/systemd/systemd-bootx64.efi || -f /usr/lib/systemd/boot/efi/systemd-bootx64.efi ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ProBackup-nl this directory /boot/EFI/systemd/ is not a standard yet (this path for most common Linux versions)
@ProBackup-nl RHEL 6.3 still has parted 2.1, and lots of RHEL 7.2 still have version 3.1. I don't mind to have it on-board, but then at least it may not break parted < version 3.2. |
@gdha Please drop this request. After I have seen how easily new non-optional dependencies (like |
@ProBackup-nl I am sorry for your frustration. I think that this topic is something that should be part of a future ReaR major release that does away with all the pre-systemd compatibility requirements. |
@schlomo I think that it is not wise to introduce a new (hard/non-optional) dependency for a calculation problem that exists in one old version of a distribution. |
@ProBackup-nl good point and I agree. I actually take it to support my thesis that we should cut our obligations to the past and start working on a new ReaR version that is geared towards recent systems (recent probably being somewhat relative). I have a strong feeling that this will simplify a lot of things within ReaR. |
@schlomo By the way, I am not frustrated, more disappointed. Please do post me a note as soon as the |
I'll try to remember. BTW, I recently read the Archlinux FAQ and liked this part:
It kind of makes me wish we could split ReaR into two parts: One that supports only recent distros and another one for the old stuff. I know that many if not most of our users rely on ReaR supporting their old stuff, this is just me as a developer speaking. |
@schlomo The newest versions of packages is one of the main reasons to use Arch Linux in the first place. Once too many I stumbled upon ancient packages in the major distributions, where I needed a newer version to get things done. And there wasn't a quick solution to install that newer package version. |
(1) Change EFI partition from primary to ESP,
(2) name partitions,
(3) Set boot_flag to "esp" for EFI systemd-boot
(4) Make log message more explicit