You are not logged in.

#1 2023-06-23 01:28:17

sadproton
Member
Registered: 2022-11-13
Posts: 11

[SOLVED] Can't boot after installing LTS kernel

Hi all,

I recently decided to install the linux-lts kernel alongside the mainline kernel on my system. I installed the LTS kernel and its headers with

sudo pacman -S linux-lts linux-lts-headers

I then made the following changes in my /etc/default/grub file:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_DISABLE_SUBMENU=y

I then regenerated the GRUB configuration file using

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

After rebooting the system, a very brief "Welcome to GRUB!" message flashed in the upper left-hand corner before throwing me to my laptop's HP Startup Menu. There is an option that says "ENTER - Continue Startup" which simply returns me to the same menu when selected.

I am able to boot into the system using an Arch Linux installation medium, mount the root filesystem, and arch-chroot into it. I tried backtracking my steps by uninstalling linux-lts and linux-lts-headers, undoing the changes to /etc/default/grub, and regenerating the GRUB config, but the problem persists. I also regenerated all the initramfs images using

mkinitcpio -P

to no avail.

Perhaps there is something I overlooked in the installation process, but I am just not sure what else to do.

System information:
HP Laptop 15-bw0xx
CPU: AMD A10-9620P Radeon R5

Last edited by sadproton (2023-07-13 19:57:30)

Offline

#2 2023-06-23 01:33:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED] Can't boot after installing LTS kernel

If this installation is from before Aug of last year, did you do https://archlinux.org/news/grub-bootloa … ibilities/ ?

Offline

#3 2023-06-24 04:36:12

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Okay this helped somewhat, I am now able to at least get to the GRUB menu. However, there are no entries other than "UEFI Firmware Settings"

Steps:

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --boot-directory=/mnt/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot

Offline

#4 2023-06-24 06:02:47

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] Can't boot after installing LTS kernel

Uhm.. as you are chroot'ed into the system you're going to boot, you shouldn't need to specify the boot-directory.

Try just:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

Offline

#5 2023-06-26 02:20:21

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Still have the same problem. I think I am closing in on a solution, however. While in the chroot, running mkinitcpio -P gives me the following error:

==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-linux'

Same for LTS. Some digging online led me to this post here https://bbs.archlinux.org/viewtopic.php?id=215432. Looking at my /etc/fstab I notice there is only a single entry, that being the / partition. I very well could have forgotten to mount /mnt/boot before running the pacstrap command (I first installed Arch about a year ago so I'm not entirely sure though). Will I have to do a fresh install or is there anything I can do to salvage the system?

Perhaps running

genfstab -U /mnt > /mnt/etc/fstab

would do the trick? One > instead of >> to avoid repeat entries

Last edited by sadproton (2023-06-26 02:26:29)

Offline

#6 2023-06-26 05:04:41

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,389

Re: [SOLVED] Can't boot after installing LTS kernel

Just make sure you mounted your efi partition, then chroot into the system and reinstall both.
Yes, the command will work if you have the partitions mounted.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Online

#7 2023-06-26 14:33:21

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Alright well now my /etc/fstab is looking as it should be, but I'm still not seeing anything in the GRUB menu other than "UEFI Firmware Settings". Last night I ran pacman -S linux-lts successfully, and the appropriate files appear in my /boot directory. mkinitcpio -p linux-lts also finishes successfully.

I tried doing the same for linux but I get

error: failed retrieving file 'linux-6.3.8.arch1-1-x86_64.pkg.tar.zar' from foo.mirror : Could not resolve host: foo.mirror

and

mkinitcpio -p linux

gives the same error as previously

I honestly don't care if I am not able to use the mainline kernel (my original intention was to daily drive LTS and keep the other as a fallback lol). Not sure where to go from here sad

Offline

#8 2023-06-26 16:11:22

loqs
Member
Registered: 2014-03-06
Posts: 18,938

Re: [SOLVED] Can't boot after installing LTS kernel

From inside the chroot please post the output of

# parted -l
# blkid
$ file /boot/vmlinuz-linux-lts  /boot/vmlinuz-linux
$ pacman -Q linux-lts linux
$ cat /etc/fstab
$ cat /etc/default/grub
$ cat /boot/grub/grub.cfg

Offline

#9 2023-07-11 02:18:49

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Apologies for being MIA, life has been busy. Here are images of the requested output
https://photos.app.goo.gl/P4bDo2WrrwzSQP6h9

Offline

