grub-install doesn't work (it says "source_dir doesn't exist")

Bug #1069178 reported by Mustafa Muhammad on 2012-10-20
This bug affects 6 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)

Bug Description

When I run:

sudo grub-install /dev/sda

I get:

source_dir doesn't exist. Please specify --target or --directory

and even setting the directory doesn't work:

sudo grub-install --directory=/boot/ /dev/sda

/usr/sbin/grub-install: 357: .: Can't open /boot//

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: grub2-common 2.00-7ubuntu11
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu3
Architecture: amd64
Date: Sat Oct 20 21:53:07 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
 PATH=(custom, no user)
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Phillip Susi (psusi) wrote :

Please try reinstalling grub:

sudo apt-get install --reinstall grub-pc

Or use grub-efi instead if you are using EFI boot.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete

I did:

mustafa@mustafa-Lenovo-B570e:~$ sudo apt-get install --reinstall grub-efi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 208 not upgraded.
Need to get 1,140 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 quantal/main grub-efi amd64 2.00-7ubuntu11 [1,140 B]
Fetched 1,140 B in 1s (943 B/s)
(Reading database ... 141805 files and directories currently installed.)
Preparing to replace grub-efi 2.00-7ubuntu11 (using .../grub-efi_2.00-7ubuntu11_amd64.deb) ...
Unpacking replacement grub-efi ...
Setting up grub-efi (2.00-7ubuntu11) ...
mustafa@mustafa-Lenovo-B570e:~$ sudo grub-install /dev/sda
source_dir doesn't exist. Please specify --target or --directory

When I installed Ubuntu, I chose /dev/sda7 to install the bootloader, when I try to chainload it from my grub, it doesn't work (grub1 says "Error 13: Invalid or unsupported executable format" and grub2 says "Invalid signature), I updated openSUSE grub to include Ubuntu (not chainloading), and now using Ubuntu I can't do "grub-install /dev/sda".

Ok, it got fixed by installing grub-pc and removing grub-efi, looks like Ubiquity installed grub-efi while my laptop needs grub-pc, should I report the bug against Ubiquity?

Phillip Susi (psusi) wrote :

Can you recall when you installed the first time what the menu first looked like when you booted the install cd? Was it the more plain looking grub text menu, or the graphical syslinux menu with more options?

None!! only a black screen and when I press "Enter" it boots, I've just tried it.

Phillip Susi (psusi) wrote :

You don't get a menu? Even if you press the up/down arrow keys?

Yes, I don't get one, ever if I press up/down.

Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired

This happened for me directly after upgrading to 13.04.

Fixed by `sudo apt-get install --reinstall grub-pc`

Heimen Stoffels (vistaus) wrote :

I experience this bug on 13.04 currently. When reinstalling Grub this message pops up. I'm afraid to reboot now.

Changed in grub2 (Ubuntu):
status: Expired → Confirmed
Phillip Susi (psusi) wrote :

And did you try sudo apt-get install --reinstall grub-pc?

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete

"sudo apt-get install --reinstall grub-pc" solved the problem, thank you.
Not sure this should be marked as solved or not because anyone who uses the official ISOs will face this problem.

Changed in grub2 (Ubuntu):
status: Incomplete → Opinion
moueza (mouezapeter) wrote :

Affects me too with Ubuntu 13.10

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers