You are not logged in.

#1 2020-04-12 09:01:21

esteka3000
Member
Registered: 2020-04-10
Posts: 18

[SOLVED]Failed installation? GRUB and mountpoint issues

Hi there!

So I have tried to install ArchLinux following the guide. Everything went fine, until the bootloader: I have installed GRUB and I have taken care of the microcode. I have generated the grub.cfg file, and all seemed well.

Now if I try to turn on my computer, GRUB is stuck in minimal bash-like… So I took a look at my disk, I strangely got that:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 533.2M  1 loop /run/archiso/sfs/airootfs
sda      8:0    0 111.8G  0 disk 
├─sda1   8:1    0   512M  0 part 
├─sda2   8:2    0   110G  0 part 
└─sda3   8:3    0   1.3G  0 part 
sdb      8:16   1   1.9G  0 disk 
├─sdb1   8:17   1   649M  0 part /run/archiso/bootmnt
└─sdb2   8:18   1    64M  0 part 
sr0     11:0    1  1024M  0 rom  

That is strange since (using cfdisk) sda1 was the EFI in "EFI system partition" type, mounted in /mnt/efi, sda2 was arch in "Linux x86-64" type mounted in /mnt, and sda3 was the swap.

What happened and how to fix it?

Cheers mates!

Last edited by esteka3000 (2020-04-12 14:25:18)

Offline

#2 2020-04-12 09:47:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

GRUB is stuck in minimal bash-like

Just to be clear, is that the "grub>" prompt? If so then use the set command to see where GRUB is looking for the configuration file it can't find.

And I'm not familiar with cfdisk so please post the full output of

# parted --list
efibootmgr -v

