PDA

View Full Version : grub-install doesn't recognize /dev/sda



pwabrahams
January 28th, 2013, 05:29 AM
I'm reconstructing my dual-boot system with Kubuntu 12.10 and Windows 7. I first installed Windows 7. I'm now running Kubuntu and trying to install it. (I started it by using SuperGrub.) I've already run update-grub. But when I try to use grub-install I get this:

sudo grub-install /dev/sda
source dir doesn't exist. Please specify --target or --directory
What am I missing?

Bucky Ball
January 28th, 2013, 05:56 AM
Not sure. The command is correct. Sounds silly but you do have the sda device installed and working? No cables loose or popped off?

You might try Boot Repair which, if it doesn't work, can give us a lot more info about your machine and what is happening:

https://help.ubuntu.com/community/Boot-Repair

pwabrahams
January 28th, 2013, 09:27 PM
I solved the problem by installing grub-pc, which forced the deinstallation of grub-efi. After doing that, install-grub worked as it was supposed to. That's puzzling since my BIOS has UEFI activated. There are several architectural variants of grub, it seems, and I don't understand how you're supposed to choose the right one. In any event, the Kubuntu installation didn't choose the right one.

oldfred
January 28th, 2013, 11:10 PM
How you boot install media is how it installs for both Windows and Ubuntu. And both really have to be installed in the same mode or dual booting is a real hassle, by going into UEFI/BIOS and changing each time.

Boot-Repair also does the same in either installing grub-pc or grub-efi to convert an install from BIOS to UEFI or vice-versa.

Window will normally only install in UEFI mode on gpt drives. Ubuntu will work in either UEFI or BIOS from gpt partitioned drives.