LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Dual boot system now boots only into Windows (https://www.linuxquestions.org/questions/linux-general-1/dual-boot-system-now-boots-only-into-windows-4175736458/)

dlfallen 04-26-2024 05:16 PM

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?

frankbell 04-26-2024 08:15 PM

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.

syg00 04-27-2024 12:01 AM

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.

yancek 04-27-2024 08:49 AM

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.

business_kid 04-27-2024 10:24 AM

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.

dlfallen 04-28-2024 01:49 PM

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!


All times are GMT -5. The time now is 12:15 PM.