Messed up my hard drives, need help with a "master reset".
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.