From 312fb1d9c6bd22f387fedd11715374136239ee0b Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 5 Jan 2021 17:48:57 -0500 Subject: Manjaro Follow-up --- www/blog/2021-01-05/index.html | 119 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 www/blog/2021-01-05/index.html diff --git a/www/blog/2021-01-05/index.html b/www/blog/2021-01-05/index.html new file mode 100644 index 0000000..50199c3 --- /dev/null +++ b/www/blog/2021-01-05/index.html @@ -0,0 +1,119 @@ + + + + + + senders.io - Blog + + + + + +
+
+

Manjaro Follow-up - Breaking things!

+

I wanted to write a quick follow-up covering how I managed to break, + and then recover, everything when I went to remove my old debian + partition.

+

Recap

+

To recap: I installed Manjaro alongside a Debian/sid and Windows 10 + install. Each of those OSs were on their own SSDs. I went from a 128SSD + with Windows installed, to adding a 256 installing Debian. Years later I + split the Debian SSD into two parts - installing Manjaro on my new slice. + Since my last update I have been playing around with Manjaro and having + made my i3 keybindings for Kwin I've been pretty happy. But then I + started breaking things.

+

Break stuff

+

I broke my Manjaro by updating my Debian (apparently). To be honest + this is the one part I don't fully understand why it happened. + From what I could find online I didn't setup my system to handle two + separate Linux OS installs. But I was no longer able to boot directly + into Manjaro without using the initramfs failover boot option. I only + updated my Debian install because I was debugging something on my work + install, which both run Debian/sid. (Otherwise I would've used my + server which runs Debian/Stable). But considering I hadn't had any + need to boot back into Debian I decided to just get rid of it!

+

GParted, Grub, Gotchas!

+

I went in knowing I'd have to fix my Grub since I'd be + removing Debian, which was the OS that I configured when I first + dualbooted the machine, so I assumed they were linked somehow and I would + need to reinstall it. The process I followed was:

+
    +
  • Create a GParted Live USB
  • +
  • Launch GParted reconfigure my partitions
  • +
  • Open the terminal in the live USB and reinstall Grub
  • +
The 3rd point being a bit of a "rest of the owl" I + wasn't sure what to expect. GParted thankfully warns you + "you're probably going to break stuff see our FAQ" which + had a section on reinstalling grub. Reading that the 3rd part became: +
    +
  • mount the linux OS
  • +
  • bind the live dirs that are needed: /dir /sys + /proc
  • +
  • chroot into the mounted folder
  • +
  • run grub-install <device>
  • +
But what I failed to realize (stupidly in hindsight) was the + "device" is the Master Boot Record (MBR) device. So in my case + Windows or /dev/sdb. I had assumed it was the + device of the linux install so I tried that and got notified my EFI boot + directory didn't look like an EFI partition... and from here it was + rabbit holes. +

Where is my EFI partition?

+

I have a fairly old Windows 7 install that has been upgraded to + Windows 10 during this whole journey. I've been meaning to reinstall + it (on a larger drive). But rather than having a few partitions on my + drive (typically having a boot partition) I just have the one (and a + recovery partition). Its marked as boot, and even mounted to /boot/efi I found when I was able to boot into Manjaro + again. But it made no sense to me. If I needed an EFI partition, why was + my efi pointed to the root of my Windows C drive? The rabbit hole + consisted of:

+
    +
  • Creating a 200MB Fat32 Boot partition
  • +
  • Mounting that as my efi-directory
  • +
  • Reinstalling grub (again on my Linux device)
  • +
  • Eventually getting it to boot straight into Manjaro
  • +
  • Modifying my /etc/fstab to mount my + boot/efi to the new partition (oops)
  • +
  • Repeating the above steps 5 times hoping something would be + different
  • +
  • Eventually finding in a forum that grub should be on the + MBR...
  • +
+

The Fix and Final Steps

+

The fix was to basically follow the steps above but use the MBR:

+
    +
  • Boot GParted Live USB
  • +
  • Properly configure any partitions (this case delete the + "EFI" partition)
  • +
  • Mount the linux device
  • +
  • Bind the necessary live dirs to the linux mount
  • +
  • Run grub-install to the MBR device
  • +
  • Reboot
  • +
It was that misunderstanding about the MBR that sent me on a path, + but now I at least feel semi-confident in changing around my OSs knowing + how to fix Grub. But what bout the Fstab? +

Like all true movie monsters, my stupidity came back for the final + scare. I booted into Manjaro, from Grub! to have it crash on me. It + couldn't mount one of the devices! The deleted partition! I was in + the recover shell and was able to modify the Fstab to point back to the + correct boot/efi device. (Thankfully I was familiar with Fstab to begin + with). But editing two files in a super-low-res terminal is not my idea + of fun (okay, maybe it is).

+

Conclusion

+

One of my new years resolutions was to learn more about my system. So + lighting a fire I had to put out was a great way to get some more + knowledge on maintence for grub/dualbooting.

+
+ +
+ + -- cgit v1.2.3-54-g00ecf