Solved Disabling Windows on antiquated HP 15 notebook

My friend the Doctor needs some help salvaging an obsolete 2014 HP 15 Notebook PC which originally came with some obsolete pre-installed version of Windows on it. He has been persuaded that he should install Linux Mint on it. Nevertheless, he wants to preserve his copy of Windows 10 because he needs it for some programs which won't run on anything else. He needs my help because, for better or for worse, I have some experience with Linux Mint. I have a similarly configured Lenovo laptop with several versions of Linux and FreeBSD on it, and so, did not anticipate any problems.

Well, I was wrong. Instead of immediately jumping to the grub bootloader like my laptop does, his notebook, instead, insists on trying to boot Windows! It bypasses the grub bootloader every time. If I hammer on the F1 key, I can eventually reach the BIOS, but it takes over a minute, and that is not acceptable for regular use.

So far, he has resisted the temptation to put rEFInd on it, because he doesn't like its look and feel.

I've tried using Linux Mint to temporarily rename C:\Windows\System32\svchost.exe and C:\Windows\SysWOW64\svchost.exe to unusable names, and C:\Windows as well, to no effect.

Any advice would be greatly appreciated. My apologies if I posted in the wrong Forum again, please feel free to move or delete this thread. Thanks!
 
What exactly is the end goal here? I'm asking this because many roads lead to Rome but maybe Rome is not the desired destination.
If by "Doctor" you're referring to a medical doctor / GP I wouldn't touch this with someone else's hockey's stick. From personal experience it seems like this breed is particularly likely to keep years of patient records on those laptops without a signular backup nor proper data privacy policy. Hence the recommendation would depend the desired outcome. If he needs/wants to run Linux on it for some obscure application it might be better to leave the laptop as is and enabling Hyper-V and then running a VM of your choosing.

Unfortunately, it appears to be free for Windows 11, but costs $39.99 USD for the Windows 10 version.
If 40.- USD are a no-go for a doctor's laptop I think you better run as far away from this situation as possible ;-)
But again, I guess this too depends on what the ultimate end goal is.

In any case, I have yet to see how this is related to FreeBSD at all.
 
My friend the Doctor needs some help salvaging an obsolete 2014 HP 15 Notebook PC which originally came with some obsolete pre-installed version of Windows on it. He has been persuaded that he should install Linux Mint on it. Nevertheless, he wants to preserve his copy of Windows 10 because he needs it for some programs which won't run on anything else. He needs my help because, for better or for worse, I have some experience with Linux Mint. I have a similarly configured Lenovo laptop with several versions of Linux and FreeBSD on it, and so, did not anticipate any problems.

Well, I was wrong. Instead of immediately jumping to the grub bootloader like my laptop does, his notebook, instead, insists on trying to boot Windows! It bypasses the grub bootloader every time. If I hammer on the F1 key, I can eventually reach the BIOS, but it takes over a minute, and that is not acceptable for regular use.

So far, he has resisted the temptation to put rEFInd on it, because he doesn't like its look and feel.

I've tried using Linux Mint to temporarily rename C:\Windows\System32\svchost.exe and C:\Windows\SysWOW64\svchost.exe to unusable names, and C:\Windows as well, to no effect.

Any advice would be greatly appreciated. My apologies if I posted in the wrong Forum again, please feel free to move or delete this thread. Thanks!
SystemRescue has a way to restore GRUB when Windows overwrites it, here is the documentation for it, you can use the osprober package on Linux Mint to let GRUB be able to boot into Windows aswell: https://www.system-rescue.org/manual/Booting_a_broken_linux_system_on_the_hard_disk/
 
What exactly is the end goal here? I'm asking this because many roads lead to Rome but maybe Rome is not the desired destination.
If by "Doctor" you're referring to a medical doctor / GP I wouldn't touch this with someone else's hockey's stick. From personal experience it seems like this breed is particularly likely to keep years of patient records on those laptops without a signular backup nor proper data privacy policy. Hence the recommendation would depend the desired outcome. If he needs/wants to run Linux on it for some obscure application it might be better to leave the laptop as is and enabling Hyper-V and then running a VM of your choosing.


If 40.- USD are a no-go for a doctor's laptop I think you better run as far away from this situation as possible ;-)
But again, I guess this too depends on what the ultimate end goal is.

In any case, I have yet to see how this is related to FreeBSD at all.
"The Doctor" is his nickname as the retired proprietor of a sound and audio studio. He is not a medical practitioner. His main interest is in using the Audacity program, plus do a little web browsing for sound equipment and music videos when he's on the road. He still needs Windows because some proprietary hardware-related software won't run on anything but Windows or Mac. I'm still trying to persuade him to try FreeBSD but he's still reluctant insofar as his technical expertise is not in this area.

As I said in the OP, the moderators are free to delete this post, and no hard feelings about it.
 
With linux grub it's easy to have a triple boot windows/linux/freebsd.
My problem seems to be related to the UEFI firmware, along with Windows interference. Unlike with the Lenovo laptop, and other laptops I've configured, I'm unable to change the UEFI boot order.
 
My HP computer has a buggy bios. Meaning hardware vendors try, does it boot Windows & sell without testing.
I was forced to disable UEFI & use legacy boot.
 
Most computers require you to mash the F2 to reach the BIOS... and yes, HP machines as well. And, I'd suggest googling around for a manual for your specific model...
 
My HP computer has a buggy bios. Meaning hardware vendors try, does it boot Windows & sell without testing.
I was forced to disable UEFI & use legacy boot.
Thanks, I'm trying that right now... it may take a few minutes to get back into the BIOS related firmware...
Most computers require you to mash the F2 to reach the BIOS... and yes, HP machines as well. And, I'd suggest googling around for a manual for your specific model...
This one seems to like F1.
 
My HP computer has a buggy bios. Meaning hardware vendors try, does it boot Windows & sell without testing.
I was forced to disable UEFI & use legacy boot.

Most computers require you to mash the F2 to reach the BIOS... and yes, HP machines as well. And, I'd suggest googling around for a manual for your specific model...
This one seems to like F1.
 
My HP computer has a buggy bios. Meaning hardware vendors try, does it boot Windows & sell without testing.
I was forced to disable UEFI & use legacy boot.
So far, no good. It goes right back into Windows automatic repair program.
 
You must press the right key and at the right moment, sometimes continuously during boot. Then you normally you enter bios where you choose device to boot from, eg usb
My solution if I don't know what key the laptop uses is to smash all the function and delete keys at boot and see if something happens lol
 
Are you able to boot off of a USB drive?
Yes.
You must press the right key and at the right moment, sometimes continuously during boot. Then you normally you enter bios where you choose device to boot from, eg usb
The problem seems to be Windows 10, stepping in on the boot process.

I've scrapped together a temporary fix using efibootmgr. It deactivates Windows' boot manager, and takes it out of the boot order.

I'm going to write a couple of /bin/sh scripts to reverse the efibootmgr changes, and reinstall them, for the Doctor's usage, and shall post them here when I've tested them. Thanks, everybody!
 
So I put these two shell scripts on the Doctor's desktop:
Code:
#!/bin/sh
# windows.disable
efibootmgr
sudo su -m root -c "efibootmgr -A -b 0001"
sudo su -m root -c "efibootmgr -o 0002,3001,2001,2002"
efibootmgr
read inp
Code:
#!/bin/sh
# windows.enable
efibootmgr
sudo su -m root -c "efibootmgr -a -b 0001"
sudo su -m root -c "efibootmgr -o 0001,0002,3001,2001,2002"
efibootmgr
read inp

... and I'm marking this thread "Solved," thanks for the help everyone.
 
If you always have physical access to the machine when you want to change boot order you can use a USB stick (or CDROM for that matter). Put the non-Windows bootloader on the stick, leave the HD/SSD alone. Set BIOS to boot from USB stick first.

Then, when you want to boot one of the Unixens insert the stick. If you want to use Windows, remove the stick.
 
If you always have physical access to the machine when you want to change boot order you can use a USB stick (or CDROM for that matter). Put the non-Windows bootloader on the stick, leave the HD/SSD alone. Set BIOS to boot from USB stick first.

Then, when you want to boot one of the Unixens insert the stick. If you want to use Windows, remove the stick.
Thanks, I tried this but the Windows interference problem was the same. I don't doubt that this works fine on some other hardware, but this HP 15 notebook is particularly problematic.
 
Thanks, I tried this but the Windows interference problem was the same. I don't doubt that this works fine on some other hardware, but this HP 15 notebook is particularly problematic.

How so? How does windows get control after you boot something else from a USB stick?
 
How so? How does windows get control after you boot something else from a USB stick?
It doesn't. It's all good until I boot Windows. The Windows boot loader then puts itself first in the boot order, and moves the USB drive down again. It takes several minutes to change the boot order back again in either case. First I hit the power button after Windows starts booting itself, in order to shut the device down abruptly and get Windows boot loader to believe Windows is "broken." Then it presents the "System Information" screen and prompts the operator to press <Esc>. Windows again takes over and goes to its "Preparing Automatic Repair" screen, then, after 45-50 seconds, flashes the grub bootloader on the screen momentarily. Next it goes to "Diagnosing your PC" mode for about half a minute, reports that "Automatic Repair" couldn't repair the PC, and offers option buttons to "Shut down" or go to "Advanced options." One of the options is to "Use a device." Selecting that, it offers "ubuntu" as an option, and, selecting that, it finally surrenders control again and takes us back to the grub bootloader menu.

If I then shutdown again and try to boot from the USB stick, which I prepared using ubuntu's grub-install program, the whole Windows "Preparing Automatic Repair" process takes over again, for some reason, and I have to repeat the whole cycle over again. The windows.disable shell script using efitbootmgr actually works more reliably so I'll stick with that until such time if and when I find a better solution.
 
That's fixable in BIOS, you should be able to specify that the USB sticks boot first. But yeah, if you remove the stick that the BIOS saw last time, then the BIOS boot order will revert back to Windows on the HDD.

A BIOS will boot whatever it can see.
 
Back
Top