LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-08-2018, 11:57 PM   #1
johnlut
LQ Newbie
 
Registered: Jan 2018
Posts: 2

Rep: Reputation: Disabled
Messed up my hard drives, need help with a "master reset".


I have two SSDs and a couple of regular HDDs. I had one SSD running windows and the installed Linux onto the other one.

While doing this I accidentally installed grub onto the SSD with windows on it. After doing this, when booting, I was unable to see windows in the OS selection screen.

After trying to fix this for a while I gave up and ended up deleting all partitions on both drives using a bootable USB with gparted, and left both HDD as entirely unallocated.

I then reinstalled windows using a bootable USB made by the media creation tool by microsoft.

Which leads me to where I am currently. I have one empty SSD which used to have linux and one SSD with windows. Although the windows installation was successful, I cannot boot into it. Instead after the BIOS screen the boot ends with a screen of the following:

Loading Operating System...
error: no such partition.
Entering rescue mode...
grub rescue>

I have tried a couple of remedies however non have helped.

bootrec /fixmbr
- did nothing

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildmbr
- fixmbr runs successfully however fixboot gives me an access denied error.
- I tried to remedy this error however i could not locate an EFI partition as the steps pointed out to do.

re-installing windows
- did nothing

windows statup repair
- failed

I have no valuable data on either of the SSDs, however I do on the HDDs(not sure if relevant but figured might as well include just in case). I wish to achieve what I set out to do originally, which is one SSD with linux and one with windows. I have bootable USBs for both so I don't mind having to wipe anything. How can I fully reset this system so I can just do a total clean install of everything.

Any and all help is much appreciated.
 
Old 01-09-2018, 08:09 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,214
Blog Entries: 12

Rep: Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656
I can't truly help you with the Windows one, except in both cases to say the following rule which applies to me.

First, clear all partitions, and set up the drives using a live boot media, format the drives appropriately. Which is to say, the Windows one have it be one partition of FAT32 and do enable the DOS mode. The Linux one, make it type 83 Linux and put any of ext2/3/4 on it, once again a single partition.

Next, install the intended target drive as your primary and only drive into your computer.

Boot off of the live media and perform a full install onto that primary drive.

This has always worked for me, traditionally with Windows, back in the days of XP, NT, 3.1 ... sorry I don't play much with re-configuring any newer Windows systems.

This has always worked for me with Linux.
 
Old 01-09-2018, 04:54 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,169

Rep: Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628
Sounds like a BIOS (MBR) system, and the Linux SSD (which still has grub boot code in the MBR) is first in the boot list. So the BIOS boots the Linux disk (as the MBR has a loader in it), and there is no grub code to execute. Re-installing Linux to that SSD should fix things.
Should.

As per rtmistler, I take the simple approach in weird situations. Take all the disks out except one - install to that, make sure it works. Take it out, put next system disk in. Repeat. Generally works best if you do Windows first - a simple grub mkconfig/update should find and add Windows to the Linux boot menu.
Changing BIOS boot order also works.

There are scenarios where the above needs help - old systems upgraded to Win10 (rather than Win10 as shipped). UEFI where Windows is on a MBR disk and Linux on gpt - I have one such with Win10 on MBR and it's a PITA.
From a Linux liveCD go get the script from here run it and post the result.
 
Old 01-09-2018, 08:11 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,563

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
I assume syg00 is correct about the loader and order of boot. If you want to test without too much trouble maybe try F key at boot to select the drive. Be sure to look at bios boot order.

I too tend to want native loaders on the drive. So, removing power to the other drive and load my OS keeps things (in my mind) simple.

rtmistler's point about the hardware may need to be known. Uefi/ upgrade could be important.
 
Old 01-09-2018, 08:59 PM   #5
johnlut
LQ Newbie
 
Registered: Jan 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you for the help! I ended up creating new partition tables both SSDs with a live gparted USB and then installed installed each OS after unplugging all other drives except the one I was working on. This seemed to remove grub completely and stopped all my issue.

I was worried about installing on one drive at a time like this as I thought after plugging the new ones in it'd cause some issues; pardon my ignorance.
Once again thank you very much!! I was starting to go crazy.
 
Old 01-09-2018, 11:04 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,563

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
Thanks for the update and solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
looking to reset ide hard drives deanoman Linux - Newbie 1 10-07-2014 03:15 AM
MySQL reset master server circus78 Linux - Server 2 08-02-2013 05:15 AM
Do all hard drives have a master boot record? wisdev General 4 09-02-2009 07:42 AM
Master Reset all of my network settings? mike513 Linux - Networking 2 01-31-2007 12:08 AM
messed up startx--how do I reset? Rundi Linux - General 3 02-13-2005 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration