You are not logged in.
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-headersI then made the following changes in my /etc/default/grub file:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_DISABLE_SUBMENU=yI then regenerated the GRUB configuration file using
grub-mkconfig -o /boot/grub/grub.cfgAfter 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 -Pto 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
If this installation is from before Aug of last year, did you do https://archlinux.org/news/grub-bootloa … ibilities/ ?
Offline
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
rebootOffline
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=GRUBOffline
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/fstabwould do the trick? One > instead of >> to avoid repeat entries
Last edited by sadproton (2023-06-26 02:26:29)
Offline
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...
Online
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.mirrorand
mkinitcpio -p linuxgives 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 ![]()
Offline
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.cfgOffline
Apologies for being MIA, life has been busy. Here are images of the requested output
https://photos.app.goo.gl/P4bDo2WrrwzSQP6h9
Offline
I also had a similar issue after installing LTS kernel, every single code which put I didn't get any output of it.
Offline
@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
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
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.stI just mounted /boot while within the chroot
No, that's correct.
Offline
http://0x0.st/HjXs.txt
http://0x0.st/HjA-.txt
http://0x0.st/HjA-.txt
same output on the ls commands
Offline
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 /bootYou don't have to post this, you want findmnt at some point to not print anything.
Offline
Alright here is that output again
http://0x0.st/HjAJ.txt
http://0x0.st/HjAy.txt
http://0x0.st/HjA-.txt
Offline
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=/bootsuggesting 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
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 /mntthen do this "clear the /boot directory" thing, correct?
Offline
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
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? ![]()
Offline
Your guess is as good as ours (as wdk what you actually did) and there's only one way to find out ![]()
Offline
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! ![]()
Offline