Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 29/01/2024, à 13:29

Mario2020C

Installation Ubuntu 18.04 sur SSD externe (Suite)

J'ai une installation Ubuntu faite sur mon disque SSD avec une autre partition DATAS. (sda)
J'ai mon portable qui contient Windows seulement avec une autre partition de sauvegarde (nvme0n1p1)
Mon Boot ne se fait pas du côté de mon disque externe et je dois réinstaller Windows sur mon laptop.
Je sais que je vais perdre mon Grub et la partiton EFI pour pouvoir démarrer sur mon disque externe.
J'ai besoin d'aide pour pouvoir le faire.

J'ai une mauvaise installation tout comme https://forum.ubuntu-fr.org/viewtopic.php?id=2051037 avait dans le passé
Mais son post date de 2020 et je suis frileux de me tromper en essayant de faire les changements de copier la partition EFI qui n'est pas sur mon disque SSD
J'ai aussi déjà posté dans le passé un post semblable avec mon ancien ordinateur mais c'est trop tordu à suivre puisqu'il y a beaucoup de choses de différent.

Je suis perdu dans les commandes et je ne veux pas tout perdre:
sudo umount -v /dev/sda1
sudo umount -v /dev/nvme0n1p1    Démonte la partition Windows
mkdir -v  IN   OUT
sudo mount -v  /dev/sda1  OUT
sudo mount -v /dev/nvme0n1p1  IN
sudo cp -rv IN/*  OUT
sudo rm -r  OUT/efi/Microsoft
cd OUT/efi/ubuntu/
ls
sudo gedit grub.cfg
sudo umount -v OUT

Quelqu'un peux me confirmer ces commandes pour copier les fichiers EFI sur mon disque externe?


Voici mon Boot-Info:

boot-info-4ppa2075                                              [20240129_1808]

============================== Boot Info Summary ===============================

 => No boot loader is installed in the MBR of /dev/nvme0n1.
 => No boot loader is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.

nvme0n1p1: _____________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/fallback.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi

nvme0n1p2: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Boot file info:      Grub2 (v2.00) in the file 
                       /ubuntu-22.04.3-desktop-amd64.iso looks at sector 0 of 
                       the same hard drive for core.img, but core.img can not 
                       be found at this location.
    Operating System:  Windows 8 or 10
    Boot files:        /Windows/System32/winload.exe

nvme0n1p3: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 22.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  According to the info in the boot sector, sdb1 has 
                       1177536511 sectors, but according to the info from 
                       fdisk, it has 9767471103 sectors.
    Boot file info:      Grub2 (v2.00) in the file 
                       /ubuntu-22.04.3-desktop-amd64.iso looks at sector 0 of 
                       the same hard drive for core.img, but core.img can not 
                       be found at this location. Grub2 (v2.00) in the file 
                       /ubuntu-23.10.1-desktop-amd64.iso looks at sector 0 of 
                       the same hard drive for core.img, but core.img can not 
                       be found at this location.
    Operating System:  
    Boot files:        


================================ 2 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.3 LTS on sda2
OS#2:   Windows 8 or 10 on nvme0n1p2

================================ Host/Hardware =================================

CPU architecture: 64-bit
Video: GA106M [GeForce RTX 3060 Mobile / Max-Q] TigerLake-H GT1 [UHD Graphics] from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-6.5.0-15-generic root=UUID=2670aca4-6bcd-42f8-8535-92dd165192c4 ro quiet splash vt.handoff=7
df -Th / : /dev/sda2        ext4   385G     21G  346G   6% /

===================================== UEFI =====================================

BIOS/UEFI firmware: FB0A(5.19) from American Megatrends International, LLC.
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0007
Timeout: 1 seconds
BootOrder: 0003,0007,0001
Boot0000  ubuntu GRUB 2 Loader	HD(1,GPT,95646662-9d80-4a07-bf28-fd0bf509070b,0x800,0x32000)/File(EFI\UBUNTU\GRUBX64.EFI)
Boot0001  ubuntu GRUB 2 Loader	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(EFI\UBUNTU\GRUBX64.EFI)
Boot0003* Windows Boot Manager	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0007* ubuntu	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)

64349b3622c65f495a99dbf6102496e3   nvme0n1p1/Boot/bootx64.efi
85fa9d77b929ec4231aba29476574eb6   nvme0n1p1/Boot/fallback.efi
a9c517741ac31962d7feb152948ad1ee   nvme0n1p1/Boot/fbx64.efi
a660182adef313615746a665966d2ccc   nvme0n1p1/Boot/mmx64.efi
a1da253696a304dce6b4668b70151c0e   nvme0n1p1/ubuntu/grubx64.efi
a660182adef313615746a665966d2ccc   nvme0n1p1/ubuntu/mmx64.efi
64349b3622c65f495a99dbf6102496e3   nvme0n1p1/ubuntu/shimx64.efi
2d20ed0d3e457a66b52486dbc47f90a8   nvme0n1p1/Microsoft/Boot/bootmgfw.efi
592685834cbb082c044d21845b0ba7ed   nvme0n1p1/Microsoft/Boot/bootmgr.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda	: is-GPT,	no-BIOSboot,	has---ESP, 	usb-disk,	not-mmc, has-os,	no-wind,	2048 sectors * 512 bytes
nvme0n1	: is-GPT,	no-BIOSboot,	has---ESP, 	not-usb,	not-mmc, has-os,	has-win,	2048 sectors * 512 bytes
sdb	: is-GPT,	no-BIOSboot,	has-noESP, 	liveusb,	not-mmc, no-os,	no-wind,	2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda2	: is-os,	64, apt-get,	signed grub-pc grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	end-after-100GB
nvme0n1p1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p2	: is-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
nvme0n1p3	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sda1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda4	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sdb1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB

Partitions info (2/3): _________________________________________________________

sda2	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p2	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p3	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
sda1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sdb1	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot

Partitions info (3/3): _________________________________________________________

sda2	: not--sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	sda
nvme0n1p1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p2	: not--sepboot,	no-kernel,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p3	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
sda1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sdb1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk identifier: D53225F2-B423-44AE-ABE1-0F4BA75C3B91
             Start        End   Sectors  Size Type
nvme0n1p1      2048     206847    204800  100M EFI System
nvme0n1p2    206848  834936831 834729984  398G Microsoft basic data
nvme0n1p3 834969600 1000214527 165244928 78.8G Microsoft basic data
Disk sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: D875B111-B1F7-4C5F-98E4-5C0A2831E74B
         Start        End    Sectors   Size Type
sda1       2048    1050623    1048576   512M EFI System
sda2    1050624  823291903  822241280 392.1G Linux filesystem
sda4  823291904 1953523711 1130231808 538.9G Microsoft basic data
Disk sdb: 4.55 TiB, 5000947302400 bytes, 9767475200 sectors
Disk identifier: 51701FF0-5BF7-46EF-97D7-73B183D409E8
     Start        End    Sectors  Size Type
sdb1   2048 9767473151 9767471104  4.5T Microsoft basic data

parted -lm (filtered): _________________________________________________________

sda:1000GB:scsi:512:512:gpt:Micron CT1000X6SSD9:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:422GB:421GB:ext4::;
4:422GB:1000GB:579GB:ntfs:DATAS:msftdata;
sdb:5001GB:scsi:512:4096:gpt:WD My Passport 2665:;
1:1049kB:5001GB:5001GB:ntfs:My Passport:msftdata;
nvme0n1:512GB:nvme:512:512:gpt:ESR512GMFCM-E8GBTNB4:;
1:1049kB:106MB:105MB:fat32::boot, esp;
2:106MB:427GB:427GB:ntfs::msftdata;
3:428GB:512GB:84.6GB:ntfs:Basic data partition:hidden, msftdata;

Free space >10MiB: ______________________________________________________________

nvme0n1: 407684MiB:407700MiB:16.0MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL         PARTLABEL
sda                                                                                                          
├─sda1      vfat     63D0-FC62                            12c86031-5a67-4436-9e90-c4519eb3850b               EFI System Partition
├─sda2      ext4     2670aca4-6bcd-42f8-8535-92dd165192c4 2b9077fc-ffa5-418d-abf7-6ec545791f58               
└─sda4      ntfs     4E802A3B6200D9E1                     7f8e8ec3-d92b-47cb-bb91-41f02d105a17 DATAS         DATAS
sdb                                                                                                          
└─sdb1      ntfs     1D16626F799C3E61                     eaff152c-97df-49e7-85b4-87e2219b54a5 Backup        My Passport
nvme0n1                                                                                                      
├─nvme0n1p1 vfat     56F0-74B0                            3913937e-0176-466b-b7ff-f65a9c9f7d50 SYSTEM        
├─nvme0n1p2 ntfs     9A30F14B30F12EBF                     eaa08054-61ad-43c6-b48f-3effe95d62d0 Windows       
└─nvme0n1p3 ntfs     1C4EF9CB4EF99E28                     69c66419-dca5-45ff-a1ca-f279dbd6679e IMAGE_ACRONIS Basic data partition

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/nvme0n1p1                  63.6M  34% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p2                   266G  33% /mnt/boot-sav/nvme0n1p2
/dev/nvme0n1p3                  16.3G  79% /mnt/boot-sav/nvme0n1p3
/dev/sda1                        511M   0% /mnt/boot-sav/sda1
/dev/sda2                      345.2G   5% /
/dev/sda4                      298.9G  45% /media/mario/DATAS
/dev/sdb1                      446.4G  90% /media/mario/Backup
efivarfs                        88.8K  51% /sys/firmware/efi/efivars

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1                 vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p2                 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p3                 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda1                      vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/sda2                      ext4            rw,relatime,errors=remount-ro
/dev/sda4                      fuseblk         rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
/dev/sdb1                      ntfs3           rw,nosuid,nodev,relatime,uid=1000,gid=1000,windows_names,iocharset=utf8

=================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================

search.fs_uuid 2670aca4-6bcd-42f8-8535-92dd165192c4 root hd1,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

====================== sda2/boot/grub/grub.cfg (filtered) ======================

Ubuntu   2670aca4-6bcd-42f8-8535-92dd165192c4
Windows Boot Manager (on nvme0n1p1)   osprober-efi-56F0-74B0
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

========================== sda2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=2670aca4-6bcd-42f8-8535-92dd165192c4 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=56F0-74B0  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

======================= sda2/etc/default/grub (filtered) =======================

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

==================== sda2: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
 348.753471375 = 374.471188480  boot/grub/grub.cfg                             1
  10.412666321 = 11.180515328   boot/vmlinuz                                   1
   7.849735260 = 8.428589056    boot/vmlinuz-6.2.0-26-generic                  1
  10.412666321 = 11.180515328   boot/vmlinuz-6.5.0-15-generic                  1
   7.849735260 = 8.428589056    boot/vmlinuz.old                               1
 105.910072327 = 113.720074240  boot/initrd.img                                1
 105.494441986 = 113.273794560  boot/initrd.img-6.2.0-26-generic               1
 105.910072327 = 113.720074240  boot/initrd.img-6.5.0-15-generic               1
 105.494441986 = 113.273794560  boot/initrd.img.old                            1

===================== sda2: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root 18683 déc 19  2022 10_linux
-rwxr-xr-x 1 root root 43031 déc 19  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 déc 19  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 déc 19  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 déc 19  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 mai  17  2023 35_fwupd
-rwxr-xr-x 1 root root   214 déc 19  2022 40_custom
-rwxr-xr-x 1 root root   215 déc 19  2022 41_custom



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi of
sda2,
using the following options:  sda1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the L'OS actuellement utilisé - Ubuntu 22.04.3 LTS entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.
If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
For example you can boot into Windows, then type the following command in an admin command prompt:
bcdedit /set {bootmgr} path \EFI\****\grub****.efi (**** will be updated in the final message)

Hors ligne

#2 Le 29/01/2024, à 16:19

geole

Re : Installation Ubuntu 18.04 sur SSD externe (Suite)

Bonjour
Extraits de ton boot-info

================================ 2 OS detected =================================
OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.3 LTS on sda2
OS#2:   Windows 8 or 10 on nvme0n1p2
nvme0n1p1: _____________________________________________________________________
    File system:       vfat
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/fallback.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi
sda1: __________________________________________________________________________
    File system:       vfat
    Boot files:        
=================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================
search.fs_uuid 2670aca4-6bcd-42f8-8535-92dd165192c4 root hd1,gpt2 
========================== sda2/etc/fstab (filtered) ===========================
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=56F0-74B0  /boot/efi       vfat    umask=0077      0       1
blkid (filtered): ______________________________________________________________
NAME        FSTYPE   UUID                                 PARTUUID                             LABEL         PARTLABEL
sda                                                                                                          
├─sda1      vfat     63D0-FC62                            12c86031-5a67-4436-9e90-c4519eb3850b               EFI System Partition
├─nvme0n1p1 vfat     56F0-74B0                            3913937e-0176-466b-b7ff-f65a9c9f7d50 SYSTEM  
Boot0000  ubuntu GRUB 2 Loader	HD(1,GPT,95646662-9d80-4a07-bf28-fd0bf509070b,0x800,0x32000)/File(EFI\UBUNTU\GRUBX64.EFI)
Boot0001  ubuntu GRUB 2 Loader	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(EFI\UBUNTU\GRUBX64.EFI)
Boot0007* ubuntu	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)

64349b3622c65f495a99dbf6102496e3   nvme0n1p1/Boot/bootx64.efi
64349b3622c65f495a99dbf6102496e3   nvme0n1p1/ubuntu/shimx64.efi

Donc  on peut faire plus simple en travaillant avec ton ubuntu qui fonctionne et profiter que la partition EFI est montée
1) Monter la future partition EFI

mkdir OUT
sudo mount -v  /dev/sda1  OUT

2) Copier la structure de boot du répertoire boot et déplacer celle du répertoire ubuntu

mkdir OUT/EFI
sudo cp -Rv /boot/efi/EFI/Boot  OUT/EFI
sudo mv -v /boot/efi/EFI/ubuntu  OUT/EFI

3) Corriger le grub en ligne de commande en supprimant hd1,gpt2 qui est maintenant inutile

sudo sed -i 's/hd1,gpt2/ /' OUT/EFI/ubuntu/grub.cfg 

4) Rectifier le fichier FSTAB

sudo sed -i 's/nvme0n1p1 during installation/ sur disque externe après correction./' /etc/fstab
sudo sed -i 's/56F0-74B0/63D0-FC62/' /etc/fstab

5) Assurer le démontage des partitions et le remonatage de la nouvelle partition EFI

sudo umount -v OUT
rm OUT
sudo umount -v /boot/efi
sudo mount -va

6) Mettre à jour la NVRAM en éliminant  les lignes de boot  ubuntu

sudo efibootmgr -B -b 0
sudo efibootmgr -B -b 1
sudo efibootmgr -B -b 7

Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne

#3 Le 30/01/2024, à 14:40

Mario2020C

Re : Installation Ubuntu 18.04 sur SSD externe (Suite)

Merci geole cela m'est d'un grand secours
Voici mon boot-info:

boot-info-4ppa2075                                              [20240130_2012]

============================== Boot Info Summary ===============================

 => No boot loader is installed in the MBR of /dev/nvme0n1.
 => No boot loader is installed in the MBR of /dev/sda.

nvme0n1p1: _____________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/fallback.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                       /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi

nvme0n1p2: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Boot file info:      Grub2 (v2.00) in the file 
                       /ubuntu-22.04.3-desktop-amd64.iso looks at sector 0 of 
                       the same hard drive for core.img, but core.img can not 
                       be found at this location.
    Operating System:  Windows 8 or 10
    Boot files:        /Windows/System32/winload.exe

nvme0n1p3: _____________________________________________________________________

    File system:       ntfs
    Boot sector type:  NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/fallback.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 22.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        


================================ 2 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.3 LTS on sda2
OS#2:   Windows 8 or 10 on nvme0n1p2

================================ Host/Hardware =================================

CPU architecture: 64-bit
Video: GA106M [GeForce RTX 3060 Mobile / Max-Q] TigerLake-H GT1 [UHD Graphics] from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-6.5.0-15-generic root=UUID=2670aca4-6bcd-42f8-8535-92dd165192c4 ro quiet splash vt.handoff=7
df -Th / : /dev/sda2        ext4   385G     21G  346G   6% /

===================================== UEFI =====================================

BIOS/UEFI firmware: FB0A(5.19) from American Megatrends International, LLC.
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0003,0004
Boot0003* Windows Boot Manager	HD(1,GPT,3913937e-0176-466b-b7ff-f65a9c9f7d50,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0004* ubuntu	HD(1,GPT,12c86031-5a67-4436-9e90-c4519eb3850b,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)..BO

64349b3622c65f495a99dbf6102496e3   nvme0n1p1/Boot/bootx64.efi
85fa9d77b929ec4231aba29476574eb6   nvme0n1p1/Boot/fallback.efi
a9c517741ac31962d7feb152948ad1ee   nvme0n1p1/Boot/fbx64.efi
a660182adef313615746a665966d2ccc   nvme0n1p1/Boot/mmx64.efi
2d20ed0d3e457a66b52486dbc47f90a8   nvme0n1p1/Microsoft/Boot/bootmgfw.efi
592685834cbb082c044d21845b0ba7ed   nvme0n1p1/Microsoft/Boot/bootmgr.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda	: is-GPT,	no-BIOSboot,	has---ESP, 	usb-disk,	not-mmc, has-os,	no-wind,	2048 sectors * 512 bytes
nvme0n1	: is-GPT,	no-BIOSboot,	has---ESP, 	not-usb,	not-mmc, has-os,	has-win,	2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda2	: is-os,	64, apt-get,	signed grub-pc grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	end-after-100GB
nvme0n1p3	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
nvme0n1p1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p2	: is-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sda4	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	end-after-100GB
sda1	: no-os,	64, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far

Partitions info (2/3): _________________________________________________________

sda2	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p3	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
nvme0n1p1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p2	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot

Partitions info (3/3): _________________________________________________________

sda2	: not--sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	sda
nvme0n1p3	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p2	: not--sepboot,	no-kernel,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk identifier: D53225F2-B423-44AE-ABE1-0F4BA75C3B91
             Start        End   Sectors  Size Type
nvme0n1p1      2048     206847    204800  100M EFI System
nvme0n1p2    206848  834936831 834729984  398G Microsoft basic data
nvme0n1p3 834969600 1000214527 165244928 78.8G Microsoft basic data
Disk sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: D875B111-B1F7-4C5F-98E4-5C0A2831E74B
         Start        End    Sectors   Size Type
sda1       2048    1050623    1048576   512M EFI System
sda2    1050624  823291903  822241280 392.1G Linux filesystem
sda4  823291904 1953523711 1130231808 538.9G Microsoft basic data

parted -lm (filtered): _________________________________________________________

sda:1000GB:scsi:512:512:gpt:Micron CT1000X6SSD9:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:422GB:421GB:ext4::;
4:422GB:1000GB:579GB:ntfs:DATAS:msftdata;
nvme0n1:512GB:nvme:512:512:gpt:ESR512GMFCM-E8GBTNB4:;
1:1049kB:106MB:105MB:fat32::boot, esp;
2:106MB:427GB:427GB:ntfs::msftdata;
3:428GB:512GB:84.6GB:ntfs:Basic data partition:hidden, msftdata;

Free space >10MiB: ______________________________________________________________

nvme0n1: 407684MiB:407700MiB:16.0MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL         PARTLABEL
sda                                                                                                          
├─sda1      vfat     63D0-FC62                            12c86031-5a67-4436-9e90-c4519eb3850b               EFI System Partition
├─sda2      ext4     2670aca4-6bcd-42f8-8535-92dd165192c4 2b9077fc-ffa5-418d-abf7-6ec545791f58               
└─sda4      ntfs     4E802A3B6200D9E1                     7f8e8ec3-d92b-47cb-bb91-41f02d105a17 DATAS         DATAS
nvme0n1                                                                                                      
├─nvme0n1p1 vfat     56F0-74B0                            3913937e-0176-466b-b7ff-f65a9c9f7d50 SYSTEM        
├─nvme0n1p2 ntfs     9A30F14B30F12EBF                     eaa08054-61ad-43c6-b48f-3effe95d62d0 Windows       
└─nvme0n1p3 ntfs     1C4EF9CB4EF99E28                     69c66419-dca5-45ff-a1ca-f279dbd6679e IMAGE_ACRONIS Basic data partition

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/nvme0n1p1                  67.8M  29% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p2                   266G  33% /mnt/boot-sav/nvme0n1p2
/dev/nvme0n1p3                  16.3G  79% /mnt/boot-sav/nvme0n1p3
/dev/sda2                      345.1G   5% /
/dev/sda4                      298.9G  45% /media/mario/DATAS
efivarfs                        89.1K  51% /sys/firmware/efi/efivars

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1                 vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p2                 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p3                 fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda2                      ext4            rw,relatime,errors=remount-ro
/dev/sda4                      fuseblk         rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096

===================== sda1/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid 2670aca4-6bcd-42f8-8535-92dd165192c4 root   
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

====================== sda2/boot/grub/grub.cfg (filtered) ======================

Ubuntu   2670aca4-6bcd-42f8-8535-92dd165192c4
Windows Boot Manager (on nvme0n1p1)   osprober-efi-56F0-74B0
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

========================== sda2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=2670aca4-6bcd-42f8-8535-92dd165192c4 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/ sur disque externe après correction.
UUID=63D0-FC62  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

======================= sda2/etc/default/grub (filtered) =======================

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

==================== sda2: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
 348.753471375 = 374.471188480  boot/grub/grub.cfg                             1
  10.412666321 = 11.180515328   boot/vmlinuz                                   1
   7.849735260 = 8.428589056    boot/vmlinuz-6.2.0-26-generic                  1
  10.412666321 = 11.180515328   boot/vmlinuz-6.5.0-15-generic                  1
   7.849735260 = 8.428589056    boot/vmlinuz.old                               1
 105.910072327 = 113.720074240  boot/initrd.img                                1
 105.494441986 = 113.273794560  boot/initrd.img-6.2.0-26-generic               1
 105.910072327 = 113.720074240  boot/initrd.img-6.5.0-15-generic               1
 105.494441986 = 113.273794560  boot/initrd.img.old                            1

===================== sda2: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root 18683 ธ.ค.    19  2022 10_linux
-rwxr-xr-x 1 root root 43031 ธ.ค.    19  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 ธ.ค.    19  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 ธ.ค.    19  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 ธ.ค.    19  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 พ.ค.    17  2023 35_fwupd
-rwxr-xr-x 1 root root   214 ธ.ค.    19  2022 40_custom
-rwxr-xr-x 1 root root   215 ธ.ค.    19  2022 41_custom



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi of
sda2,
using the following options:  sda1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the L'OS actuellement utilisé - Ubuntu 22.04.3 LTS entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.
If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
For example you can boot into Windows, then type the following command in an admin command prompt:
bcdedit /set {bootmgr} path \EFI\****\grub****.efi (**** will be updated in the final message)

- J'ai dû ajouter un sudo à la commande mkdir OUT/EFI puisqu'il ne m'en donnait pas la permission
- j'ai aussi ajouté un sudo et le paramètre -d à la commande rm OUT --> sudo rm -d OUT

Informations supplémentaires:
Pour les prochaines corrections qui risquent d'arriver dans le furur, j'aimerais comprendre les parties 3 et 4 puisqu'elles risquent de changer lors d'une nouvelle installation.
Les modicications pour effacer le contenu des lignes des fichiers grub.cfg et fstab peuvent-ils être fait manuellement via la cmmande sudo gedit /OUT/EFI/ubuntu/grub.cfg et aussi sudo gedit /etc/fstab ?
(Avec explication du contenu et de la procédure si possible.)

3) Corriger le grub en ligne de commande en supprimant hd1,gpt2 qui est maintenant inutile
sudo sed -i 's/hd1,gpt2/ /' OUT/EFI/ubuntu/grub.cfg

et
4) Rectifier le fichier FSTAB
sudo sed -i 's/nvme0n1p1 during installation/ sur disque externe après correction./' /etc/fstab
sudo sed -i 's/56F0-74B0/63D0-FC62/' /etc/fstab

Encore merci, Cela me permet maintenant de réinstaller le laptop.

Hors ligne