• [^] # Re: chroot grub

    Posté par . En réponse au message j'ai cassé mon grub. Évalué à 1. Dernière modification le 03 décembre 2025 à 17:59.

    Je crois que j'ai tout cassé.

    Voici ce que donne l'utilitaire boot-info

    [20251203_1230]
    ============================== Boot Info Summary ===============================
     => No boot loader is installed in the MBR of /dev/sda.
    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 20.04.6 LTS
     Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
    sdb: ___________________________________________________________________________
     File system: iso9660
     Boot sector type: Grub2 (v1.99-2.00)
     Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of 
     sdb and looks at sector 0 of the same hard drive for 
     core.img, but core.img can not be found at this 
     location.
     Mounting failed: mount: /mnt/BootInfo/FD/sdb: /dev/sdb déjà monté ou point de montage actif.
    ================================ 1 OS detected =================================
    OS#1 (linux): Ubuntu 20.04.6 LTS on sda2
    ================================ Host/Hardware =================================
    CPU architecture: 64-bit
    Video: Skylake GT2 [HD Graphics 520] EFI VGA from Intel Corporation
    Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.3 LTS, jammy, x86_64)
    ===================================== UEFI =====================================
    BIOS/UEFI firmware: N1GET72W (1.51 )(1.51) from LENOVO
    The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
    SecureBoot disabled (confirmed by mokutil).
    BootCurrent: 001B
    Timeout: 0 seconds
    BootOrder: 0001,0000,0017,0018,0019,001A,001B,001C
    Boot0000* Windows OBI 10.0.02.0f HD(2,GPT,6bbda134-510b-4d1b-a438-24a567b73e0f,0xa00800,0x82000)/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.}...S................
    Boot0001* ubuntu HD(1,GPT,6db309ee-be52-4c34-a257-ca865c1d8829,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
    Boot0010 Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
    Boot0011 Boot Menu FvFile(126a762d-5758-4fca-8531-201a7f57f850)
    Boot0012 Diagnostic Splash Screen FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
    Boot0013 Lenovo Diagnostics FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
    Boot0014 Startup Interrupt Menu FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
    Boot0015 Rescue and Recovery FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
    Boot0016 MEBx Hot Key FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
    Boot0017* USB CD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
    Boot0018* USB FDD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
    Boot0019* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
    Boot001A* ATA HDD0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
    Boot001B* USB HDD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
    Boot001C* PCI LAN VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
    Boot001D* IDER BOOT CDROM PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
    Boot001E* IDER BOOT Floppy PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
    Boot001F* ATA HDD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
    Boot0020* ATAPI CD VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
    ============================= Drive/Partition Info =============================
    Disks info: ____________________________________________________________________
    sda : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, no-wind, 2048 sectors * 512 bytes
    Partitions info (1/3): _________________________________________________________
    sda1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
    sda2 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, end-after-100GB
    Partitions info (2/3): _________________________________________________________
    sda1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, vfat
    sda2 : isnotESP, fstab-has-bad-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, ext4
    Partitions info (3/3): _________________________________________________________
    sda1 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda
    sda2 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda
    fdisk -l (filtered): ___________________________________________________________
    Disk sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
    Disk identifier: 7F479630-3D82-4E1A-AE62-3CB0724E9331
     Start End Sectors Size Type
    sda1 2048 1050623 1048576 512M EFI System
    sda2 1050624 500117503 499066880 238G Linux filesystem
    Disk sdb: 7.36 GiB, 7900845056 bytes, 15431338 sectors
    Disk identifier: F45E2FA1-C5A6-4D79-876F-C8245AF921E0
     Start End Sectors Size Type
    sdb1 64 9828451 9828388 4.7G Microsoft basic data
    sdb2 9828452 9838519 10068 4.9M EFI System
    sdb3 9838520 9839119 600 300K Microsoft basic data
    sdb4 9842688 15431274 5588587 2.7G Linux filesystem
    parted -lm (filtered): _________________________________________________________
    sda:256GB:scsi:512:512:gpt:ATA SanDisk SD8TN8U2:;
    1:1049kB:538MB:537MB:fat32::boot, esp;
    2:538MB:256GB:256GB:ext4::;
    sdb:7901MB:scsi:512:512:gpt:SanDisk Cruzer Edge:;
    1:32.8kB:5032MB:5032MB::ISO9660:hidden, msftdata;
    2:5032MB:5037MB:5155kB::Appended2:boot, esp;
    3:5037MB:5038MB:307kB::Gap1:hidden, msftdata;
    4:5039MB:7901MB:2861MB:ext4::;
    blkid (filtered): ______________________________________________________________
    NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
    sda 
    ├─sda1 vfat 5CF2-8015 949e6706-d408-44f4-b4ac-7bb35bf47d13 
    └─sda2 ext4 1677d603-595c-451e-aec9-28177b22674b 9a402792-39d7-4a0b-b229-3138f14acbe4 
    sdb iso9660 2023年08月08日-01-19-05-00 Ubuntu 22.04.3 LTS amd64 
    ├─sdb1 iso9660 2023年08月08日-01-19-05-00 f45e2fa1-c5a6-4d79-876e-c8245af921e0 Ubuntu 22.04.3 LTS amd64 ISO9660
    ├─sdb2 vfat F7DB-4D56 f45e2fa1-c5a6-4d79-876d-c8245af921e0 ESP Appended2
    ├─sdb3 f45e2fa1-c5a6-4d79-876c-c8245af921e0 Gap1
    └─sdb4 ext4 4661e872-4dd3-40d6-a2a5-02f3445547d8 cce9a753-4796-3b4a-9013-e52cb65a12ed writable 
    Mount points (filtered): _______________________________________________________
     Avail Use% Mounted on
    /dev/sda1 511M 0% /mnt/boot-sav/sda1
    /dev/sda2 61.4G 69% /media/ubuntu/1677d603-595c-451e-aec9-28177b22674b
    /dev/sdb1 0 100% /cdrom
    Mount options (filtered): ______________________________________________________
    /dev/sda1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
    /dev/sda2 ext4 rw,nosuid,nodev,relatime,errors=remount-ro
    /dev/sdb1 iso9660 ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8
    ====================== sda2/boot/grub/grub.cfg (filtered) ======================
    Ubuntu 1677d603-595c-451e-aec9-28177b22674b
    ### END /etc/grub.d/30_os-prober ###
    UEFI Firmware Settings uefi-firmware
    ### END /etc/grub.d/30_uefi-firmware ###
    ========================== sda2/etc/fstab (filtered) ===========================
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sda2 during installation
    UUID=1677d603-595c-451e-aec9-28177b22674b / ext4 errors=remount-ro 0 1
    # /boot/efi was on /dev/sda1 during installation
    UUID=86A6-69D5 /boot/efi vfat umask=0077 0 1
    /swapfile none swap sw 0 0
    /dev/sdb /mnt/sdb auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
    ======================= sda2/etc/default/grub (filtered) =======================
    GRUB_DEFAULT=0
    GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT=0
    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)
     58,956974030 = 63,304568832 boot/grub/grub.cfg 2
     157,121135712 = 168,707534848 boot/vmlinuz 2
     82,175823212 = 88,235618304 boot/vmlinuz-5.15.0-138-generic 2
     157,121135712 = 168,707534848 boot/vmlinuz-5.15.0-139-generic 2
     82,175823212 = 88,235618304 boot/vmlinuz.old 2
     159,391597748 = 171,145424896 boot/initrd.img 11
     140,407222748 = 150,761107456 boot/initrd.img-5.15.0-138-generic 8
     159,391597748 = 171,145424896 boot/initrd.img-5.15.0-139-generic 11
     140,407222748 = 150,761107456 boot/initrd.img.old 8
    ===================== sda2: ls -l /etc/grub.d/ (filtered) ======================
    -rwxr-xr-x 1 root root 18224 Jan 11 2022 10_linux
    -rwxr-xr-x 1 root root 42359 Sep 8 2020 10_linux_zfs
    -rwxr-xr-x 1 root root 13101 Dec 18 2022 20_linux_xen
    -rwxr-xr-x 1 root root 12059 Apr 15 2020 30_os-prober
    -rwxr-xr-x 1 root root 1424 Apr 15 2020 30_uefi-firmware
    -rwxr-xr-x 1 root root 700 Feb 21 2022 35_fwupd
    -rwxr-xr-x 1 root root 214 Apr 15 2020 40_custom
    -rwxr-xr-x 1 root root 216 Apr 15 2020 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 Ubuntu 20.04.6 LTS entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !