GRUB on USB key to switch OSs?

Dearest Techs!

You have helped me so many times in the past and I am sorry I haven't got a lot I can give back to the community, but I have yet another question.

I want to dual boot Windows and Debian. I know how to install it, I know how to run it, but I have a problem with GRUB. Sitting in front of the PC everytime is something I don't want to do. I always look at the option to install GRUB on another disk, but I don't know what that will do.

If I install GRUB on a separate flash drive, what will happen? Will it
A) only see the debian partition when I plug in the thumb drive and boot into windows without it OR
B) will it be crippled unless I plug the grub disk in?


EDIT: To clarify, my goal is to have a pre-boot switch with which I can determine which OS boots so as to have less stuff to do in grub after I press the power button.

1 Like

Please clarify your question. It's really not clear what you are asking.

Anyway, if you don't like to use GRUB you can use the BIOS to select an OS. When I set up my PC I unplugged all hard drives other than the ones I was installing an OS to so none of the operating systems installed a silly bootloader. My linux drive is set as the default boot option and whenever I want (=need) to start windows I do it via the UEFI.

@m4iler just to note, Maybe you should change the title of this post since this is not directly related to Hardware but it is for GRUB...

Good !

What's the problem?

You can install GRUB on a Flash drive/USB and use it as a key. this way It can only boot if you have the USB key present ion the machine. This is common for security purposes.

Ah, so if I'm understanding you correctly, you want to boot into Linux if you've got the flash drive plugged in and when it's not plugged in, you boot into Windows?

That's possible, depending on your BIOS. You'd need to set it up to first boot from USB devices, then from HDD.

Then you'll need to wipe your existing grub installation from your computer Windows boot loader should remain in tact, but if not, you can always use a windows installer cd/usb to repair it.

Then you insert the flash drive you want to put grub on and make sure it's formatted as (if the drive is /dev/sdc) /dev/sdc1 ext4 and install grub on /dev/sdc. Then you should be good to go.

DISCLAIMER I haven't done this before, but that's how I'd go about it if I were to attempt this.

You won't need the USB drive once it boots, but any time you want to update packages, it's in your best interest to make sure it's plugged in because it's if the package manager needs to upgrade grub, it might fail.

GRUB shouldn't have problems starting windows without the flashdrive attached. But if you try and boot linux, it will throw a tantrum since the boot reference is non existant(This is guessing you mean to have the boot partition on the internal harddrive).
The boot option for debian would still show up and all in the menu, but if you choose to boot into debian it will get gnarly.
But honestly i would just have a small partition on your main harddrive which contains a linux distro, this option sounds like alot of jumps and hoops for no gains.

This might be a solution.

I already have Windows 10 installed, so I could unplug the Windows SSD, plug in the HDD I plan to use this with and install Debian on it. When it asks me about the GRUB location, I'll pick a USB drive.

After it's done installing, I'll plug all three disks (WinDebGrub) into the PC and set them to boot, in order:


This way, if the Grub key is out:
Windows won't care about any other drive and will boot itself like the self-centered blob it is.
And with the grub key in:
The UEFI will look at it first and transport me into the grub menu, where it will either only give me Debian as an option OR it will give me both and I'll set Debian to be the default waiting option.

This would solve my problem. I'll give it a shot later today and report back!

Thanks, everyone!

1 Like

It's not no gains, it's just VERY FEW gains.

I would love to have a switch on top of my case that I can set to either "Loonix" or "Windaz". That's what the USB key might be useful for.

Got it, changed it :wink:

Also, my problem with grub is that it 1) slows down boot by 5 seconds (or however long I set the menu to show up for) AND when I forget about it, I might boot into the wrong distro.

With the USB key, it would be clear before I even touch the power button.

Yes there are gains, while you might not want to set it up this way, I wish I had setup my desktop with a usb key instead of the traditional doul boot setup.