I inadvertently switched off power to my desktop PC during the Manjaro shutdown process. Now my boot partition is corrupted and my PC won’t boot. I only get the GRUB command line when booting.
I followed the instructions in the Manjaro wiki (Restore_the_GRUB_Bootloader). But it doesn’t work because I receive the following error -
grub-install /dev/sda6
Installing for i386-pc platform.
grub-install: warning: File system `fat’ doesn’t support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged…
grub-install: error: will not proceed with blocklists.
I received the same error when I reformatted the boot partition as ext4.
I tried using --force with grub-install. This appeared to work, but Grub only finds my Windows partition, not my Manjaro one.
Thank you for your welcome, Wollie. Here is the output (the Windows partition is a legacy partition - it doesn’t contain a functional operating system) -
sudo parted -l
Model: ATA ST3250312AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
The required commands need to be done after chrooting. So start with a live iso, open a terminal window and chroot by
sudo manjaro-chroot -a
(select 1 if only one line is given)
As you have a msdos parted disk and booted via legacy mode (BIOS) the right commands to restore the grub bootloader are (as mentioned by @freggel.doe already):
Thanks for your help and quick response . I have followed your instructions, but (as happened previously) even though both my boot (/dev/sda6) and Linux system (/dev/sda5) partitions are mounted, grub-install finds only my Windows 7 system on /dev/sda1.
I am disappointed by what seems to me to be a lack of resilience in Linux or Grub (I don’t know which). This has all happened simply because I inadvertently switched off power to my desktop PC during the Manjaro shutdown process. I am not a huge fan of Windows, but at least I think it would have recovered from this mistake much more robustly.
Thanks again for your help. It looks like a reinstall might be my only option. Should I stick with Manjaro and Grub, or are there other options?
caused more corruption as this is the wrong command., forcing it makes it even worse. The /boot partition could be ext4 but I don’t understand why you formatted it, by that you most likely lost all kernels.
Can you post the exact error message? grub-install must be given the disk device in a BIOS install not a partition, so the right syntax is
grub-install /dev/sda
No numbers behind sda.
If you lost the kernels, you could try to reinstall them. Do you remember what kernel you used? In the following procedure I have considered linux54, but if you think another kernel was installed you can replace it, for example by linux419 if you used 4.19.
Thanks again for your assistance - I really appreciate it.
Formatting the boot partition was a (mistaken) attempt to get around the blocklists error (which I think was the result of misreading the instructions and typing grub-install /dev/sda6 instead of grub-install /dev/sda).
I now have a different UUID for this partition from what Manjaro looks for when chrooting (in the fstab?). I get around this with the following command, then exit and chroot again:
I received an error when running the mhwd-kernel command. Here is the output (from manjaro-chroot onwards):
[manjaro@manjaro ~]$ sudo manjaro-chroot -a
==> Detected systems:
–> 0) Windows
–> 1) ManjaroLinux
==> Select system to mount [0-1] :
1
==> Mounting (ManjaroLinux) [/dev/sda5]
–> mount: [/mnt]
–> mount: [/mnt/boot]
–> mount: [/mnt/run/media/patrick/c0e4573a-3d71-45cb-b21e-14e6f3de9abb]
mount: /mnt/run/media/patrick/c0e4573a-3d71-45cb-b21e-14e6f3de9abb: mount point does not exist.
[manjaro /]# grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
[manjaro /]# mhwd-kernel -i linux54
:: Synchronizing package databases…
core 168.7 KiB 180 KiB/s 00:01 [######################] 100%
extra 2013.9 KiB 338 KiB/s 00:06 [######################] 100%
community 6.1 MiB 1298 KiB/s 00:05 [######################] 100%
multilib 194.9 KiB 2.29 MiB/s 00:00 [######################] 100% The following packages are out of date, please update your system first: archlinux-appstream-data archlinux-keyring binutils ca-certificates-mozilla cups curl dnsmasq engrampa fuse-common fuse3 gcc gcc-libs glib2 glibc hwids iana-etc intel-gmmlib iputils lib32-gcc-libs lib32-glib2 lib32-glibc lib32-libva-mesa-driver lib32-mesa lib32-mesa-vdpau lib32-systemd lib32-vulkan-intel lib32-vulkan-radeon libcap libcups libinput libmm-glib libnm libnsl libp11-kit libpipeline libpurple libreoffice-still libtool libutil-linux libva-mesa-driver lightdm linux-api-headers linux54 man-pages manjaro-system mariadb-libs mesa mesa-vdpau mhwd-nvidia-450xx modemmanager mpfr mpg123 nano networkmanager nspr nss openresolv opera p11-kit pam pambase pango perl-libwww pidgin python-reportlab sqlite systemd systemd-libs systemd-sysvcompat thin-provisioning-tools util-linux vlc vulkan-intel vulkan-radeon xfce4-weather-plugin xfsprogs
Do you want to continue anyway? [y/N] y error: no targets specified (use -h for help)
The two commands
pacman-mirrors -f && pacman -Syu linux54
and
mkinitcpio -P
both appeared to work successfully.
When I ran depmod -a, I received the following error messages:
depmod: ERROR: could not open directory /lib/modules/5.6.15-1-MANJARO: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
Thank you! I had to edit /etc/fstab, because of the new UUID for the boot partition (after I had reformatted it). After that, my system booted successfully and I am back up and running. Hooray - what a relief!
Thank you again, Wollie - I greatly appreciate all your help with this!!