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 10/07/2023, à 16:12

Henri56

transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Bonjour a tous , j'aimerais transférer Ubuntu 22.04 d'un ancien dd vers une partition de ssd . Je suis en dual boot win 10 / Ubuntu 22.04 , j'ai déja essayer avec un 18.04 mais je n'ai jamais réussi a configurer le grub donc cela n'a pas fonctionné . Voici mon boot info : https://paste.ubuntu.com/p/54qVDpRS8F/

pastebin
Paste from boot-info 10 July 2023 15:09 +0000

Syntax highlighting: bash
View raw

boot-info-4ppa200                                              [20230710_1709]

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

 => Grub2 (v2.00) is installed in the MBR of /dev/nvme0n1 and looks at sector 
    2048 of the same hard drive for core.img. core.img is at this location and 
    looks for (,gpt2)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_gpt biosdisk
    ---------------------------------------------------------------------------
 => No boot loader is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.

nvme0n1p2: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99-2.00)
    Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                       nvme0n1p2 and looks at sector 191646792 of the same 
                       hard drive for core.img, but core.img can not be found 
                       at this location.
    Operating System:  Ubuntu 18.04.6 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                       /boot/grub/i386-pc/core.img

nvme0n1p3: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

nvme0n1p4: _____________________________________________________________________

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

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/10/11/2012: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/grubx64.efi 
                       /efi/ubuntu/fwupx64.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

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 10 or 11
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

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

sdb2: __________________________________________________________________________

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


================================ 3 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.2 LTS CurrentSession on sdb2
OS#2:   Ubuntu 18.04.6 LTS on nvme0n1p2
OS#3:   Windows 10 or 11 on sda3

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

CPU architecture: 64-bit
Video: GP108 [GeForce GT 1030] Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.15.0-76-generic root=UUID=4c26c065-d62d-4568-b08a-92dc9622ff99 ro quiet splash vt.handoff=7
df -Th / : /dev/sdb2        ext4   292G     90G  188G  33% /

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

BIOS/UEFI firmware: L01 v02.65(2.65) from Hewlett-Packard
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled - SecureBoot disabled - Veuillez indiquer ce message à boot.repair@gmail.com.
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0004,0001,0002,0003,000A,000C,0005,0006,0007,0009
Boot0000* ubuntu	HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)/File(\EFI\ubuntu\grubx64.efi)
Boot0001* DTO UEFI USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000001)..BO
Boot0002* DTO UEFI USB Hard Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0200000001)..BO
Boot0003* DTO UEFI ATAPI CD-ROM Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0300000001)..BO
Boot0004* Windows Boot Manager	HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,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.}...a................
Boot0005* DTO Legacy USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000000)..BO
Boot0006* Hard Drive	BBS(HD,,0x0)..GO..NO?.........F.a.k.e. .U.s.b. .O.p.t.i.o.n.................BO..NO{.......+.S.A.T.A. . .P.M.:. .S.a.n.D.i.s.k. .S.D.7.S.B.3.Q.-.1.2.8.G.........................rN.D+..,.\...........BO..NO{.......+.S.A.T.A. . .P.M.:. .W.D.C. .W.D.3.2.0.0.B.E.K.X.-.7.5.B.7.W.........................rN.D+..,.\...........BO
Boot0007* IBA GE Slot 00C8 v1550	BBS(Network,,0x0)..BO
Boot0009* CD/DVD Drive 	BBS(CDROM,,0x0)..GO..NO{.......+.S.A.T.A. . .P.M.:. .h.p. . . . . . .D.V.D. .A. . .D.S.8.A.C.........................rN.D+..,.\...........BO
Boot000A* WDC WD3200BEKX-75B7WT0	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(3,65535,0)/HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)..BO
Boot000C* SanDisk SD7SB3Q-128G-1006	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,0x800,0x32000)..BO

61f28521dad20467a8e92c65f405ff61   sdb1/BOOT/bkpbootx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   sdb1/BOOT/bootx64.efi
8b8cdc518f2c5bb2e9d875ff1b98721f   sdb1/BOOT/fbx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   sdb1/ubuntu/grubx64.efi
f243a42f3bd3164872e792dbc2610270   sdb1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sdb1/ubuntu/shimx64.efi
261d615bf3021028e8026792c63f2aab   sda1/Boot/bkpbootx64.efi
61f28521dad20467a8e92c65f405ff61   sda1/Boot/bootx64.efi
5dabe049a4dad758d975dc2e60a7f00e   sda1/Boot/fbx64.efi
43ff9f5ed17495c46afef40ab5a53e42   sda1/Boot/grubx64.efi
b5698f2f88c3917bdf0c9f0f2a45d469   sda1/ubuntu/fwupx64.efi
621356d82b109cd860ad92cdf241c58b   sda1/ubuntu/grubx64.efi
f243a42f3bd3164872e792dbc2610270   sda1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda1/ubuntu/shimx64.efi
f2c9c5c28ef51a83d75db5d108b1a310   sda1/Microsoft/Boot/bootmgfw.efi
46288d3cb6a91cb97d25474930f95dfb   sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sdb2	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p3	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p2	: is-os,	64, apt-get,	grub-pc ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sdb1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda3	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far

Partitions info (2/3): _________________________________________________________

sdb2	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p3	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
nvme0n1p2	: isnotESP,	fstab-without-efi,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sdb1	: 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,	recovery-or-hidden,	no-bmgr,	notwinboot
sda3	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	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): _________________________________________________________

sdb2	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
nvme0n1p3	: maybesepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	nvme0n1
nvme0n1p2	: not--sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	nvme0n1
sdb1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda3	: 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: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 1759318E-DCB4-4B59-BC80-9427D640A84B
               Start        End   Sectors   Size Type
nvme0n1p2  616181760 1128181759 512000000 244.1G Linux filesystem
nvme0n1p3 1128181760 1953523711 825341952 393.6G Linux filesystem
nvme0n1p4    6164480  616181759 610017280 290.9G Microsoft basic data
Partition table entries are not in disk order.
Disk sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk identifier: 9EADD9A7-A013-414B-830C-4D0883EB4760
          Start       End   Sectors   Size Type
sda1       2048    206847    204800   100M EFI System
sda2     206848    239615     32768    16M Microsoft reserved
sda3     239616 248995169 248755554 118.6G Microsoft basic data
sda4  248995840 250066943   1071104   523M Windows recovery environment
Disk sdb: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk identifier: 3CD568F6-7A3E-41CB-B31F-31797D32C9F5
        Start       End   Sectors   Size Type
sdb1     2048   1050623   1048576   512M EFI System
sdb2  1050624 625141759 624091136 297.6G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:128GB:scsi:512:4096:gpt:ATA SanDisk SD7SB3Q-:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:127GB:127GB:ntfs:Basic data partition:msftdata;
4:127GB:128GB:548MB:ntfs::hidden, diag;
sdb:320GB:scsi:512:512:gpt:ATA WDC WD3200BEKX-7:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:320GB:320GB:ext4::;
nvme0n1:1000GB:nvme:512:512:gpt:WDC WDS100T2B0C:;
4:3156MB:315GB:312GB:ntfs:Windows 10:hidden, msftdata;
2:315GB:578GB:262GB:ext4:Ubuntu 18.04.04:;
3:578GB:1000GB:423GB:ext4::;

Free space >10MiB: ______________________________________________________________

nvme0n1: 0.02MiB:3010MiB:3010MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL PARTLABEL
sda                                                                                                  
├─sda1      vfat     520E-296B                            e9b4c171-a67b-473c-844d-ca7d1b604fb6       EFI system partition
├─sda2                                                    f3bdebb6-4441-4fa9-bdba-4b7111e21db4       Microsoft reserved partition
├─sda3      ntfs     8CA40F38A40F23F4                     0ddd0552-64c7-4eb2-9933-2379f6244c8a       Basic data partition
└─sda4      ntfs     567099EC7099D2DB                     4b6cd196-2431-450c-8f87-c854dd9430d5       
sdb                                                                                                  
├─sdb1      vfat     B0BB-2DA6                            07d12838-f492-47a9-b8da-b307ccc60fdf       EFI System Partition
└─sdb2      ext4     4c26c065-d62d-4568-b08a-92dc9622ff99 91000ed6-e6dc-4408-a52e-5d7574e0dad7       
nvme0n1                                                                                              
├─nvme0n1p2 ext4     d4b24ad1-82ac-401e-82a2-9843bcdfd9d6 03429eea-6bd1-4694-be8d-0581a34d674b /     Ubuntu 18.04.04
├─nvme0n1p3 ext4     e4daf880-091b-4cdb-855d-1fbba1c0e3d8 dd1f9f1f-9aa3-41d5-bb4b-01dd5d73e259       
└─nvme0n1p4 ntfs     516240271FFB565D                     74dd419d-15c5-4402-a0ea-ca318f32efbf       Windows 10

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/nvme0n1p2                  21.5G  86% /mnt/boot-sav/nvme0n1p2
/dev/nvme0n1p3                 366.6G   0% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4                 127.7G  56% /media/henri/516240271FFB565D
/dev/sda1                       65.3M  32% /mnt/boot-sav/sda1
/dev/sda3                       64.5G  46% /media/sda3
/dev/sda4                       88.6M  83% /media/sda4
/dev/sdb1                      504.1M   1% /mnt/boot-sav/sdb1
/dev/sdb2                      187.7G  31% /
/dev/sdb2[/usr/share/hunspell] 187.7G  31% /var/snap/firefox/common/host-hunspell

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p2                 ext4            rw,relatime,stripe=32738
/dev/nvme0n1p3                 ext4            rw,relatime
/dev/nvme0n1p4                 fuseblk         ro,nosuid,nodev,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/sda3                      fuseblk         ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda4                      fuseblk         ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sdb1                      vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/sdb2                      ext4            rw,relatime,errors=remount-ro
/dev/sdb2[/usr/share/hunspell] ext4            ro,noexec,noatime,errors=remount-ro

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

Ubuntu   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-166-generic   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-163-generic   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-162-generic   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

======================== nvme0n1p2/etc/fstab (filtered) ========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=d4b24ad1-82ac-401e-82a2-9843bcdfd9d6 /               ext4    errors=remount-ro 0       1

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

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

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

           GiB - GB             File                                 Fragment(s)
 335.943946838 = 360.717066240  boot/grub/grub.cfg                             1
 441.943431854 = 474.533146624  boot/grub/i386-pc/core.img                     1
 405.990291595 = 435.928756224  boot/vmlinuz-4.15.0-162-generic                2
 338.294982910 = 363.241472000  boot/vmlinuz-4.15.0-163-generic                1
 406.005924225 = 435.945541632  boot/vmlinuz-4.15.0-166-generic                2
 406.005924225 = 435.945541632  vmlinuz                                        2
 338.294982910 = 363.241472000  vmlinuz.old                                    1
 432.693355560 = 464.600952832  boot/initrd.img-4.15.0-162-generic             5
 396.380775452 = 425.610616832  boot/initrd.img-4.15.0-163-generic             5
 429.455284119 = 461.124100096  boot/initrd.img-4.15.0-166-generic             5
 429.455284119 = 461.124100096  initrd.img                                     5
 396.380775452 = 425.610616832  initrd.img.old                                 5

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

-rwxr-xr-x 1 root root 12808 Feb 24  2021 10_linux
-rwxr-xr-x 1 root root 11298 Feb 24  2021 20_linux_xen
-rwxr-xr-x 1 root root 12059 Feb 24  2021 30_os-prober
-rwxr-xr-x 1 root root  1418 Feb 24  2021 30_uefi-firmware
-rwxr-xr-x 1 root root   214 Feb 24  2021 40_custom
-rwxr-xr-x 1 root root   216 Feb 24  2021 41_custom

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

search.fs_uuid 47bf659a-335f-4fd1-9d14-d2fdc66aeb1a root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

search.fs_uuid 4c26c065-d62d-4568-b08a-92dc9622ff99 root hd1,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-76-generic   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-75-generic   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu 18.04.6 LTS (18.04) (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-166-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-163-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-162-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Windows Boot Manager (on sda1)   osprober-efi-520E-296B
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings   uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
Windows 10"{

========================== sdb2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=4c26c065-d62d-4568-b08a-92dc9622ff99	/	ext4	errors=remount-ro	0	1
UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0

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

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

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

           GiB - GB             File                                 Fragment(s)
  28.155849457 = 30.232113152   boot/grub/grub.cfg                             1
 102.066455841 = 109.593022464  boot/vmlinuz                                   1
 115.675830841 = 124.205977600  boot/vmlinuz-5.15.0-75-generic                 1
 102.066455841 = 109.593022464  boot/vmlinuz-5.15.0-76-generic                 1
 115.675830841 = 124.205977600  boot/vmlinuz.old                               1
  76.867652893 = 82.536013824   boot/initrd.img                                7
 110.243160248 = 118.372691968  boot/initrd.img-5.15.0-75-generic              5
  76.867652893 = 82.536013824   boot/initrd.img-5.15.0-76-generic              7
 110.243160248 = 118.372691968  boot/initrd.img.old                            5

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

-rwxr-xr-x 1 root root 18683 Apr 15  2022 10_linux
-rwxr-xr-x 1 root root 43031 Apr 15  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Apr 15  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Apr 15  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 Feb 21  2022 35_fwupd
-rwxr-xr-x 1 root root   349 Jan 24  2022 40_custom
-rwxr-xr-x 1 root root   215 Apr 15  2022 41_custom
drwxr-xr-x 4 root root  4096 Jan 24  2022 backup

=========================== sdb2/etc/grub.d/35_fwupd ===========================

#! /bin/sh
# SPDX-License-Identifier: LGPL-2.1+
set -e
[ -d ${pkgdatadir:?} ]
# shellcheck source=/dev/null
. "$pkgdatadir/grub-mkconfig_lib"
if [ -f /var/lib/fwupd/uefi_capsule.conf ] &&
   ls /sys/firmware/efi/efivars/fwupd-*-0abba7dc-e516-4167-bbf5-4d9d1c739416 1>/dev/null 2>&1; then
      . /var/lib/fwupd/uefi_capsule.conf
      if [ "${EFI_PATH}" != "" ] && [ "${ESP}" != "" ]; then
      echo "Adding Linux Firmware Updater entry" >&2
cat << EOF
menuentry 'Linux Firmware Updater' \$menuentry_id_option 'fwupd' {
EOF
      ${grub_probe:?}
      prepare_grub_to_access_device '`${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/"'
cat << EOF
	chainloader ${EFI_PATH}
}
EOF
      fi
fi

========================== sdb2/etc/grub.d/40_custom ===========================

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10"{
	set root='(hd3,1)'
	search --no-floppy --fs-uuid --set B0BB-2DA6
	drivemap -s (hd0) ${root}
	chainloader +1
}



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi of
nvme0n1p2,
using the following options:  sdb1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups

Blockers in case of suggested repair: __________________________________________

 Please use this software in a live-session (live-CD or live-USB). This will enable this feature.

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 18.04.6 LTS entry (sdb1/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)

New paste
Poster:

Your name (30 characters max)
Syntax:
Expiration:

Approximate and not guaranteed
Content:
© 2023 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.

    Legal info 

Go to the top of the page

Dernière modification par Henri56 (Le 14/07/2023, à 14:49)

Hors ligne

#2 Le 11/07/2023, à 12:41

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Bonjour
Je n'ai pas bien compris ce que tu veux faire.

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.2 LTS CurrentSession on sdb2
OS#2:   Ubuntu 18.04.6 LTS on nvme0n1p2

Est-ce déplacer le ubuntu de SDB2  ou un autre?
Est-ce pour  le mettre  à la place de ubuntu18.04   ou à coté?
Quoique il en soit,  il faut faire cette démarche:
1) Booter avec un support d'installation, choisir d'essayer ubuntu et lancer GPARTED

Disk nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
               Start        End   Sectors   Size Type
nvme0n1p2  616181760 1128181759 512000000 244.1G Linux filesystem
nvme0n1p3 1128181760 1953523711 825341952 393.6G Linux filesystem
nvme0n1p4    6164480  616181759 610017280 290.9G Microsoft basic data

2) Se positionner au début du nvme et créer une partition de boot: Caractèristiques.     Taille 36 Mo, formatée en FAT32 et lui ajouter le drapeau  ESP.
3) Se positionner sur la partition ubuntu que tu veux déplacer,
4) Eventuellement, la rétrécir  pour qu'elle ne fasse  pas plus que 244.1 Go ou 393.6 Go ( Elle peut faire moins).
5) Faire un copier
6) Faire un  coller qui durera un certain  temps.
7) Eventuellement, Agrandir la partition copiée pour qu'elle  occuper la totalité de l'espace de la partition.
8)  Modifier  le UUID  de cette partition pour en générer un  autre aléatoire.
9) Demander a gparted, l 'affichage de cet UUID et en faire un copier
10) Quitter gparted et monter la partition réceptrice afin de  modifier son fichier fstab    (éventuellement remplacer le 2 par un 3 )

sudo mount  -v /dev/nvme0n1p2  /mnt
sudo nano /mnt/etc/fstab 

et remplacer UUID décrivant  la partition racine par le nouvel UUID généré. Puis sauver la modification (Ctrl o) et quitter ( Ctrl x)
La ligne à remplacer ressemble à cela

# / was on /dev/sda4 during installation
UUID=f993d09f-322e-4596-8322-f8216c77c802 /               ext4    errors=remount-ro 0       1

Puis  démonter

sudo umount -v  /mnt

11) Lancer boot-repair. Prendre le mode "réparation avancée" et lui dire  de réparer le logiciel    du nvme en lui précisant d'utiliser la partition EFI du nvme.

Dernière modification par geole (Le 11/07/2023, à 12:48)


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 11/07/2023, à 13:10

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Merci pour ta réponse geole , si je parviens a déplacer le 22.04 et booter dessus je supprimerai 18.04 , je le garde plus comme sauvegarde que comme OS , j'essaierai ce que tu me conseille ce soir car la je dois partir a l’hôpital .
A+ Henri

Hors ligne

#4 Le 12/07/2023, à 10:40

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

alors la je cale dans le fstab voici les lignes que j ai dedans

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sdb2 :
UUID=4c26c065-d62d-4568-b08a-92dc9622ff99	/	ext4	errors=remount-ro	0	1
#Entry for /dev/sdb1 :
UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1
#Entry for /dev/nvme0n1p4 :
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
#Entry for /dev/sda3 :
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
#Entry for /dev/sda4 :
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0

#UUID=B0BB-2DA6	/boot/efi	vfat	umask=0077	0	1
#UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1
#UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1

je ne sais pas lequel je dois remplacer
a+

Hors ligne

#5 Le 12/07/2023, à 10:47

iznobe

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

geole a écrit :

Bonjour
Je n'ai pas bien compris ce que tu veux faire.


Bonjour , moi non plus , meme maintenant .

Pourquoi faudrait il remplacer des lignes dans le fstab , dans quel but ? ou est il placé ce fstab que tu veux modifier ?
qu ' as tu fais entre temps ?

Dernière modification par iznobe (Le 12/07/2023, à 10:48)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#6 Le 12/07/2023, à 10:50

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

j essaie de transferer mon 22.04 sur le nvme et pouvoir bouter dessus et la je cale parce que je ne sais pas quel uuid je dois changer dans le fstab

Hors ligne

#7 Le 12/07/2023, à 10:57

iznobe

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

t ' es plutot avare en explication . on ne sait pas ce que tu as fait entre temps , tu ne nous l' as pas ecris et on ne peut pas deviner ...

je suppose donc , tu n ' hesite pas a dire si j ' ai faux , que tu as installé ubuntu 22.04 LTS sur le disque SSD et qu ' il ne demarre pas ?
ou tu as copier la partition systeme de ton ubuntu 22.04 dejà installé sur l' ancien disque sur le nouveau SSD ?

Dernière modification par iznobe (Le 12/07/2023, à 10:59)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#8 Le 12/07/2023, à 11:02

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

UUID=4c26c065-d62d-4568-b08a-92dc9622ff99    /    ext4    errors=remount-ro    0    1


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

#9 Le 12/07/2023, à 11:07

iznobe

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

ba , je vois pas pourquoi il faudrait remplacer cet UUID , si c ' est une copie de partition via gparted de la partition systeme d ' ubuntu 22.04 sdb2 vers une partition du nvme .

mais comme on ne sait pas ce qui a été fait avant , impossible de dire quoi faire ...

Dernière modification par iznobe (Le 12/07/2023, à 11:08)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#10 Le 12/07/2023, à 11:22

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Bonjour iznobe
Si le UUID de la duplication n'est pas modifié , on a deux UUID identiques.
Merci  d'expliquer la règle pour choisir  le bon.    On pouvait aussi choisir que le montage se fasse par les labels, mais il n'en faut pas deux identiques. On  pouvait aussi choisir le nom de la partition   (/dev/nvme0n1p3 ?) On pouvait aussi choisir de modifier le UUID émetteur mais du coup, il n'aurait plus fonctionné correctement.


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

#11 Le 12/07/2023, à 11:34

iznobe

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

ba comme y a toujours la 18.04 , il suffit de supprimer la partition sdb2 . si elle a bien été dupliquer via gparted .
Mais comme on ne sait toujours pas .

Dernière modification par iznobe (Le 12/07/2023, à 11:35)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#12 Le 12/07/2023, à 11:59

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Supprimer SDB2 avant d'avoir vérifié que sa duplication fonctionne, me vient pas à  l'esprit. De  plus, Henri56 souhaite peut-être la conserver comme  sécurité. Il a indiqué vouloir supprimer la version 18.04 qui  n'est plus maintenue.


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

#13 Le 12/07/2023, à 12:01

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Voici ce que j ai fais
for;ater la partition nvmeon1p2 en ext4
copier colle 22.04 dans ce nvmeon1p2
changer le uuid de cette partition
maintenant j essaie de changer le uuid dans fstab mais il refuse  pas la permission

Hors ligne

#14 Le 12/07/2023, à 12:04

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

As-tu bien mis le mot sudo devant la commande pour ouvrir le fichier?


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

#15 Le 12/07/2023, à 12:07

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

oui mais fstab ne s ouvre pas en ligne de commande

Hors ligne

#16 Le 12/07/2023, à 12:10

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Afin de visualiser le problème, donne ta commande  de montage et son retour.        idem pour la commande nano


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

#17 Le 12/07/2023, à 12:12

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

ok j y suis arrive

Hors ligne

#18 Le 12/07/2023, à 14:11

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

bon nouveau probleme dans boot-repair

The current session is in BIOS-compatibility mode. Please disable BIOS-compatibility/CSM/Legacy mode in your UEFI firmware, and use this software from a live-CD (or live-USB) that is compatible with UEFI booting mode. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode.

Hors ligne

#19 Le 12/07/2023, à 15:00

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

bon ben comme d'habitude , il lance toujours le 22.04 qui est sur mon ancien disque dur et non celui qui est sur le nvme , voici le boot info :

pastebin
Paste from boot-info 12 July 2023 13:56 +0000

Syntax highlighting: bash
View raw

boot-info-4ppa200                                              [20230712_1555]

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

 => Grub2 (v1.99-2.00) is installed in the MBR of /dev/nvme0n1 and looks at 
    sector 2048 of the same hard drive for core.img, but core.img can not be 
    found at this location.
 => 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/bkpbootx64.efi /efi/BOOT/bootx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/grub.cfg

nvme0n1p2: _____________________________________________________________________

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

nvme0n1p3: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

nvme0n1p4: _____________________________________________________________________

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

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/10/11/2012: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/grubx64.efi 
                       /efi/ubuntu/fwupx64.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

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 10 or 11
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

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

sdb2: __________________________________________________________________________

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


================================ 3 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.2 LTS CurrentSession on sdb2
OS#2:   Ubuntu 22.04.2 LTS (boot) on nvme0n1p2
OS#3:   Windows 10 or 11 on sda3

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

CPU architecture: 64-bit
Video: GP108 [GeForce GT 1030] Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.15.0-76-generic root=UUID=4c26c065-d62d-4568-b08a-92dc9622ff99 ro quiet splash vt.handoff=7
df -Th / : /dev/sdb2        ext4   234G     90G  132G  41% /

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

BIOS/UEFI firmware: L01 v02.65(2.65) from Hewlett-Packard
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled - SecureBoot disabled - Veuillez indiquer ce message à boot.repair@gmail.com.
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0004,0001,0002,0003,000A,000C,0005,0006,0007,0009
Boot0000* ubuntu	HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)/File(\EFI\ubuntu\grubx64.efi)
Boot0001* DTO UEFI USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000001)..BO
Boot0002* DTO UEFI USB Hard Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0200000001)..BO
Boot0003* DTO UEFI ATAPI CD-ROM Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0300000001)..BO
Boot0004* Windows Boot Manager	HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,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.}...a................
Boot0005* DTO Legacy USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000000)..BO
Boot0006* Hard Drive	BBS(HD,,0x0)..GO..NO?.........F.a.k.e. .U.s.b. .O.p.t.i.o.n.................BO..NO{.......+.S.A.T.A. . .P.M.:. .S.a.n.D.i.s.k. .S.D.7.S.B.3.Q.-.1.2.8.G.........................rN.D+..,.\...........BO..NO{.......+.S.A.T.A. . .P.M.:. .W.D.C. .W.D.3.2.0.0.B.E.K.X.-.7.5.B.7.W.........................rN.D+..,.\...........BO
Boot0007* IBA GE Slot 00C8 v1550	BBS(Network,,0x0)..BO
Boot0009* CD/DVD Drive 	BBS(CDROM,,0x0)..GO..NO{.......+.S.A.T.A. . .P.M.:. .h.p. . . . . . .D.V.D. .A. . .D.S.8.A.C.........................rN.D+..,.\...........BO
Boot000A* WDC WD3200BEKX-75B7WT0	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(3,65535,0)/HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)..BO
Boot000C* SanDisk SD7SB3Q-128G-1006	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,0x800,0x32000)..BO

5ddf997e8b025bfbc2009e85b32f60dc   nvme0n1p1/BOOT/bkpbootx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   nvme0n1p1/BOOT/bootx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   nvme0n1p1/ubuntu/grubx64.efi
ae8af199ef80311f9cee9de104a15496   nvme0n1p2/boot/bootx64.efi
1309af23db7b4cdd16bb29b41d6975e5   nvme0n1p2/microsoft/boot/cdboot.efi
ba914e4bb811a1b27220f020d2672167   nvme0n1p2/microsoft/boot/cdboot_noprompt.efi
261d615bf3021028e8026792c63f2aab   sda1/Boot/bkpbootx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   sda1/Boot/bootx64.efi
5dabe049a4dad758d975dc2e60a7f00e   sda1/Boot/fbx64.efi
43ff9f5ed17495c46afef40ab5a53e42   sda1/Boot/grubx64.efi
b5698f2f88c3917bdf0c9f0f2a45d469   sda1/ubuntu/fwupx64.efi
621356d82b109cd860ad92cdf241c58b   sda1/ubuntu/grubx64.efi
f243a42f3bd3164872e792dbc2610270   sda1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda1/ubuntu/shimx64.efi
f2c9c5c28ef51a83d75db5d108b1a310   sda1/Microsoft/Boot/bootmgfw.efi
46288d3cb6a91cb97d25474930f95dfb   sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sdb2	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p3	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p2	: is-os,	64, apt-get,	signed grub-pc grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sdb1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda3	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far

Partitions info (2/3): _________________________________________________________

sdb2	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p3	: isnotESP,	part-has-no-fstab,	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
nvme0n1p4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
nvme0n1p2	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	bootmgr,	is-winboot
sdb1	: 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,	recovery-or-hidden,	no-bmgr,	notwinboot
sda3	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	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): _________________________________________________________

sdb2	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
nvme0n1p3	: maybesepboot,	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
nvme0n1p4	: 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---boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	nvme0n1
sdb1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda3	: 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: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 1759318E-DCB4-4B59-BC80-9427D640A84B
               Start        End   Sectors   Size Type
nvme0n1p1       2048      75775     73728    36M EFI System
nvme0n1p2  616181760 1128181759 512000000 244.1G Linux filesystem
nvme0n1p3 1128181760 1953523711 825341952 393.6G Linux filesystem
nvme0n1p4    6164480  616181759 610017280 290.9G Microsoft basic data
Partition table entries are not in disk order.
Disk sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk identifier: 9EADD9A7-A013-414B-830C-4D0883EB4760
          Start       End   Sectors   Size Type
sda1       2048    206847    204800   100M EFI System
sda2     206848    239615     32768    16M Microsoft reserved
sda3     239616 248995169 248755554 118.6G Microsoft basic data
sda4  248995840 250066943   1071104   523M Windows recovery environment
Disk sdb: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk identifier: 3CD568F6-7A3E-41CB-B31F-31797D32C9F5
        Start       End   Sectors   Size Type
sdb1     2048   1050623   1048576   512M EFI System
sdb2  1050624 500967423 499916800 238.4G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:128GB:scsi:512:4096:gpt:ATA SanDisk SD7SB3Q-:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:127GB:127GB:ntfs:Basic data partition:msftdata;
4:127GB:128GB:548MB:ntfs::hidden, diag;
sdb:320GB:scsi:512:512:gpt:ATA WDC WD3200BEKX-7:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:256GB:256GB:ext4::;
nvme0n1:1000GB:nvme:512:512:gpt:WDC WDS100T2B0C:;
1:1049kB:38.8MB:37.7MB:fat32::boot, esp;
4:3156MB:315GB:312GB:ntfs:Windows 10:hidden, msftdata;
2:315GB:578GB:262GB:ext4::;
3:578GB:1000GB:423GB:ext4::;

Free space >10MiB: ______________________________________________________________

nvme0n1: 37.0MiB:3010MiB:2973MiB
sdb: 244613MiB:305245MiB:60632MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL PARTLABEL
sda                                                                                                  
├─sda1      vfat     520E-296B                            e9b4c171-a67b-473c-844d-ca7d1b604fb6       EFI system partition
├─sda2                                                    f3bdebb6-4441-4fa9-bdba-4b7111e21db4       Microsoft reserved partition
├─sda3      ntfs     8CA40F38A40F23F4                     0ddd0552-64c7-4eb2-9933-2379f6244c8a       Basic data partition
└─sda4      ntfs     567099EC7099D2DB                     4b6cd196-2431-450c-8f87-c854dd9430d5       
sdb                                                                                                  
├─sdb1      vfat     B0BB-2DA6                            07d12838-f492-47a9-b8da-b307ccc60fdf       EFI System Partition
└─sdb2      ext4     4c26c065-d62d-4568-b08a-92dc9622ff99 91000ed6-e6dc-4408-a52e-5d7574e0dad7       
nvme0n1                                                                                              
├─nvme0n1p1 vfat     72D3-CD14                            bbc2ef27-4d66-4355-ac04-7bf61f624775 ESP   
├─nvme0n1p2 ext4     3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8 7a1056d9-9070-45d8-a883-4aa49324d6d6       
├─nvme0n1p3 ext4     e4daf880-091b-4cdb-855d-1fbba1c0e3d8 dd1f9f1f-9aa3-41d5-bb4b-01dd5d73e259       
└─nvme0n1p4 ntfs     516240271FFB565D                     74dd419d-15c5-4402-a0ea-ca318f32efbf       Windows 10

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/nvme0n1p1                    28M  21% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p2                 138.2G  37% /mnt/boot-sav/nvme0n1p2
/dev/nvme0n1p3                 366.6G   0% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4                 127.7G  56% /media/henri/516240271FFB565D
/dev/sda1                         63M  34% /mnt/boot-sav/sda1
/dev/sda3                       61.9G  48% /media/sda3
/dev/sda4                       88.6M  83% /media/sda4
/dev/sdb2                        132G  38% /
/dev/sdb2[/usr/share/hunspell]   132G  38% /var/snap/firefox/common/host-hunspell

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1                 vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p2                 ext4            rw,relatime
/dev/nvme0n1p3                 ext4            rw,relatime
/dev/nvme0n1p4                 fuseblk         rw,nosuid,nodev,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/sda3                      fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda4                      fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sdb2                      ext4            rw,relatime,errors=remount-ro
/dev/sdb2[/usr/share/hunspell] ext4            ro,noexec,noatime,errors=remount-ro

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

search.fs_uuid 3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8 root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Ubuntu, with Linux 5.15.0-76-generic   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Windows Boot Manager (on sda1)   osprober-efi-520E-296B
Ubuntu 22.04.2 LTS (22.04) (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-76-generic (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-75-generic (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###
Windows 10"{

======================== nvme0n1p2/etc/fstab (filtered) ========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8	/	ext4	errors=remount-ro	0	1
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0
UUID=72D3-CD14  /boot/efi       vfat    defaults      0       1

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

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

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

           GiB - GB             File                                 Fragment(s)
 461.943401337 = 496.007950336  boot/grub/grub.cfg                             1
 467.297901154 = 501.757300736  boot/vmlinuz                                   1
 467.297901154 = 501.757300736  boot/vmlinuz-5.15.0-76-generic                 1
 467.297901154 = 501.757300736  boot/vmlinuz.old                               1
 469.341285706 = 503.951368192  boot/initrd.img                                2
 469.341285706 = 503.951368192  boot/initrd.img-5.15.0-76-generic              2
 469.341285706 = 503.951368192  boot/initrd.img.old                            2

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

-rwxr-xr-x 1 root root 18683 Apr 15  2022 10_linux
-rwxr-xr-x 1 root root 43031 Apr 15  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Apr 15  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Apr 15  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 Feb 21  2022 35_fwupd
-rwxr-xr-x 1 root root   349 Jan 24  2022 40_custom
-rwxr-xr-x 1 root root   215 Apr 15  2022 41_custom
drwxr-xr-x 4 root root  4096 Jan 24  2022 backup

======================== nvme0n1p2/etc/grub.d/35_fwupd =========================

#! /bin/sh
# SPDX-License-Identifier: LGPL-2.1+
set -e
[ -d ${pkgdatadir:?} ]
# shellcheck source=/dev/null
. "$pkgdatadir/grub-mkconfig_lib"
if [ -f /var/lib/fwupd/uefi_capsule.conf ] &&
   ls /sys/firmware/efi/efivars/fwupd-*-0abba7dc-e516-4167-bbf5-4d9d1c739416 1>/dev/null 2>&1; then
      . /var/lib/fwupd/uefi_capsule.conf
      if [ "${EFI_PATH}" != "" ] && [ "${ESP}" != "" ]; then
      echo "Adding Linux Firmware Updater entry" >&2
cat << EOF
menuentry 'Linux Firmware Updater' \$menuentry_id_option 'fwupd' {
EOF
      ${grub_probe:?}
      prepare_grub_to_access_device '`${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/"'
cat << EOF
	chainloader ${EFI_PATH}
}
EOF
      fi
fi

======================== nvme0n1p2/etc/grub.d/40_custom ========================

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10"{
	set root='(hd3,1)'
	search --no-floppy --fs-uuid --set B0BB-2DA6
	drivemap -s (hd0) ${root}
	chainloader +1
}

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

search.fs_uuid 47bf659a-335f-4fd1-9d14-d2fdc66aeb1a root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

search.fs_uuid 4c26c065-d62d-4568-b08a-92dc9622ff99 root hd1,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-76-generic   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-75-generic   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu 18.04.6 LTS (18.04) (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-166-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-163-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Ubuntu, with Linux 4.15.0-162-generic (on nvme0n1p2)   d4b24ad1-82ac-401e-82a2-9843bcdfd9d6
Windows Boot Manager (on sda1)   osprober-efi-520E-296B
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings   uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
Windows 10"{

========================== sdb2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=4c26c065-d62d-4568-b08a-92dc9622ff99	/	ext4	errors=remount-ro	0	1
UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0

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

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

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

           GiB - GB             File                                 Fragment(s)
 168.626033783 = 181.060825088  boot/grub/grub.cfg                             1
 102.066455841 = 109.593022464  boot/vmlinuz                                   1
 115.675830841 = 124.205977600  boot/vmlinuz-5.15.0-75-generic                 1
 102.066455841 = 109.593022464  boot/vmlinuz-5.15.0-76-generic                 1
 115.675830841 = 124.205977600  boot/vmlinuz.old                               1
  76.867652893 = 82.536013824   boot/initrd.img                                7
 110.243160248 = 118.372691968  boot/initrd.img-5.15.0-75-generic              5
  76.867652893 = 82.536013824   boot/initrd.img-5.15.0-76-generic              7
 110.243160248 = 118.372691968  boot/initrd.img.old                            5

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

-rwxr-xr-x 1 root root 18683 Apr 15  2022 10_linux
-rwxr-xr-x 1 root root 43031 Apr 15  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Apr 15  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Apr 15  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 Feb 21  2022 35_fwupd
-rwxr-xr-x 1 root root   349 Jan 24  2022 40_custom
-rwxr-xr-x 1 root root   215 Apr 15  2022 41_custom
drwxr-xr-x 4 root root  4096 Jan 24  2022 backup

=========================== sdb2/etc/grub.d/35_fwupd ===========================

#! /bin/sh
# SPDX-License-Identifier: LGPL-2.1+
set -e
[ -d ${pkgdatadir:?} ]
# shellcheck source=/dev/null
. "$pkgdatadir/grub-mkconfig_lib"
if [ -f /var/lib/fwupd/uefi_capsule.conf ] &&
   ls /sys/firmware/efi/efivars/fwupd-*-0abba7dc-e516-4167-bbf5-4d9d1c739416 1>/dev/null 2>&1; then
      . /var/lib/fwupd/uefi_capsule.conf
      if [ "${EFI_PATH}" != "" ] && [ "${ESP}" != "" ]; then
      echo "Adding Linux Firmware Updater entry" >&2
cat << EOF
menuentry 'Linux Firmware Updater' \$menuentry_id_option 'fwupd' {
EOF
      ${grub_probe:?}
      prepare_grub_to_access_device '`${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/"'
cat << EOF
	chainloader ${EFI_PATH}
}
EOF
      fi
fi

========================== sdb2/etc/grub.d/40_custom ===========================

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10"{
	set root='(hd3,1)'
	search --no-floppy --fs-uuid --set B0BB-2DA6
	drivemap -s (hd0) ${root}
	chainloader +1
}



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi of
nvme0n1p2,
using the following options:  kernel-purge nvme0n1p1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups

Blockers in case of suggested repair: __________________________________________

 Please use this software in a live-session (live-CD or live-USB). This will enable this feature.

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.2 LTS (boot) entry (nvme0n1p1/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)

New paste
Poster:

Your name (30 characters max)
Syntax:
Expiration:

Approximate and not guaranteed
Content:
© 2023 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.

    Legal info 

Go to the top of the page

a+

Hors ligne

#20 Le 12/07/2023, à 16:59

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Choix A)      Avec boot-repair
Il faut que tu ailles dans le bios et que tu le règles pour choisir de fichier de boot EFI de la clé USB au lieu du fichier de boot LEGACY ou que tu lui dises que le boot EFI  sur support USB est prioritaire

Choix B)  Avec le UBUNTU installé sur le disque dur
Faire découvrir le ubuntu du NVME

sudo update-grub 

Puis rebooter. Normalement tu dois avoir une grille  te proposant le choix.
Tu choisis le ubuntu NVME et dans ce UBUNTU NVME
je mémorise cela

blkid (filtered): ______________________________________________________________
NAME        FSTYPE   UUID                                 PARTUUID                             LABEL PARTLABEL                                                                                             
├─sda1      vfat     520E-296B                            e9b4c171-a67b-473c-844d-ca7d1b604fb6       EFI system partition                                                                                              
├─sdb1      vfat     B0BB-2DA6                            07d12838-f492-47a9-b8da-b307ccc60fdf       EFI System Partition                                                                                            
├─nvme0n1p1 vfat     72D3-CD14                            bbc2ef27-4d66-4355-ac04-7bf61f624775 ESP

Tu définiras la partition de boot EFI qui est absente avec cette commande

echo UUID=72D3-CD14	/boot/efi	vfat	defaults	0	1  | sudo tee -a /etc/fstab

puis installation du grub

sudo grub-install

et mise à jour

sudo update-grub

Dernière modification par geole (Le 12/07/2023, à 17:11)


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

#21 Le 13/07/2023, à 07:21

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Tout d'abord merci pour votre aide , ce forum est génial .
J'ai réussi a mettre le nvme dans le grub avec boot-repair mais le démarrage s’arrête après quelques lignes , juste après une ligne qui dit : failed a propos du swap mais j'avais déjà ça avant avec l'ancien dd mais lui se lançait quand même donc je ne suis pas beaucoup plus avancé .
Une idée ?

Dernière modification par Henri56 (Le 13/07/2023, à 07:22)

Hors ligne

#22 Le 13/07/2023, à 07:25

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

voici le boot info

pastebin
Paste from boot-info 13 July 2023 6:24 +0000

Syntax highlighting: bash
View raw

boot-info-4ppa200                                              [20230713_0823]

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

 => Grub2 (v1.99-2.00) is installed in the MBR of /dev/nvme0n1 and looks at 
    sector 2048 of the same hard drive for core.img, but core.img can not be 
    found at this location.
 => 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/bkpbootx64.efi /efi/BOOT/bootx64.efi 
                       /efi/BOOT/fbx64.efi /efi/BOOT/grubx64.efi 
                       /efi/BOOT/mmx64.efi /efi/ubuntu/grubx64.efi 
                       /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi 
                       /efi/ubuntu/grub.cfg

nvme0n1p2: _____________________________________________________________________

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

nvme0n1p3: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

nvme0n1p4: _____________________________________________________________________

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

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/10/11/2012: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/grubx64.efi 
                       /efi/ubuntu/fwupx64.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

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 10 or 11
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/10/11/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

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

sdb2: __________________________________________________________________________

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


================================ 3 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 22.04.2 LTS CurrentSession on sdb2
OS#2:   Ubuntu 22.04.2 LTS (boot) on nvme0n1p2
OS#3:   Windows 10 or 11 on sda3

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

CPU architecture: 64-bit
Video: GP108 [GeForce GT 1030] Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller from NVIDIA Corporation Intel Corporation
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.15.0-76-generic root=UUID=4c26c065-d62d-4568-b08a-92dc9622ff99 ro quiet splash
df -Th / : /dev/sdb2        ext4   234G     90G  132G  41% /

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

BIOS/UEFI firmware: L01 v02.65(2.65) from Hewlett-Packard
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled - SecureBoot disabled - Veuillez indiquer ce message à boot.repair@gmail.com.
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0004,0001,0002,0003,000A,000C,0005,0006,0007,0009
Boot0000* ubuntu	HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)/File(\EFI\ubuntu\grubx64.efi)
Boot0001* DTO UEFI USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000001)..BO
Boot0002* DTO UEFI USB Hard Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0200000001)..BO
Boot0003* DTO UEFI ATAPI CD-ROM Drive	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0300000001)..BO
Boot0004* Windows Boot Manager	HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,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.}...a................
Boot0005* DTO Legacy USB Floppy/CD	VenMedia(b6fef66f-1495-4584-a836-3492d1984a8d,0500000000)..BO
Boot0006* Hard Drive	BBS(HD,,0x0)..GO..NO?.........F.a.k.e. .U.s.b. .O.p.t.i.o.n.................BO..NO{.......+.S.A.T.A. . .P.M.:. .S.a.n.D.i.s.k. .S.D.7.S.B.3.Q.-.1.2.8.G.........................rN.D+..,.\...........BO..NO{.......+.S.A.T.A. . .P.M.:. .W.D.C. .W.D.3.2.0.0.B.E.K.X.-.7.5.B.7.W.........................rN.D+..,.\...........BO
Boot0007* IBA GE Slot 00C8 v1550	BBS(Network,,0x0)..BO
Boot0009* CD/DVD Drive 	BBS(CDROM,,0x0)..GO..NO{.......+.S.A.T.A. . .P.M.:. .h.p. . . . . . .D.V.D. .A. . .D.S.8.A.C.........................rN.D+..,.\...........BO
Boot000A* WDC WD3200BEKX-75B7WT0	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(3,65535,0)/HD(1,GPT,07d12838-f492-47a9-b8da-b307ccc60fdf,0x800,0x100000)..BO
Boot000C* SanDisk SD7SB3Q-128G-1006	PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,e9b4c171-a67b-473c-844d-ca7d1b604fb6,0x800,0x32000)..BO

64349b3622c65f495a99dbf6102496e3   nvme0n1p1/BOOT/bkpbootx64.efi
64349b3622c65f495a99dbf6102496e3   nvme0n1p1/BOOT/bootx64.efi
a9c517741ac31962d7feb152948ad1ee   nvme0n1p1/BOOT/fbx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   nvme0n1p1/BOOT/grubx64.efi
a660182adef313615746a665966d2ccc   nvme0n1p1/BOOT/mmx64.efi
5ddf997e8b025bfbc2009e85b32f60dc   nvme0n1p1/ubuntu/grubx64.efi
a660182adef313615746a665966d2ccc   nvme0n1p1/ubuntu/mmx64.efi
64349b3622c65f495a99dbf6102496e3   nvme0n1p1/ubuntu/shimx64.efi
ae8af199ef80311f9cee9de104a15496   nvme0n1p2/boot/bootx64.efi
1309af23db7b4cdd16bb29b41d6975e5   nvme0n1p2/microsoft/boot/cdboot.efi
ba914e4bb811a1b27220f020d2672167   nvme0n1p2/microsoft/boot/cdboot_noprompt.efi
261d615bf3021028e8026792c63f2aab   sda1/Boot/bkpbootx64.efi
64349b3622c65f495a99dbf6102496e3   sda1/Boot/bootx64.efi
5dabe049a4dad758d975dc2e60a7f00e   sda1/Boot/fbx64.efi
43ff9f5ed17495c46afef40ab5a53e42   sda1/Boot/grubx64.efi
b5698f2f88c3917bdf0c9f0f2a45d469   sda1/ubuntu/fwupx64.efi
621356d82b109cd860ad92cdf241c58b   sda1/ubuntu/grubx64.efi
f243a42f3bd3164872e792dbc2610270   sda1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda1/ubuntu/shimx64.efi
f2c9c5c28ef51a83d75db5d108b1a310   sda1/Microsoft/Boot/bootmgfw.efi
46288d3cb6a91cb97d25474930f95dfb   sda1/Microsoft/Boot/bootmgr.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sdb2	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p3	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
nvme0n1p4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
nvme0n1p2	: is-os,	64, apt-get,	signed grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sdb1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda3	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far

Partitions info (2/3): _________________________________________________________

sdb2	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
nvme0n1p3	: isnotESP,	part-has-no-fstab,	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
nvme0n1p4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
nvme0n1p2	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	bootmgr,	is-winboot
sdb1	: 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,	recovery-or-hidden,	no-bmgr,	notwinboot
sda3	: isnotESP,	part-has-no-fstab,	no-nt,	haswinload,	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): _________________________________________________________

sdb2	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
nvme0n1p3	: maybesepboot,	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
nvme0n1p4	: 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---boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	nvme0n1
sdb1	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sdb
sda4	: not--sepboot,	no---boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	no--grub.d,	sda
sda3	: 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: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 1759318E-DCB4-4B59-BC80-9427D640A84B
               Start        End   Sectors   Size Type
nvme0n1p1       2048      75775     73728    36M EFI System
nvme0n1p2  616181760 1128181759 512000000 244.1G Linux filesystem
nvme0n1p3 1128181760 1953523711 825341952 393.6G Linux filesystem
nvme0n1p4    6164480  616181759 610017280 290.9G Microsoft basic data
Partition table entries are not in disk order.
Disk sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk identifier: 9EADD9A7-A013-414B-830C-4D0883EB4760
          Start       End   Sectors   Size Type
sda1       2048    206847    204800   100M EFI System
sda2     206848    239615     32768    16M Microsoft reserved
sda3     239616 248995169 248755554 118.6G Microsoft basic data
sda4  248995840 250066943   1071104   523M Windows recovery environment
Disk sdb: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk identifier: 3CD568F6-7A3E-41CB-B31F-31797D32C9F5
        Start       End   Sectors   Size Type
sdb1     2048   1050623   1048576   512M EFI System
sdb2  1050624 500967423 499916800 238.4G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:128GB:scsi:512:4096:gpt:ATA SanDisk SD7SB3Q-:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:127GB:127GB:ntfs:Basic data partition:msftdata;
4:127GB:128GB:548MB:ntfs::hidden, diag;
sdb:320GB:scsi:512:512:gpt:ATA WDC WD3200BEKX-7:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:256GB:256GB:ext4::;
nvme0n1:1000GB:nvme:512:512:gpt:WDC WDS100T2B0C:;
1:1049kB:38.8MB:37.7MB:fat32::boot, esp;
4:3156MB:315GB:312GB:ntfs:Windows 10:hidden, msftdata;
2:315GB:578GB:262GB:ext4::;
3:578GB:1000GB:423GB:ext4::;

Free space >10MiB: ______________________________________________________________

nvme0n1: 37.0MiB:3010MiB:2973MiB
sdb: 244613MiB:305245MiB:60632MiB

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL PARTLABEL
sda                                                                                                  
├─sda1      vfat     520E-296B                            e9b4c171-a67b-473c-844d-ca7d1b604fb6       EFI system partition
├─sda2                                                    f3bdebb6-4441-4fa9-bdba-4b7111e21db4       Microsoft reserved partition
├─sda3      ntfs     8CA40F38A40F23F4                     0ddd0552-64c7-4eb2-9933-2379f6244c8a       Basic data partition
└─sda4      ntfs     567099EC7099D2DB                     4b6cd196-2431-450c-8f87-c854dd9430d5       
sdb                                                                                                  
├─sdb1      vfat     B0BB-2DA6                            07d12838-f492-47a9-b8da-b307ccc60fdf       EFI System Partition
└─sdb2      ext4     4c26c065-d62d-4568-b08a-92dc9622ff99 91000ed6-e6dc-4408-a52e-5d7574e0dad7       
nvme0n1                                                                                              
├─nvme0n1p1 vfat     72D3-CD14                            bbc2ef27-4d66-4355-ac04-7bf61f624775 ESP   
├─nvme0n1p2 ext4     3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8 7a1056d9-9070-45d8-a883-4aa49324d6d6       
├─nvme0n1p3 ext4     e4daf880-091b-4cdb-855d-1fbba1c0e3d8 dd1f9f1f-9aa3-41d5-bb4b-01dd5d73e259       
└─nvme0n1p4 ntfs     516240271FFB565D                     74dd419d-15c5-4402-a0ea-ca318f32efbf       Windows 10

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/nvme0n1p1                    26M  27% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p2                 138.2G  37% /mnt/boot-sav/nvme0n1p2
/dev/nvme0n1p3                 366.6G   0% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4                 127.7G  56% /media/henri/516240271FFB565D
/dev/sda1                       64.5M  33% /mnt/boot-sav/sda1
/dev/sda3                       61.9G  48% /media/sda3
/dev/sda4                       88.6M  83% /media/sda4
/dev/sdb2                      131.9G  38% /
/dev/sdb2[/usr/share/hunspell] 131.9G  38% /var/snap/firefox/common/host-hunspell

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1                 vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p2                 ext4            rw,relatime
/dev/nvme0n1p3                 ext4            rw,relatime
/dev/nvme0n1p4                 fuseblk         rw,nosuid,nodev,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/sda3                      fuseblk         ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sda4                      fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/sdb2                      ext4            rw,relatime,errors=remount-ro
/dev/sdb2[/usr/share/hunspell] ext4            ro,noexec,noatime,errors=remount-ro

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

search.fs_uuid 3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8 root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Ubuntu, with Linux 5.15.0-76-generic   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Windows Boot Manager (on sda1)   osprober-efi-520E-296B
Ubuntu 22.04.2 LTS (22.04) (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-76-generic (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-75-generic (on sdb2)   4c26c065-d62d-4568-b08a-92dc9622ff99
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

======================== nvme0n1p2/etc/fstab (filtered) ========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8	/	ext4	errors=remount-ro	0	1
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0
UUID=72D3-CD14  /boot/efi       vfat    defaults      0       1

==================== nvme0n1p2/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=""

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

           GiB - GB             File                                 Fragment(s)
 449.944328308 = 483.124043776  boot/grub/grub.cfg                             1
 297.607418060 = 319.553531904  boot/vmlinuz                                   2
 297.607418060 = 319.553531904  boot/vmlinuz-5.15.0-76-generic                 2
 297.607418060 = 319.553531904  boot/vmlinuz.old                               2
 317.810035706 = 341.245927424  boot/initrd.img                                5
 317.810035706 = 341.245927424  boot/initrd.img-5.15.0-76-generic              5
 317.810035706 = 341.245927424  boot/initrd.img.old                            5

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

-rwxr-xr-x 1 root root 18683 Dec 18  2022 10_linux
-rwxr-xr-x 1 root root 43031 Dec 18  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Dec 18  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Dec 18  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   214 Dec 18  2022 40_custom
-rwxr-xr-x 1 root root   215 Dec 18  2022 41_custom

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

search.fs_uuid 47bf659a-335f-4fd1-9d14-d2fdc66aeb1a root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

search.fs_uuid 4c26c065-d62d-4568-b08a-92dc9622ff99 root hd1,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu (on nvme0n1p2)   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Ubuntu, with Linux 5.15.0-76-generic (on nvme0n1p2)   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
UEFI Firmware Settings   uefi-firmware
Windows 10"{
Ubuntu 22.04.2 LTS (22.04) (on nvme0n1p2)   3d3e6bc3-e125-4b11-aadc-30d7ee24dfb8
Windows Boot Manager (on sda1)   osprober-efi-520E-296B
Ubuntu, with Linux 5.15.0-76-generic   4c26c065-d62d-4568-b08a-92dc9622ff99
Ubuntu, with Linux 5.15.0-75-generic   4c26c065-d62d-4568-b08a-92dc9622ff99

========================== sdb2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=4c26c065-d62d-4568-b08a-92dc9622ff99	/	ext4	errors=remount-ro	0	1
UUID=B0BB-2DA6	/boot/efi	vfat	defaults	0	1
UUID=516240271FFB565D	/media/henri/516240271FFB565D	ntfs-3g	defaults,nodev,nosuid,locale=fr_BE.UTF-8	0	0
UUID=8CA40F38A40F23F4	/media/sda3	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
UUID=567099EC7099D2DB	/media/sda4	ntfs-3g	defaults,locale=fr_BE.UTF-8	0	0
/swapfile	none	swap	sw	0	0

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

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

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

           GiB - GB             File                                 Fragment(s)
 168.626018524 = 181.060808704  boot/grub/grub.cfg                             1
 102.066455841 = 109.593022464  boot/vmlinuz                                   1
 115.675830841 = 124.205977600  boot/vmlinuz-5.15.0-75-generic                 1
 102.066455841 = 109.593022464  boot/vmlinuz-5.15.0-76-generic                 1
 115.675830841 = 124.205977600  boot/vmlinuz.old                               1
  76.867652893 = 82.536013824   boot/initrd.img                                7
 110.243160248 = 118.372691968  boot/initrd.img-5.15.0-75-generic              5
  76.867652893 = 82.536013824   boot/initrd.img-5.15.0-76-generic              7
 110.243160248 = 118.372691968  boot/initrd.img.old                            5

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

-rwxr-xr-x 1 root root  2884 Jul 12 19:25 10_linux_proxy
-rwxr-xr-x 1 root root 43031 Apr 15  2022 32_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 33_linux_xen
-rwxr-xr-x 1 root root  2924 Feb  6  2022 34_memtest86+
-rwxr-xr-x 1 root root   920 Jul 12 19:25 35_os-prober_proxy
-rwxr-xr-x 1 root root   169 Jul 12 19:25 40_custom_proxy
-rwxr-xr-x 1 root root   215 Apr 15  2022 41_custom
drwxr-xr-x 4 root root  4096 Jan 24  2022 backup
drwxr-xr-x 2 root root  4096 Jul 12 19:25 bin
drwxr-xr-x 2 root root  4096 Jul 12 19:25 proxifiedScripts

========================= sdb2/etc/grub.d/32_linux_zfs =========================

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2019 Canonical Ltd.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
prefix="/usr"
datarootdir="/usr/share"
ubuntu_recovery="1"
quiet_boot="1"
quick_boot="1"
gfxpayload_dynamic="1"
vt_handoff="1"
. "${pkgdatadir}/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
set -u
## Skip early if zfs utils isn't installed (instead of failing on first zpool list)
if ! `which zfs >/dev/null 2>&1`; then
    exit 0
fi
imported_pools=""
MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
machine="$(uname -m)"
case "${machine}" in
    i?86) GENKERNEL_ARCH="x86" ;;
    mips|mips64) GENKERNEL_ARCH="mips" ;;
    mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
    arm*) GENKERNEL_ARCH="arm" ;;
    *) GENKERNEL_ARCH="${machine}" ;;
esac
RC=0
on_exit() {
    # Restore initial zpool import state
    for pool in ${imported_pools}; do
        zpool export "${pool}"
    done
    mountpoint -q "${MNTDIR}"  && umount "${MNTDIR}" || true
    rmdir "${MNTDIR}"
    rm -rf "${ZFSTMP}"
    exit "${RC}"
}
trap on_exit EXIT INT QUIT ABRT PIPE TERM
# List ONLINE and DEGRADED pools
import_pools() {
    # We have to ignore zpool import output, as potentially multiple / will be available,
    # and we need to autodetect all zpools this way with their real mountpoints.
    local initial_pools="$(zpool list | awk '{if (NR>1) print $1}')"
    local all_pools=""
    local imported_pools=""
    local err=""
    set +e
    err="$(zpool import -f -a -o cachefile=none -o readonly=on -N 2>&1)"
    # Only print stderr if the command returned an error
    # (it can echo "No zpool to import" with success, which we don't want)
    if [ $? -ne 0 ]; then
        echo "Some pools couldn't be imported and will be ignored:\n${err}" >&2
    fi
    set -e
    all_pools="$(zpool list | awk '{if (NR>1) print $1}')"
    for pool in ${all_pools}; do
        if echo "${initial_pools}" | grep -wq "${pool}"; then
            continue
        fi
        imported_pools="${imported_pools} ${pool}"
    done
    echo "${imported_pools}"
}
# List all the dataset with a root mountpoint
get_root_datasets() {
    local pools="$(zpool list | awk '{if (NR>1) print $1}')"
    for p in ${pools}; do
        local rel_pool_root=$(zpool get -H altroot ${p} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root="/"
        fi
        zfs list -H -o name,canmount,mountpoint -t filesystem | grep -E '^'"${p}"'(\s|/[[:print:]]*\s)(on|noauto)\s'"${rel_pool_root}"'$' | awk '{print $1}'
    done
}
# find if given datasets can be mounted for directory and return its path (snapshot or real path)
# $1 is our current dataset name
# $2 directory path we look for (cannot contains /)
# $3 is the temporary mount directory to use
# $4 is the optional snapshot name
# return path for directory (which can be a mountpoint)
validate_system_dataset() {
    local dataset="$1"
    local directory="$2"
    local mntdir="$3"
    local snapshot_name="$4"
    local mount_path="${mntdir}/${directory}"
    if ! zfs list "${dataset}" >/dev/null 2>&1; then
        return
    fi
    if ! mount -o noatime,zfsutil -t zfs "${dataset}" "${mount_path}"; then
        grub_warn "Failed to find a valid directory '${directory}' for dataset '${dataset}@${snapshot_name}'. Ignoring"
        return
    fi
    local candidate_path="${mount_path}"
    if [ -n "${snapshot_name}" ]; then
        # WORKAROUND a bug https://github.com/zfsonlinux/zfs/issues/9958
        # Reading the content of a snapshot fails if it is not the first mount
        # for a given dataset
        first_mntdir=$(awk '{if ($1 == "'${dataset}'") {print $2; exit;}}' /proc/mounts)
        if [ "${first_mntdir}" = "/" ]; then
            # prevents // on candidate_path
            first_mntdir=""
        fi
        candidate_path="${first_mntdir}/.zfs/snapshot/${snapshot_name}"
    fi
    if [ -n "$(ls "${candidate_path}" 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    else
        mountpoint -q "${mount_path}" && umount "${mount_path}" || true
    fi
}
# Detect system directory relevant to the other, trying to find the ones associated on the current dataset or snapshot/
# System directory should be at most a direct child dataset of main datasets (no recursivity)
# We can fallback trying other zfs pools if no match has been found.
# $1 is our current dataset name (which can have @snapshot name)
# $2 directory path we look for (cannot contains /)
# $3 restrict_to_same_pool (true|false) force looking for dataset with the same basename in the current dataset pool only
# $4 is the temporary mount directory to use
# $5 is the optional etc directory (if not $2 is not etc itself)
# return path for directory (which can be a mountpoint)
get_system_directory() {
    local dataset_path="$1"
    local directory="$2"
    local restrict_to_same_pool="$3"
    local mntdir="$4"
    local etc_dir="$5"
    if [ -z "${etc_dir}" ]; then
        etc_dir="${mntdir}/etc"
    fi
    local candidate_path="${mntdir}/${directory}"
    # 1. Look for /etc/fstab first (which will mount even on top of non empty $directory)
    local mounted_fstab_entry="false"
    if [ -f "${etc_dir}/fstab" ]; then
        mount_args=$(awk '/^[^#].*[ \t]\/'"${directory}"'[ \t]/ {print "-t", $3, $1}' "${etc_dir}/fstab")
        if [ -n "${mount_args}" ]; then
            mounted_fstab_entry="true"
            mount -o noatime ${mount_args} "${candidate_path}" || mounted_fstab_entry="false"
        fi
    fi
    # If directory isn't empty. Only count if coming from /etc/fstab. Will be
    # handled below otherwise as we are interested in potential snapshots.
    if [ "${mounted_fstab_entry}" = "true" -a -n "$(ls ${candidate_path} 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2. Handle zfs case, which can be a snapshots.
    local base_dataset_path="${dataset_path}"
    local snapshot_name=""
    # For snapshots we extract the parent dataset
    if echo "${dataset_path}" | grep -q '@'; then
        base_dataset_path=$(echo "${dataset_path}" | cut -d '@' -f1)
        snapshot_name=$(echo "${dataset_path}" | cut -d '@' -f2)
    fi
    base_dataset_name="${base_dataset_path##*/}"
    base_pool="$(echo "${base_dataset_path}" | cut -d'/' -f1)"
    # 2.a) Look for child dataset included in base dataset, which needs to hold same snapshot if any
    candidate_path=$(validate_system_dataset "${base_dataset_path}/${directory}" "${directory}" "${mntdir}" "${snapshot_name}")
    if [ -n "${candidate_path}" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2.b) Look for current dataset (which is already mounted as /)
    candidate_path="${mntdir}/${directory}"
    if [ -n "${snapshot_name}" ]; then
        # WORKAROUND a bug https://github.com/zfsonlinux/zfs/issues/9958
        # Reading the content of a snapshot fails if it is not the first mount
        # for a given dataset
        first_mntdir=$(awk '{if ($1 == "'${base_dataset_path}'") {print $2; exit;}}' /proc/mounts)
        if [ "${first_mntdir}" = "/" ]; then
            # prevents // on candidate_path
            first_mntdir=""
        fi
        candidate_path="${first_mntdir}/.zfs/snapshot/${snapshot_name}/${directory}"
    fi
    if [ -n "$(ls "${candidate_path}" 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2.c) Look for every datasets in every pool which isn't the current dataset which holds:
    # - the same dataset name (last section) than our base_dataset_name
    # - mountpoint=directory
    # - canmount!=off
    all_same_base_dataset_name="$(zfs list -H -t filesystem -o name,canmount | awk '/^[^ ]+\/'"${base_dataset_name}"'[ \t](on|noauto)/ {print $1}') "
    # order by local pool datasets first
    current_pool_same_base_datasets=""
    other_pools_same_base_datasets=""
    root_pool=$(echo "${dataset_path%%/*}")
    for d in ${all_same_base_dataset_name}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        if echo "${cur_dataset_pool}" | grep -wq "${root_pool}" 2>/dev/null ; then
            current_pool_same_base_datasets="${current_pool_same_base_datasets} ${d}"
        else
            other_pools_same_base_datasets="${other_pools_same_base_datasets} ${d}"
        fi
    done
    ordered_same_base_datasets="${current_pool_same_base_datasets} ${other_pools_same_base_datasets}"
    if [ "${restrict_to_same_pool}" = "true" ]; then
        ordered_same_base_datasets="${current_pool_same_base_datasets}"
    fi
    # now, loop over them
    for d in ${ordered_same_base_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        rel_pool_root=$(zpool get -H altroot ${cur_dataset_pool} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root=""
        fi
        # check mountpoint match
        candidate_dataset=$(zfs get -H mountpoint ${d} | grep -E "mountpoint\s${rel_pool_root}/${directory}\s" | awk '{print $1}')
        if [ -z "${candidate_dataset}" ]; then
            continue
        fi
        candidate_path=$(validate_system_dataset "${candidate_dataset}" "${directory}" "${mntdir}" "${snapshot_name}")
        if [ -n "${candidate_path}" ]; then
            echo "${candidate_path}"
            return
        fi
    done
    # 2.d) If we didn't find anything yet: check for persistent datasets corresponding to our mountpoint, with canmount=on without any snapshot associated:
    # Note: we go over previous datasets as well, but this is ok, as we didn't include them before.
    all_mountable_datasets="$(zfs list -t filesystem -o name,canmount | awk  '/^[^ ]+[ \t]+on/ {print $1}')"
    # order by local pool datasets first
    current_pool_datasets=""
    other_pools_datasets=""
    root_pool=$(echo "${dataset_path%%/*}")
    for d in ${all_mountable_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        if echo "${cur_dataset_pool}" | grep -wq "${root_pool}" 2>/dev/null ; then
            current_pool_datasets="${current_pool_datasets} ${d}"
        else
            other_pools_datasets="${other_pools_datasets} ${d}"
        fi
    done
    ordered_datasets="${current_pool_datasets} ${other_pools_datasets}"
    if [ "${restrict_to_same_pool}" = "true" ]; then
        ordered_datasets="${current_pool_datasets}"
    fi
    for d in ${ordered_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        rel_pool_root=$(zpool get -H altroot ${cur_dataset_pool} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root=""
        fi
        # check mountpoint match
        candidate_dataset=$(zfs get -H mountpoint ${d} | grep -E "mountpoint\s${rel_pool_root}/${directory}\s" | awk '{print $1}')
        if [ -z "${candidate_dataset}" ]; then
            continue
        fi
        candidate_path=$(validate_system_dataset "${d}" "${directory}" "${mntdir}" "")
        if [ -n "${candidate_path}" ]; then
            echo "${candidate_path}"
            return
        fi
    done
    grub_warn "Failed to find a valid directory '${directory}' for dataset '${dataset_path}'. Ignoring"
    return
}
# Try our default layout bpool as a prefered layout (fast path)
# This is get_system_directory for boot optimized for our default installation layout
# $1 is our current dataset name (which can have @snapshot name)
# $2 is the temporary mount directory to use
# return path for directory (which can be a mountpoint) if found
try_default_layout_bpool() {
    local root_dataset_path="$1"
    local mntdir="$2"
    dataset_basename="${root_dataset_path##*/}"
    candidate_dataset="bpool/BOOT/${dataset_basename}"
    dataset_properties="$(zfs get -H mountpoint,canmount "${candidate_dataset}" 2>/dev/null | cut -f3 | paste -sd ' ')"
    if [ -z "${dataset_properties}" ]; then
        return
    fi
    rel_pool_root=$(zpool get -H altroot bpool | awk '{print $3}')
    if [ "${rel_pool_root}" = "-" ]; then
        rel_pool_root=""
    fi
    snapshot_name="${dataset_basename##*@}"
    [ "${snapshot_name}" = "${dataset_basename}" ] && snapshot_name=""
    if [ -z "${snapshot_name}" ]; then
        if ! echo "${dataset_properties}" | grep -Eq "${rel_pool_root}/boot (on|noauto)"; then
            return
        fi
    else
        candidate_dataset=$(echo "${candidate_dataset}" | cut -d '@' -f1)
    fi
    validate_system_dataset "${candidate_dataset}" "boot" "${mntdir}" "${snapshot_name}"
}
# Return if secure boot is enabled on that system
is_secure_boot_enabled() {
    if LANG=C mokutil --sb-state 2>/dev/null | grep -qi enabled; then
        echo "true"
        return
    fi
    echo "false"
    return
}
# Given a filesystem or snapshot dataset, returns dataset|machine id|pretty name|last used
# $1 is dataset we want information from
# $2 is the temporary mount directory to use
get_dataset_info() {
    local dataset="$1"
    local mntdir="$2"
    local base_dataset="${dataset}"
    local etc_dir="${mntdir}/etc"
    local is_snapshot="false"
    # For snapshot we extract the parent dataset
    if echo "${dataset}" | grep -q '@'; then
        base_dataset=$(echo "${dataset}" | cut -d '@' -f1)
        is_snapshot="true"
    fi
    mount -o noatime,zfsutil -t zfs "${base_dataset}" "${mntdir}"
    # read machine-id/os-release from /etc
    etc_dir=$(get_system_directory "${dataset}" "etc" "true" "${mntdir}" "")
    if [ -z  "${etc_dir}" ]; then
        grub_warn "Ignoring ${dataset}"
        mountpoint -q "${mntdir}/etc" && umount "${mntdir}/etc" || true
        umount "${mntdir}"
        return
    fi
    machine_id=""
    if [ -f "${etc_dir}/machine-id" ]; then
        machine_id=$(cat "${etc_dir}/machine-id")
    fi
    # We have to use a random temporary id if we don't have any machine-id file or if this one is empty
    # (mostly the case of new installations before first boot).
    # Let's use the dataset name directly for this.
    # Consequence is that all datasets are then separated.
    if [ -z "${machine_id}" ]; then
        machine_id="${dataset}"
    fi
    pretty_name=$(. "${etc_dir}/os-release" && echo "${PRETTY_NAME}")
    mountpoint -q "${mntdir}/etc" && umount "${mntdir}/etc" || true
    # read available kernels from /boot
    boot_dir="$(try_default_layout_bpool "${dataset}" "${mntdir}")"
    if [ -z "${boot_dir}" ]; then
        boot_dir=$(get_system_directory "${dataset}" "boot" "false" "${mntdir}" "${etc_dir}")
    fi
    if [ -z  "${boot_dir}" ]; then
        grub_warn "Ignoring ${dataset}"
        mountpoint -q "${mntdir}/boot" && umount "${mntdir}/boot" || true
        umount "${mntdir}"
        return
    fi
    initrd_list=""
    kernel_list=""
    candidate_kernel_list="$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')"
    while [ -n "${candidate_kernel_list}" ] ; do
        list_basename="$(echo "${candidate_kernel_list}" | sed -e 's#.*/##')"
        linux=$(version_find_latest ${list_basename})
        linux=$(echo "${candidate_kernel_list}" | while read k; do
            if [ "$(basename "${k}")" = "${linux}" ]; then
                echo -n "${k}"
                break
            fi
        done)
        # || true to not abort even if candidate_kernel_list is empty on last entry
        candidate_kernel_list="$(echo "${candidate_kernel_list}" | fgrep -vx "${linux}"||true)"
        if ! grub_file_is_not_garbage "${linux}" ; then
            continue
        fi
        # Filters entry if efi/non efi.
        # Note that for now we allow kernel without .efi.signed as those are signed kernel
        # on ubuntu, loaded by the shim.
        case "${linux}" in
            *.efi.signed)
                if [ "$(is_secure_boot_enabled)" = "false" ]; then
                    continue
                fi
            ;;
        esac
        linux_basename=$(basename "${linux}")
        linux_dirname=$(dirname "${linux}")
        version=$(echo "${linux_basename}" | sed -e "s,^[^0-9]*-,,g")
        alt_version=$(echo "${version}" | sed -e "s,\.old$,,g")
        gettext_printf "Found linux image: %s in %s\n" "${linux_basename}" "${dataset}" >&2
        initrd=""
        for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
            "initrd-${version}" "initramfs-${version}.img" \
            "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
            "initrd-${alt_version}" "initramfs-${alt_version}.img" \
            "initramfs-genkernel-${version}" \
            "initramfs-genkernel-${alt_version}" \
            "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
            "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
            if test -e "${linux_dirname}/${i}" ; then
                initrd="$i"
                break
            fi
        done
        if test -z "${initrd}" ; then
            grub_warn "Couldn't find any valid initrd for dataset ${dataset}."
            continue
        fi
        gettext_printf "Found initrd image: %s in %s\n" "${initrd}" "${dataset}" >&2
        rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
        initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
        kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
    done
    initrd_list="${initrd_list#|}"
    kernel_list="${kernel_list#|}"
    initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
    mountpoint -q "${mntdir}/boot" && umount "${mntdir}/boot" || true
    # We needed to look in / for snapshots on root dataset, umount there before zfs lazily unmount it
    case "${boot_dir}" in /boot/.zfs/snapshot/*)
        umount "${boot_dir}" || true
        ;;
    esac
    # for zsys snapshots: we want to know which kernel we successful last booted with
    last_booted_kernel=$(zfs get -H com.ubuntu.zsys:last-booted-kernel "${dataset}" | awk -v FS='\t' '{print $3}')
    # snapshot: last_used is dataset creation time
    if [ "${is_snapshot}" = "true" ]; then
        last_used="$(zfs get -pH creation "${dataset}" | awk -F '\t' '{print $3}')"
    # otherwise, last_used is manually marked at boot/shutdown on a root dataset for zsys
    else
        # if current system, take current time
        if zfs mount | awk '/[ \t]+\/$/ {print $1}' | grep -q "${dataset}"; then
            last_used=$(date +%s)
        else
            last_used=$(zfs get -H com.ubuntu.zsys:last-used "${dataset}" | awk '{print $3}')
            # case of non zsys, or zsys without annotation, take /etc/machine-id stat (as we mounted with noatime).
            # However, as systems can be relatime, if system is current mounted one, set current time (case of clone + reboot
            # within the same d).
            if [ "${last_used}" = "-" ]; then
                last_used=$(stat --printf="%X" "${mntdir}/etc/os-release")
                if [ -f "${mntdir}/etc/machine-id" ]; then
                    last_used=$(stat --printf="%X" "${mntdir}/etc/machine-id")
                fi
            fi
        fi
    fi
    is_zsys=$(zfs get -H com.ubuntu.zsys:bootfs "${base_dataset}" | awk '{print $3}')
    if [ -n "${initrd_list}" -a -n "${kernel_list}" ]; then
        echo "${dataset}\t${is_zsys}\t${machine_id}\t${pretty_name}\t${last_used}\t${initrd_device}\t${initrd_list}\t${kernel_list}\t${last_booted_kernel}"
    else
        grub_warn "didn't find any valid initrd or kernel."
    fi
    umount "${mntdir}" || true
    # We needed to look in / for snapshots on root dataset, umount the snapshot for etc before zfs lazily unmount it
    case "${etc_dir}" in /.zfs/snapshot/*/etc)
        snapshot_path="$(findmnt -n -o TARGET -T "${etc_dir}")"
        umount "${snapshot_path}" || true
        ;;
    esac
}
# Scan available boot options and returns in a formatted list
# $1 is the temporary mount directory to use
bootlist() {
    local mntdir="$1"
    local boot_list=""
    for dataset in $(get_root_datasets); do
        # get information from current root dataset
        boot_list="${boot_list}$(get_dataset_info "${dataset}" ${mntdir})\n"
        # get information from snapshots of this root dataset
        snapshots="$(zfs list -H -o name -t snapshot "${dataset}"|while read snapshot_dataset; do
            get_dataset_info "${snapshot_dataset}" ${mntdir}
        done)"
        [ -n "${snapshots}" ] && boot_list="${boot_list}${snapshots}\n"
    done
    echo "${boot_list}"
}
# Order machine ids by last_used from their main entry
get_machines_sorted() {
    local bootlist="$1"
    local machineids="$(echo "${bootlist}" | awk '{print $3}' | sort -u)"
    for machineid in ${machineids}; do
        echo "${bootlist}" | awk 'BEGIN{FS="\t"} $1 !~ /.*@.*/  {print $5, $3}' | sort -nr | grep -E "[^^]\b${machineid}\b" | head -1
    done | sort -nr | awk '{print $2}'
}
# Sort entries by last_used for a given machineid
sort_entries_for_machineid() {
    local bootlist="$1"
    local machineid="$2"
    tab="$(printf '\t')"
    echo "${bootlist}" | grep -E "[^^]\b${machineid}\b" | sort -k5,5r -k1,1 -t "${tab}"
}
# Return main entry index
get_main_entry() {
    local entries="$1"
    echo "${entries}" | awk 'BEGIN{FS="\t"} $1 !~ /.*@.*/  {print}' | head -1
}
# Return specific field at index from entry
get_field_from_entry() {
    local entry="$1"
    local index="$2"
    echo "${entry}" | awk "BEGIN{FS=\"\t\"} {print \$$index}"
}
# Get the main entry metadata
main_entry_meta() {
    local main_entry="$1"
    initrd=$(get_field_from_entry "${main_entry}" 7 | cut -d'|' -f1)
    kernel=$(get_field_from_entry "${main_entry}" 8 | cut -d'|' -f1)
    # Take first element (most recent entry) which is not a snapshot
    echo "${main_entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"} {print \$3, \$2, \"main\", \$4, \$1, \$6, \"$initrd\", \"$kernel\"}"
}
# Get advanced entries metadata
advanced_entries_meta() {
    local main_entry="$1"
    last_used_kernel="$(get_field_from_entry "${main_entry}" 9 )"
    # We must align initrds with kernels.
    # Adds initrds to the stack then pop them 1 by 1 as we process the kernels
    oldIFS="$IFS"
    export IFS='|'
    set -- $(get_field_from_entry "${main_entry}" 7)
    for kernel in $(get_field_from_entry "${main_entry}" 8); do
        # get initrd and pop to the next one
        initrd="$1"; shift
        was_last_used_kernel="false"
        kernel_basename=$(basename "${kernel}")
        if [ "${kernel_basename}" = "${last_used_kernel}" ]; then
            was_last_used_kernel="true"
        fi
        echo "${main_entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"}    {print \$3, \$2, \"advanced\", \$4, \$1, \$6, \"$initrd\", \"$kernel\", \"$was_last_used_kernel\"}"
    done
    IFS="$oldIFS"
}
# Get history metadata
history_entries_meta() {
    local entries="$1"
    local main_dataset_name="$2"
    local main_dataset_releasename="$3"
    if [ -z "${entries}" ]; then
        return
    fi
    # Traverse snapshots and clones
    echo "${entries}" | while read entry; do
        name=""
        # Compute snapshot/filesystem dataset name
        snap_dataset_name="$(get_field_from_entry "${entry}" 1)"
        snapname="${snap_dataset_name##*@}"
        # If, this is a clone, take what is after main_dataset_name
        if [ "${snapname}" = "${snap_dataset_name}" ]; then
            snapname="${snap_dataset_name##${main_dataset_name}_}"
            # Handle manual user clone (not prefixed by "main_dataset_name")
            snapname="${snapname##*/}"
        fi
        # We keep the snapname only if it is not only a zsys auto snapshot
        if echo "${snapname}" | grep -q "^autozsys_"; then
            snapname=""
        fi
        # We store the release only if it different from main dataset release (snapshot before a release upgrade)
        releasename=$(get_field_from_entry "${entry}" 4)
        if [ "${releasename}" = "${main_dataset_releasename}" ]; then
            releasename=""
        fi
        # Snapshot date
        foo="$(get_field_from_entry "${entry}" 5)"
        snapdate="$(date -d @$(get_field_from_entry "${entry}" 5) "+%x @ %H:%M")"
        # For snapshots/clones the name can have the following formats:
        # 	<DATE>: autozsys, same release
        #   <OLD_RELEASE> on <DATE>: autozsys, different release
        #   <SNAPNAME> on <DATE>: Manual snapshot, same release
        #   <SNAPNAME>, <OLD_RELEASE> on <DATE>: Manual snapshot, different release
        if [ "${snapname}" = "" -a "${releasename}" = "" ]; then
            name="${snapdate}"
        elif [ "${snapname}" = "" -a "${releasename}" != "" ]; then
            name=$(gettext_printf "%s on %s" "${releasename}" "${snapdate}")
        elif [ "${snapname}" != "" -a "${releasename}" = "" ]; then
            name=$(gettext_printf "%s on %s" "${snapname}" "${snapdate}")
        else # snapname != "" && releasename != ""
            name=$(gettext_printf "%s, %s on %s" "${snapname}" "${releasename}" "${snapdate}")
        fi
        # Choose kernel and initrd if the snapshot was booted successfully on a specific kernel before
        # Take latest by default if no match
        initrd=$(get_field_from_entry "${entry}" 7 | cut -d'|' -f1)
        kernel=$(get_field_from_entry "${entry}" 8 | cut -d'|' -f1)
        last_used_kernel="$(get_field_from_entry "${entry}" 9)"
        # We must align initrds with kernels.
        # Adds initrds to the stack then pop them 1 by 1 as we process the kernels
        oldIFS="$IFS"
        export IFS='|'
        set -- $(get_field_from_entry "${entry}" 7)
        for k in $(get_field_from_entry "${entry}" 8); do
            # get initrd and pop to the next one
            candidate_initrd="$1"; shift
            kernel_basename=$(basename -- "${k}")
            if [ "${kernel_basename}" = "${last_used_kernel}" ]; then
                kernel="${k}"
                initrd="${candidate_initrd}"
                break
            fi
        done
        IFS="$oldIFS"
        echo "${entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"}    {print \$3, \$2, \"history\", \"$name\", \$1, \$6, \"$initrd\", \"$kernel\"}"
    done
}
# Generate metadata from a BOOTLIST that will subsequently used to generate
# the final grub menu entries
generate_grub_menu_metadata() {
    local bootlist="$1"
    # Sort machineids by last_used from their main entry
    for machineid in $(get_machines_sorted "${bootlist}"); do
        entries="$(sort_entries_for_machineid "${bootlist}" ${machineid})"
        main_entry="$(get_main_entry "${entries}")"
        if [ -z "$main_entry" ]; then
            continue
        fi
        main_entry_meta "${main_entry}"
        advanced_entries_meta "${main_entry}"
        main_dataset_name="$(get_field_from_entry "${main_entry}" 1)"
        main_dataset_releasename="$(get_field_from_entry "${main_entry}" 4)"
        # grep -v errcode != 0 if there is no match. || true to not fail with -e
        other_entries="$(echo "${entries}" | grep -v "${main_entry}" || true)"
        history_entries_meta "${other_entries}" "${main_dataset_name}" "${main_dataset_releasename}"
    done
}
# Print the configuration part common to all sections
# Note:
#   If 10_linux runs these part will be defined twice in grub configuration
print_menu_prologue() {
    cat << 'EOF'
function gfxmode {
	set gfxpayload="${1}"
EOF
    if [ "${vt_handoff}" = 1 ]; then
        cat << 'EOF'
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=1
	else
		set vt_handoff=
	fi
EOF
    fi
    cat << EOF
}
EOF
    # Use ELILO's generic "efifb" when it's known to be available.
    # FIXME: We need an interface to select vesafb in case efifb can't be used.
    GRUB_GFXPAYLOAD_LINUX="${GRUB_GFXPAYLOAD_LINUX:-}"
    if [ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 0 ]; then
        echo "set linux_gfx_mode=${GRUB_GFXPAYLOAD_LINUX}"
    else
        cat << EOF
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
EOF
    fi
    cat << EOF
export linux_gfx_mode
EOF
}
# Cache for prepare_grub_to_access_device call
# $1: boot_device
# $2: submenu_level
prepare_grub_to_access_device_cached() {
    local boot_device="$1"
    local submenu_level="$2"
    local boot_device_idx="$(echo ${boot_device} | tr '/' '_')"
    cache_file="${ZFSTMP}/$(echo boot_device${boot_device_idx})"
    if [ ! -f "${cache_file}" ]; then
        set +u
        echo "$(prepare_grub_to_access_device "${boot_device}")" > "${cache_file}"
        set -u
        for i in 0 1 2; do
            submenu_indentation="$(printf %${i}s | tr " " "${grub_tab}")"
            sed "s/^/${submenu_indentation}	/" "${cache_file}" > "${cache_file}--${i}"
        done
    fi
    cat "${cache_file}--${submenu_level}"
}
# Print a grub menu entry
zfs_linux_entry () {
    submenu_level="$1"
    title="$2"
    type="$3"
    dataset="$4"
    boot_device="$5"
    initrd="$6"
    kernel="$7"
    kernel_version="$8"
    kernel_additional_args="${9:-}"
    boot_devices="${10:-}"
    submenu_indentation="$(printf %${submenu_level}s | tr " " "${grub_tab}")"
    echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
    if [ "${quick_boot}" = 1 ]; then
        echo "${submenu_indentation}	recordfail"
    fi
    if [ "${type}" != "recovery" ] ; then
        GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}
        default_entry="$(save_default_entry)"
        if [ -n "${default_entry}" ]; then
            echo "${submenu_indentation}	${default_entry}"
        fi
    fi
    # Use ELILO's generic "efifb" when it's known to be available.
    # FIXME: We need an interface to select vesafb in case efifb can't be used.
    if [ "${GRUB_GFXPAYLOAD_LINUX}" = "" ]; then
        echo "${submenu_indentation}	load_video"
    else
        if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
            echo "${submenu_indentation}	load_video"
        fi
    fi
    if ([ "${ubuntu_recovery}" = 0 ] || [ "${type}" != "recovery" ]) && \
        ([ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 1 ]); then
        echo "${submenu_indentation}	gfxmode \${linux_gfx_mode}"
    fi
    echo "${submenu_indentation}	insmod gzio"
    echo "${submenu_indentation}	if [ \"\${grub_platform}\" = xen ]; then insmod xzio; insmod lzopio; fi"
    if [ -n "$boot_devices" ]; then
        for device in ${boot_devices}; do
            echo "${submenu_indentation}	if [ "${boot_device}" = "${device}" ]; then"
            echo "$(prepare_grub_to_access_device_cached "${device}" $(( submenu_level +1 )) )"
            echo "${submenu_indentation}	fi"
        done
    else
        echo "$(prepare_grub_to_access_device_cached "${boot_device}" "${submenu_level}")"
    fi
    if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
        echo "${submenu_indentation}	echo $(gettext_printf "Loading Linux %s ..." ${kernel_version} | grub_quote)"
    fi
    linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
    if [ ${type} = "recovery" ]; then
        linux_default_args="${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
    fi
    # echo in echo trims end of line spaces
    echo "${submenu_indentation}	linux	\"${kernel}\" root=ZFS=\"${dataset}\" ro $(echo ${linux_default_args} ${kernel_additional_args})"
    if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
        echo "${submenu_indentation}	echo '$(gettext_printf "Loading initial ramdisk ..." | grub_quote)'"
    fi
    echo "${submenu_indentation}	initrd	\"${initrd}\""
    echo "${submenu_indentation}}"
}
# Generate a GRUB Menu from menu meta data
# $1 menu metadata
generate_grub_menu() {
    local menu_metadata="$1"
    local last_section=""
    local main_dataset_name=""
    local main_dataset=""
    local have_zsys=""
    if [ -z "${menu_metadata}" ]; then
        return
    fi
    CLASS="--class gnu-linux --class gnu --class os"
    if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then
        OS=GNU/Linux
    else
        case ${GRUB_DISTRIBUTOR} in
            Ubuntu|Kubuntu)
            OS="${GRUB_DISTRIBUTOR}"
            ;;
            *)
            OS="${GRUB_DISTRIBUTOR} GNU/Linux"
            ;;
        esac
        CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1 | LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
    fi
    if [ -x /lib/recovery-mode/recovery-menu ]; then
        GRUB_CMDLINE_LINUX_RECOVERY=recovery
    else
        GRUB_CMDLINE_LINUX_RECOVERY=single
    fi
    if [ "${ubuntu_recovery}" = 1 ]; then
        GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
    fi
    case "$GENKERNEL_ARCH" in
        x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
    esac
    if [ "${vt_handoff}" = 1 ]; then
        for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
            if [ "${word}" = splash ]; then
                GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} \${vt_handoff}"
            fi
        done
    fi
    print_menu_prologue
    cat<<'EOF'
function zsyshistorymenu {
	# $1: root dataset (eg rpool/ROOT/ubuntu_2zhm07@autozsys_k56fr6)
	# $2: boot device id (eg 411f29ce1557bfed)
	# $3: initrd (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/initrd.img-5.4.0-21-generic)
	# $4: kernel (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/vmlinuz-5.4.0-21-generic)
	# $5: kernel_version (eg 5.4.0-21-generic)
	set root_dataset="${1}"
	set boot_device="${2}"
	set initrd="${3}"
	set kernel="${4}"
	set kversion="${5}"
EOF
    boot_devices=$(echo "${menu_metadata}" | cut -d"$(printf '\t')" -f6 | sort -u)
    title=$(gettext_printf "Revert system only")
    zfs_linux_entry 1 "${title}" "simple" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' '' "${boot_devices}"
    title="$(gettext_printf "Revert system and user data")"
    zfs_linux_entry 1 "${title}" "simple" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' 'zsys-revert=userdata' "${boot_devices}"
    GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
    if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
        title="$(gettext_printf "Revert system only (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
        zfs_linux_entry 1 "${title}" "recovery" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' '' "${boot_devices}"
        title="$(gettext_printf "Revert system and user data (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
        zfs_linux_entry 1 "${title}" "recovery" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' 'zsys-revert=userdata' "${boot_devices}"
    fi
echo "}"
echo
    # IFS is set to TAB (ASCII 0x09)
    echo "${menu_metadata}" |
    {
        at_least_one_entry=0
        have_zsys="$(which zsysd || true)"
        while IFS="$(printf '\t')" read -r machineid iszsys section name dataset device initrd kernel opt; do
            # Disable history for non zsys system or if systems is a zsys one and zsys isn't installed.
            # In pure zfs systems, we identified multiple issues due to the mount generator
            # in upstream zfs which makes it incompatible. Don't show history for now.
            if [ "${section}" = "history" ]; then
                if [ "${iszsys}" != "yes" ] || [ "${iszsys}" = "yes" -a -z "${have_zsys}" ]; then
                    continue
                fi
            fi
            if [ "${last_section}" != "${section}" -a -n "${last_section}" ]; then
                # Close previous section wrapper
                if [ "${last_section}" != "main" ]; then
                    echo "}"    # Add grub_tabs
                    at_least_one_entry=0
                fi
            fi
            case "${section}" in
                main)
                    title="${name}"
                    main_dataset_name="${name}"
                    main_dataset="${dataset}"
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    zfs_linux_entry 0 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    at_least_one_entry=1
                ;;
                advanced)
                    # normal and recovery entries for a given kernel
                    if [ "${last_section}" != "${section}" ]; then
                        echo "submenu '$(gettext_printf "Advanced options for %s" "${main_dataset_name}" | grub_quote)' \${menuentry_id_option} 'gnulinux-advanced-${main_dataset}' {"
                    fi
                    last_booted_kernel_marker=""
                    if [ "${opt}" = "true" ]; then
                        last_booted_kernel_marker="* "
                    fi
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"
                    zfs_linux_entry 1 "${title}" "advanced" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}
                    if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
                        title="$(gettext_printf "%s%s, with Linux %s (%s)" "${last_booted_kernel_marker}" "${name}" "${kernel_version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
                        zfs_linux_entry 1 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    fi
                    at_least_one_entry=1
                ;;
                history)
                    # Revert to a snapshot
                    # revert system, revert system and user data and associated recovery entries
                    if [ "${last_section}" != "${section}" ]; then
                        echo "submenu '$(gettext_printf "History for %s" "${main_dataset_name}" | grub_quote)' \${menuentry_id_option} 'gnulinux-history-${main_dataset}' {"
                    fi
                    if [ "${iszsys}" = "yes" ]; then
                        title="$(gettext_printf "Revert to %s" "${name}" | grub_quote)"
                    else
                        title="$(gettext_printf "Boot on %s" "${name}" | grub_quote)"
                    fi
                    echo "	submenu '${title}' \${menuentry_id_option} 'gnulinux-history-${dataset}' {"
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    # Zsys only: let revert system without destroying snapshots
                    if [ "${iszsys}" = "yes" ]; then
                        echo "${grub_tab}${grub_tab}zsyshistorymenu" \"${dataset}\" \"${device}\" \"${initrd}\" \"${kernel}\" \"${kernel_version}\"
                    # Non-zsys: boot temporarly on snapshots or rollback (destroying intermediate snapshots)
                    else
                        title="$(gettext_printf "One time boot")"
                        zfs_linux_entry 2 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                        GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
                        if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
                            title="$(gettext_printf "One time boot (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
                            zfs_linux_entry 2 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                        fi
                        title="$(gettext_printf "Revert system (all intermediate snapshots will be destroyed)")"
                        zfs_linux_entry 2 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}" "rollback=yes"
                    fi
                    echo "	}"
                    at_least_one_entry=1
                ;;
                *)
                    grub_warn "unknown section: ${section}. Ignoring entry ${name} for ${dataset}"
                ;;
            esac
            last_section="${section}"
        done
        if [ "${at_least_one_entry}" -eq 1 ]; then
            echo "}"
        fi
    }
}
# don't add trailing newline of variable is empty
# $1: content to write
# $2: destination file
trailing_newline_if_not_empty() {
    content="$1"
    dest="$2"
    if [ -z "${content}" ]; then
        rm -f "${dest}"
        touch "${dest}"
        return
    fi
    echo "${content}" > "${dest}"
}
GRUB_LINUX_ZFS_TEST="${GRUB_LINUX_ZFS_TEST:-}"
case "${GRUB_LINUX_ZFS_TEST}" in
    bootlist)
        # Import all available pools on the system and return imported list
        imported_pools=$(import_pools)
        boot_list="$(bootlist ${MNTDIR})"
        trailing_newline_if_not_empty "${boot_list}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    metamenu)
        boot_list="$(cat ${GRUB_LINUX_ZFS_TEST_INPUT})"
        menu_metadata="$(generate_grub_menu_metadata "${boot_list}")"
        trailing_newline_if_not_empty "${menu_metadata}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    grubmenu)
        menu_metadata="$(cat ${GRUB_LINUX_ZFS_TEST_INPUT})"
        grub_menu=$(generate_grub_menu "${menu_metadata}")
        trailing_newline_if_not_empty "${grub_menu}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    *)
        # Import all available pools on the system and return imported list
        imported_pools=$(import_pools)
        # Generate the complete list of boot entries
        boot_list="$(bootlist ${MNTDIR})"
        # Create boot menu meta data from the list of boot entries
        menu_metadata="$(generate_grub_menu_metadata "${boot_list}")"
        # Create boot menu meta data from the list of boot entries
        grub_menu="$(generate_grub_menu "${menu_metadata}")"
        if [ -n "${grub_menu}" ]; then
            # We want the trailing newline as a marker will be added
            echo "${grub_menu}"
        fi
    ;;
esac

========================= sdb2/etc/grub.d/33_linux_xen =========================

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
. "$pkgdatadir/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os --class xen"
SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    # We can't cope with devices loop-mounted from files here.
    case ${GRUB_DEVICE} in
      /dev/*) ;;
      *) exit 0 ;;
    esac
  ;;
esac
# Default to disabling partition uuid support to maintian compatibility with
# older kernels.
GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true}
# btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
# and mounting btrfs requires user space scanning, so force UUID in this case.
if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] ) \
    || ( [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
	&& [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ] ) \
    || ( ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
	&& ! test -e "/dev/disk/by-partuuid/${GRUB_DEVICE_PARTUUID}" ) \
    || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \
    || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ]; then
  LINUX_ROOT_DEVICE=PARTUUID=${GRUB_DEVICE_PARTUUID}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
  GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
fi
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
  GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
fi
case x"$GRUB_FS" in
    xbtrfs)
	rootsubvol="`make_system_path_relative_to_its_root /`"
	rootsubvol="${rootsubvol#/}"
	if [ "x${rootsubvol}" != x ]; then
	    GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
	fi;;
    xzfs)
	rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
	bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
	LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
	;;
esac
title_correction_code=
linux_entry ()
{
  linux_entry_xsm "$@" false
  linux_entry_xsm "$@" true
}
linux_entry_xsm ()
{
  os="$1"
  version="$2"
  xen_version="$3"
  type="$4"
  args="$5"
  xen_args="$6"
  xsm="$7"
  # If user wants to enable XSM support, make sure there's
  # corresponding policy file.
  if ${xsm} ; then
      xenpolicy="xenpolicy-$xen_version"
      if test ! -e "${xen_dirname}/${xenpolicy}" ; then
	  return
      fi
      xen_args="$xen_args flask=enforcing"
      xen_version="$(gettext_printf "%s (XSM enabled)" "$xen_version")"
      # xen_version is used for messages only; actual file is xen_basename
  fi
  if [ -z "$boot_device_id" ]; then
      boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
  fi
  if [ x$type != xsimple ] ; then
      if [ x$type = xrecovery ] ; then
	  title="$(gettext_printf "%s, with Xen %s and Linux %s (%s)" "${os}" "${xen_version}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
      elif [ "${type#init-}" != "$type" ] ; then
	  title="$(gettext_printf "%s, with Xen %s and Linux %s (%s)" "${os}" "${xen_version}" "${version}" "${type#init-}")"
      else
	  title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")"
      fi
      replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
      if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
         quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
         title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
         grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
      fi
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  else
      title="$(gettext_printf "%s, with Xen hypervisor" "${os}")"
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  fi
  if [ x$type != xrecovery ] ; then
      save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
  fi
  if [ -z "${prepare_boot_cache}" ]; then
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
  fi
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
  xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
  lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
  sed "s/^/$submenu_indentation/" << EOF
	echo	'$(echo "$xmessage" | grub_quote)'
        if [ "\$grub_platform" = "pc" -o "\$grub_platform" = "" ]; then
            xen_rm_opts=
        else
            xen_rm_opts="no-real-mode edd=off"
        fi
	${xen_loader}	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
	echo	'$(echo "$lmessage" | grub_quote)'
	${module_loader}	${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
  if test -n "${initrd}" ; then
    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
    message="$(gettext_printf "Loading initial ramdisk ...")"
    initrd_path=
    for i in ${initrd}; do
       initrd_path="${rel_dirname}/${i}"
       sed "s/^/$submenu_indentation/" << EOF
	echo	'$(echo "$message" | grub_quote)'
	${module_loader}	--nounzip   $(echo $initrd_path)
EOF
    done
  fi
  if ${xsm} && test -n "${xenpolicy}" ; then
    message="$(gettext_printf "Loading XSM policy ...")"
    sed "s/^/$submenu_indentation/" << EOF
	echo	'$(echo "$message" | grub_quote)'
	${module_loader}     ${rel_dirname}/${xenpolicy}
EOF
  fi
  sed "s/^/$submenu_indentation/" << EOF
}
EOF
}
linux_list=
for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
    if grub_file_is_not_garbage "$i"; then
    	basename=$(basename $i)
	version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
	dirname=$(dirname $i)
	config=
	for j in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
	    if test -e "${j}" ; then
		config="${j}"
		break
	    fi
	done
        if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then linux_list="$linux_list $i" ; fi
    fi
done
if [ "x${linux_list}" = "x" ] ; then
    exit 0
fi
file_is_not_xen_garbage () {
    case "$1" in
	*/xen-syms-*)
	    return 1;;
	*/xenpolicy-*)
	    return 1;;
	*/*.config)
	    return 1;;
	*)
	    return 0;;
    esac
}
xen_list=
for i in /boot/xen*; do
    if grub_file_is_not_garbage "$i" && file_is_not_xen_garbage "$i" ; then xen_list="$xen_list $i" ; fi
done
prepare_boot_cache=
boot_device_id=
title_correction_code=
machine=`uname -m`
case "$machine" in
    i?86) GENKERNEL_ARCH="x86" ;;
    mips|mips64) GENKERNEL_ARCH="mips" ;;
    mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
    arm*) GENKERNEL_ARCH="arm" ;;
    *) GENKERNEL_ARCH="$machine" ;;
esac
# Extra indentation to add to menu entries in a submenu. We're not in a submenu
# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
submenu_indentation=""
is_top_level=true
while [ "x${xen_list}" != "x" ] ; do
    list="${linux_list}"
    current_xen=`version_find_latest $xen_list`
    xen_basename=`basename ${current_xen}`
    xen_dirname=`dirname ${current_xen}`
    rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname`
    xen_version=`echo $xen_basename | sed -e "s,.gz$,,g;s,^xen-,,g"`
    if [ -z "$boot_device_id" ]; then
	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
    fi
    if [ "x$is_top_level" != xtrue ]; then
	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
    fi
    if ($grub_file --is-arm64-efi $current_xen); then
	xen_loader="xen_hypervisor"
	module_loader="xen_module"
    else
	if ($grub_file --is-x86-multiboot2 $current_xen); then
	    xen_loader="multiboot2"
	    module_loader="module2"
	else
	    xen_loader="multiboot"
	    module_loader="module"
        fi
    fi
    initrd_early=
    for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
             ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
       if test -e "${xen_dirname}/${i}" ; then
          initrd_early="${initrd_early} ${i}"
       fi
    done
    while [ "x$list" != "x" ] ; do
	linux=`version_find_latest $list`
	gettext_printf "Found linux image: %s\n" "$linux" >&2
	basename=`basename $linux`
	dirname=`dirname $linux`
	rel_dirname=`make_system_path_relative_to_its_root $dirname`
	version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
	alt_version=`echo $version | sed -e "s,\.old$,,g"`
	linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
	initrd_real=
	for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
	   "initrd-${version}" "initramfs-${version}.img" \
	   "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
	   "initrd-${alt_version}" "initramfs-${alt_version}.img" \
	   "initramfs-genkernel-${version}" \
	   "initramfs-genkernel-${alt_version}" \
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" ; do
	    if test -e "${dirname}/${i}" ; then
		initrd_real="$i"
		break
	    fi
	done
	initrd=
	if test -n "${initrd_early}" || test -n "${initrd_real}"; then
	    # Xen assumes the real initrd is the first module after the kernel.
	    # Additional (later) initrds can also be used for microcode update,
	    # with Xen option 'ucode=<scan|module number> (non-default anyway).
	    initrd="${initrd_real} ${initrd_early}"
	    initrd_display=
	    for i in ${initrd}; do
		initrd_display="${initrd_display} ${dirname}/${i}"
	    done
	    gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
	fi
	if test -z "${initrd_real}"; then
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
	    if [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] \
		|| [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ]; then
		linux_root_device_thisversion=${GRUB_DEVICE}
	    else
		linux_root_device_thisversion=PARTUUID=${GRUB_DEVICE_PARTUUID}
	    fi
	fi
	# The GRUB_DISABLE_SUBMENU option used to be different than others since it was
	# mentioned in the documentation that has to be set to 'y' instead of 'true' to
	# enable it. This caused a lot of confusion to users that set the option to 'y',
	# 'yes' or 'true'. This was fixed but all of these values must be supported now.
	if [ "x${GRUB_DISABLE_SUBMENU}" = xyes ] || [ "x${GRUB_DISABLE_SUBMENU}" = xy ]; then
	    GRUB_DISABLE_SUBMENU="true"
	fi
	if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
	    linux_entry "${OS}" "${version}" "${xen_version}" simple \
		"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
	    submenu_indentation="$grub_tab$grub_tab"
    
	    if [ -z "$boot_device_id" ]; then
		boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
	    fi
            # TRANSLATORS: %s is replaced with an OS name
	    echo "submenu '$(gettext_printf "Advanced options for %s (with Xen hypervisor)" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
	   is_top_level=false
	fi
	linux_entry "${OS}" "${version}" "${xen_version}" advanced \
	    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
	for supported_init in ${SUPPORTED_INITS}; do
	    init_path="${supported_init#*:}"
	    if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink -f "${init_path}")" ]; then
		linux_entry "${OS}" "${version}" "${xen_version}" "init-${supported_init%%:*}" \
		    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
	    fi
	done
	if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
	    linux_entry "${OS}" "${version}" "${xen_version}" recovery \
		"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
	fi
	list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
    done
    if [ x"$is_top_level" != xtrue ]; then
	echo '	}'
    fi
    xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
done
# If at least one kernel was found, then we need to
# add a closing '}' for the submenu command.
if [ x"$is_top_level" != xtrue ]; then
  echo '}'
fi
echo "$title_correction_code"

====================== sdb2/etc/grub.d/35_os-prober_proxy ======================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "-'Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'~a66d0cf0861c08121624955bd9ac165c~
-'Windows Boot Manager (on /dev/sda1)'~cbd93295488d2da2d28d9226c7b4a0d3~
+*
+#text
-'SUBMENU' as 'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'{-'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'/*, -'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'/'Ubuntu (on /dev/nvme0n1p2)'~b4c446663ff43ed4c8e2f7302ca39b82~, -'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'/'Ubuntu, with Linux 5.15.0-76-generic (on /dev/nvme0n1p2)'~b4c446663ff43ed4c8e2f7302ca39b82~, -'Advanced options for Ubuntu 22.04.2 LTS (22.04) (on /dev/nvme0n1p2)'/'Ubuntu, with Linux 5.15.0-76-generic (recovery mode) (on /dev/nvme0n1p2)'~db3bc62eaffed18d35d86233e725fd0c~}
"

======================= sdb2/etc/grub.d/40_custom_proxy ========================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "-*
-'Windows 10'~3c49191edc943481040fef1073cb5e80~
+#text
"



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi of
nvme0n1p2,
using the following options:  kernel-purge nvme0n1p1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups

Blockers in case of suggested repair: __________________________________________

 Please use this software in a live-session (live-CD or live-USB). This will enable this feature.

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.2 LTS (boot) entry (nvme0n1p1/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)

New paste
Poster:

Your name (30 characters max)
Syntax:
Expiration:

Approximate and not guaranteed
Content:
© 2023 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.

    Legal info 

Go to the top of the page

Hors ligne

#23 Le 13/07/2023, à 07:51

iznobe

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

juste après une ligne qui dit : failed a propos du swap

c' est toujours aussi clair ...

plutot que de recopier l' erreur exacte ( ou prendre une photo , ou les 2 meme ) et nous la donner bien propre pour qu ' on puisse te repondre de façon certaine et rapide .

Dernière modification par iznobe (Le 13/07/2023, à 07:52)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#24 Le 13/07/2023, à 08:19

Henri56

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

désolé de ne pas etre tres clair , voici une photo ou le démarrage sue le nvme s'arrete :
https://www.cjoint.com/c/MGnhttNzCge

Dernière modification par Henri56 (Le 13/07/2023, à 08:20)

Hors ligne

#25 Le 13/07/2023, à 08:42

geole

Re : transférer ubuntu 22.04 d'un ancien dd vers ssd (résolu)

Bonjour
lorsque ton ordinateur plante, tu appuies sur la touche entrée pour avoir la main puis tu vas modifier le fichier /etc/fstab

nano /etc/fstab

Tu te positionnes sur cette ligne

/swapfile	none	swap	sw	0	0

et tu la modifies pour qu'elle devienne

#/swapfile	none	swap	sw	0	0

et tu rebootes, cela devrait marcher.

Lorsque cela aura booté, afin de faire le point, tu donnes

LANG=C free -h
ls -ls / | grep -v drwx

Ajout

 cat /etc/initramfs-tools/conf.d/resume

Dernière modification par geole (Le 13/07/2023, à 09:10)


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