After taking out and putting back an M.2 Drive, I can no longer boot
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
After taking out and putting back an M.2 Drive, I can no longer boot
I have had a lot of problems with nvidia graphics drivers on my Mageia installation recently, so took out my M.2 drive with my install on it and tried booting from a SATA drive with a fresh install and updating all drivers to see if the problem was on a specific install and/or the very latest drivers had fixed my issue.
They hadn't, so I put my M.2 drive back in, but now that will not longer boot.
If I run from a SATA drive, then the data is still there on my M.2 drive, so I have clearly not destroyed it. If I try to reinstall on to my M.2 drive, the Mageia installer tells me I have no EFI partition any more and I have to erase the whole disk.
Is there a way to recover my EFI partition? I really don't know why carefully removing and reinstalling the M.2 drive would cause this to happen.
What sounds like happened when you take a drive out then put it back your cmos got reset. Go into bios find your drive and set it to boot from. make sure legacy boot support is enabled if you do not use EFI partition. On my system I have it set to Auto so I can boot legacy or EFI partition from the disk.
What it looks like you had it set to legacy when you installed your system. Now your system is set to boot EFI only. Like it came from factory. set to auto or legacy boot that system.
What sounds like happened when you take a drive out then put it back your cmos got reset. Go into bios find your drive and set it to boot from. make sure legacy boot support is enabled if you do not use UFEI partition. On my system I have it set to Auto so I can boot legacy or UFEI partition from the disk.
I have tried that (I think). I can press F12 to choose the drive to boot from. If I do that, nothing happens for a short while then it returns the computer's boot options (is asking me which physical drive I should boot from). If I go in to the BIOS itself and select the relevant M.2 drive as the first drive to boot from, it's the same.
No you need to set to legacy boot. so please give MB info
What it looks like you had it set to legacy when you installed your system. Now your system is set to boot EFI only. Like it came from factory. set to auto or legacy boot
I have tried legacy, but it didn't help. Mageia only works with UEFI, I am 99.9% sure I did install with with UEFI enabled.
that is not true. I do installs of it as not EFI all the time in VM.
I also do it on this one partition I have. just boot from grub. I do not set up a GPT and 100mb fat partition that is mounted at /boot/grub.
That is what a EFI partition.
I install it make sure my work runs in it then reformat carry on.
default install with a non formatted drive. Your installer will do a GPT partion and then create a EFI partion.
Little secret you can still boot it as legacy if you have legacy boot enable in csm.
The reason Default install is EFI. is because people take a windows machine and install linux on it.
so we spoon feed them a tad to let them grow.
Other wise would not be sitting here dealing with this issue.
since you have no Idea the make model of your computer or the motherbord.
put a live disk in and wipe the drive and start fresh.
let the default installer create the default partitions and formats.
Code:
how to find motherboard info in linux
use this
as root or sudo.
Code:
dmidecode -t 2
look like this
Code:
Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS ELITE WIFI
Version: x.x
Serial Number: Default string
Asset Tag: Default string
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Default string
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
It was the "MB" that threw me, I simply didn't know what it stood for, had I known the abbreviation I'd've known how to get the information. As we were talking about hard drives, I just didn't make the connection.
Code:
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z390 UD
Version: x.x
Serial Number: Default string
Asset Tag: Default string
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Default string
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
As for the question from colorpurple21859, that is a very good question. There was a different SATA drive I just used for some data backup. That was removed and this second SATA drive put in just to enable me to check the graphics issue on a separate drive temporarily. When I did the original install there was nothing but the M2 drive installed in the virgin machine though.
Quote:
put a live disk in and wipe the drive and start fresh.
let the default installer create the default partitions and formats.
I'm more than capable of doing that, but was trying not to have to go through that rigmarole and copy everything on to a newly formatted drive. (I never use the default partitioning, mind.)
There was a different SATA drive I just used for some data backup.
Quote:
. If I try to reinstall on to my M.2 drive, the Mageia installer tells me I have no EFI partition any more and I have to erase the whole disk.
Is there a way to recover my EFI partition? I really don't know why carefully removing and reinstalling the M.2 drive would cause this to happen.
Removing and reinstalling a drive won't get rid of the the efi partition or any other partition on the drive. Either the drive was booting in legacy/csm mode or the efi partition was located on the different Sata drive.
With the sata and m2 drive installed post the output of
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.