You are not logged in.

#1 2024-02-14 02:01:58

huhn
Member
Registered: 2024-02-14
Posts: 17

[SOLVED]unable to change the linux kernel using grub

edit: issue was this:
/oot                        /dev/nvme0n1p1 vfat
i mounted it wrong at installation.
a rm -r /boot a remount followed by pacman -S linux-lts and a reinstall of grub fixed it /edit


i'm unable to change the linux kernel to linux-lts.

what i did so far.
install the kernel make sure the kernel is present in /boot

[root@Gundam2 boot]# ls -l
total 272768
drwxr-xr-x 2 root root      4096 Feb 14 01:16 grub
-rw------- 1 root root 115342155 Feb 14 01:08 initramfs-linux-fallback.img
-rw------- 1 root root  73356277 Feb 14 00:48 initramfs-linux-lts-fallback.img
-rw------- 1 root root  12364243 Feb 14 00:48 initramfs-linux-lts.img
-rw------- 1 root root  52271001 Feb 14 01:07 initramfs-linux.img
-rw-r--r-- 1 root root  13038080 Feb 14 01:07 vmlinuz-linux
-rw-r--r-- 1 root root  12920864 Feb  9 06:47 vmlinuz-linux-lts

running grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot:  initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

changed /etc/default/grub
added
GRUB_TOP_LEVEL=vmlinuz-linux-lts

try entries for like
GRUB_DEFAULT=1

the following no one should do:
pacman -R linux
grub-mkconfig -o /boot/grub/grub.cfg

grub failed to boot and i had to type in my root password and it used 6.7.4 aynway

the first 3 entires in /boot/grub/grub.cfg are which start with the lts version as i want it.

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1c7cb91f-a688-4441-89e5-b39c809b60ec' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root 1c7cb91f-a688-4441-89e5-b39c809b60ec
        echo    'Loading Linux linux-lts ...'
        linux   /boot/vmlinuz-linux-lts root=UUID=1c7cb91f-a688-4441-89e5-b39c809b60ec rw  loglevel=3 quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-1c7cb91f-a688-4441-89e5-b39c809b60ec' {
        menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-1c7cb91f-a688-4441-89e5-b39c809b60ec' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 1c7cb91f-a688-4441-89e5-b39c809b60ec
                echo    'Loading Linux linux-lts ...'
                linux   /boot/vmlinuz-linux-lts root=UUID=1c7cb91f-a688-4441-89e5-b39c809b60ec rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux-lts.img
        }
        menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-1c7cb91f-a688-4441-89e5-b39c809b60ec' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 1c7cb91f-a688-4441-89e5-b39c809b60ec
                echo    'Loading Linux linux-lts ...'
                linux   /boot/vmlinuz-linux-lts root=UUID=1c7cb91f-a688-4441-89e5-b39c809b60ec rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux-lts-fallback.img
        }
        menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-1c7cb91f-a688-4441-89e5-b39c809b60ec' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 1c7cb91f-a688-4441-89e5-b39c809b60ec
                echo    'Loading Linux linux ...'
                linux   /boot/vmlinuz-linux root=UUID=1c7cb91f-a688-4441-89e5-b39c809b60ec rw  loglevel=3 quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-linux.img

uname -R is currently this:

6.7.4-arch1-1

in the grub entires

grub-install output this terrible error:

Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

how can it even boot this way?

the grub menu has only option for the iniframfs

[root@Gundam2 boot]# grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub-install: error: /boot doesn't look like an EFI partition.
[root@Gundam2 boot]# fdisk -l
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500P3SSD8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C522AABC-81DC-4E67-A452-2926C9692594

Device           Start       End   Sectors   Size Type
/dev/nvme0n1p1    2048   2252800   2250753   1.1G EFI System
/dev/nvme0n1p2 2254848 225280000 223025153 106.3G Linux filesystem
[root@Gundam2 boot]# findmnt
TARGET                        SOURCE         FSTYPE     OPTIONS
/                             /dev/nvme0n1p2 ext4       rw,relatime
├─/proc                       proc           proc       rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc  systemd-1      autofs     rw,relatime,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=5504
├─/sys                        sys            sysfs      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars efivarfs       efivarfs   rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security      securityfs     securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup            cgroup2        cgroup2    rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
│ ├─/sys/fs/pstore            pstore         pstore     rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf               bpf            bpf        rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug         debugfs        debugfs    rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/tracing       tracefs        tracefs    rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections  fusectl        fusectl    rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config        configfs       configfs   rw,nosuid,nodev,noexec,relatime
├─/dev                        dev            devtmpfs   rw,nosuid,relatime,size=3996700k,nr_inodes=999175,mode=755,inode64
│ ├─/dev/shm                  tmpfs          tmpfs      rw,nosuid,nodev,inode64
│ ├─/dev/pts                  devpts         devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/mqueue               mqueue         mqueue     rw,nosuid,nodev,noexec,relatime
│ └─/dev/hugepages            hugetlbfs      hugetlbfs  rw,nosuid,nodev,relatime,pagesize=2M
├─/run                        run            tmpfs      rw,nosuid,nodev,relatime,mode=755,inode64
│ └─/run/user/0               tmpfs          tmpfs      rw,nosuid,nodev,relatime,size=805100k,nr_inodes=201275,mode=700,inode64
├─/tmp                        tmpfs          tmpfs      rw,nosuid,nodev,nr_inodes=1048576,inode64
└─/oot                        /dev/nvme0n1p1 vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro

is my efi disk not properly mounted after boot?

Last edited by huhn (2024-02-14 02:49:31)

Offline

#2 2024-02-14 07:46:15

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED]unable to change the linux kernel using grub

Is /oot a typo?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2024-02-14 10:00:23

huhn
Member
Registered: 2024-02-14
Posts: 17

Re: [SOLVED]unable to change the linux kernel using grub

yes you can install the grub anywhere on efi.
i'm not going to say how many hours it toke me to notice.
and it only booted because the old boot loader was still on the efi disk with an relative new arch linux.

Offline

Board footer

Powered by FluxBB