Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am dual booting ubuntu 11.04 and windows 7 and I have a bootable usb flash drive. How can I configure grub so it will boot my flash drive?

share|improve this question
    
FYI, many computers these days have a boot menu where you can choose the drive you boot to. Perhaps you have your reasons for wanting to do this in grub, but I find this method easier. –  user606723 Sep 12 '11 at 16:03
add comment

3 Answers

Several ways. There is an application in Ubuntu Software Center called Startup-Manager, which can be used to edit grubs menu. It's not actively supported or developed since a couple of months ago though. The developer of Startup-manager recommends a software called Grub-customizer, which you can find here: https://launchpad.net/grub-customizer. Both of those applications are GUI apps.

You can edit the boot menu yourself.

But most BIOSes have a keyboard shortcut to display a boot menu from which you choose which device you want to boot from. That is a better solution, because then you don't have to do anything special to either device. You'll just install grub on both of them.

share|improve this answer
add comment

As pointed out correctly by Jo Erland: the method below refers to the old grub. I should check how it works with the new grub2. However, I still think that it is better to start the grub command line and to try booting using that command line than to edit the grub configuration directly. I will have a look tonight. In the meantime I still leave my old post here for reference.

You have to make sure that your bios supports booting from usb, and the usb drive should be enabled as a bootable device. If this is the case, you can follow the procedure outlined here to boot once from usb: https://help.ubuntu.com/community/BootFromUSB You usb drive will most likely be hd(1,0) if it is the second device from which the bios can boot.

It is best to test this first, and once you find a combination that works, you can edit your menu.lst to add a permanent entry (also outlined in the above page).

Apart from that: most bioses support a hotkey to choose the boot device (often F12). In that case you can boot from usb without having to edit the grub configuration.

share|improve this answer
2  
Doesn't that page refer to Grub Legacy? –  Jo-Erlend Schinstad Sep 12 '11 at 10:23
add comment

What device it appears as in hardware listing is dependent on BIOS and hardware boot options. If it already has an OS on it just connect it and run update-grub. It should find it that way. It's my understanding that grub2 uses UUIDs instead of hd(x,y) except for where it stores /boot. Just a couple thoughts. It should just work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.