LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-26-2024, 05:16 PM   #1
dlfallen
LQ Newbie
 
Registered: Feb 2018
Posts: 12

Rep: Reputation: Disabled
Dual boot system now boots only into Windows


My computer crashed and now I can only boot into Windows 10. How can I restore the dual boot capability without loss of any of my Linux files?
 
Old 04-26-2024, 08:15 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,341
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
The first thing I would do is mount the Linux partition (in Windows if I could or using a Live CD/USB) and look at the Linux log files, particularly /var/log/boot.log. That may give you some hint as to what is going on. It's a long shot, but it may be something that can be fixed via a Live CD/USB.

Also, while the partition is mounted in that way, you can back up any crucial files to external media in case you have no choice but to reinstall Linux.

Of course, if you have a separate /home partition, you should be able to reinstall without losing any crucial files, but, even then, you should back them up, because stuff can happen.
 
Old 04-27-2024, 12:01 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,137

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
We had a laptop that used to do this periodically. Presuming a UEFI machine, simply get into the firmware screens (what used to be called the BIOS) and set the entry for your Linux system to be the default. Easy.

Given we don't know what the crash was, it would be prudent to proceed as above first to verify your data.
 
Old 04-27-2024, 08:49 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,534

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
You might be more explicit about what 'crashed' means in your particular case. Just froze and stopped working? While using your Linux? Which Linux since there are hundres of them? Is windows on the same physical drive as your Linux? Are both systems installed in EFI mode? What were you doing when the system 'crashed'? The steps suggested in the posts above would be a good start but if you don't resolve the problem, you need to post a lot more detail.
 
Old 04-27-2024, 10:24 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,358

Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
Re Post #1: If you get booted into linux from a live cd or some such, proceed as follows:
  1. Run '[sudo] efibootmgr' with no options. That should show you the boot order, and windows will be first. Note the number beside each one because you need those.
  2. Run '[sudo] efibootmgr -O' which deletes the boot order.
  3. Run '[sudo] efibootmgr -o 0003,0000,0001' or whatever your desired boot order is.;
You can now boot into linux and discover how you've messed that up.

You will probably find your boot order is full of crazy entries. You can remove those one at a time as follows: '[sudo] efibootmgr -b 000<number> -B' and it's gone.
 
Old 04-28-2024, 01:49 PM   #6
dlfallen
LQ Newbie
 
Registered: Feb 2018
Posts: 12

Original Poster
Rep: Reputation: Disabled
I appreciate all the responses to my question. I was led to a successful resolution by the information provided in post #5. There was some interest in a better explanation of my problem, so here is a quick overview and the solution:

My older computer runs the current version 22H2 of Windows 10.
Sometime in the past I had installed Linux Mint 20.3 and created a grub menu that let me choose between Windows and Linux at boot time.

One day, overnight, the computer was running a very old version of Windows 10, version 1709 (I had not turned the computer off). All of my desktop icons were missing. My data all seemed to be present, but all of my links were gone and several programs were no longer listed in the start menu, although they were still on the hard drive. I could not shut down the normal way via the start menu, but I could shutdown using the command prompt in administrator mode. When I did reboot it was directly into Windows (no Grub menu). Windows update would not update the system, and even using Windows installation media failed to update the system. And, of course, I could not access Linux Mint at all.

I did determine that I had two Windows partitions and two Linux partitions. Using the info in post #5, I booted an old Linux Format CD "Rescue Toolkit" and from there was able to use the terminal to use efibootmgr to change the boot order so the proper Linux partition was first. Rebooting, the grub menu appears and I can now choose between Linux Mint and the proper version of Windows 10 replete with all the icons, links, and installed programs.

It appears that something happened to cause the computer to boot from the computer's old recovery partition instead of the correct partition. Anyway, everything works fine now.

Thanks again to everone!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub only boots on 2nd attempt - menu reappears a 2nd time, then it boots. LenHoff Linux - Software 1 06-28-2020 07:10 AM
[SOLVED] Put my dual boot hard drive in a different older laptop and now only Linux boots. Legaboss Linux - Software 9 08-03-2015 08:57 PM
Redhat 5 Windows XP dual boot boots only into Redhat e041110 Red Hat 2 01-28-2011 11:56 PM
dual boot on a compaq now only boots to hp backup & recovery manager Quercus ruber Linux - General 6 01-07-2009 01:58 AM

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

All times are GMT -5. The time now is 11:52 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