Restore the GRUB Bootloader

Restore the GRUB Bootloader
https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader

So me dummy didn’t think it would be so hard. Somehow I noticed in Gparted. That all my Netrunner rolling was installed on one partition. Even tho I usually separate / and /home. So there I had all on sda6 so copied all of sda6 to sda5 which had the grub so overwritten.
So lo and behold broken. and sda6 is deleted free now.

Following the link above ran into issues. Trying to generate a new grub2 and install on sda5. As have a standard windows boot on mbr and use EasyBCD to dual boot. Like the double boot menus for safety. Like in this case typing from my Win7 side presently.

So followed the instructions and ran into issues right away. I started with 2. List your partitions. And had a sudo su terminal open.
What was confusing is if I needed to?

  1. Mount your Manjaro system partition. No problem
  2. Change to the root directory of your mounted partitions. - No problem

Then

[code]mount -t proc proc /mnt/proc

mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts/
chroot /mnt[/code]
No problems

pacman -S mtools os-prober

Errors: error: failed retrieving file ‘mtools-4.0.18-2-x86_64.pkg.tar.xz’ from manjaro.uberglobalmirror.com : Could not resolve host: manjaro.uberglobalmirror.com

error: failed retrieving file ‘mtools-4.0.18-2-x86_64.pkg.tar.xz’ from mirror.ragenetwork.de : Could not resolve host: mirror.ragenetwork.de

error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

Don’t need those? As os-prober was installed but not mtools. Also in LiveCD didn’t know how to install with Octopi as asked for a password?

Continued anyways with

grub-install /dev/sda5

[root@netrunner /]# grub-install /dev/sda5

Installing for i386-pc platform.
grub-install: warning: File system `ext2’ 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.

Blocklist? on my / partition? Confused at this point and can’t boot into netrunner. As left at a grub rescue> prompt and don’t know what to do to boot up to my partition then use my grub-customizer to fix?

So go back and do 1 Chroot first? Install it with yaourt -S mhwd-chroot?

Why are not mtools , os-prober & mhwd-chroot installed on LiveCD? What if a person didn’t have Wifi or Internet in the LiveCD.

So any insights or pointers would be appreciated as using a white cane here in the dark! :s

Interesting, I might decide to add os-prober & mhwd-chroot on the next ISO, mtools is already on the ISO.

Anyway, after chrooting into your system, you wouldn’t still be connect to the internet as the live session is no longer active, your now using the installed system on the hardrive. You’ll need to use network managers ncurses interface to connect in order to download the packages.

nmtui

Shouldn’t that be in the page instructions?

So I need to install nmtui? or run the command nmtui?

Update seems using 09-2015 Netrunner or Manjaro Plasma 5 09-2015 neither can I start the boot-repair procedure.

Errors when I try to install using - yaourt -S mhwd-chroot

Netrunner Error

[code]yaourt -S mhwd-chroot
:: Some packages should be upgraded first…
resolving dependencies…
looking for conflicting packages…

Packages (1) manjaro-system-20151019-2

Total Download Size: 0.01 MiB
Total Installed Size: 0.00 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages …
manjaro-system-2015… 5.7 KiB 16.7K/s 00:00 [###############] 100%
(1/1) checking keys in keyring [###############] 100%
(1/1) checking package integrity [###############] 100%
error: manjaro-system: signature from “Philip Müller (Called Little) philm@manjaro.org” is unknown trust
:: File /var/cache/pacman/pkg/manjaro-system-20151019-2-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
[/code]

Then boot up the Manjaro KDE ubuntu based LiveCD and get

[code]
[manjaro@manjaro ~]$ sudo su
[manjaro manjaro]# yaourt -S mhwd-chroot

==> Downloading mhwd-chroot PKGBUILD from AUR…
x .SRCINFO
x PKGBUILD
mhwd-chroot 1.4-1 (2015-06-16 11:40)
( Unsupported package: Potentially dangerous ! )
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.
Unable to read PKGBUILD[/code]

This is absurd Twists,Turns,Dead Ends and a Bunch of cryptic commands all to restore a simple grub config.

Why are you using yaourt?
This is in the Manjaro repositories, there’s no need for an AUR wrapper.

sudo pacman -S mhwd-chroot

Don’t know that is what the link to the manjaro wiki says to do.
Got all the tools and got change root working but failing at actual grub-install.

[root@netrunner /]# grub-install /dev/sda5 Installing for i386-pc platform. grub-install: warning: File system `ext2' 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.

As Tried the procedure with Manjaro KDE and Netrunner Live Iso’s.
Started an additional thread at Manjaro for more insights and feedback to problem.
https://forum.manjaro.org/index.php?topic=27791.0

Update: After 4 hrs. just gave up and rolled back to my 12 day old partitions backups.
Way too complex and prone to errors trying to restore a grub.

I too have had many grub2 issues over the years, especially with multi-boot systems or a non-default partitioning scheme.

My solution has always been a Ubuntu “Boot-Repair” Re-mix Live CD.

Download ISO, burn it, boot it and update to the latest boot-repair after it prompts you when you run boot-repair. Hasn’t failed me yet.

I know its not the guru way to do it, but “Way too complex and prone to errors trying to restore a grub.” sums up my disappointment with the move from grub to grub2. Whatever the virtues of grub2 its been way too much pain and breakage and much harder to fix compared to grub.

Yes, however since Manjaro, like Arch, loads the Intel microcode early via grub2, the Ubuntu “Boot-Repair” Re-mix Live CD like grub customizer will not work properly on their grub2 implementations.

Luckily, Netrunner rolling didn’t adopt the loading of this code by default like Manjaro does.
This doesn’t mean that if you install this package yourself at any point, you won’t have the same issues as upstream.

There are so many obscure details to deal with, it drives people back to Windoze. I got off the Microsoft treadmill in 2010, but its not been without pain, I do keep a Win-7 system for photoshop and video editing and pretty much nothing else beyond a few Android rooting utilities.

But “boot-repair” did fix my multi-boot setup after intalling netrunner and ubuntu-mate 15.10 which was borked after installing ubuntu-mate over ubuntu-studio 14.04. Netrunner 2015 over my broken netrunner 2014 didn’t mess up the multi-boot.

Well, with 2015 we decided not to include the early Intel microcode loading, and 2014 came out before Manjaro (Arch) had implemented this change for the Intel code. Manjaro still loads the Intel microcode on their ISO’s.