I was wondering if I could make an os-selecting-hardware-key or something like that.
I'm currently using a dual boot system (ubuntu 10.10 + win7) and i want to use an usb drive to specify the OS I want to boot. So if the usb key is plugged in during the boot, it will start one operating system, if it isn't, it will boot the other one.
I want to edit my currently installed grub to recognize only one OS, and install a second grub to the usb key, with the other OS in it. After that I just need to set up booting from the usb key in the BIOS. Mcafee free trial 90 days. I may be completely wrong about it, but mainly I need some advices how to install grub(2) on the usb key.
1 Answer
Install Grub4dos On Usb Windows 10
Open a terminal, and type sudo fdisk -l
(your USB flash drive should show up in the list if it is inserted).Now, type sudo grub-install /dev/<insert flash drive name here>
to install it on your flash drive.
for example:
sudo grub-install /dev/cookies
Be careful with these commands (don't mess up) or you could damage your system. Make sure you are installing to the flash drive and not something else.
I'm not completely sure that this will allow you to boot your system as you wish, but if it doesn't you can edit your grub configuration on the flash drive to find your built in hard drives.
Not the answer you're looking for? Browse other questions tagged installationgrub2dual-bootusb-drive or ask your own question.
![Grub4dos Grub4dos](https://www.pendrivelinux.com/wp-content/uploads/Grub4Dos-Installer.png)
I'm trying to build my recovery usb key drive. I'd like to use GRUB as my bootloader.
How do I install GRUB to my usb's MBR?
Lots of examples out there seem to expect I'm running Linux.
4 Answers
UNetbootin is a good tool to install entire distributions on a USB flash.
A reference to the Super Grub Disk wiki page on How do I boot an USB hard disk?
In order to GRUB or SGD to boot a USB drive, pendrive or hard disk your BIOS computer has to offer the usb drive as a boot drive.
If your BIOS does not let you boot your pendrive with F8 or F12 keys or by setting up your BIOS hard disk boot order with F1 or SUPR keys at boot.. it does not mean that it cannot offer the drive to GRUB to be booted.
You can use UNetbootin to install SGD to your USB Flash.
The WinGrub technique also looks good and
you might be able to use the notes in my references for understanding the steps better.
Ultimately I used this video for guidance.
Basically, the goal is to install the grub4dos loader to the MBR of the usb drive and copy its program/configuration files to the drive's root. To do this, you download grub4dos (the program) and grubinst (a utility to add the program's loader to a MBR).
Grubinst has 2 clients, a gui and a command-line utility. The video leverages the gui. It didn't work correctly for me - yelling that there was something wrong with my drive's partition table. Running the command line client worked though. If you run into the same problem look at the readme for options and use the gui to grab the hd# of your usb drive.
I considered UNetbootin but I
- didn't want a tool to do this for me (wanted more understanding)
- wanted to add many bootables to the usb
You can refer to this article - it worked for me. Edit the menu.lst to suit your needs.
The OP wants to install GRUB through Windows, and only Windows.
Try WinGrub.
See here: Install Ultimate Boot CD (UBCD) to a Flash Drive in Windows
This worked for me. All the GRUBs are on it, plus extras. And it's all free. Just download the USB installer and Utimate CD ISO. Run the installer, follow its prompts.