yveslg a écritIl y a quelques jours j'ai installé Ubuntu sur un Hp où windows etait déjà installé.
Au début l'installation posait problème. Après quelque tutos. J'ai réussi à l'installer en utilisant boot-repair. Mais après je n'arrive plus a démarrer windows. Pourtant dans les options de disque d'Ubuntu je vois la partition où est installé Windows . Et c'est marqué non monté. Par contre celle de Ubuntu est marquée montée sur racine du système de fichiers.
Et quand je décide de monter la partition contenant windows, il se monte sur media.
Voici l'url du boot-info:
https://paste.ubuntu.com/p/VfqndjG7Nh/
Bonjour
Je reprends cette discussion dans le seul but d'améliorer si possible le logiciel.
1) D'abord, attention de ne pas confondre boot-repair avec boot-info
Lancer plusieurs fois de suite boot-info n'a pas de conséquence.
Lancer une seule fois boot-repair peut avoir des conséquences importantes. Dans l'ensemble boot-repair essaie de faire au mieux.
2) Ne disposant pas d'un boot-info fait avant le passage de boot-repair et comme maintenant boot-repair ne fait plus préventivement un boot-info, il est possible que j'attribue des actions faites par boot-repair alors qu'elles ont été faites auparavant d'une autre façon.
3) Dès le début du rapport, on sait de quoi on va parler. Je ne sais plus si cela a changé par rapport aux autres versions.
========================================================================
=================== log of boot-repair 20200417_1440 ===================
boot-repair version : 4ppa83
C'est bien un boot-repair et pas un boot-info
4) On voit tout de suite les conditions d'exécution. Cela existait mais il fallait aller les trouver
boot-repair is executed in live-session (Ubuntu 19.10, eoan, Ubuntu, x86_64)
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed quiet splash nomodeset ---
=================== os-prober:
/dev/sda8:Ubuntu 19.10 (19.10):Ubuntu:linux
Trois remarques
a) Le boot-repair a lieu à partir d'une session live. On se souvient certainement qu'en version 19.10 boot-repair refusait de travailler dans une session installée, ce n'est plus totalement le cas: Il peut travailler pour l'instance en cours. Il y a un projet pour permettre aussi de réparer les autres instances s'il en existe.
b) Il serait sympathique qu'à ce niveau, boot-repair indique à l'utilisateur à l'aide d'une grille qu'il a booté en mode EFI ou en mode LEGACY en lui demandant s'il souhaite continuer dans ce mode de réparation.
En effet booter en LEGACY ne pourra jamais réparer un boot EFI.
En effet booter en mode EFI peut réparer un boot LEGACY du moins en théorie
En effet, souvent l'utilisateur sait très mal qu'il a booté en EFI/LEGACY . C'est quasiment la cause des échecs d'installation.
Je suis conscient que c'est une grosse demande, Mais au minima, il devrait être possible d'indiquer dans le compte-rendu en quel mode ce boot-repair a été fait. (LEGACY/EFI) Cela peut aider les débutants.
c) On constate que windows n'est pas vu.
C'est l'énorme difficulté. Il faut que le boot soit exécuté dans le même mode que l'installation de windows pour que windows soit visible
Boot-repair utilisé "os-prober" pour obtenir cette liste. J'ai un gros doute sur le fait que OS.PROBER soit modifié un jour. En effet quel est l'intérêt de le lister si on ne sait pas le lancer!!!!!!!!!
Je serais heureux d'être contredit, mais il me que semble que cette affirmation est vraie et risque de le rester jusqu'à la disparition du mode LEGACY.
- Un ubuntu installé en EFI ne sait pas proposer le boot de windows LEGACY. Même une codification manuelle des commandes pour booter n'a jamais réussi à être écrite.
- Un ubuntu installé en LEGACY ne sait pas proposer le boot de windows EFI. Même une codification manuelle des commandes pour booter n'a jamais réussi à être écrite.
5) On voit le type de réparation proposée.
=================== Recommended repair
The default repair of the Boot-Repair utility will purge (in order to remove grub-efi) and reinstall the grub2 of sda8 into the MBR of sda.
Grub-efi will not be selected by default because: no-win-efi
Additional repair will be performed: unhide-bootmenu-10s fix-windows-boot
Sur le principe elle n'est pas mauvaise. Cependant, il me semble que la suite de cette analyse va aboutir à une modification de la seconde ligne :
"Grub-efi will not be selected by default because: no-win-efi" par " UBUNTU EFI repertory will be deleted because: no-win-efi"
6) Je ne connais pas suffisamment le mode légacy pour dire que ces lignes
grub-install --version
grub-install (GRUB) 2.04-1ubuntu12.2,grub-install (GRUB) 2.
Reinstall the GRUB of sda8 into the MBR of sda
Installing for i386-pc platform.
Installation finished. No error reported.
grub-install /dev/sda: exit code of grub-install /dev/sda:0
ont correctement réparé le mode légacy
La commande à l'origine de ces résultats ne semble pas listée. Je m'attendais à la voir. Elle aurait certainement ressemblé à cela
grub-install -v --no-nvram --efi-directory=/boot/efi --removable --no-uefi-secure-boot --target=i386-pc --directory=/boot/efi/i386-pc --recheck /dev/sda;
Cependant, c'est certainement correct mais la suite perturbe.
7) Après la création, il faut mettre à jour
chroot /mnt/boot-sav/sda8 update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-46-generic
Found initrd image: /boot/initrd.img-5.3.0-46-generic
Found linux image: /boot/vmlinuz-5.3.0-18-generic
Found initrd image: /boot/initrd.img-5.3.0-18-generic
File descriptor 9 (/proc/8750/mountinfo) leaked on lvs invocation. Parent PID 26294: /bin/sh
/dev/sdc: open failed: No medium found
Adding boot menu entry for EFI firmware configuration
Cependant, cela ne parle que du firmware, histoire de provoquer un doute????
8) On constate un début de réparation LEGACY effectué au niveau du MBR. A mon avis elle provient du boot-repair
============================= Boot Info Summary: ===============================
=> Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos8)/boot/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------
Cette partie me semble parfaite.
9) La suite du boot est prévue classiquement comme cela
sda8: __________________________________________________________________________
File system: ext4
Boot sector type: Grub2 (v1.99-2.00)
Boot sector info: Grub2 (v2.00) is installed in the boot sector of sda8
and looks at sector 1394202104 of the same hard drive
for core.img. core.img is at this location and looks
for (,msdos8)/boot/grub. It also embeds following
components:
modules
-------------------------------------------------------
fshelp ext2 part_msdos biosdisk
-------------------------------------------------------
Operating System: Ubuntu 19.10
Boot files: /boot/grub/grub.cfg /etc/fstab
/boot/grub/i386-pc/core.img
Je fais une absolue confiance à cet extrait disant que core img lance /boot/grub
10) Je ne pense pas que ce grub aurait refusé de booter en mode legacy. Du moins je ne sais pas le démontrer.
=========================== sda8/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${initrdfail}" = 2 ]; then
set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
set next_entry="${prev_entry}"
set prev_entry=
save_env prev_entry
if [ "${next_entry}" ]; then
set initrdfail=2
fi
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function initrdfail {
if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
if [ -z "${initrdfail}" ]; then
set initrdfail=1
if [ -n "${boot_once}" ]; then
set prev_entry="${default}"
save_env prev_entry
fi
fi
save_env initrdfail
fi; fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=fr_FR
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=10
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=10
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 10 ; then
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
# previously #2c001e 44,0,30,0
# now yaru #4f194c 79,25,76
if background_color 79,25,76,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-29300d9b-a56d-441c-af46-e665afef2738' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
linux /boot/vmlinuz-5.3.0-46-generic root=UUID=29300d9b-a56d-441c-af46-e665afef2738 ro quiet splash $vt_handoff
initrd /boot/initrd.img-5.3.0-46-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-29300d9b-a56d-441c-af46-e665afef2738' {
menuentry 'Ubuntu, with Linux 5.3.0-46-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-46-generic-advanced-29300d9b-a56d-441c-af46-e665afef2738' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
echo 'Loading Linux 5.3.0-46-generic ...'
linux /boot/vmlinuz-5.3.0-46-generic root=UUID=29300d9b-a56d-441c-af46-e665afef2738 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.3.0-46-generic
}
menuentry 'Ubuntu, with Linux 5.3.0-46-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-46-generic-recovery-29300d9b-a56d-441c-af46-e665afef2738' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
echo 'Loading Linux 5.3.0-46-generic ...'
linux /boot/vmlinuz-5.3.0-46-generic root=UUID=29300d9b-a56d-441c-af46-e665afef2738 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.3.0-46-generic
}
menuentry 'Ubuntu, with Linux 5.3.0-18-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-18-generic-advanced-29300d9b-a56d-441c-af46-e665afef2738' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
echo 'Loading Linux 5.3.0-18-generic ...'
linux /boot/vmlinuz-5.3.0-18-generic root=UUID=29300d9b-a56d-441c-af46-e665afef2738 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.3.0-18-generic
}
menuentry 'Ubuntu, with Linux 5.3.0-18-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-18-generic-recovery-29300d9b-a56d-441c-af46-e665afef2738' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 29300d9b-a56d-441c-af46-e665afef2738
else
search --no-floppy --fs-uuid --set=root 29300d9b-a56d-441c-af46-e665afef2738
fi
echo 'Loading Linux 5.3.0-18-generic ...'
linux /boot/vmlinuz-5.3.0-18-generic root=UUID=29300d9b-a56d-441c-af46-e665afef2738 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.3.0-18-generic
}
}
11) Ma conclusion.
Jusqu'à preuve du contraire, la réparation est bonne mais elle est inutile car cet ordinateur préfère d'abord booter en EFI lorsque cela est possible et qu'il boote seulement en mode legacy qu'en dernier recours.
Cependant windows a été installé en mode legacy!
12) Ce qu'il resterait à faire dans boot-repair: Eliminer les possiblités de booter en EFI. Je les ai vues à deux endroits
a) Dans la partition de boot-efi
sda6: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /EFI/ubuntu/grub.cfg /efi/BOOT/fbx64.efi
/efi/BOOT/mmx64.efi /efi/ubuntu/grubx64.efi
/efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi
/efi/ubuntu/grub.cfg
Quelle correction faire?
- Supprimer froidement la partition.
- Supprimer la partition en demandant l'accord de l'utilisateur.
- Supprimer froidement du répertoire EFI tout ce qui a trait à ubuntu. Mais il restera le répertoire boot!!!
- Transformer cette partition de boot EFI en partition de boot-BIOS bien qu'elle soit stockée dans une partition étendue. Mais la documentation ne dit pas clairement que le boot fonctionnerait. Cependant il y aurait un avantage, la partition UBUNTU pourrait être déplacée sans nécessiter un boot-repair.
- Demander à l'utilisateur de lancer gparted pour supprimer cette partition avant de rebooter?
=> Cela me semble un bon choix. Juste une information à faire et gparted est encore présent dans le support d'installation
- ?
=>> Il ne faudrait retenir qu'une seule possibililté afin de ne pas trop compliquer le développement
b) Dans la NVRAM
================== efibootmgr -v
....
Boot0003* ubuntu HD(4,MBR,0xc9825e41,0x4fd15ffe,0x249f0802)/HD(2,MBR,0x0,0x6719e000,0x9502800)/File(EFIubuntushimx64.efi)RC
Comme boot-repair a booté en EFI, il peut éliminer la ligne . Je ne sais pas si c'est nécessaire. Pas mal d'ordinateurs batissent la NVRAM à partir de la strutrure EFI .
Voilà tout ce que j'ai vu dans ce fichier.