LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-20-2021, 11:22 AM   #1
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 813

Rep: Reputation: 40
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.

Many thanks.
 
Old 06-20-2021, 11:34 AM   #2
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
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.

Last edited by lovemeslk; 06-20-2021 at 11:37 AM.
 
Old 06-20-2021, 11:39 AM   #3
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 813

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by lovemeslk View Post
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.
 
Old 06-20-2021, 11:41 AM   #4
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
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

Last edited by lovemeslk; 06-20-2021 at 11:47 AM.
 
Old 06-20-2021, 12:15 PM   #5
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 813

Original Poster
Rep: Reputation: 40
I don't know what you mean by MB info, sorry.

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.
 
Old 06-20-2021, 12:17 PM   #6
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 813

Original Poster
Rep: Reputation: 40
BTW, CSM support *is* enabled in the BIOS. If that is disabled, you can't choose The Storage Boot Option Control between Legacy and EUFI.

Last edited by DiBosco; 06-20-2021 at 12:18 PM.
 
Old 06-20-2021, 12:56 PM   #7
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
Quote:
Originally Posted by DiBosco View Post
I don't know what you mean by MB info, sorry.

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
 
Old 06-20-2021, 02:11 PM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,361

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Before you took out the m2 drive, was the sata drive already installed and if so, what was on it before you did a fresh install?
 
Old 06-20-2021, 04:26 PM   #9
Bonzoo
Member
 
Registered: Sep 2018
Location: Costa Rica
Distribution: Antix21a2,Parrot rolling,MXfce19.4,Sparky Openbox
Posts: 233

Rep: Reputation: 48
Quote:
Originally Posted by DiBosco View Post
I don't know what you mean by MB info, sorry.

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.
inxi -b in your terminal
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2021-06-20_15-25-21.png
Views:	12
Size:	77.8 KB
ID:	36654  
 
Old 06-20-2021, 05:04 PM   #10
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 813

Original Poster
Rep: Reputation: 40
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.)

Last edited by DiBosco; 06-20-2021 at 05:11 PM.
 
Old 06-20-2021, 05:13 PM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,361

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Post the output of /etc/fstab of the installation on the m2 drive
 
Old 06-20-2021, 05:48 PM   #12
Bonzoo
Member
 
Registered: Sep 2018
Location: Costa Rica
Distribution: Antix21a2,Parrot rolling,MXfce19.4,Sparky Openbox
Posts: 233

Rep: Reputation: 48
OK. How about this ( far stretch) Snatch the battery and reset the cmos.
 
Old 06-20-2021, 08:18 PM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,361

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
.
Quote:
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
Code:
sudo parted -l
and the contents of the m2 /etc/fstab.
 
Old 06-21-2021, 10:29 AM   #14
verndog
Member
 
Registered: Oct 2007
Posts: 279

Rep: Reputation: 68
Boot from a live linux distro. Open a terminal and type
Code:
efibootmgr
. It will list the boot order. Make your m.2 the first boot.

Last edited by verndog; 06-21-2021 at 10:30 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting saved xdiff output back into (text) columns twork Linux - Software 2 02-04-2016 08:07 PM
[SOLVED] exporting the whole filesystem and putting it back on samopal Linux - General 5 10-06-2012 01:31 AM
Putting EEE Xandros back on my eee pc ianjmatt Linux - Newbie 7 05-13-2012 12:55 PM
Do I have to uninstall nvidia drivers, before putting my old video card back in? bdb4269 Linux - Hardware 1 08-09-2006 11:28 PM
security keeps putting me back jamaas Mandriva 0 05-12-2004 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:11 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
Open Source Consulting | Domain Registration