reinstalled windows 10 lost grub

writeman

New Member
Joined
Jan 28, 2020
Messages
1
Reaction score
1
Credits
0
Hello. New to Linux-just spent about 12 hours getting Windows 10 reinstalled and finally working (need it for work)-discovered mx Linux which I love, but seem to have lost grub. Windows disk management says my Linux partitions are primary, healthy and active. I have the MX live usb. Can I use their fix grub tool? If I can't, I'm not sure how to reinstall Linux in the exact same partitions: 39.06 gb Active, Primary Partition (boot?); 411.13 gb healthy partition(home); 15.57 gb healthy primary partition (swap). I've tried to figure it out on the internet, but I.m deathly afraid of screwing up the Windows reinstall which was a nightmare. Any help would be appreciated, and apologies in advance if I have violated protocol with this request... Sincerely, writeman total noob. Thank you.
 


so are you saying you installed linux and then windows? if so because Windows has no respect for anything it simply overwrote boot manager that Linux set up

if all partitions are right clean. etc then it means everything is ok,simply that the boot manager has been overwritten. Now if everything is there on the linux partition it means all the grub scripts are also there. So its a matter of getting to those grub scripts probably this one $ update-grub

one approach is to use linux on a usb something like knoppix; you are going to have to boot from usb stick . using a terminal windows from the OS on the usb you are going to have to "evoke" the grub script. basically you can do this is you chroot the mounted partition linux is on. it means you using scripts on the installed linux as if you had booted that Linux partition. Another way is booting from a CD disk grub rescue.

So the moral of the story is : if you have a clean hard disk and want both Windows & Linux always install Windows first.
 
another possible crazy way if you have plenty of room is to install another Linux use that to shrink partitions , then that linux if it uses grub will update for all OS's meaning you could boot any of the three.
As i said probably mad..
 
As i said probably mad
And with a good chance of it working to!

@writeman G'day and welcome.
I like MX -Linux as well but my main OS is Mint. and that will be my secondary OS.
We all were once like you, new to this OS even the @wizardfromoz so relax and have a good read of what the @captain-sensible wrote and even I like his last suggestion. So just sit back think about what you need to do then carry it out.
 
just had another look at your post; you say you have a live linux ok yes you can try that.

first have a look at what tools it has ; has it got gparted ?
it would help me to see structure visually of partitions
or boot MX live and tell me this output:

either sudo fdisk -l or

$ su ->password->root -> #
# fdisk - l
// thats a small L

mine is:
Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 8595455 8388608 4G Linux swap
/dev/sda3 8595456 122142686 113547231 54.1G Linux filesystem

so in my case I would need to use /sbin scripts in /dev/sda3

first look around a bit MX linux to see what is where . can you see something like an /mnt directory.

Because we need to mount /dev/sda3 or whatever your linux install is on.

say there is a hd directory in /mnt
to mount you would use( in my case):

Code:
# mount /dev/sda3        /mnt/hd
//then  we chroot it
# chroot /mnt/hd
// then try

# update-grub




and tell us if any output

[ others on here check above, if that makes sense or I missed anything ]
 
Last edited:

Members online


Top