I was getting some issues with Java so I decided to do "sudo pacman -Rsc jre-openjdk" (sudo pacman -R jre-openjdk didnt work because i had jre18-openjdk=18.0.2.u9-1 as a dependency) and now whenever I try to perform 'sudo pacman -S jdk-openjdk' I cannot because it saays that all of the files of "jre-openjdk-headless" already exists in the filesystem, is there anyway to remove these? I know that it isn't a good idea to manually remove pacman files. Any help is greatly appreciated!
#Grub not booting to OS
247 messages · Page 1 of 1 (latest)
remove jre-openjdk-headless
btw it's dangerous to use the c option
-c, --cascade
Remove all target packages, as well as all packages that depend on one or more target packages. This operation
is recursive and must be used with care, since it can remove many potentially needed packages.
you told pacman to remove everything that requires java basically
Yeah i double checked the files that it removed and it didnt seem like anything essential
The files that it removed was java-environment-common-3-3 jdk-openjdk-18.0.2.u9-1 openjdk-doc-18.0.2.u9-1 openjdk-src-18.0.2.u9-1 tlauncher-tl-999-0 worldpainter-2.8.1-1 jre-openjdk-18.0.2.u9-1
i usually remove things with -Rns (don't keep config files, remove packages that only this package requires and which i haven't manually installed)
pick one of the files that it's telling you already exists on the file system and do pacman -Qo <file>
this will tell you which package owns the file
what about pacman -Qo /usr/share/licenses/java-openjdk
same result
oh you didn't use the right path in these commands, i would recommend copy/pasting them
hmm
same result even with copying and pasting
huh ig you dont need superuser to run -Qo
pacman -Qo works itself though, tested it with neofetch and htop and it works fine
well it seems like somehow you've ended up with java files on your system that aren't owned by a package, in this case there are 2 options:
- use the
--overwriteoption with pacman to tell it to overwrite files that already exist - or manually delete these files that are conflicting
is manually deleting pacman files safe?
they aren't pacman files
and it's usually a bad idea, but in this case, it would be safe to rm -rf /usr/share/licenses/java-openjdk for example
but you might wanna just let pacman handle it with --overwrite '*'
oops already did rm -rf
didnt even know about those pacman tools
wait.. i might be able to run sudo pacman -Syu for the first time in about 3 years
yeah
if you haven't updated in 3 years then remember to re-run the grub-install command to update the grub executable on your EFI partition
.aw grub
on some systems grub will brick itself if you don't
and you'd have to chroot in from a usb
to fix it
should i do it after i update everything?
yeah, before rebooting
also check out https://archlinux.org/news/git-migration-completed/
you'll want to update your pacman config file
should i update my pgp keys?
yeah it may ask you to do so
also, if you get an error about unable to verify the signature of a package, run sudo pacman -Sy archlinux-keyring then do your Syu again
uh..
what? my partitions shouldn't have changed
i can help you figure out the right args if you don't know what to put
show lsblk -f
also show ls -R /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --no-nvram should do
do it with sudo
there it goes
do you need sudo to go through EFI partitions?
like it wont even detect it?
you mean grub-install?
efi directory should be owned by root so it needs root to write to it
just thought it was odd it said "not found" instead of giving an error for no access
is there anything else i should do?
run sudo mkinitcpio -P and sudo grub-mkconfig -o /boot/grub/grub.cfg for good measure
then you should be good to reboot
was following this but got this error - should i update my keyring?
i don't know what pkgctl is, but this is normal message from SSH when you connect to a server for the first time
if you want to be very secure, you're supposed to double check the key matches what it's supposed to be
oh ok
just need to sudo cp /etc/pacman.conf /etc/pacman.conf.old && sudo mv /etc/pacman.conf.pacnew /etc/pacman.conf
and i should be good
yeah
there was a warning that said ```Warning: os-prober will not be executed to detect other bootable partitions.
i assume its fine?
yeah
os-prober is a grub feature that lets it scan for other operating systems and show them as options in the boot menu
so like you could boot windows from the grub menu if you wanted to
it's just telling you that's disabled
Uh it's not booting right now and my laptop monitor is busted
what do you mean busted?
oh
May be screwed
is arch your default boot option?
Should be
try pressing enter a couple of times
I've always booted to it by default
you might be in the grub menu
Nothing
Arrow keys and pressing enter doesn't work either
did you press any keys before pressing enter
hmm, it looks like something's broken with grub
are you able to go into the bios menu and see that properly on the second display?
Bios only appears on the built in monitor
Vaguely resembles '... shutdown not found'
Think it's "grub_is_lockdown not found'"
we updated the bootloader and the grub config file, so my only idea is that maybe the firmware boot option should've been updated (no --no-nvram option)
to fix this you'll need to boot archiso from a USB
actually, no, that wouldn't be the issue
because grub is being started
Should I try to chroot in?
yeah
i hope you have USB higher in the boot order than Arch's GRUB
might be hard to change the order when you can't see half the screen
Also my screen is about to burn in on the other side
I may try to brute force find my bios options
though, it may be necessary to mess with boot options anyway
it seems like this could be an issue with the firmware boot entry
my troubleshooting idea after chrooting in will be to run grub-install again without --no-nvram
but you will probably end up with 2 boot entries for grub
and you'd need to try each
you can modify boot order in linux though
if you can get the usb booted
I think I have to let it cool
The sides at times just get brighter
Assume it's on the brink of burning out
what happened to this poor laptop
Not even sure honestly
Got it in USB
I'm actually shocked the screen didn't burn out
lol
Can you walk me through chrooting?
mount /dev/sda3 /
mount /dev/sda1 /boot/efi
oh wait
that's wrong
sudo umount /dev/sda3 and sda1 if you already did it
mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot/efi
Got it
arch-chroot /mnt
Done
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB2
explicitly naming it GRUB2 instead of GRUB, this is optional but you're gonna have 2 grub entries anyway so might as well label them
Is chrooting that easy?
yeah
Should I do anything else while I'm in here?
Used to dualboot but scrapped it (hence the sda4)
Oh wait
There's a grub 2 below the windows boot manager
Don't know why it wasn't showing
0002
you can use the same name, but it would still create a new entry, you'd just have 2 entries with the same name
Uh
efibootmgr --bootorder 0002,0001,0000
this will make the GRUB2 entry top priority, then the windows one, then the old GRUB, you can arrange them how you like but put 0002 as the first one
restart isn't a command
do this first
and grub-mkconfig -o /boot/grub/grub.cfg
which
Did this first
yeah
yeah
i don't remember if you can reboot from inside the chroot, if not, then just do exit then reboot
You have to do exit then reboot
It ignores reboot if you're in chroot
Same error?
Should I type anything in grub rescue?
it is possible to manually boot the OS from the grub rescue prompt, but that won't fix the problem
sorry, but i don't really know what's wrong with it now
Should I try to chroot in and manually start it from there?
you can't boot the OS from the chroot
Should I check grub lists in chroot?
yeah you can
you can check efibootmgr and GRUB2 should be on top
It's not on top
actually it may not be on top but it should be the first number listed on the BootOrder line
i don't think it matters if it boots the old or original grub entry anyway, they appear to be identical
Doesn't one have the no vram option though?
this is an option to grub-install that tells it to not create a new boot entry
if you wanna check the grub config (and see the menu entries) you can do less /boot/grub/grub.cfg
the grub menu entries look like this
I'm in, not sure anything seems off though
Then again I probably wouldn't be able to tell
This is really basic but how do I get out of less? Im doing Ctrl C and it's not doing anything
press q
if you're stuck in less you can press Ctrl Alt F2 then run killall -9 less then Ctrl Alt F1
there are 7 TTYs you can access with F1-7
I'm just gonna rechroot because I'm forgot how to type my password on qwerty since I've been using a different layout
heh
Anything else I should try to look at?
Why is it saying that no boot order is set in efibootmgr
probably just your laptop's firmware doesn't talk properly with linux
so efibootmgr can't tell what the order is
not that i can think of
someone else may be able to help you more
Is my firmware messed up? It gave me a warning on it at the start of booting
i think that top warning is probably harmless
Alright, my firmware is about 10 years old anyway
tl;dr to anyone else coming to help:
they updated their arch system for the first time in 3 years, and made sure to run grub-install and grub-mkconfig
the system boots to the grub rescue prompt
we chrooted in, installed grub again with a different entry ("GRUB2"), same issue persists
also their laptop screen is nearly unusable and they are restricted to an external display
Welp its getting late and i should probably head to bed, goodnight
good night, best of luck