Choice of default ESP when several available

Bug #1717821 reported by YannUbuntu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Boot-Repair
Fix Released
Medium
YannUbuntu

Bug Description

suggestion from Bougron (Dec2016, extracted from Bug #1652319 )

 Boot-repair requires the use of the first FAT32 partition with an ESP boot flag.
I think that imposing the storage of the ubuntu boot directory in the same partition as those of windows should not be systematic.

We should find a solution ...

Having the boot structure in another FAT32 partition has the following advantages:
1) Sometimes this partition can not be read by the bios. There is then double punishment. Neither windows, nor ubuntu can start.
2) Some ubuntu application tools initialize the ubuntu boot partition by forgetting that it also contains the windows boot structure that is destroyed
3) A constructor knows how to lock the windows boot partition in read mode. The installer of ubuntu is blocked and boot-repair also. It insists in removing the lock and launching a fsck that can not repair
4)It will happen one day that windows will make a partition not very vast and of which the available space will become insufficient to contain the files of boot of ubuntu which become more voluminous.
5) The space available in the deboot partition can become too small for windows to install new boot files He'll do some housework. Ubuntu boot files will not be spared

Revision history for this message
YannUbuntu (yannubuntu) wrote :

To be sure I understand,
- if Windows and Ubuntu are on the same disk, and there are 2 ESPs on this disk, you suggest that Boot-Repair installs GRUB EFI files in the ESP that does not contain Windows EFI file, correct ?
- if the Windows ESP is not on the same disk as the Ubuntu ESP, what do you suggest ?

Revision history for this message
Bougron (francis-bougron) wrote :

Hello
When there is only one disk
   i prefer another partition because
     Some constructor (HP) look this partition and even an fsck can't repar this, Is was absololuty necessary to do this thing manually (see some french discussion)
     Some tools, forget that the ESP partition can contains files for windows and format this partition if bad paraameters are used
     Pearheaps, one day, microsoft will destroys also this partition
When there are two devices, some users install ubuntu on the second device.
    actually, if the first

or also on an externe device

Revision history for this message
Bougron (francis-bougron) wrote :

Hello
If only one disk
     Windows has a FAT32 partition
     Some applications of the free world format this partition by forgetting that windows is inside.
     I think one day windows will do the housework when one will need room because it installs full of new languages in this structure.
     A constructor (HP) was able to block this partition in writing for ubuntu. FSCK launched by boot-repair could do nothing. The solution was to back up the windows directory, remove and recreate the partition and to put the windows software back before repairing with boot-repair.
    I chose to install refind in another partition.

If an internal disk and i external disk
   Some users do not want to install ubuntu on the same hard drive as windows or can not because of lack of space if the drive is an emmc of size 32 GB
An external medium is chosen. it is absolutely necesary that it is connected to launch windows. It is not practical. I propose to these users a duplication in command lines of the structure of boot on this external disk but this is not practical because made in lines of command.

If two internals disk.
    Some users do not want to install ubuntu on the same hard drive as windows.
    If the disk containing ubuntu is destroyed, the user can continue to use windows.
    If the disk containing windows is destroyed, the user can not boot with ubuntu. the correct answer from us is to tell him to use supergrub2 to access his data
For repair, he must put his hands in the hardware in order to disconnect the dead disk in order to ask him to create an EFI boot farce on this hard disk and then to make a repair.
    It's an easy thing to avoid if you do it preventively.

Thanks for reading me

Revision history for this message
Bougron (francis-bougron) wrote :

Hello.
To days, on the french https://forum.ubuntu-fr.org/viewtopic.php?pid=21797923#p21797923 forum i saw

ATA Error Count: 1592
Error 1592 occurred at disk power-on lifetime: 13890 hours (578 days + 18 hours)
  40 51 08 00 08 00 00 Error: UNC at LBA = 0x00000800 = 2048
(...)
Error 1588 occurred at disk power-on lifetime: 13890 hours
  40 51 08 00 08 00 00 Error: UNC at LBA = 0x00000800 = 2048

so, neither windows nor ubunbtu can't Start. it is a double punission for the user.
it is a double punishment for the user!

Revision history for this message
Bougron (francis-bougron) wrote :

Hello
Don't forget, on external disk, it is also necessary to write /EFI/ubuntu/grubx64.efi on /EFI/boot/bootx64.efi ( https://doc.ubuntu-fr.org/tutoriel/installation_sur_disque_usb#specificites_support_usb_efi )

Revision history for this message
YannUbuntu (yannubuntu) wrote :

Fixed in 4ppa47.

new "Separate /boot/efi partitions" ordering criteria, from most important criteria to minor:
1) prefer ESP that is not hidden
2) prefer ESP on the disk of the Linux we reinstall GRUB
3) prefer ESP not on USB or MMC live-disk
4) prefer ESP that don't contain Windows EFI files
5) prefer ESP not on USB or MMC disk
6) prefer ESP on GPT disk

Changed in boot-repair:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → YannUbuntu (yannubuntu)
Revision history for this message
Bougron (francis-bougron) wrote :

Hello
So I use it. it is good but it was necessarry for me to do this thing

sudo apt-get purge -y grub*-common grub-common:i386 shim-signed linux-signed*

and i saw

Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  glade2script libfuse2:i386 libwxbase2.8-0 libwxgtk2.8-0 python-gi shim
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets suivants seront ENLEVÉS :
  boot-repair* boot-sav* boot-sav-extra* grub-common* grub-efi-amd64*
  grub-efi-amd64-bin* grub-efi-amd64-signed* grub2-common*
  linux-signed-generic* linux-signed-image-4.4.0-96-generic*
  linux-signed-image-generic* os-prober* shim-signed*
0 mis à jour, 0 nouvellement installés, 13 à enlever et 0 non mis à jour.
Après cette opération, 23,5 Mo d'espace disque seront libérés.
(Lecture de la base de données... 301982 fichiers et répertoires déjà installés.)
Suppression de boot-repair (4ppa47) ...
Purge des fichiers de configuration de boot-repair (4ppa47) ...
Suppression de boot-sav-extra (4ppa47) ...
Suppression de boot-sav (4ppa47) ...

Next time, it is necessary to install boot-repair

Revision history for this message
YannUbuntu (yannubuntu) wrote :

thx Bougron for the feedback.

Fixed in boot-sav 4ppa48 (moved os-prober to Recommends so that boot-sav is not removed when purging grub)

Revision history for this message
Bougron (francis-bougron) wrote :

Thanks, It is now good.

YannUbuntu (yannubuntu)
Changed in boot-repair:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.