Those commands can be run from any graphical live environment for ease of transcription (or pipe the output to a pastebin[1] if you've only got the Arch ISO).


Jin, Jîyan, Azadî

Offline

#3 2020-04-12 10:35:39

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Please post the full output of

# parted --list
efibootmgr -v

Here we go:

Model: ATA WDC WDS120G2G0A- (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  538MB  537MB   fat32                 boot, esp
 2      538MB   119GB  118GB   ext4
 3      119GB   120GB  1391MB  linux-swap(v1)        swap


Model:  USB Flash Memory (scsi)
Disk /dev/sdb: 2008MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      84.0kB  67.2MB  67.1MB  primary  fat16        esp

and

BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0008,0000,0006,0007
Boot0000* GRUB	HD(1,GPT,bd6d9498-dcff-fe45-818c-4dea93f98ca5,0x800,0x100000)/File(\EFI\GRUB\grubx64.efi)
Boot0006* UEFI: IP4 Qualcomm Atheros PCIe Network Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(d8cb8a851f4e,0)/IPv4(0.0.0.00.0.0.0,0,0)..BO
Boot0007* UEFI: IP6 Qualcomm Atheros PCIe Network Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(d8cb8a851f4e,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0008* UEFI:  USB Flash MemoryPMAP	PciRoot(0x0)/Pci(0x1a,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x63af2e9,0xa4,0x20000)..BO

I hope that is answering your questions…

Last edited by esteka3000 (2020-04-12 10:35:58)

Offline

#4 2020-04-12 10:41:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

That all looks fine, the ESP has the correct flags applied and the NVRAM entry is present and correct.

So now you'll have to explain how exactly you "generated the grub.cfg file", please post the exact commands used. See also https://bbs.archlinux.org/viewtopic.php?id=57855

And what did the set command tell you? On which partition is GRUB searching for the configuration file?


Jin, Jîyan, Azadî

Offline

#5 2020-04-12 10:42:03

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Just to be clear, is that the "grub>" prompt? If so then use the set command to see where GRUB is looking for the configuration file it can't find.

I don not know how to answer to that one, the set command return a bunch of line, no error…

Offline

#6 2020-04-12 10:44:11

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

I don not know how to answer to that one

Very well, please take a picture of the screen showing the output of the set command then upload it to an image hosting site and post the link here.


Jin, Jîyan, Azadî

Offline

#7 2020-04-12 10:49:11

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

So now you'll have to explain how exactly you "generated the grub.cfg file", please post the exact commands used.

I have "simply" enter :

# grub-mkconfig -o /mnt/efi/grub/grub.cfg

since I had mounted EFI under /mnt/efi

May be

# grub-mkconfig -o /efi/grub/grub.cfg

would have been better?!

Offline

#8 2020-04-12 10:59:11

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Just to be clear, is that the "grub>" prompt? If so then use the set command to see where GRUB is looking for the configuration file it can't find.

Here we go:

cmdpath=(hd1,gpt1)/EFI/GRUB
color_highlight=black/light-gray
color_normal=light-gray/black
feature_200_final=y
feature_all_video_module=y
feature_chainloader_bpb=y
feature_default_font_path=y
feature_menuentry_id=y
feature_menuentry_options=y
feature_nativedisk_cmd=y
feature_ntldr=y
feature_platform_search_hint=y
feature_timeout_style=y
grub_cpu=x86_64
grub_platform=efi
lang=
locale_dir=
pager=
prefix=(hd1,gpt2)/boot/grub
root=hd1,gpt2
secondary_locale_dir=

there…

Offline

#9 2020-04-12 10:59:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

I have "simply" enter :

# grub-mkconfig -o /mnt/efi/grub/grub.cfg

since I had mounted EFI under /mnt/efi

The GRUB configuration file goes under /boot/grub/, which would only be on the ESP if that were mounted under /boot

See https://wiki.archlinux.org/index.php/GRUB#Configuration

But you will have to run that command after mounting the root partition & ESP and using arch-chroot (just as you did when configuring the system during the installation process).


Jin, Jîyan, Azadî

Offline

#10 2020-04-12 11:15:06

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

The GRUB configuration file goes under /boot/grub/, which would only be on the ESP if that were mounted under /boot .

I thought that the command was:

grub-mkconfig -o EFI_mount_point/grub/grub.cfg

I was wrong, wasn't I?

Head_on_a_Stick wrote:

But you will have to run that command after mounting the root partition & ESP and using arch-chroot.

Do I need to reinstall everything? If so, should I mount the points before the installation and then under arch-chroot?

Last edited by esteka3000 (2020-04-12 11:18:55)

Offline

#11 2020-04-12 11:21:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

I thought that the command was:

grub-mkconfig -o [i]ESP_mount_point[/i]/grub/grub.cfg

I was wrong, wasn't I?

Yes, you were wrong. Always consult the ArchWiki when in doubt, the GRUB page is particularly excellent.

esteka3000 wrote:

Do I need to reinstall everything?

No, you just need to run the grub-mkconfig(8) command again.

esteka3000 wrote:

should I mount the points before the installation and then under arch-chroot?

No, you only need to mount the root partition once then arch-chroot in and create the configuration file at the correct location. You don't actually need to mount the ESP unless it is to be under /boot in the installed system (which doesn't seem to be the case here).


Jin, Jîyan, Azadî

Offline

#12 2020-04-12 11:36:28

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Yes, you were wrong. Always consult the ArchWiki when in doubt, the GRUB page is particularly excellent.

I did read that, but I thought that /boot/ was the mount point for EFI. Dumb me… My bad!

Last edited by esteka3000 (2020-04-12 11:57:35)

Offline

#13 2020-04-12 11:36:59

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

No, you just need to run the grub-mkconfig(8) command again.

How so?

Last edited by esteka3000 (2020-04-12 11:58:08)

Offline

#14 2020-04-12 12:00:58

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Read the ArchWiki page to which I linked earlier, it shows the command you need to use. Run that command from the chroot environment. GRUB is currently trying to find /boot/grub/grub.cfg on /dev/sda2 but it's not there.

EDIT: actually, that set command shows root as hd1,gpt2 — did you run the grub-install(8) command from the chroot environment? If not then you will also need to run that again (from the chroot).

Last edited by Head_on_a_Stick (2020-04-12 12:03:02)


Jin, Jîyan, Azadî

Offline

#15 2020-04-12 12:10:41

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Read the ArchWiki page to which I linked earlier, it shows the command you need to use. Run that command from the chroot environment. GRUB is currently trying to find /boot/grub/grub.cfg on /dev/sda2 but it's not there.

I did re-read that, but I can not access to the chroot…

Head_on_a_Stick wrote:

Actually, that set command shows root as hd1,gpt2 — did you run the grub-install(8) command from the chroot environment?

Yes, I did.

Offline

#16 2020-04-12 12:18:13

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

No, you only need to mount the root partition once then arch-chroot in and create the configuration file at the correct location. You don't actually need to mount the ESP unless it is to be under /boot in the installed system (which doesn't seem to be the case here).

I am confused… There it is said that I have to mount efi, but there too, with arch-chroot (I guees)…

Last edited by esteka3000 (2020-04-12 12:19:46)

Offline

#17 2020-04-12 13:00:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

I can not access to the chroot

Why not? How are you trying and how is it failing, exactly?

esteka3000 wrote:

I am confused… There it is said that I have to mount efi

That's the installation guide but you have already installed the system. All you are doing now is creating a configuration file for GRUB in the correct location.

Last edited by Head_on_a_Stick (2020-04-12 13:00:31)


Jin, Jîyan, Azadî

Offline

#18 2020-04-12 13:08:26

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Why not? How are you trying and how is it failing, exactly?

I am trying to mount my arch root, ie sda2 here…

Head_on_a_Stick wrote:

That's the installation guide but you have already installed the system. All you are doing now is creating a configuration file for GRUB in the correct location.

Okay. So, I mount efi before the installation and after under chroot right?

Offline

#19 2020-04-12 13:12:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

esteka3000 wrote:

I am trying to mount my arch root, ie sda2 here

How? Please provide the actual command(s) and post the full error message(s) you see.

I'm losing patience here, you really need to make more of an effort.

esteka3000 wrote:

So, I mount efi before the installation and after under chroot right?

You don't need to mount /efi at all, it doesn't have anything to do with GRUB.


Jin, Jîyan, Azadî

Offline

#20 2020-04-12 13:13:43

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

I'm losing patience here, you really need to make more of an effort.

I am sorry mate, I am a noob… Thanks for everything.

Last edited by esteka3000 (2020-04-12 14:58:06)

Offline

#21 2020-04-12 13:22:35

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]Failed installation? GRUB and mountpoint issues


Jin, Jîyan, Azadî

Offline

#22 2020-04-12 14:24:05

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

So I mounted my arch part thanks to

mount /dev/sda2 /mnt
arch-chroot /mnt

There I checked  the /etc/fstab  which seems fine. Then, as it is asked, I run

mount /dev/sda1 /efi
grub-install --target=x86_64-efi --efi-directory=/efi--bootloader-id=GRUB

Digging a bit, I deleted /efi/grub folder that was made by mistake… Ending by

grub-mkconfig -o /boot/grub/grub.cfg

Now everything works well!

Last edited by esteka3000 (2020-04-12 14:38:52)

Offline

#23 2020-04-12 14:36:58

esteka3000
Member
Registered: 2020-04-10
Posts: 18

Re: [SOLVED]Failed installation? GRUB and mountpoint issues

Head_on_a_Stick wrote:

Sorry, I got tired and lost track — cf post 13 to 20…
Thanks for everything, truly! For your kindness and your devotion.

Offline

Board footer

Powered by FluxBB