You are not logged in.

#1 2012-07-27 01:23:15

evilhugbear
Member
Registered: 2012-07-27
Posts: 5

Grub error

Hey guys,

I was trying to install Arch for the first time today, and was following the Beginners' Guide and everything was going fine until I got to the part where I need to run "grub-install /dev/sda".

When I run that, it says "source_dir doesn't exist. Please specify --target or --directory". What does this mean? This is actually my second attempt at installing Arch, and I got the same error and just ignored it after I couldn't find an answer from google and after restarting my PC, there was just a blinking cursor and it wouldn't boot tongue.

How can I fix this? Please explain in the simplest way possible, because I'm a fairly big noob when it come to this stuff. To give you an idea of how much of a noob I am, it took me about 10 minutes to figure out how to answer the security question to register on this forum xD

Thanks

btw: Not sure if this matters, but I have a UEFI motherboard, so I ran "pacstrap /mnt grub-efi-x86_64" earlier in the installation when the beginners' guide said to install a bootloader.

EDIT: I google'd "grub-install" and found this. It says that I can specify where to install using --boot-directory=. Would doing "mkdir /mnt/boot" and then "grub-install --boot-directory=/mnt/boot /dev/sda" work? I'd like to ask you guys before I go ahead and do it.

Last edited by evilhugbear (2012-07-27 03:21:53)

Offline

#2 2012-07-27 08:10:43

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Grub error

Welcome to the forums.

Have a look at this section of the GRUB wiki article. It contains instructions on how to install on an UEFI system.


Burninate!

Offline

#3 2012-07-27 14:52:08

evilhugbear
Member
Registered: 2012-07-27
Posts: 5

Re: Grub error

Thanks for the reply! I followed that all the way to the "Create GRUB2 entry in the Firmware Boot Manager" section where it then says "grub-install will ensure that /boot/efi/EFI/arch_grub/grubx64.efi is launched by default if it detects efibootmgr and if it is able to access UEFI Runtime Services." I went ahead and tried grub-install /dev/sda again, and it showed the same error. Is that fine? Should I now be able to restart and launch the UEFI Shell and do that step?

Offline

#4 2012-07-27 19:02:15

evilhugbear
Member
Registered: 2012-07-27
Posts: 5

Re: Grub error

I went ahead and just restarted and tried to launch EFI shell from filesystem device, and it said something like none available or not found.

Should I just try reformatting again and reinstall? But instead of following the UEFI instructions in the Beginners' Guide, should I follow the instructions in the article you gave me?

Offline

#5 2012-07-28 00:50:50

evilhugbear
Member
Registered: 2012-07-27
Posts: 5

Re: Grub error

I went ahead and reformatted and reinstalled Arch following the beginners' guide, but once I got to the Install a bootloader section, I followed the instructions from your link, but once I did the very first command : pacstrap /mnt grub-efi-x86_64. It said:

warning: database file for 'core' does not exist
warning: database file for 'extra' does not exist
warning: database file for 'community' does not exist
error: target not found: grub-efi-x86_64

I decided to just go ahead and try the commands following that because I had nothing else to do, and when I got to "mount -t vfat /dev/sdXY /boot/efi" it said special device /dev/sdXY does not exist, so I replace it with sda1 and just sda and it said /dev/sda(1) is already mounted or /boot/efi busy. I'm not sure if that matters...

After that, I tried the grub- install --directory .... and it came up with : unrecognized option --directory=/usr/lib/grub/x86_64-efi

Why won't the Grub install work?!Grub was installed fine when I had previously had an Ubuntu/Windows 7 dual boot that used grub...

Last edited by evilhugbear (2012-07-28 01:13:02)

Offline

#6 2012-07-28 03:39:20

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Grub error

RTFW https://wiki.archlinux.org/index.php/GR … _systems_2 . I have updated it.

In short, boot the iso via uefi boot mode (important for efibootmgr step) install the system, pacstrap grub-efi-x86_64 , mount your UEFISYS partition to /boot/efi , run grub-install as explained at https://wiki.archlinux.org/index.php/GR … _PARTITION , and then create a UEFI boot entry for grubx64.efi using efibootmgr as explained at https://wiki.archlinux.org/index.php/Un … efibootmgr .

But before all this I recommend you read https://wiki.archlinux.org/index.php/Un … _Interface , https://wiki.archlinux.org/index.php/UEFI_Bootloaders , https://wiki.archlinux.org/index.php/GU … tion_Table and https://wiki.archlinux.org/index.php/GRUB thorouly since UEFI booting is very much different from BIOS booting (even if grub(2) is used in both cases).

If you cant get grub-efi-x86_64 to work, try rEFInd+EFISTUB booting. That is much for simple to setup.

EDIT: I recommend https://wiki.archlinux.org/index.php/Archboot over Archiso as it does most of these things automatically.

Last edited by the.ridikulus.rat (2012-07-28 03:40:25)

Offline

#7 2012-07-28 03:57:33

evilhugbear
Member
Registered: 2012-07-27
Posts: 5

Re: Grub error

the.ridikulus.rat wrote:

RTFW https://wiki.archlinux.org/index.php/GR … _systems_2 . I have updated it.

