Boot Partition Grub Rebuild using Linux Mint ISO

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
binar
Level 3
Level 3
Posts: 141
Joined: Wed Feb 05, 2020 8:04 am

Boot Partition Grub Rebuild using Linux Mint ISO

Post by binar »

Hi All,
I made a stupid mistake. I was formatting what I thought was a USB stick using the Disk Manager but did not realize I had the C: Drive (my Linux Mint OS boot drive) selected. So, I inadvertently deleted the boot partition and and now when I try to boot my Linux Mint 20.1 version I get the error shown below:

Code: Select all

error: no such partition.
Entering rescue mode...
grub rescue>
I have spent hours looking at YouTube videos and no solution found. In short, is it possible to use the terminal in the USB Stick Linux Mint installation ISO I have running and copy over all the missing grub files from this install ISO over to the C: drive which has all these files missing? I tried an app called Boot Repair in my Linux Mint ISO and I was not able fix my C: Drive Boot drive.

If it is not possible to rebuild the boot partition is it possible to copy over all my data to a new Linux Mint 20.3 fresh installation?

Any help that will point me in the right direction to fixing this problem will be greatly appreciated.
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.
deepakdeshp
Level 20
Level 20
Posts: 12340
Joined: Sun Aug 09, 2015 10:00 am

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by deepakdeshp »

First Linux doesn't have c drive
https://askubuntu.com/questions/56929/w ... letters%20(fd,device%20has%2C%20starting%20by%20zero.&text=So%20for%20example%3A,SATA%20drive%20is%20%2Fdev%2Fsda1

Post output of commands

Code: Select all

 sudo parted -l; sudo blkid; sudo fdisk -l
Copy paste the command from the terminal
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by pbear »

binar wrote: Sun May 15, 2022 11:54 am In short, is it possible to use the terminal in the USB Stick Linux Mint installation ISO I have running and copy over all the missing grub files from this install ISO over to the C: drive which has all these files missing?
You can reinstall Grub from a live session, yes, but it's more complicated than simply copying files. I wrote a tutorial on how to do this. How easy it will be to follow depends on how comfortable you are with Terminal. If you have any questions, feel free to ask. Do so in this thread, not in the tutorial. Also, to be able to give useful advice, I'll need your system information.
If it is not possible to rebuild the boot partition is it possible to copy over all my data to a new Linux Mint 20.3 fresh installation?
Of course. As a practical matter, this generally means copying them off to a USB drive, then copying back in. You should already have that though, in the form of data files backups. If you don't, setting up backup should be your next priority.
binar
Level 3
Level 3
Posts: 141
Joined: Wed Feb 05, 2020 8:04 am

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by binar »

Thank you to all for your help. I went down the path of using GParted to see if I could fix my boot partition problem. Below is the link for this app:

https://gparted.org/display-doc.php%3Fn ... elp-manual

I wish I could say I fixed the problem but instead I ended up messing up other partitions which contained a lot of data. In short, I lost all my data I had on this hard drive and that really hurt because it was not backed up anywhere. It was 3 AM when I mistakenly damaged this hard drive using the DISKS utility app in Linux Mint. So I blame being too tired for having committed this stupid mistake. But perhaps the best lesson I learned is to always have a backup hard drive of the data. Live and learn as they say.
deepakdeshp
Level 20
Level 20
Posts: 12340
Joined: Sun Aug 09, 2015 10:00 am

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by deepakdeshp »

There are firms which will recover data for you. An example https://www.googleadservices.com/pagead ... Qx6BAgEEAE
There are many like this

There are many DIY
https://www.turbogeek.co.uk/ext4-data-recovery/
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
binar
Level 3
Level 3
Posts: 141
Joined: Wed Feb 05, 2020 8:04 am

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by binar »

Thanks for the post. Yeah I thought about that but I decided to roll the dice and believe that the Gparted app was going to fix the problem. In retrospect I should have put the brakes after GParted identified I had a partition containing data. But I didn't stop at this point. I moved on to actually trying to fix the damaged boot partition and this is when I lost all of my data. Gparted has a worlkflow I thought I understood after watching a YouTube video on it. But I was wrong. I ended up making making a wrong step by writing what I thought was a fix to the drive and instead it made it worse.

It would be great if the Linux Mint Disks app could have a feature where the Hard Drive containing the OS could be manually hidden. This would prevent mistakenly formatting the OS drive by mistake.

Thank you to all for your posts.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Boot Partition Grub Rebuild using Linux Mint ISO

Post by pbear »

Don't know why you thought GParted could help with this problem. As described in the OP, it could not.

There are several lessons to learn here, in addition to one you've already mentioned (data file backups). One is that you should be sure you understand how a tool works before using it. Another is that, although easy, YouTube videos tend to be not suitable for any except the simplest problems. Instead, teach yourself how to use written tutorials. They will be more detailed, will cover more scenarios, and lend themselves more easily to clarifying questions.

Anyhoo, you might as well attempt data recovery as deepak suggests. Maybe you'll get lucky.
Locked

Return to “Installation & Boot”