how do i get the grub bootloader back after windows reinstal

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
sanitarium

how do i get the grub bootloader back after windows reinstal

Post by sanitarium »

i've just had to reload windows onto its partition & can no longer get to my linux mint 8 install how do i go about getting the boot loader back so i can choose which os i want to log into?
any help would be really appreciated
thanks
sani
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mmesantos1

Re: how do i get the grub bootloader back after windows rein

Post by mmesantos1 »

You can load the Mint LiveCD here is a link with the how to. :) Since you are running Mint 8 you are useing Grub2 by default.

https://help.ubuntu.com/community/Recov ... ingWindows
sanitarium

Re: how do i get the grub bootloader back after windows rein

Post by sanitarium »

hey
i've just tried the steps in the link provided but keep getting errors
error 1:
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: Cannot read `/grub/core.img' correctly

error 2 (the --recheck step):
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: Cannot read `/grub/core.img' correctly
am i being stupid & missing something obvious?
thanks
sani
caf4926
Level 7
Level 7
Posts: 1916
Joined: Mon Mar 22, 2010 3:21 pm
Location: Argyll and Bute

Re: how do i get the grub bootloader back after windows rein

Post by caf4926 »

Boot the Mint CD

* Open a terminal and type

$ sudo fdisk -l

* Now, you need to remember which device listed is your linux distribution, for reference, /dev/sda1 will be used. Now we need to mount the filesystem to /mnt

$ sudo mount /dev/sda1 /mnt

* If you have /boot on a separate partition, that need's to be mounted aswell. For reference, /dev/sda2 will be used.

$ sudo mount /dev/sda2 /mnt/boot Make sure you don't mix these up, pay attention to the output of FDISK

* Now mount the rest of your devices

$ sudo mount --bind /dev /mnt/dev

* Now chroot into your system

$ sudo chroot /mnt

You should be chroot'd into your system as root, you can now run commands as root, without the need for sudo.

*

Now you need to edit the /etc/default/grub file to fit your system

$ nano /etc/default/grub

*

When that is done you need to run update-grub to create the configuration file.

$ update-grub

*

To install GRUB 2 to the MBR, next you need to run grub-install /dev/sda

$ grub-install /dev/sda
Linux Mint 21.1 Cinnamon
sanitarium

Re: how do i get the grub bootloader back after windows rein

Post by sanitarium »

hey
i got as far as:
Now you need to edit the /etc/default/grub file to fit your system

$ nano /etc/default/grub

what do i need to change in the file?
thanks
sani
caf4926
Level 7
Level 7
Posts: 1916
Joined: Mon Mar 22, 2010 3:21 pm
Location: Argyll and Bute

Re: how do i get the grub bootloader back after windows rein

Post by caf4926 »

You can skip that and just run

update-grub

then

grub-install /dev/sd?
Linux Mint 21.1 Cinnamon
Locked

Return to “Beginner Questions”