You are not logged in.
Hello everyone,
After a big update (haven't update for a while) i shut down my laptop but now when turning it on the bootloader isn't starting at all. So i think now i can restore it via live usb but idk how to do it properly. I'm trying to reinstall grub but it tells me
grub-install: error: cannot delete '/boot/grub/x86_64-efi/memrw.mod': read-only file system
I know i shoud remount with read and write permissions but i'm not sure what to remount...
Any suggestions?
Last edited by cervyesterday (2024-11-18 17:02:58)
Offline
After you booted from the install media, did you set up and enter a chroot?
You should have mounted your root file system on /mnt, your EFI file system on /mnt/boot, then entered your system using arch-chroot /mnt
Then update GRUB.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Yes i did all of the above. If i try to update with
grub-mkconfig -o /boot/grub/grub.cfg
It says the filesystem is read only. Should i remount /mnt? /mnt/boot? And in the case, what is the correct syntax, just
mount remount,rw /mnt
?
Offline
First and foremost: why is it mounted read-only?
EIther you're looking at the wrong filesystem (ie. the /boot path on the install iso) or the filesystem is corrupted or the disk damaged.
Does dmesg tell you why the FS was (likely "re-")mounted ro?
Do you need to fsck it?
What does "smartctl -a" say?
(Idk whether smartctl is on the iso, in doubt use some live-distro like https://grml.org/ )
Online
I'm not sure what to reply... i'll try to explain in the most complete way and trying to reply to your questions.
if I turn on the laptop grub says
Reboot into firmware interface
So if I use a live usb the first things i see are these messages
ACPI BIOS Error (bug): could not resolve symbol [\_SB.PC00.RP09.PEGP.DDNT], AE_NOT_FOUND (20240322/psargs-332)
ACPI Error: Aborting method \_SB.PC00.LPCB.EC.SEN4._TMP due to previous error (AE_NOT_FOUND) (20240322/psparse-529)
So i thought what i said before, that updating grub would fix and i got that error of ro. Note that the fstab says that both the root and the efi partitions are rw.
Now, if I run dmesg while in chroot i can see two lines that can help
EXT4-fs (name) warning: mounting fs with errors, running e2fsck is recommended
...
FAT-fs (name) Volume was notproperly unmounted. Some data may be corrupt. Please run fsck
So, i think i need to fsck, but actually idk what it means. I'll start reading the guide about it.
Last but not least, for both the partitions smartctl says a lot of infos but nothing that seems like an error. Indeed, at the bottom it says
No Errors Logged
EDIT:
I read the guide. Does "run fsck" simply mean run
fsck -a
as said in the wiki?
Last edited by cervyesterday (2024-11-17 21:45:29)
Offline
dmesg | curl -F 'file=@-' 0x0.st
smartctl -a /dev/sdX | curl -F 'file=@-' 0x0.st # use the proper device instead of sdX
Online
dmesg | curl -F 'file=@-' 0x0.st smartctl -a /dev/sdX | curl -F 'file=@-' 0x0.st # use the proper device instead of sdX
Dmesg output: http://0x0.st/XdS8.txt
Smartctl output: http://0x0.st/XdSq.txt
Offline
umount nvme0n1p1
umount nvme0n1p2
And then fsck both.
After a big update (haven't update for a while) i shut down my laptop
With the power button? Any idea why else both partitions might be corrupted?
Online
Actually i can't remember if with power button, but it could be (finally i know why it shouldn't be done).
Do i have to run
fsck -a
or
fsck -r nvme0n1px
two times? And after that, it willautomatically remount both partitions?
Offline
Nothing happens automatically.
(exit the chroot or just don't chroot), umount the partitions, run fsck, then re-mount them.
"-r" is rather pointless but ok, don't run fsck un-interactively (so no -a)
Online
Ok for the filesystem partition. For the boot one i don't know what to do. It asks me if i want to copy the original to backup or backup to original (i assume the second one). Then it asks which FAT to use the 'first' one or the 'secondo one, ehat first and second stand for? In the end it asks if I want to correct or not (and i assume that i need to correct them)
Offline
Your guess is as good as anybody elses on that - pick one.
Since you're gonna re-install the bootloader anyway, it doesn't matter all that much.
Once you're done and can mount the partitions rw, you want to
pacman --root=/mnt -Qkk | grep -v ', 0 altered files' | grep -v backup
to see whether this entire thing has left corrupted packages behind.
Online
There'sthe output http://0x0.st/XdSE.csv
So now i need to reinstall grub?
Offline
That looks ok and yes, arch-chroot into the system, re-install grub and also run grub-install and maybe grub-mkconfig.
Depending on the corruption of the boot partition you might also want to re-install the kernel
Online
Ok, now grub loads but it freeze saying
initramfs unpacking failed: invalid magic at start of compressed archive
Offline
Depending on the corruption of the boot partition you might also want to re-install the kernel
as this should™ regenerate the initramfs implicitly
Online
And so do i have to run
mkinitcpio -p linux
?
Offline
You just have to re-install the kernel package, that will also take care of a pot. corrupted kernel image copy on the boot partition.
Online
But actually i've already reinstalled the kernel, i mean, i've reinstalled grub, run grub-install and grub-mkconfig and reinstalled the kernel. Then I reboot and the error occours.
Should i reinstall the kernel again?
Offline
From the chroot, what's the output of
pacman -S linux
file /boot/vmlinuz-linux
file /boot/initramfs-linux.img
Online
Pacman output: http://0x0.st/XdQm.txt
/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.11.8-arch1-2 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Fri, 15 Nov 2024 15:35:07 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
/boot/initramfs-linux.img: ASCII cpio archive (SVR4 with no CRC)
Offline
Please confirm those kernel & initramfs images were on the EFI system partition rather than the main root partition.
Does fsck(8) confirm that the FAT filesystem is now fine?
I would have just reformatted the ESP and reinstalled the kernel & bootloader, FAT is not reliable at all. You don't need to mount the ESP under /boot/ for GRUB btw, it might be more reliable to have /boot/ on the root partition instead.
Para todos todo, para nosotros nada
Offline
Maybe we should also check where the OP is actually booting from.
Post an older journal from the chroot,
sudo journalctl -b -1 | curl -F 'file=@-' 0x0.st
should do
Online
Please confirm those kernel & initramfs images were on the EFI system partition rather than the main root partition.
yes, they're both in the ESP.
Does fsck(8) confirm that the FAT filesystem is now fine?
Fsck output on the esp partition
Post an older journal from the chroot
Here's the output of journalctl
Last edited by cervyesterday (2024-11-18 08:49:32)
Offline
That's not a complete journal but
Oct 18 15:07:27 archlinux kernel: BOOT_IMAGE=/vmlinuz-linux-lts
you had been booting the LTS kernel from some boot partition.
=> Try to re-install linux-lts, not linux
Online