Asi jsem to blbě napsal, nebo nechápu o co jde. Anebo nechápete vy. Tak to radši napíšu a podepřu praktickým testem. Můj hlavní zavaděč mám z AntiXu. Abych byl co nejblíže k dle mne dané problematice, rozhodl jsem se do ubuntu 22.04 nainstalovat novější jádro 6.0
Na notebooku mám nvme disk. EFI mám na oddílu nvme0n1p1, AntiX na nvme0n1p5.
Instalace jádra v ubuntu:
radek@radek-ubuntu:~$ mkdir jadro
radek@radek-ubuntu:~$ cd jadro/
radek@radek-ubuntu:~/jadro$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
--2022-11-29 20:21:34-- https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
Překládám kernel.ubuntu.com (kernel.ubuntu.com)… 91.189.94.216
Navazuje se spojení s kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443… spojeno.
HTTP požadavek odeslán, program čeká na odpověď… 200 OK
Délka: 12093632 (12M) [application/x-debian-package]
Ukládám do: ‘linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’
linux-image-unsigned-6.0.0-060000-generic_6 100%[========================================================================================>] 11,53M 1011KB/s za 8,2s
2022-11-29 20:21:43 (1,41 MB/s) – ‘linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’ uloženo [12093632/12093632]
radek@radek-ubuntu:~/jadro$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
--2022-11-29 20:22:04-- https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
Překládám kernel.ubuntu.com (kernel.ubuntu.com)… 91.189.94.216
Navazuje se spojení s kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443… spojeno.
HTTP požadavek odeslán, program čeká na odpověď… 200 OK
Délka: 92365796 (88M) [application/x-debian-package]
Ukládám do: ‘linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’
linux-modules-6.0.0-060000-generic_6.0.0-06 100%[========================================================================================>] 88,09M 1,73MB/s za 82s s
2022-11-29 20:23:26 (1,08 MB/s) – ‘linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’ uloženo [92365796/92365796]
radek@radek-ubuntu:~/jadro$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
--2022-11-29 20:23:29-- https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
Překládám kernel.ubuntu.com (kernel.ubuntu.com)… 91.189.94.216
Navazuje se spojení s kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443… spojeno.
HTTP požadavek odeslán, program čeká na odpověď… 200 OK
Délka: 3097056 (3,0M) [application/x-debian-package]
Ukládám do: ‘linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’
linux-headers-6.0.0-060000-generic_6.0.0-06 100%[========================================================================================>] 2,95M 2,65MB/s za 1,1s
2022-11-29 20:23:30 (2,65 MB/s) – ‘linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb’ uloženo [3097056/3097056]
radek@radek-ubuntu:~/jadro$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb
--2022-11-29 20:23:45-- https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb
Překládám kernel.ubuntu.com (kernel.ubuntu.com)… 91.189.94.216
Navazuje se spojení s kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443… spojeno.
HTTP požadavek odeslán, program čeká na odpověď… 200 OK
Délka: 12688478 (12M) [application/x-debian-package]
Ukládám do: ‘linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb’
linux-headers-6.0.0-060000_6.0.0-060000.202 100%[========================================================================================>] 12,10M 694KB/s za 14s
2022-11-29 20:24:00 (886 KB/s) – ‘linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb’ uloženo [12688478/12688478]
radek@radek-ubuntu:~/jadro$ sudo dpkg -i *.deb
Vybírá se dosud nevybraný balík linux-headers-6.0.0-060000-generic.
(Načítá se databáze … nyní je nainstalováno 199438 souborů a adresářů.)
Připravuje se nahrazení linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb …
Rozbaluje se linux-headers-6.0.0-060000-generic (6.0.0-060000.202210022231) …
Vybírá se dosud nevybraný balík linux-headers-6.0.0-060000.
Připravuje se nahrazení linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb …
Rozbaluje se linux-headers-6.0.0-060000 (6.0.0-060000.202210022231) …
Vybírá se dosud nevybraný balík linux-image-unsigned-6.0.0-060000-generic.
Připravuje se nahrazení linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb …
Rozbaluje se linux-image-unsigned-6.0.0-060000-generic (6.0.0-060000.202210022231) …
Vybírá se dosud nevybraný balík linux-modules-6.0.0-060000-generic.
Připravuje se nahrazení linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb …
Rozbaluje se linux-modules-6.0.0-060000-generic (6.0.0-060000.202210022231) …
Nastavuje se balík linux-headers-6.0.0-060000 (6.0.0-060000.202210022231) …
Nastavuje se balík linux-modules-6.0.0-060000-generic (6.0.0-060000.202210022231) …
Nastavuje se balík linux-headers-6.0.0-060000-generic (6.0.0-060000.202210022231) …
Nastavuje se balík linux-image-unsigned-6.0.0-060000-generic (6.0.0-060000.202210022231) …
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.15.0-53-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.15.0-53-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-6.0.0-060000-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.0.0-060000-generic
Zpracovávají se spouštěče pro balík linux-image-unsigned-6.0.0-060000-generic (6.0.0-060000.202210022231) …
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.0.0-060000-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p8
I: (UUID=7897ed19-78a5-4478-b129-9f3ddb6c3cf8)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.0.0-060000-generic
Found initrd image: /boot/initrd.img-6.0.0-060000-generic
Found linux image: /boot/vmlinuz-5.15.0-53-generic
Found initrd image: /boot/initrd.img-5.15.0-53-generic
Found linux image: /boot/vmlinuz-5.15.0-43-generic
Found initrd image: /boot/initrd.img-5.15.0-43-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Linux Mint 21 Vanessa (21) on /dev/nvme0n1p2
Found Arch Linux on /dev/nvme0n1p3
Found antiX (22) on /dev/nvme0n1p5
Adding boot menu entry for UEFI Firmware Settings ...
done
Kontrola EFI:
efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0000,0018,0014,0001,0015,0016,0017,0019,001A
Boot0000* ubuntu HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/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.}...\................
Boot0002* antiX22 HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/File(\EFI\antiX22\grubx64.efi)
Boot0010 Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011 Boot Menu FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0012 Diagnostic Splash FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013 UEFI Diagnostics FvFile(f8397897-e203-4a62-b977-9e7e5d94d91b)
Boot0014* NVMe: SKHynix_HFM512GDHTNI-87A0B PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,AC-E4-2E-00-0A-25-73-F2)....2.LN........
Boot0015* ATA HDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot0016* ATA HDD1: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot0017* ATAPI CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0018* USB HDD: Generic MassStorageClass PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x4)/USB(1,0)3.!..3.G..A.....
Boot0019* USB FDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001A* USB CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Vše OK.
A teď pokračujem aktualizací AntiX (mnou zvoleného hlavního) zavaděče v ubuntu!:
radek@radek-ubuntu:~$ sudo mount /dev/nvme0n1p5 /mnt
radek@radek-ubuntu:~$ sudo mount /dev/nvme0n1p1 /mnt/boot/efi
radek@radek-ubuntu:~$ for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done
radek@radek-ubuntu:~$ sudo chroot /mnt
root@radek-ubuntu:/# update-grub
Generating grub configuration file ...
Found background: /usr/share/wallpaper/grub/back.png
Found background image: /usr/share/wallpaper/grub/back.png
Found linux image: /boot/vmlinuz-5.10.142-antix.2-amd64-smp
Found initrd image: /boot/initrd.img-5.10.142-antix.2-amd64-smp
Found linux image: /boot/vmlinuz-4.9.0-326-antix.1-amd64-smp
Found initrd image: /boot/initrd.img-4.9.0-326-antix.1-amd64-smp
Found mtest-64.efi image: /boot/uefi-mt/mtest-64.efi
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Linux Mint 21 Vanessa (21) on /dev/nvme0n1p2
Found Arch Linux on /dev/nvme0n1p3
Found Ubuntu 22.04.1 LTS (22.04) on /dev/nvme0n1p4
Adding boot menu entry for UEFI Firmware Settings ...
done
root@radek-ubuntu:/# exit &&
> sudo umount /mnt/sys &&
> sudo umount /mnt/proc &&
> sudo umount /mnt/dev/pts &&
> sudo umount /mnt/dev &&
> sudo umount /mnt
exit
radek@radek-ubuntu:~$ efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0000,0018,0014,0001,0015,0016,0017,0019,001A
Boot0000* ubuntu HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/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.}...\................
Boot0002* antiX22 HD(1,GPT,4e1b8eb5-027c-4001-94f4-9bbade878ced,0x800,0x30000)/File(\EFI\antiX22\grubx64.efi)
Boot0010 Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011 Boot Menu FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0012 Diagnostic Splash FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013 UEFI Diagnostics FvFile(f8397897-e203-4a62-b977-9e7e5d94d91b)
Boot0014* NVMe: SKHynix_HFM512GDHTNI-87A0B PciRoot(0x0)/Pci(0x2,0x4)/Pci(0x0,0x0)/NVMe(0x1,AC-E4-2E-00-0A-25-73-F2)....2.LN........
Boot0015* ATA HDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot0016* ATA HDD1: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot0017* ATAPI CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0018* USB HDD: Generic MassStorageClass PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x4)/USB(1,0)3.!..3.G..A.....
Boot0019* USB FDD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001A* USB CD: VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
radek@radek-ubuntu:~$ reboot
Následný start ubuntu a funguje s novým jádrem:
radek@radek-ubuntu:~$ uname -r
6.0.0-060000-generic
Zkrátka se namountuje jak AntiX do /mnt tak EFI do /mnt/boot/efi
Přimountují se i /dev /dev/pts /proc /sys a /sys/firmware/efi/efivars
Pak se chrootnem do AntiXu a updatujem jeho grub. Pak to zase odpojíme a hotovo. Při příštím startu PC už je grub s aktualizovanou nabídkou.
Nevím jak lépe to popsat. Nemusí se používat žádné externí utility, usb disky, ap. Jednodušeji by to šlo rebootem a startem OS který se používá jako hlavní a tam si to vygenerovat. Ale je to o jeden restart více. Jak je vidět, nebyl by problém si na to napsat jednoduchý skript.