#10 2023-07-11 06:15:45

milesedger
Member
Registered: 2023-07-11
Posts: 1
Website

Re: [SOLVED] Can't boot after installing LTS kernel

I also had a similar issue after installing LTS kernel, every single code which put I didn't get any output of it.

Offline

#11 2023-07-11 06:26:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

@sadproton, please post text, not pictures of text (1st link below)
You forgot to mount the /boot partition (sda1) but there still seems to be a /boot/grub/grub.cfg what already indicates a problem in that direction.
=> Mount the /boot partition, re-post the outputs as text.

@milesedger, please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855 - your comment is unintelligible.

Offline

#12 2023-07-11 15:27:29

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Sorry, this is my first time posting on the forum. Here are the command outputs as text

parted -l http://0x0.st/HjHD.txt
blkid http://0x0.st/HjHn.txt
file /boot/vmlinuz-linux-lts /boot/vmlinuz-linux http://0x0.st/HjHR.txt
pacman -Q linux-lts linux http://0x0.st/HjH7.txt
cat /etc/fstab http://0x0.st/HjHF.txt
cat /etc/default/grub http://0x0.st/HjXr.txt
cat /boot/grub/grub.cfg http://0x0.st/HjXs.txt

Also, for what it's worth, I just mounted /boot while within the chroot, not sure if this is incorrect or has any bearing on things.

Offline

#13 2023-07-11 20:21:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

The lts kernel is there, but the non-lts (despite the package being installed) isn't.
From your previous post it's apparently also not in the unmounted /boot path.
The last posted grub.cfg has an entry for the LTS kernel.

From the chroot

umount /boot
cat /boot/grub/grub.cfg | curl -F 'file=@-' 0x0.st
ls -lR /boot | curl -F 'file=@-' 0x0.st
mount /boot
ls -lR /boot | curl -F 'file=@-' 0x0.st

I just mounted /boot while within the chroot

No, that's correct.

Offline

#14 2023-07-12 19:22:14

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Offline

#15 2023-07-12 20:08:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

same output on the ls commands

Means (likely) the /boot partition wasn't unmounted.
Either you skipped the step or it was mounted multiple times.

findmnt /boot
umount /boot
findmnt /boot

You don't have to post this, you want findmnt at some point to not print anything.

Offline

#16 2023-07-12 21:16:52

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

Offline

#17 2023-07-12 22:17:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

It looks like originally (? June, 3rd) you installed grub into the /boot directory of the root partition (sda2) and the ESP was mounted somewhere else.
W/

--efi-directory=/boot

suggesting that the intention was to mount the ESP into /boot, the /boot directory on the root partition should be empty.

Make sure sda1 is mounted into /boot **ONCE**, re-install the kernel, run grub-install and grub-mkconfig and reboot.
If it works, clear the /boot directory on the root partition (w/o sda1 mounted)

The inner EFI/EFI directory on the /boot partition is probably just bogus as well.

Offline

#18 2023-07-13 01:26:39

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

June 3 (2022) was when I first installed the system. Before I try this, could you clarify what you mean by "clear the /boot directory on the root partition" ? Do you mean to rm -rf /boot/* ?

And after I reboot I should

mount /dev/sda2 /mnt
arch-chroot /mnt

then do this "clear the /boot directory" thing, correct?

Offline

#19 2023-07-13 04:50:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

Do you mean to rm -rf /boot/* ?

Yes. AT THE END OF THIS! Not now.

You first want to sanitize the ESP/boot partition situation, ie. turn the ESP into your /boot partition (that's not an absolute necessity, but the pattern that emerges from this thread and you've to be consistent w/ one approach)
Removing the residuals from the /boot path on your root partition is just cleaning up after the work.

Offline

#20 2023-07-13 16:27:05

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

I believe everything ran smoothly. Am I now okay to reboot, remove the installation media and pray to the archlinux gods that my system works again? big_smile

Offline

#21 2023-07-13 17:55:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] Can't boot after installing LTS kernel

Your guess is as good as ours (as wdk what you actually did) and there's only one way to find out cool

Offline

#22 2023-07-13 19:56:50

sadproton
Member
Registered: 2022-11-13
Posts: 11

Re: [SOLVED] Can't boot after installing LTS kernel

It worked! Thank you all so much for the help. My hunch is that during the installation process I did not mount the EFI system partition before generating the fstab and installing GRUB. Will definitely be more mindful of that next time! lol

Offline

Board footer

Powered by FluxBB