Fix Windows MBR

From: Peter (BOUGHTONP) 2 Jul 2017 19:56
To: ALL1 of 18
Dual boot machine - I deleted old Linux partitions and broke Grub.

I just want to repair the MBR so Windows can boot, but I don't have a recovery disk.

I've spent /ages/ creating a bootable USB with Boot-Repair-Disk on, but it doesn't start ("can not mount /dev/loop0 (/cdrom/casper/filesystem.squashfs) on //filesystem.squashfs")

So any suggestions on the simplest way to restore it?

And why is it so bloody complicated to tell a computer to boot from partition X on drive Y? :@

From: Peter (BOUGHTONP) 2 Jul 2017 21:32
To: Peter (BOUGHTONP) 2 of 18
Ok, so I re-mirrored the disk to get things booting again, and found instructions for creating recovery disk without needing an ISO, so I'll do that tomorrow and figure out if Grub has a proper uninstall method before I start re-doing partitions.
From: CHYRON (DSMITHHFX) 3 Jul 2017 01:24
To: Peter (BOUGHTONP) 3 of 18
# dd if=/dev/sda of=/path/to/mbr.bak bs=512 count=1
From: koswix 3 Jul 2017 12:03
To: Peter (BOUGHTONP) 4 of 18
I can choose boot drive and partition from within the bios on my laptop, guessing you've checked if that's possible on your machine?
From: Peter (BOUGHTONP) 3 Jul 2017 20:07
To: koswix 5 of 18
That'll be either UEFI or GPT doing that.

I don't got none of those.

From: Peter (BOUGHTONP) 3 Jul 2017 20:11
To: CHYRON (DSMITHHFX) 6 of 18
That copies an MBR file to the first 512 bytes of the disk, right?

One of the many useless bits of information that lodged itself in my brain from the numerous pages of irrelevant crap I read through yesterday is that it's not safe to assume that's always the case.

From: Peter (BOUGHTONP) 3 Jul 2017 20:51
To: ALL7 of 18
MBR restored, old partitions removed, Windows still boots, 100GB free on C, and an evening of robocopy /mir /dcopy:t to look forward to.

//WOOT//

From: koswix 3 Jul 2017 21:43
To: Peter (BOUGHTONP) 8 of 18
Ah yeah, uefi I think. Useful if you've got it!
From: Peter (BOUGHTONP) 3 Jul 2017 22:58
To: ALL9 of 18
Almost all done... after shuffling partitions I've got 40GB unallocated on my second disk which is before the main partition and when I try extending Windows wants to do some "dynamic disk" bollocks to use it. Grrr.

A quick search says GParted can just extend partitions backwards, so that'll be tomorrow's task and then I'll finally be all fully upgradeded.

From: CHYRON (DSMITHHFX) 4 Jul 2017 00:33
To: Peter (BOUGHTONP) 10 of 18
Nope, it copies the mbr + partition table to a file, which can then be restored from a linux boot disk in the event said mbr is hosed.
From: Peter (BOUGHTONP) 4 Jul 2017 21:31
To: ALL11 of 18
"Moving a partition might take a very long time to apply."

Well that's a useful message. How long is "very long"?

Search reveals no information whatsoever.

Fuck it, can't be that bad. I'm enlarging the partition not moving it, so at most it should just need to update the index table file offset values or something, no data needs to change.

"3.96 GiB of 1.78 TiB copied (41:40:50 remaining)"

Oh fucking hell!!! :@

Even *if* it recognises that half the bloody disk is empty, that's still 21 hours just for an extra 5% of space.

"8.00 GiB of 1.78 TiB copied (46:41:52 remaining)"

It's gone up by five hours! :@

The original clone only took three hours - lets see what happens when I click this cancel button...

From: Peter (BOUGHTONP) 4 Jul 2017 21:37
To: Peter (BOUGHTONP) 12 of 18
Hrm, so it looks like it cancelled and restored the original partition info, and the data is all still there - I guess since I did it before it went past the 40GB point. Yay for not having to spend another three hours faffing.
EDITED: 4 Jul 2017 21:38 by BOUGHTONP
From: Peter (BOUGHTONP)16 Aug 2018 21:21
To: ALL13 of 18
Heh, so this is why I've got a 32GB pendrive with Windows recovery on.

If I'm reading my ramblings correctly, it wasn't any help and there's no reason not to overwrite it ... so why do I feel like the day after I do, Windows will suddenly break on me... :'S

From: CHYRON (DSMITHHFX)17 Aug 2018 10:15
To: Peter (BOUGHTONP) 14 of 18
I thought you said the pendrive was useless for windows recovery anyway? Besides, the things are dead cheap.
From: Peter (BOUGHTONP)17 Aug 2018 18:49
To: CHYRON (DSMITHHFX) 15 of 18
They are, which is why I went out at lunchtime and just got a new one.

It's frustrating that every supposed-to-be-quick task I try to do turns into an odyssey.

EDITED: 17 Aug 2018 18:51 by BOUGHTONP
From: CHYRON (DSMITHHFX)17 Aug 2018 19:40
To: Peter (BOUGHTONP) 16 of 18
Here's a new-to-me debian based os. Can't tell if it's super-easy, or just dumbed down Gnome

https://endlessos.com/
From: Peter (BOUGHTONP)17 Aug 2018 22:47
To: CHYRON (DSMITHHFX) 17 of 18
From: CHYRON (DSMITHHFX)18 Aug 2018 01:11
To: Peter (BOUGHTONP) 18 of 18
Does look like a kiddie toy.