You are not logged in.
I have seen a few posts mentioning this particular mistake, but I haven't come across one that explicitly explains how to recover from it.
After updating my Arch like a brainlet:
pacman -Qi linux | grep Version
outputs
Version : 5.5.7-arch1-1
while
uname -r
outputs
5.4.5-arch1-1
As a result I no longer have access to my ethernet ports/wifi in general, in addition to the other expected tribulations (Xserver borked, etc.).
I still have my Arch iso on a live USB from when I first installed it.
I do not have UEFI (don't know if this matters), I'm on an old T440s.
What are the steps that I need to take in order to recover from this without nuking my whole install?
Please keep in mind that I have a genuine micro-brain.
Last edited by dotdotok (2020-03-06 11:12:16)
Offline
Clear the boot dir, mount it, and reinstall the kernel package.
If you can't mount it because of missing filesystem drivers, downgrade the kernel first, you should find the package in your pacman cache. The other option would be to boot the install disk and do all of it from there.
Offline
Clear the boot dir, mount it, and reinstall the kernel package.
+1, should work
If you don't automount /boot, this is an easy mistake to make repeatedly.
To prevent in future, consider making the unmounted /boot write-protected even for root user.
# make sure it's not mounted
umount /boot
# leave a message for humans
touch /boot/BOOT_IS_NOT_MOUNTED
# make it immutable
chattr +i /boot
That should make it not-writeable when umounted so files can not silently be placed/installed by mistake.
When mounted, it's writeable as per normal, thus making the mount mandatory for kernel updates and the like.
example output with pacman erroring out when /boot is not mounted:
:: Processing package changes...
(1/1) reinstalling linux [######################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating linux initcpios...
install: cannot create regular file '/boot/vmlinuz-linux': Operation not permitted
error: command failed to execute correctly
Last edited by frostschutz (2020-03-04 14:29:15)
Offline
The other solution would be using a bootloader like grub or refind which supports having your /boot directory be part of your root filesystem e.g. ext4. Then you'll never have to boot it at all.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Why was /boot unmounted during the kernel upgrade? And why do you even have a separate /boot partition if you have a non-UEFI system?
@eshwartz: rEFInd won't work for the OP.
Offline
Uh.
> I do not have UEFI (don't know if this matters),
I don't know how I glossed over this, but it is indeed bizarre to use a separate boot partition when you're not forced to have a dedicated ESP in the first place. It does *nothing* but complicate things.
(Also, this is yet another reason it drives me nuts to see people storing UEFI kernels in a dedicated partition. More and more confusion!)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Clear the boot dir, mount it, and reinstall the kernel package.
If you can't mount it because of missing filesystem drivers, downgrade the kernel first, you should find the package in your pacman cache. The other option would be to boot the install disk and do all of it from there.
So just to make sure I get you:
1. Clear the boot dir -> cd into boot, rm everything in boot
2. Mount it -> mount /boot
3. Reinstall the kernel package -> What do you mean by this? As in pacman -S linux? If so I suppose I would need to boot into the iso to get an internet connection first, then chroot into my laptop and then pacman -S linux?
4. And then just reboot one last time?
Offline
Why was /boot unmounted during the kernel upgrade? And why do you even have a separate /boot partition if you have a non-UEFI system?
@eshwartz: rEFInd won't work for the OP.
Because during my initial install I was using an apparently outdated/misinformed video tutorial (Luke Smith's). I did end up switching to the official guide but it was _after_ I had already set up the partitions and I didn't do a complete tear-down and restart from zero (like it seems I should have).
Offline
I suppose I would need to boot into the iso to get an internet connection first, then chroot into my laptop and then pacman -S linux?
Yes, that's right. Make sure both your root and /boot partitions are correctly mounted before using arch-chroot though (just as you did when installing).
I was using an apparently outdated/misinformed video tutorial (Luke Smith's).
Please troll his YT channel, this isn't the first thread his "guides" have appeared in. He's an annoying, ignorant, narcissistic twat. IMO.
Offline
1. Clear the boot dir -> cd into boot, rm everything in boot
2. Mount it -> mount /boot
3. Reinstall the kernel package -> What do you mean by this? As in pacman -S linux? If so I suppose I would need to boot into the iso to get an internet connection first, then chroot into my laptop and then pacman -S linux?
Well, you might still have the linux package stored in /var/cache/pacman/pkg, in which case you don't need internet. So you could do it from the running system.
Of course, there is no reason you couldn't use the ISO which you already have anyway. But I feel it is worth pointing out that you can most likely still recover even without one.
Last edited by eschwartz (2020-03-05 20:31:48)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
dotdotok wrote:1. Clear the boot dir -> cd into boot, rm everything in boot
2. Mount it -> mount /boot
3. Reinstall the kernel package -> What do you mean by this? As in pacman -S linux? If so I suppose I would need to boot into the iso to get an internet connection first, then chroot into my laptop and then pacman -S linux?Well, you might still have the linux package stored in /var/cache/pacman/pkg, in which case you don't need internet. So you could do it from the running system.
Of course, there is no reason you couldn't use the ISO which you already have anyway. But I feel it is worth pointing out that you can most likely still recover even without one.
Got ya, very much appreciate the help.
I am marking the thread as SOLVED for posterity, but to be truthful I have actually just accidentally nuked my system. In the interest of caution I wanted to mv the contents of /boot into ~/boot-backups, however, I had eaten an extra bottle of glue beforehand--inhibiting my last 5, already handicapped, brain cells, and instead of typing ./* I typed /*
I am going to take this as a lesson and as a chance to do a full re-install, this time based _fully_ on the official install guide. I didn't lose too much work, it'll be a weekend of reconfig though, which I'm ok with.
Last edited by dotdotok (2020-03-06 12:46:06)
Offline
In retrospect, it might have been a better move to change:
1. Clear the boot dir -> cd into boot, rm everything in boot
to
1. Clear the boot dir -> rm /boot/*
or
1. Clear the boot dir -> rm -r /boot; mkdir /boot
This would have been somewhat more typo-proof.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline