Windows just "fixed" my dual booting drive by destroying Linux

I dual boot Windows 10 and Manjaro 17.1.1 on my laptop as I have some propiotory software that only works on Windows. I just booted into Windows and a message saying “fixing drive” or something appeared. I didn’t think much of it, did the work I needed to do and rebooted to start Linux again. Now I get a message sating it can’t find my drive and I’m being dropped into an emergency shell, not being able to do anything. I have both W10 and my Linux Installs encrypted.

Did Windows just alter my Linux partition to make it unbootable? Is it fixable? I’m kinda a Linux noob.

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

I think the commands are universal. Try reinstalling Grub.

2 Likes

https://help.ubuntu.com/community/Boot-Repair
Works every time for me :slight_smile:

2 Likes

Maybe boot to a LiveCD and verify that your install is still there. Windows shitting all over the boot loader is pretty typical. This sounds like a very different problem. This sounds like Grub actually loads, and attempts to boot the selected OS, and fails.

2 Likes

If I may, consider using a separate hard drive for your Linux installations.

I know, you shouldn’t have to, and it’s more expensive and often unnecessary, but it really prevents things like this. My buddy had his C:\ partition sh*t itself and in the process of recovering Windows, his Linux partitions became corrupted.

Could have just been a nasty coincidence, and maybe the drive was failing (initial diags passed), but using multiple drives prevents this kind of thing :slight_smile:

Just a suggestion for future reference.

3 Likes

This is exactly what happends. Grub seem to work fine and I can see my Windows and Linux paritition. It is after I chosen the Linux installation that this happends. I can post a screenshot later today.

This is how it looks after I have chosen Manjaro from grub:

Not sure how this works as grub is able to detect the device just fine…

I have tried running a recovery disk but unfortunatly Grub doesn’t play well with my machine. When I installed Manjaro, I frist had to use Refind to get it to boot. I will have to download a respun distro of Ubuntu to boot from USB now.

Edit:

I booted Ubuntu and ran Boot Repair, this is the link for the output: http://paste.ubuntu.com/p/Gtn834324k/
Running the recommended settings give me a message saying "Please enable a repository containing the grub efi-amd64 signed packages in the software sources of manjaro Linux (sda5) and then try again. Maybe I need to change something in the settings for boot repair?

can you provide the output of ls -l /dev/disk/by-uuid; ls -l /dev/disk/by-label? in the recovery shell where [rootfs ]# appears

Seems like windows just changed the UUID of the partition.

I’d just run Windows inside a virtual machine, or on a separate drive (in most cases, I know you can’t because you’re on a laptop). Then you don’t have to reboot just to run one program.

Hmm, I can’t seem to be able to type anything at this shell, pressing any key has no effect, nothing happens. I can try with an USB keyboard when I get home.

Ah but the thing is that this is a very low powered laptop, Apollo Lake 3450 and 6GB ram. Using Virtual box is a pain, using Windows is a pain, using Visual Studio is a pain and combining them all is a huge pain. :smiley:

I don’t wanna bump my thread but alas, I really need help! I’m too afraid to just try changing partitions and stuff, I will 100% break it more. Anyone having any suggestion? :slight_smile:

I am pretty confident this will be the problem, and is exactly what I would recommend. If you cannot type in the emergency shell… boot a live CD and chroot into your Manjaro installation.

Re-pointing to the correct UUID will likely fix your problem.

2 Likes

Hmm, I googled chroot and skimmed the wikipedia article. Maybe you could be more specific? I’m not sure I can go into the installation as I encrypted it, but I think it was only the home folder though.

Boot to a LiveCD
Do a quick ls -l /dev/disk/by-uuid and note the UUID of your / and /boot partitions (the ones from your hard drive, not the LiveCD)
Mount your / partition to /mnt (if it’s encrypted you’ll have to look up the commands for this, as I don’t have them off the top of my head, but I believe LUKS is the usual suspect for encrypted disks in Linux)
chroot /mnt
You should now be in your Linux installation, though things may not be exactly as you normally have them
Check Grub to make sure it’s pointed at the right UUID (I also don’t have the commands to do this)

Sorry I’ve left so much of the heavy lifting to you, as far as finding the exact commands. I’m at work and have limited internet access. I don’t mean to come off as a “Well just RTFM,” jerk. But this should set you down the right path.

Edit:
Also worth noting, I don’t know how much I believe that the UUID of your / or /boot partitions has changed. But my other theories are:

  • Your / partition is just corrupted
  • Grub isn’t configured to deal with an encrypted / partition

In going through the motions above, you’ll figure out if either of these are the case. And who knows, maybe the UUID(s) did change.

1 Like

Oh yeah, this is more than enough to get me started. Don’t have time right now but I will probably give it a try during the weekend. I will let you know how it went. :slight_smile:
Thanks!

2 Likes

Alright, so this is what I tested and managed to find out:

I booted live usb and opend the file explorer. My Manjaro partition is mounted at sda5 and I also used your command to check the UUID. As I encrypted the drive with ecryptfs, I looked at this guide however that command don’t work anymore. But, I don’t think I actually need to mount my home folder anyway. Searching after more information, I opened the boot/grub/grub.cfg file in my Manjaro installation. Of what I understand, this is the configuration file for grub. To me it looks correct, UUID for sd5 is set. Regarding using encrypted drive I’m not sure, as I said, this setup has worked 100% for a couple of months.

1 Like

And is the UUID the same as the one in the screenshot you posted earlier?

I’m running quickly running out of ideas here. If it’s the same UUID as in the screenshot, my best guess is that the controller isn’t being seen by Grub anymore, but then why would it be seen by Grub in a LiveCD. It’s all very confusing.

My last resort might be to run a grub-install command from your chroot environment, but not being that familiar with the setup, I’d be hesitant to suggest an example.

Sorry for the offtopic, just watned to share this.

I had Win10 C:\ on SSD + data HDD and Linux on separate SSD (/ and /boot(EFI)) and HDD (/home). After updating, WIn10 simply wiped /boot partition and isntalled its own bootloader there. After I reinstalled systemd-boot there, I couldn’t boot into Win10, because it wiped its own boot partition, too… Was fun loading from Win10 install CD and rebuidling Win10 boot partition in their cmd. The docs where sparse.


I simply gave up on Win10, and now use Win7 in dual boot. It only lives on one HDD now and I manually update it when I hear there’s a big exploit or something.

It may be expecting you to put in root password, if I remeber correctly that is.