bitedasher / kesboot Goto Github PK
View Code? Open in Web Editor NEWScript for automating work with EFI Kernel Stub (linux)
License: MIT License
Script for automating work with EFI Kernel Stub (linux)
License: MIT License
i don't know why, but the output of efibootmgr (from manjaro-linux) is something like this:
$ efibootmgr
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0006
Boot0002* Linux Boot Manager HD(1,GPT,7ff6991c-d9ef-4c3e-8bf1-345168f07626,0x800,0x100000)/\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI
Boot0006* UEFI OS HD(1,GPT,7ff6991c-d9ef-4c3e-8bf1-345168f07626,0x800,0x100000)/\EFI\BOOT\BOOTX64.EFI0000424f
So the entries won't end with the name and kesboot is unable to found his own entries.
so i added the following line in main.sh:_get_efi and main.sh:_get_efi_num to get rid of the tabulator and the rest of the line and to make it work as expected:
_poses="$(echo "$_poses" | sed 's/\t.*//')"
when uninstalling a kernel, the efi-var can't be found:
# mhwd-kernel -r linux67 ✔
...
:: Pre-transaction-Hooks werden gestartet …
(1/3) Removing linux initcpios...
(2/3) Updating EFI variables (remove)...
Can't find the builduser kernel in the EFI variables...
...
if i read the source correctly, "builduser" should be the name of the kernel to be removed?
In a "recovery" environment (i.e. an archiso boot + arch-chroot), lsblk -r -n -o PARTUUID /dev/nvme0n1p1
yields an empty string for me. By contrast, blkid -o value -s PARTUUID /dev/nvme0n1p1
works as expected.
Hi,
I was trying to switch to dracut from mkinitcpio but I found that the kesboot pacman hook keeps adding '*' to the CMDLINES array and failing.
---> New kernel: *
kernel "*" not found!
It works when I use mkinitcpio, so I'm not sure if it's a dracut issue or kesboot issue
Hi, I can't see an obvious way to add a second initramfs for microcode other than by inserting directly into the cmdline array. This is obviously not the preferable solution - if this functionality existed and I'm missing it or could be added that would be great. Many thanks!
Line 72 in 936c6f1
When creating an entry for a root installed in a btrfs subvolume, the entry stays with empty root and doesn't add the subvol argument:
lsblk: /dev/nvme0n1p2[/@root]: not a block device
lsblk: /dev/nvme0n1p2[/@root]: not a block device
1.9.r0.g2d8eae8-1
(up-to-date kesboot-git
from AUR)linux
and linux-mainline
)Every time I upgrade my kernel packages, e.g. linux
, the CMDLINES element for that kernel simply is removed and replaced with 'linux' ''
at the end of the array.
Relevant parts of upgrade log where this issue happened:
:: Running pre-transaction hooks...
(1/3) Removing linux booster images...
(2/3) Updating EFI variables (remove)...
===> Removed linux
(3/3) Remove DKMS modules
:: Processing package changes...
...
(13/16) upgrading linux
...
:: Running post-transaction hooks...
(1/8) Reloading device manager configuration...
(2/8) Arming ConditionNeedsUpdate...
(3/8) Updating module dependencies...
(4/8) Install DKMS modules
==> dkms install --no-depmod vendor-reset/r112.7d43285 -k 5.17.6-arch1-1.1
==> depmod 5.17.6-arch1-1.1
(5/8) Updating linux booster images...
(6/8) Updating EFI variables (install)...
---> New kernel: linux
===> Kernel: vmlinuz-linux
cmdline: rw root=PARTUUID=<xyz>
initrd: booster-linux.img
===> Kernel: vmlinuz-linux-mainline
cmdline: rw root=PARTUUID=<xyz> loglevel=3 quiet systemd.show_status=0 audit=0 usbcore.autosuspend=-1
initrd: booster-linux-mainline.img
...
My current /etc/kesboot.conf
:
# A directory containing kernels and mounted as FAT32
#BOOT_DIR=/boot
# The path to the efibootmgr command
##EFIBOOTMGR_PATH=/usr/bin/efibootmgr
# Additional parameters for the efibootmgr command
##EFIBOOTMGR_EXTRA_FLAGS="-q"
# A hook for the package manager when installing kernels
##INSTALL_HOOK=1
# A hook for the package manager when removing kernels
##REMOVE_HOOK=1
# The script that will be run before kesboot (variable, can accept arguments)
##PRE_SCRIPT=
# The script that will be run after kesboot (variable, can accept arguments)
##POST_SCRIPT=
# default kernel cmdline
#CMDLINE_DEFAULT="rw"
# The prefix and suffix specified by mkinitcpio by default (leave blank so as not to substitute initrd= for cmdline)
INITRD_NAME='booster-@[email protected]'
# Prefix to the name of the kernel located in $BOOT_DIR (leave blank so as not to substitute $KERNEL_PREFIX for CMDLINES)
#KERNEL_PREFIX=vmlinuz-
# Insert CMDLINE_DEFAULT at the beginning of each CMDLINES variable by default (set 0 to disable it, and use @def@ to insert it)
#USE_DEF=1
# Substitute NAME= from the /etc/os-release file to the headers of the created EFI variables
#EFIVAR_PREFIX=1
# Substitute the path to the root directory of the system in cmdline
#SUB_ROOT=1
# initrd/microcode to be loaded before initrd
MICROCODE=amd-ucode.img
# Add the kernel and its cmdline to the array in pairs
CMDLINES=(
'linux-mainline' 'loglevel=3 quiet systemd.show_status=0 audit=0'
'linux' ''
)
When running keboot -u
I get [root@scott-laptop ~]# kesboot -u lsblk: /dev/sda2[/@]: not a block device lsblk: /dev/sda2[/@]: not a block device lsblk: /dev/sda2[/@]: not a block device lsblk: /dev/sda2[/@]: not a block device
and in CMDLINE options it says root=PARTUUID=
which makes it fail to boot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.