You are not logged in.

#1 2020-07-14 07:14:35

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

[SOLVED] "Minimal bash-like line editing" in GRUB when booting

My Dell Vostro 5590 has Win 10 preinstalled on it, and my target is to install Archlinux beside it.

Since I was having issue related to secure boot and RST vs AHCI, I decided to first install Ubuntu, just because it's easier, and then supplant it with Archlinux.

So I eventually ended up with a working Ubuntu-Windows10 dual boot, and decided to proceed with Archlinux installation, following the installation guide.

I proceeded to partition the disk (I did so by using gparted from live Ubuntu, actually) without creating an additional EFI system partition; I only resized the single partition in which I had installed Ubuntu down by 16 GB and used those to create a swap partition.

At this point I actually started live Archlinux and followed the guide skipping the section Partition the disks, as I've done as described above, and I also skipped Boot loader, as I thought that it was not needed, as GRUB was there already from the previous Ubuntu installation.

Result, upon reboot, GRUB shows

Minimal BASH-like line editing is supported....

and if I enter `exit`, then Windows 10 boots just fine.

Is that skipping underlined above my mistake? In this recent post I read that a user got a similar behavior because he forgot to install a kernel. In this respect I'm pretty sure I got the following command right:

# pacstrap /mnt base linux linux-firmware

But if you tell me a missing kernel is the most likely reason for what I'm observing, I'll try following the guide again.

This older post also seems relevant, but it also writes that

grub> set root=(hd0,gpt4)
grub> linux /boot/vmlinuz root=/dev/nvme0n1p4
grub> initrd  initramfs-linux.img
grub> boot

was enough to boot the installed Archlinux. In my case `/boot/vm` gets tab-completed to `/boot/vmlinuz-linux`, `root=/d` gets completed to `root=/dev/`, but hitting tab after that doesn't complete anything (but I know the partition is named nvme0n1p4 for me too); `initrd  initramfs-linux.img` gives `error: invalid file name ...`.

Last edited by Enrico1989 (2020-07-14 21:32:32)

Offline

#2 2020-07-14 07:26:31

frostschutz
Member
Registered: 2013-11-15
Posts: 958

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

it's normal for root=/dev/... to not get tab completed

if vmlinuz-linux tab completes but initramfs-linux.img does not, maybe you forgot to run mkinitcpio so the file isn't even there?

in any case, live cd, chroot and fix kernel, initrd and grub from there

Is that skipping underlined above my mistake?

while it's possible to use grub from another distro (and share one grub to boot multiple parallel installs), you shouldn't be doing this blindly but verify how it's set up and how it works

and if in doubt (and if ArchLinux is to be your only Linux, replacing the older Ubuntu) install the grub version as provided by ArchLinux anyway

Offline

#3 2020-07-14 07:53:42

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

frostschutz wrote:

if vmlinuz-linux tab completes but initramfs-linux.img does not, maybe you forgot to run mkinitcpio so the file isn't even there?

From the wiki I read that

Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the kernel package with pacstrap.

which made me think that step could be skipped unless some other condition earlier or at least later in the wiki told me "hey, in case XYZ you have to do it".


frostschutz wrote:

while it's possible to use grub from another distro (and share one grub to boot multiple parallel installs), you shouldn't be doing this blindly but verify how it's set up and how it works

and if in doubt (and if ArchLinux is to be your only Linux, replacing the older Ubuntu) install the grub version as provided by ArchLinux anyway

Ok, I'll keep this in mind.


frostschutz wrote:

in any case, live cd, chroot and fix kernel, initrd and grub from there

This is a bit fast. I'll re-read the wiki this evening to fully understand your suggestion "fix kernel", instead of doing the whole installation from the beginning.

Last edited by Enrico1989 (2020-07-14 08:04:38)

Offline

#4 2020-07-14 08:16:56

frostschutz
Member
Registered: 2013-11-15
Posts: 958

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

Enrico1989 wrote:

`initrd  initramfs-linux.img` gives `error: invalid file name ...`.

Minor detail I missed, filename paths must start with / so it should be `initrd /initramfs-linux.img`

If that's not it you really have to check it out from Live CD and see if the files are even there.

Last edited by frostschutz (2020-07-14 08:17:28)

Offline

#5 2020-07-14 17:45:04

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

I tried the installation process again, unsuccessfully.

I did also run

# mkinitcpio -P

the out of which contains this line:

==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img

which seems to suggest that in the "Minimal bash-like line editing is supported"-GRUB I should have uset that, is it right? (*)

The output of the command ends with this last line:

Image generation successful

which seemed good.

At the Boot loader section, which is the only step left before rebooting, I don't know very well what to do, as the section just says Choose and install a Linux-capable boot loader. If you have an Intel or AMD CPU, enable microcode updates in addition (where the latter part does not apply to me, as my system has an i7).

Therefore, I tried to follow these installation steps, so I simply run this:

# mount /dev/nvme0n1p1 /home            # is it ok to mount it in home???
# grub-install --target=x86_64-efi --efi-directory=/home --bootloader-id=GRUB

But again I end up with the Minimal bash-like line editing is supported... sad

In the grub installation after the second command I copied above, I read Remember to #Generate the main configuration file after finalizing the configuration, but I did not do it, as it refers to a subsection in Configuration, which starts with On an installed system, so I understand it's after the reboot.


(*) I did run indeed these commands

grub> set root=(hd0,gpt4)
grub> linux /boot/vmlinuz-linux root=/dev/nvme0n1p4
grub> initrd  /boot/initramfs-linux.img
grub> boot

but the boot does not succeed, and all I read on screen is:

Arch Linux 5.7.8-arch1-1 (tty1)

redviper login: [    2.860377] sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-cml.ri failed err: -2
[    2.860426] sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
[    2.860854] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -2

EDIT

The boot actually does succeed, I just had to hit Return to get the login prompt. But I cannot really use the system this way, having to manually run those 4 lines in GRUB, expecially considering that I don't know the US keyboard layout and I have to look it up on a photo.

Last edited by Enrico1989 (2020-07-14 18:00:04)

Offline

#6 2020-07-14 20:25:42

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,480
Website

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

Please post the output of

efibootmgr -v

^ That can be run from any live environment.

The set command from the "grub>" prompt will show where it is looking for the configuration file that can't be found.

Offline

#7 2020-07-14 20:48:34

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

This is the output of `efibootmgr -v`, which I could scp to another computer:

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0004,0006,0003,0000,0001,0002
Boot0000* UEFI KBG40ZNS512G NVMe KIOXIA 512GB 209PD991PTML 1	PciRoot(0x0)/Pci(0x1d,0x4)/Pci(0x0,0x0)/NVMe(0x1,8C-E3-8E-04-00-70-33-4C)/HD(1,GPT,6d310373-3d6a-48ff-ad10-93c046b258d9,0x800,0x4b000)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y.
Boot0001* UEFI Generic Mass Storage 00A97E31	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(2,MBR,0x5eaa061f,0xa4,0x20000)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y.
Boot0002* UEFI Generic Mass Storage 00A97E31 2	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/CDROM(1,0xa4,0x14375c)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y.
Boot0003* Windows Boot Manager	HD(1,GPT,6d310373-3d6a-48ff-ad10-93c046b258d9,0x800,0x4b000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0004* GRUB	HD(1,GPT,6d310373-3d6a-48ff-ad10-93c046b258d9,0x800,0x4b000)/File(\EFI\GRUB\grubx64.efi)
Boot0006* ubuntu	HD(1,GPT,6d310373-3d6a-48ff-ad10-93c046b258d9,0x800,0x4b000)/File(\EFI\ubuntu\shimx64.efi)

The following is `set`'s output, which I'm copying hopefully without any typo:

cmdpath=(hd0,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=(hd0,gpt4)/boot/grub
root=hd0,gpt4
secondary_locale_dir=

Besides, at GRUB/EFI examples I read that The Dell UEFI implementation needs the UEFI firmware workaround to load grub. Otherwise it will drop into a "no OS found" screen, and my laptop is a Dell too, so I was wandering if I can be experiencing the same issue as that, even if the wiki is not very clear on what the "no OS found" screen is.

Offline

#8 2020-07-14 20:56:00

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,480
Website

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

So you've installed GRUB from the Arch live ISO but did you configure it?

https://wiki.archlinux.org/index.php/GR … ation_file

Offline

#9 2020-07-14 21:12:50

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

Executing

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

worked.

Now I just have to make GRUB detect the other OS:

To have grub-mkconfig search for other installed systems and automatically add them to the menu, install the os-prober package and mount the partitions that contain the other systems. Then re-run grub-mkconfig.

By partitions that contain the other systems the wiki means, if we refer to Windows, where C:\ is, right?

Offline

#10 2020-07-14 21:14:22

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,480
Website

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

For a UEFI Windows system GRUB just needs to be able to find bootmgfw.efi, which should be on the EFI system partition.

Offline

#11 2020-07-14 21:29:14

Enrico1989
Member
Registered: 2018-07-05
Posts: 96

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

It worked! Thank you very much.

Besides I would expect that the info you gave to me in your last message (which is not obvious at all to me; if it was, that I wouldn't need help on this forum and probably I wouldn't need much of the wiki in the first place) was under Detecting other operating systems. Instead, `bootmgfw.efi` is only mentioned 4 times in that page and only in code, never in text. I would like to update the wiki, if that can be of help for anyone else having this issue like me. Clearly I think I should first discuss the possible edit in another section of the forum, right?

Offline

#12 2020-07-14 21:32:54

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,480
Website

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

Enrico1989 wrote:

I think I should first discuss the possible edit in another section of the forum, right?

Use the "talk" section on the ArchWiki page to discuss proposed changes: https://wiki.archlinux.org/index.php/Ar … _talk_page

Offline

#13 2020-07-15 03:11:56

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,537

Re: [SOLVED] "Minimal bash-like line editing" in GRUB when booting

Enrico1989 wrote:

EDIT

The boot actually does succeed, I just had to hit Return to get the login prompt. But I cannot really use the system this way, having to manually run those 4 lines in GRUB, expecially considering that I don't know the US keyboard layout and I have to look it up on a photo.

Well, those four lines in grub can be stored in a text file and run using the shortcut

source /boot/file_with_the_four_lines.txt

And, if you name the file /boot/grub/grub.cfg, it will even run those four lines automatically...

This is the general concept behind that config file... and why it's a good idea to have one.

P.S. You can do lots of things with the grub.cfg, don't worry about the inaccurate autodetected heuristics. Write your own: https://wiki.archlinux.org/index.php/Us … figuration


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB