Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boot-repair-4ppa2072 [20231222_2344]
- ============================= Boot Repair Summary ==============================
- modprobe: FATAL: Module efivars not found in directory /lib/modules/6.2.0-1009-lowlatency
- Recommended repair: ____________________________________________________________
- The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
- mmcblk0p1,
- using the following options: nvme0n1p1/boot/efi
- Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups
- rm /mnt/boot-sav/nvme0n1p1/efi/Boot/bootx64.efi
- mv /mnt/boot-sav/nvme0n1p1/efi/Boot/bkpbootx64.efi /mnt/boot-sav/nvme0n1p1/efi/Boot/bootx64.efi
- Mount /dev/nvme0n1p1 on /mnt/boot-sav/mmcblk0p1/boot/efi
- Fixed file rights of /mnt/boot-sav/mmcblk0p1/etc/grub.d/10_linux
- ============ Reinstall the grub-efi-amd64-signed of /dev/mmcblk0p1 =============
- chroot /mnt/boot-sav/mmcblk0p1 grub-install --version
- grub-install (GRUB) 2.06-2ubuntu7.2
- modprobe: FATAL: Module efivars not found in directory /lib/modules/6.2.0-1009-lowlatency
- chroot /mnt/boot-sav/mmcblk0p1 modprobe efivars
- chroot /mnt/boot-sav/mmcblk0p1 efibootmgr -v before grub install
- EFI variables are not supported on this system.
- chroot /mnt/boot-sav/mmcblk0p1 uname -r
- 6.2.0-1009-lowlatency
- chroot /mnt/boot-sav/mmcblk0p1 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
- Installing for x86_64-efi platform.
- grub-install: warning: EFI variables cannot be set on this system.
- grub-install: warning: You will have to complete the GRUB setup manually.
- Installation finished. No error reported.
- df /dev/nvme0n1p1
- mv /mnt/boot-sav/mmcblk0p1/boot/efi/EFI/Boot/bootx64.efi /mnt/boot-sav/mmcblk0p1/boot/efi/EFI/Boot/bkpbootx64.efi
- cp /mnt/boot-sav/mmcblk0p1/boot/efi/efi/ubuntu/shimx64.efi /mnt/boot-sav/mmcblk0p1/boot/efi/EFI/Boot/bootx64.efi
- chroot /mnt/boot-sav/mmcblk0p1 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
- Installing for x86_64-efi platform.
- grub-install: warning: EFI variables cannot be set on this system.
- grub-install: warning: You will have to complete the GRUB setup manually.
- Installation finished. No error reported.
- chroot /mnt/boot-sav/mmcblk0p1 efibootmgr -v after grub install
- EFI variables are not supported on this system.
- Warning: NVram is locked (Ubuntu not found in efibootmgr).
- chroot /mnt/boot-sav/mmcblk0p1 update-grub
- Sourcing file `/etc/default/grub'
- Sourcing file `/etc/default/grub.d/init-select.cfg'
- Found linux image: /boot/vmlinuz-6.2.0-1009-lowlatency
- Found initrd image: /boot/initrd.img-6.2.0-1009-lowlatency
- Found linux image: /boot/vmlinuz-6.2.0-1009-lowlatency
- Found initrd image: /boot/initrd.img-6.2.0-1009-lowlatency
- Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
- Unhide GRUB boot menu in mmcblk0p1/boot/grub/grub.cfg
- Boot successfully repaired.
- Locked-NVram detected. Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.3 LTS entry (nvme0n1p1/efi/ubuntu/shimx64.efi file) !
- Please disable SecureBoot in the BIOS. Then try again.
- ============================ Boot Info After Repair ============================
- => No boot loader is installed in the MBR of /dev/mmcblk0.
- => No boot loader is installed in the MBR of /dev/nvme0n1.
- mmcblk0p1: _____________________________________________________________________
- File system: ext4
- Boot sector type: -
- Boot sector info:
- Operating System: Ubuntu 22.04.3 LTS
- Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
- 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/HP/diw.efi
- /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi
- /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg
- /efi/HP/BIOSUpdate/BiosMgmt.efi
- /efi/HP/BIOSUpdate/BiosMgmt32.efi
- /efi/HP/BIOSUpdate/CryptRSA.efi
- /efi/HP/BIOSUpdate/CryptRSA32.efi
- /efi/HP/BIOSUpdate/HpBiosMgmt.efi
- /efi/HP/BIOSUpdate/HpBiosUpdate.efi
- /efi/HP/BIOSUpdate/HpBiosUpdate32.efi
- /efi/HP/DEVFW/HpDevFwUpdate.efi
- /efi/HP/SystemDiags/CryptRSA.efi
- /efi/HP/SystemDiags/SysDiags.efi
- /efi/HP/SystemDiags/diw.efi
- /efi/Microsoft/Boot/bootmgfw.efi
- /efi/Microsoft/Boot/bootmgr.efi
- /efi/Microsoft/Boot/cbmr_driver.efi
- nvme0n1p2: _____________________________________________________________________
- File system:
- Boot sector type: -
- Boot sector info:
- nvme0n1p3: _____________________________________________________________________
- File system: ntfs
- Boot sector type: NTFS
- Boot sector info: No errors found in the Boot Parameter Block.
- Operating System: Windows 8 or 10
- Boot files: /Windows/System32/winload.exe
- nvme0n1p4: _____________________________________________________________________
- File system: ntfs
- Boot sector type: NTFS
- Boot sector info: No errors found in the Boot Parameter Block.
- Operating System:
- Boot files:
- nvme0n1p5: _____________________________________________________________________
- File system: ntfs
- Boot sector type: NTFS
- Boot sector info: No errors found in the Boot Parameter Block.
- Operating System:
- Boot files:
- sda: ___________________________________________________________________________
- File system: iso9660
- Boot sector type: Grub2 (v1.99-2.00)
- Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of
- sda and looks at sector 0 of the same hard drive for
- core.img, but core.img can not be found at this
- location.
- Mounting failed: mount: /mnt/BootInfo/FD/sda: /dev/sda already mounted or mount point busy.
- ================================ 2 OS detected =================================
- OS#1: Ubuntu 22.04.3 LTS on mmcblk0p1
- OS#2: Windows 8 or 10 on nvme0n1p3
- ================================ Host/Hardware =================================
- CPU architecture: 64-bit
- Video: TU106M [GeForce RTX 2060 Mobile] CometLake-H GT2 [UHD Graphics] from NVIDIA Corporation Intel Corporation
- Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.3 LTS, jammy, x86_64)
- ===================================== UEFI =====================================
- BIOS/UEFI firmware: F.15(15.15) from AMI
- The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
- SecureBoot enabled according to mokutil - Please report this message to [email protected].
- BootCurrent: 0003
- Timeout: 0 seconds
- BootOrder: 0001,0000,0002,0003
- Boot0000* Windows Boot Manager HD(1,GPT,e504916e-f935-4c21-a31d-530627287196,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
- Boot0001* ubuntu HD(1,GPT,e504916e-f935-4c21-a31d-530627287196,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
- Boot0002* Solid State Disk PciRoot(0x0)/Pci(0x1b,0x4)/Pci(0x0,0x0)/NVMe(0x1,8C-E3-8E-10-00-01-14-23)/HD(1,GPT,e504916e-f935-4c21-a31d-530627287196,0x800,0x82000)..BO
- Boot0003* USB Drive (UEFI) - KingstonDataTraveler 3.0PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(18,0)/HD(2,GPT,abe6d9c1-d820-473f-9624-5e7897c4c498,0x938b58,0x2754)..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
- 5ca6d3a1fb1b9e901eab7bfab6b56a51 nvme0n1p1/HP/diw.efi
- 5ddf997e8b025bfbc2009e85b32f60dc nvme0n1p1/ubuntu/grubx64.efi
- a660182adef313615746a665966d2ccc nvme0n1p1/ubuntu/mmx64.efi
- 64349b3622c65f495a99dbf6102496e3 nvme0n1p1/ubuntu/shimx64.efi
- 09a4d4a2f9d161cf7a23755439eed58d nvme0n1p1/HP/BIOSUpdate/BiosMgmt.efi
- 2c00d2225d10820a2b8fe32bd9dccbc7 nvme0n1p1/HP/BIOSUpdate/BiosMgmt32.efi
- 6488d391f74263c9da3c3d47dffa6212 nvme0n1p1/HP/BIOSUpdate/CryptRSA.efi
- 1b8c0684ede8539ccc205cf7a750eca3 nvme0n1p1/HP/BIOSUpdate/CryptRSA32.efi
- f1da416271b4843f519102cb1e0bc46e nvme0n1p1/HP/BIOSUpdate/HpBiosMgmt.efi
- 165f37486045a66fde96743e1f5780c6 nvme0n1p1/HP/BIOSUpdate/HpBiosUpdate.efi
- 57df6fc43cef8f70afbc26411d58f6c7 nvme0n1p1/HP/BIOSUpdate/HpBiosUpdate32.efi
- 101800493c8f023569daf037091918bd nvme0n1p1/HP/DEVFW/HpDevFwUpdate.efi
- 6488d391f74263c9da3c3d47dffa6212 nvme0n1p1/HP/SystemDiags/CryptRSA.efi
- fa736d565a3289fa5b2e2c57f494465a nvme0n1p1/HP/SystemDiags/SysDiags.efi
- 5ca6d3a1fb1b9e901eab7bfab6b56a51 nvme0n1p1/HP/SystemDiags/diw.efi
- 2a3bd52fec672a1f1364ca9b41553f4d nvme0n1p1/Microsoft/Boot/bootmgfw.efi
- 219a45fc0b91c22521a72dffdcbac5d4 nvme0n1p1/Microsoft/Boot/bootmgr.efi
- b8796e68099026aabcebb8fcf75b21f6 nvme0n1p1/Microsoft/Boot/cbmr_driver.efi
- ============================= Drive/Partition Info =============================
- Disks info: ____________________________________________________________________
- mmcblk0 : notGPT, no-BIOSboot, has-noESP, not-usb, mmc-disk, has-os, no-wind, 2048 sectors * 512 bytes
- nvme0n1 : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, has-win, 2048 sectors * 512 bytes
- Partitions info (1/3): _________________________________________________________
- mmcblk0p1 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, end-after-100GB
- nvme0n1p1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
- nvme0n1p3 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB
- nvme0n1p4 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB
- nvme0n1p5 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB
- Partitions info (2/3): _________________________________________________________
- mmcblk0p1 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
- nvme0n1p1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
- nvme0n1p3 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot
- nvme0n1p4 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
- nvme0n1p5 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
- Partitions info (3/3): _________________________________________________________
- mmcblk0p1 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, mmcblk0
- nvme0n1p1 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1
- nvme0n1p3 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1
- nvme0n1p4 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1
- nvme0n1p5 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, nvme0n1
- fdisk -l (filtered): ___________________________________________________________
- Disk nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
- Disk identifier: 87647F50-C6F9-4DF6-AE16-01779D7681F8
- Start End Sectors Size Type
- nvme0n1p1 2048 534527 532480 260M EFI System
- nvme0n1p2 534528 567295 32768 16M Microsoft reserved
- nvme0n1p3 567296 1996898303 1996331008 951.9G Microsoft basic data
- nvme0n1p4 1996898304 1999265791 2367488 1.1G Windows recovery environment
- nvme0n1p5 1999271936 2000396287 1124352 549M Windows recovery environment
- Disk mmcblk0: 116.48 GiB, 125069950976 bytes, 244277248 sectors
- Disk identifier: 0xd82c6cba
- Boot Start End Sectors Size Id Type
- mmcblk0p1 32768 244277247 244244480 116.5G 83 Linux
- Disk sda: 7.22 GiB, 7751073792 bytes, 15138816 sectors
- Disk identifier: ABE6D9C1-D820-473F-9626-5E7897C4C498
- Start End Sectors Size Type
- sda1 64 9669463 9669400 4.6G Microsoft basic data
- sda2 9669464 9679531 10068 4.9M EFI System
- sda3 9679532 9680131 600 300K Microsoft basic data
- sda4 9682944 15138752 5455809 2.6G Linux filesystem
- parted -lm (filtered): _________________________________________________________
- sda:7751MB:scsi:512:512:gpt:Kingston DataTraveler 3.0:;
- 1:32.8kB:4951MB:4951MB::ISO9660:hidden, msftdata;
- 2:4951MB:4956MB:5155kB::Appended2:boot, esp;
- 3:4956MB:4956MB:307kB::Gap1:hidden, msftdata;
- 4:4958MB:7751MB:2793MB:ext4::;
- nvme0n1:1024GB:nvme:512:512:gpt:KXG60ZNV1T02 KIOXIA:;
- 1:1049kB:274MB:273MB:fat32:EFI system partition:boot, esp;
- 2:274MB:290MB:16.8MB::Microsoft reserved partition:msftres;
- 3:290MB:1022GB:1022GB:ntfs:Basic data partition:msftdata;
- 4:1022GB:1024GB:1212MB:ntfs::hidden, diag;
- 5:1024GB:1024GB:576MB:ntfs:Basic data partition:hidden, diag;
- mmcblk0:125GB:sd/mmc:512:512:msdos:SD SD128:;
- 1:16.8MB:125GB:125GB:ext4::;
- Free space >10MiB: ______________________________________________________________
- mmcblk0: 0.00MiB:16.0MiB:16.0MiB
- blkid (filtered): ______________________________________________________________
- NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
- sda iso9660 2023-08-07-16-02-01-00 Ubuntu-Studio 22.04.3 LTS amd64
- ├─sda1 iso9660 2023-08-07-16-02-01-00 abe6d9c1-d820-473f-9627-5e7897c4c498 Ubuntu-Studio 22.04.3 LTS amd64 ISO9660
- ├─sda2 vfat F7DB-4D56 abe6d9c1-d820-473f-9624-5e7897c4c498 ESP Appended2
- ├─sda3 abe6d9c1-d820-473f-9625-5e7897c4c498 Gap1
- └─sda4 ext4 5fb74e7c-b688-445e-bbab-287e83449d24 0eb566dc-e1e9-6c45-b17b-4c2d4b9f904f writable
- mmcblk0
- └─mmcblk0p1 ext4 f3d465e7-3273-4b06-b104-6672b42ddc72 d82c6cba-01
- nvme0n1
- ├─nvme0n1p1 vfat EE4F-5C99 e504916e-f935-4c21-a31d-530627287196 SYSTEM EFI system partition
- ├─nvme0n1p2 c128d776-4681-49cd-91fa-878f70627069 Microsoft reserved partition
- ├─nvme0n1p3 ntfs 8ED47B22D47B0BA9 84567b8f-b48b-428e-b80f-0c00131653f5 Windows Basic data partition
- ├─nvme0n1p4 ntfs 4C7A34787A3460BE b8b829c0-df14-4526-b80c-ce27917287fa
- └─nvme0n1p5 ntfs 8E98660B9865F1DF d79e3778-f528-4d11-b4bc-c6902abfd48d Windows RE tools Basic data partition
- Mount points (filtered): _______________________________________________________
- Avail Use% Mounted on
- /dev/mmcblk0p1 96.6G 10% /mnt/boot-sav/mmcblk0p1
- /dev/nvme0n1p1 161.8M 37% /mnt/boot-sav/nvme0n1p1
- /dev/nvme0n1p3 326.2G 66% /mnt/boot-sav/nvme0n1p3
- /dev/nvme0n1p4 45.8M 96% /mnt/boot-sav/nvme0n1p4
- /dev/nvme0n1p5 67.4M 88% /mnt/boot-sav/nvme0n1p5
- /dev/sda1 0 100% /cdrom
- Mount options (filtered): ______________________________________________________
- /dev/mmcblk0p1 ext4 rw,relatime
- /dev/nvme0n1p1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
- /dev/nvme0n1p3 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
- /dev/nvme0n1p4 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
- /dev/nvme0n1p5 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
- /dev/sda1 iso9660 ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8
- =================== mmcblk0p1/boot/grub/grub.cfg (filtered) ====================
- Ubuntu (lowlatency) f3d465e7-3273-4b06-b104-6672b42ddc72
- Windows Boot Manager (on nvme0n1p1) osprober-efi-EE4F-5C99
- ### END /etc/grub.d/30_os-prober ###
- ### END /etc/grub.d/30_uefi-firmware ###
- ======================== mmcblk0p1/etc/fstab (filtered) ========================
- # <file system> <mount point> <type> <options> <dump> <pass>
- UUID=f3d465e7-3273-4b06-b104-6672b42ddc72 / ext4 defaults,discard 0 1
- tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
- UUID=EE4F-5C99 /boot/efi vfat defaults 0 1
- ==================== mmcblk0p1/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
- ================= mmcblk0p1: Location of files loaded by Grub ==================
- GiB - GB File Fragment(s)
- ?? = ?? boot/grub/grub.cfg 1
- 94.715950012 = 101.700476928 boot/vmlinuz 1
- 94.715950012 = 101.700476928 boot/vmlinuz-6.2.0-1009-lowlatency 1
- 94.715950012 = 101.700476928 boot/vmlinuz.old 1
- 95.422424316 = 102.459047936 boot/initrd.img 7
- 95.422424316 = 102.459047936 boot/initrd.img-6.2.0-1009-lowlatency 7
- 95.422424316 = 102.459047936 boot/initrd.img.old 7
- =================== mmcblk0p1: ls -l /etc/grub.d/ (filtered) ===================
- -rwxr-xr-x 1 root root 15845 Mar 19 2022 09_lowlatency
- -rw-r--r-- 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 700 May 17 2023 35_fwupd
- -rwxr-xr-x 1 root root 214 Dec 18 2022 40_custom
- -rwxr-xr-x 1 root root 215 Dec 18 2022 41_custom
- ================ mmcblk0p1/etc/grub.d/09_lowlatency (filtered) =================
- #! /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/>.
- #
- # Ubuntustudio customization that keeps the latest lowlatency kernel
- # as the first menu item and default boot even if there is a newer
- # generic or other kernel. Often the updated generic kernel is
- # released a few days earlier than the lowlatency kernel
- prefix="/usr"
- exec_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"
- # only 09_lowlatency or 10_linux should run, since we got this far
- # 10_linux should not run next
- if [ -x /etc/grub.d/10_linux ]; then
- chmod -x /etc/grub.d/10_linux
- fi
- CLASS="--class gnu-linux --class gnu --class os"
- SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"
- if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; 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
- # 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
- # 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_DISABLE_LINUX_UUID}" = "xtrue" ] \
- || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
- || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
- LINUX_ROOT_DEVICE=${GRUB_DEVICE}
- else
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
- 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} threadirqs ${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=
- 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
- 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
- if [ x"$GRUB_FORCE_PARTUUID" != x ]; then
- echo "set partuuid=${GRUB_FORCE_PARTUUID}"
- fi
- linux_entry ()
- {
- os="$1"
- version="$2"
- type="$3"
- args="$4"
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
- fi
- if [ x$type != xsimple ] ; then
- case $type in
- recovery)
- title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;;
- init-*)
- title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "${type#init-}")" ;;
- *)
- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
- esac
- if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
- replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
- 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 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
- else
- echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
- fi
- if [ "$quick_boot" = 1 ]; then
- echo " recordfail" | sed "s/^/$submenu_indentation/"
- fi
- if [ x$type != xrecovery ] ; then
- save_default_entry | grub_add_tab
- 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 [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
- echo " load_video" | sed "s/^/$submenu_indentation/"
- else
- if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
- echo " load_video" | sed "s/^/$submenu_indentation/"
- fi
- fi
- if ([ "$ubuntu_recovery" = 0 ] || [ x$type != xrecovery ]) && \
- ([ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 1 ]); then
- echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
- fi
- echo " insmod gzio" | sed "s/^/$submenu_indentation/"
- echo " if [ x\$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi" | sed "s/^/$submenu_indentation/"
- if [ x$dirname = x/ ]; then
- if [ -z "${prepare_root_cache}" ]; then
- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
- fi
- printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
- else
- 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/"
- fi
- if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
- sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
- EOF
- fi
- if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then
- sed "s/^/$submenu_indentation/" << EOF
- linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
- EOF
- else
- # We have initrd and PARTUUID is set - we try to boot without initrd, and fallback to using it
- # if it fails.
- # "panic=-1" means "on panic reboot immediately". "panic=0" disables the reboot behavior.
- if [ x"$GRUB_FORCE_PARTUUID" != x ]; then
- linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}"
- fi
- message="$(gettext_printf "Loading initial ramdisk ...")"
- if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then
- sed "s/^/$submenu_indentation/" << EOF
- if [ "\${initrdfail}" = 1 ]; then
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
- EOF
- if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
- sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
- EOF
- fi
- sed "s/^/$submenu_indentation/" << EOF
- initrd ${rel_dirname}/${initrd}
- else
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
- fi
- initrdfail
- EOF
- else
- # We don't have initrd or we don't want to set PARTUUID. Don't try initrd-less boot with fallback.
- sed "s/^/$submenu_indentation/" << EOF
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
- EOF
- if test -n "${initrd}"; then
- # We do have initrd - let's use it at boot.
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
- sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
- EOF
- fi
- sed "s/^/$submenu_indentation/" << EOF
- initrd ${rel_dirname}/${initrd}
- EOF
- fi
- fi
- fi
- sed "s/^/$submenu_indentation/" << EOF
- }
- EOF
- }
- machine=`uname -m`
- case "x$machine" in
- xi?86 | xx86_64)
- list=
- for i in /boot/vmlinuz-*lowlatency /vmlinuz-*lowlatency /boot/kernel-*lowlatency ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done
- list2=
- for i in /boot/vmlinuz-*generic /vmlinuz-*generic /boot/kernel-*generic ; do
- if grub_file_is_not_garbage "$i" ; then list2="$list2 $i" ; fi
- done ;;
- *)
- list=
- for i in /boot/vmlinuz-*lowlatency /boot/vmlinux-*lowlatency /vmlinuz-*lowlatency /vmlinux-*lowlatency /boot/kernel-*lowlatency ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done
- list2=
- for i in /boot/vmlinuz-*generic /boot/vmlinux-*generic /vmlinuz-*generic /vmlinux-*generic /boot/kernel-*generic ; do
- if grub_file_is_not_garbage "$i" ; then list2="$list2 $i" ; fi
- done ;;
- esac
- 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
- prepare_boot_cache=
- prepare_root_cache=
- boot_device_id=
- title_correction_code=
- 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.
- if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$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
- # 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
- is_generic_top=true
- if [ "x$list" = "x" ]; then
- is_top_level=false
- generic_is_default=true
- fi
- if [ "x$list2" = "x" ]; then
- is_generic_top=false
- fi
- while [ "x$list $list2" != "x" ] ; do
- if [ "x$is_generic_top" = xtrue ] && [ "x$is_top_level" != xtrue ]; then
- linux=`version_find_latest $list2`
- case $linux in
- *.efi.signed)
- # We handle these in linux_entry.
- list2=`echo $list2 | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
- continue
- ;;
- esac
- else
- linux=`version_find_latest $list`
- if [ "x$linux" = "x" ]; then
- break
- fi
- case $linux in
- *.efi.signed)
- # We handle these in linux_entry.
- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
- continue
- ;;
- esac
- fi
- 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=
- 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="$i"
- break
- fi
- done
- config=
- for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
- if test -e "${i}" ; then
- config="${i}"
- break
- fi
- done
- initramfs=
- if test -n "${config}" ; then
- initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
- fi
- if test -n "${initrd}" ; then
- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
- elif test -z "${initramfs}" ; then
- # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
- # no initrd or builtin initramfs, it can't work here.
- linux_root_device_thisversion=${GRUB_DEVICE}
- fi
- if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
- linux_entry "${OS} (lowlatency)" "${version}" simple \
- "${GRUB_CMDLINE_LINUX} threadirqs ${GRUB_CMDLINE_LINUX_DEFAULT}"
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
- fi
- if [ "x$is_generic_top" != xtrue ]; then
- submenu_indentation="$grub_tab"
- # TRANSLATORS: %s is replaced with an OS name
- echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
- fi
- is_top_level=false
- continue
- fi
- if [ "x$is_generic_top" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
- linux_entry "${OS} (generic)" "${version}" simple \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
- submenu_indentation="$grub_tab"
- list="$list $list2"
- 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" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
- is_generic_top=false
- continue
- fi
- linux_entry "${OS}" "${version}" advanced \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_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}" "init-${supported_init%%:*}" \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}"
- fi
- done
- if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
- linux_entry "${OS}" "${version}" recovery \
- "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
- fi
- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
- # 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"
- =================== nvme0n1p1/efi/ubuntu/grub.cfg (filtered) ===================
- search.fs_uuid f3d465e7-3273-4b06-b104-6672b42ddc72 root
- set prefix=($root)'/boot/grub'
- configfile $prefix/grub.cfg
Advertisement
Add Comment
Please, Sign In to add comment