In short, boot the iso via uefi boot mode (important for efibootmgr step) install the system, pacstrap grub-efi-x86_64 , mount your UEFISYS partition to /boot/efi , run grub-install as explained at https://wiki.archlinux.org/index.php/GR … _PARTITION , and then create a UEFI boot entry for grubx64.efi using efibootmgr as explained at https://wiki.archlinux.org/index.php/Un … efibootmgr .

But before all this I recommend you read https://wiki.archlinux.org/index.php/Un … _Interface , https://wiki.archlinux.org/index.php/UEFI_Bootloaders , https://wiki.archlinux.org/index.php/GU … tion_Table and https://wiki.archlinux.org/index.php/GRUB thorouly since UEFI booting is very much different from BIOS booting (even if grub(2) is used in both cases).

If you cant get grub-efi-x86_64 to work, try rEFInd+EFISTUB booting. That is much for simple to setup.

EDIT: I recommend https://wiki.archlinux.org/index.php/Archboot over Archiso as it does most of these things automatically.

Thanks for updating this, it seems like you changed quite a bit. I will try another install in the morning following the new guide.

Just one question: Does it matter when I do this? Should I do this when I get to the point in the Beginners' Guide where it says to Install a bootloader?

Thanks for all your help, I'm determined to install this tongue

EDIT: When you say mount UEFISYS partition, is that from this (mount -t vfat /dev/sdXY /boot/efi) command? Because I've done that before, and it says special device /dev/sdXY does not exist.

Last edited by evilhugbear (2012-07-28 05:40:56)

Offline

#8 2012-07-28 17:52:47

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Grub error

evilhugbear wrote:

EDIT: When you say mount UEFISYS partition, is that from this (mount -t vfat /dev/sdXY /boot/efi) command? Because I've done that before, and it says special device /dev/sdXY does not exist.

The 'X' and 'Y' need to be substituted for actual path. In my system UEFISYS partition is /dev/sda3 , in which case you just consider X==a and Y==3 . There is no /dev/sdXY

Offline

#9 2013-01-19 14:04:15

otyugh
Member
Registered: 2013-01-12
Posts: 9

Re: Grub error

I'm just on the same case.
I lost maybe 3 hours reformating and trying different way to set up GRUB2 or GRUB1 on partitions with MBR or GPT, and i just fail to install the bootloader. I think things are tricky because of the UEFI. Also i tried to use archbang (desesperated, i hoped magic), but then, same error.

Always that "target not found : grub-efi-x86_64".

I'd like to see a tutorial helping on theses hmm
Because the installation of Arch is so easy, i don't get why the UEFI factor would make it so hard.
Gosh.
I can't even desribe you what i've tried, because i tried all the factor possible i knew. é_è
Could i get any stupid "basic step to make it work with just minimal" ? If i can get any thing working, i will have something to work around instead of just lose time on something that just don't even boot or something.
On board : 2to of blank disk, 1USB with arch, 1motherboard with a 86x_64 uefi.

I know the point is to understand what is hapenning and how, but here my patience is almost dead :s

Last edited by otyugh (2013-01-19 14:09:04)

Offline

#10 2013-01-19 18:19:57

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Grub error

warning: database file for 'core' does not exist
warning: database file for 'extra' does not exist
warning: database file for 'community' does not exist
error: target not found: grub-efi-x86_64

This means that you probably can't install anything else either. Try a different mirror, then refresh the databases with a:

# pacman -Syy

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2013-01-19 18:36:03

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Grub error

evilhugbear wrote:

when I got to "mount -t vfat /dev/sdXY /boot/efi" it said special device /dev/sdXY does not exist, so I replace it with sda1 and just sda and it said /dev/sda(1) is already mounted or /boot/efi busy. I'm not sure if that matters...

This means that you didn't follow the proper mount order (root first, and THEN everything else), like the Beginners' Guide said to. It says there:

Pay attention, because the mounting order is important.

First, mount the root partition on /mnt. [...]
Then mount the /home partition and any other separate partition (/boot, /var, etc), if you have any


Also, if you haven't read the TOC from the Beginners' Guide (or maybe you just skimmed it), it goes like this:

2.13 Install and configure a bootloader
    2.13.1 For BIOS motherboards
           2.13.1.1 Syslinux
           2.13.1.2 GRUB
    2.13.2 For UEFI motherboards
           2.13.2.1 EFISTUB
           2.13.2.2 GRUB

You were probably following the instructions for BIOS instead of UEFI, because there is no "grub-install ... /dev/sda" in the UEFI instructions.

https://wiki.archlinux.org/index.php/Be … ide#GRUB_2


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#12 2013-01-20 14:12:51

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 116

Re: Grub error

DSpider wrote:
warning: database file for 'core' does not exist
warning: database file for 'extra' does not exist
warning: database file for 'community' does not exist
error: target not found: grub-efi-x86_64

This means that you probably can't install anything else either. Try a different mirror, then refresh the databases with a:

# pacman -Syy

Well, he may not be connected to the Internet. Something as simple as

dhcpcd wlan0

may work. Or eth0 if that is his interface.

Offline

Board footer

Powered by FluxBB