UEFI installation: grub shell after reboot
Hello, I'm trying to install Crux unfortunately with no sucess until now. I installed the UEFI version and there is no success with grub or directly with EFI Stub. After a reboot I get the grub shell. I did the following: I partitionned my hard disk with fdisk. After the partitionning I got: Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 2D20A0A0-716B-4E73-84A4-473759D6509A Device Start End Sectors Size Type /dev/nvme0n1p1 2048 1128447 1126400 550M EFI System /dev/nvme0n1p2 1128448 7419903 6291456 3G Linux swap /dev/nvme0n1p3 7419904 91305983 83886080 40G Linux filesystem /dev/nvme0n1p4 91305984 976773134 885467151 422.2G Linux filesystem I have formatted the first partition "/dev/nvme0n1p1" with ----------------------------------- # mkfs.fat -F 32 /dev/nvme0n1p1 --------------------------------------------- With the setup I have installed grub2-efi and efibootmgr. Before chrooting, I have mounted the EFI partition: ------------------------------ # mount /dev/nvme0n1p1 /mnt/boot/efi ------------------------------------------- After the chroot, I have edited the /etc/fstab to mount the EFI partition to /boot/efi. I have installed grub with the following commands: ----------------------------------------- # grub-install /boot/efi # grub-mkconfig -o /boot/grub/grub.cfg --------------------------------------------- I have the following in my folder /boot/efi: /boot/efi/: total 8 drwxr-xr-x 3 root root 4096 Dec 24 08:57 EFI drwxr-xr-x 2 root root 4096 Dec 24 07:25 linux /boot/efi/EFI: total 4 drwxr-xr-x 2 root root 4096 Dec 24 10:32 grub /boot/efi/EFI/grub: total 136 -rwxr-xr-x 1 root root 136704 Dec 24 09:46 grubx64.efi /boot/efi/linux: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz-4.14.40.efi I have also a kernel in: boot/: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz What I noticed and don't know: - when I installed grub, I got a warning that /usr/share/locale doesn't exists. I have created an empty folder. - The grub configuration file "grub.cfg" is not on the same partition as grubx64.efi, because it's in /boot/grub/grub.cfg. Other files for grub are also in that folder. Is it a problem ? - I have some doubts, but I changed a few options in the kernel. All options for uefi where compiled in the kernel, not as module. I have also set the command line argument in the kernel with a PARTUUID: [*] Built-in kernel command line (root=PARTUUID=55898d79.........e0709) Built-in kernel command string Do I need to create an initramfs ? All related UEFI options are not compiled as modules. By the way the PARTUUID is the partition of root, not my ESP partition. Finally, the output of efibootmgr: ---------------------------------------------- BootCurrent: 0003 Timeout: 1 seconds BootOrder: 0002,0001,0003,0004,0000 Boot0000* Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)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.}...a................ Boot0001* Linux 4.14.40 EFI Stub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\efi\linux\vmlinuz-4.14.40.efi) Boot0002* grub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\EFI\grub\grubx64.efi) Boot0003* UEFI: SanDisk Extreme 0001 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/CDROM(1,0xeb94,0x4000)..BO Boot0004* UEFI: SanDisk Extreme 0001, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(1,MBR,0x20d53d7b,0xeb94,0x1000)..BO ------------------------------------------------------- Without the installation media it boots to Boot0002, the string "03c08c95-4adc-cf44-94af-95b81162c304" is the PARTUUID from the ESP partition. I don't know if it changes without the installation media. At the moment, I'm stuck, thank you for your help!
did you build nvme support into the kernel? On Mon, Dec 24, 2018 at 6:14 AM Cédric Macquat <banlieue48@mykolab.com> wrote:
Hello,
I'm trying to install Crux unfortunately with no sucess until now. I installed the UEFI version and there is no success with grub or directly with EFI Stub.
After a reboot I get the grub shell. I did the following: I partitionned my hard disk with fdisk. After the partitionning I got:
Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 2D20A0A0-716B-4E73-84A4-473759D6509A
Device Start End Sectors Size Type /dev/nvme0n1p1 2048 1128447 1126400 550M EFI System /dev/nvme0n1p2 1128448 7419903 6291456 3G Linux swap /dev/nvme0n1p3 7419904 91305983 83886080 40G Linux filesystem /dev/nvme0n1p4 91305984 976773134 885467151 422.2G Linux filesystem
I have formatted the first partition "/dev/nvme0n1p1" with
-----------------------------------
# mkfs.fat -F 32 /dev/nvme0n1p1
---------------------------------------------
With the setup I have installed grub2-efi and efibootmgr. Before chrooting, I have mounted the EFI partition:
------------------------------
# mount /dev/nvme0n1p1 /mnt/boot/efi
-------------------------------------------
After the chroot, I have edited the /etc/fstab to mount the EFI partition to /boot/efi.
I have installed grub with the following commands:
-----------------------------------------
# grub-install /boot/efi
# grub-mkconfig -o /boot/grub/grub.cfg
---------------------------------------------
I have the following in my folder /boot/efi:
/boot/efi/: total 8 drwxr-xr-x 3 root root 4096 Dec 24 08:57 EFI drwxr-xr-x 2 root root 4096 Dec 24 07:25 linux
/boot/efi/EFI: total 4 drwxr-xr-x 2 root root 4096 Dec 24 10:32 grub
/boot/efi/EFI/grub: total 136 -rwxr-xr-x 1 root root 136704 Dec 24 09:46 grubx64.efi
/boot/efi/linux: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz-4.14.40.efi
I have also a kernel in:
boot/: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz
What I noticed and don't know:
- when I installed grub, I got a warning that /usr/share/locale doesn't exists. I have created an empty folder.
- The grub configuration file "grub.cfg" is not on the same partition as grubx64.efi, because it's in /boot/grub/grub.cfg. Other files for grub are also in that folder. Is it a problem ?
- I have some doubts, but I changed a few options in the kernel. All options for uefi where compiled in the kernel, not as module. I have also set the command line argument in the kernel with a PARTUUID:
[*] Built-in kernel command line
(root=PARTUUID=55898d79.........e0709) Built-in kernel command string
Do I need to create an initramfs ? All related UEFI options are not compiled as modules. By the way the PARTUUID is the partition of root, not my ESP partition. Finally, the output of efibootmgr:
----------------------------------------------
BootCurrent: 0003 Timeout: 1 seconds BootOrder: 0002,0001,0003,0004,0000 Boot0000* Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)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.}...a............. ... Boot0001* Linux 4.14.40 EFI Stub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\efi\linux\vmlinuz-4.14.40.efi) Boot0002* grub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\EFI\grub\grubx64.efi) Boot0003* UEFI: SanDisk Extreme 0001 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/CDROM(1,0xeb94,0x4000)..BO Boot0004* UEFI: SanDisk Extreme 0001, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(1,MBR,0x20d53d7b,0xeb94,0x1000)..BO
-------------------------------------------------------
Without the installation media it boots to Boot0002, the string "03c08c95-4adc-cf44-94af-95b81162c304" is the PARTUUID from the ESP partition. I don't know if it changes without the installation media.
At the moment, I'm stuck, thank you for your help! _______________________________________________ CRUX mailing list CRUX@lists.crux.nu https://lists.crux.nu/mailman/listinfo/crux
On 12/24/18 12:13 PM, Cédric Macquat wrote:
Hello,
I'm trying to install Crux unfortunately with no sucess until now. I installed the UEFI version and there is no success with grub or directly with EFI Stub.
After a reboot I get the grub shell. I did the following: I partitionned my hard disk with fdisk. After the partitionning I got:
Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 2D20A0A0-716B-4E73-84A4-473759D6509A
Device Start End Sectors Size Type /dev/nvme0n1p1 2048 1128447 1126400 550M EFI System /dev/nvme0n1p2 1128448 7419903 6291456 3G Linux swap /dev/nvme0n1p3 7419904 91305983 83886080 40G Linux filesystem /dev/nvme0n1p4 91305984 976773134 885467151 422.2G Linux filesystem
I have formatted the first partition "/dev/nvme0n1p1" with
-----------------------------------
# mkfs.fat -F 32 /dev/nvme0n1p1
---------------------------------------------
With the setup I have installed grub2-efi and efibootmgr. Before chrooting, I have mounted the EFI partition:
------------------------------
# mount /dev/nvme0n1p1 /mnt/boot/efi
-------------------------------------------
After the chroot, I have edited the /etc/fstab to mount the EFI partition to /boot/efi.
I have installed grub with the following commands:
-----------------------------------------
# grub-install /boot/efi
# grub-mkconfig -o /boot/grub/grub.cfg
---------------------------------------------
I have the following in my folder /boot/efi:
/boot/efi/: total 8 drwxr-xr-x 3 root root 4096 Dec 24 08:57 EFI drwxr-xr-x 2 root root 4096 Dec 24 07:25 linux
/boot/efi/EFI: total 4 drwxr-xr-x 2 root root 4096 Dec 24 10:32 grub
/boot/efi/EFI/grub: total 136 -rwxr-xr-x 1 root root 136704 Dec 24 09:46 grubx64.efi
/boot/efi/linux: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz-4.14.40.efi
I have also a kernel in:
boot/: total 6560 -rwxr-xr-x 1 root root 2344508 Dec 24 08:22 System.map -rwxr-xr-x 1 root root 4366896 Dec 24 08:22 vmlinuz
What I noticed and don't know:
- when I installed grub, I got a warning that /usr/share/locale doesn't exists. I have created an empty folder.
The /usr/share/locale message is safe to ignore. Just a quick note here - grub-mkconfig will not create a usable config if the kernel is just called "vmlinuz". If you append a version string after it (vmlinuz-4.14 or whatever) it should generate a proper config with fancy menus.
- The grub configuration file "grub.cfg" is not on the same partition as grubx64.efi, because it's in /boot/grub/grub.cfg. Other files for grub are also in that folder. Is it a problem ?
No that's expected.
- I have some doubts, but I changed a few options in the kernel. All options for uefi where compiled in the kernel, not as module. I have also set the command line argument in the kernel with a PARTUUID:
[*] Built-in kernel command line
(root=PARTUUID=55898d79.........e0709) Built-in kernel command string
If you intend to use grub I'd recommend not placing stuff like that in the kernel command-line. I assume the bootloaders arguments would overrule those settings but I'm just guessing as I've never tried it. Keep it simple and just remove that setting.
Do I need to create an initramfs ? All related UEFI options are not compiled as modules. By the way the PARTUUID is the partition of root, not my ESP partition. Finally, the output of efibootmgr: Not for UEFI. From what I can tell you dont need a initrd.
----------------------------------------------
BootCurrent: 0003 Timeout: 1 seconds BootOrder: 0002,0001,0003,0004,0000 Boot0000* Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)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.}...a................ Boot0001* Linux 4.14.40 EFI Stub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\efi\linux\vmlinuz-4.14.40.efi) Boot0002* grub HD(1,GPT,03c08c95-4adc-cf44-94af-95b81162c304,0x800,0x113000)/File(\EFI\grub\grubx64.efi) Boot0003* UEFI: SanDisk Extreme 0001 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/CDROM(1,0xeb94,0x4000)..BO Boot0004* UEFI: SanDisk Extreme 0001, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(1,MBR,0x20d53d7b,0xeb94,0x1000)..BO
-------------------------------------------------------
Without the installation media it boots to Boot0002, the string "03c08c95-4adc-cf44-94af-95b81162c304" is the PARTUUID from the ESP partition. I don't know if it changes without the installation media.
At the moment, I'm stuck, thank you for your help!
Since you stated you are actually booting into the grub shell, all that should be missing is a proper config. If you rename the kernel from vmlinuz to vmlinuz-<version> and rerun grub-mkconfig it should generate a usable config. /f
On 2018-12-25 08:23, Fredrik wrote: Thank you for your answer.
Just a quick note here - grub-mkconfig will not create a usable config if the kernel is just called "vmlinuz". If you append a version string after it (vmlinuz-4.14 or whatever) it should generate a proper config with fancy menus.
It's what I discovered. After renaming it to vmlinuz-4.14.40 grub generated a config file with that entry. Before I had some doubts because it was rather empty. I guess there was no entry in the grub configuration file. That's why I got the grub shell. Everything is fine now, I can boot, thank you! But I have another question: does need somebody to update the installation guide or the users are supposed to know it ? Normally the kernel version is appened to vmlinuz, but nothing more was specified in the installation guide, so I thought it was ok.
- I have some doubts, but I changed a few options in the kernel. All options for uefi where compiled in the kernel not as module. I have also set the command line argument in the kernel with a PARTUUID:
[*] Built-in kernel command line
(root=PARTUUID=55898d79.........e0709) Built-in kernel command string
If you intend to use grub I'd recommend not placing stuff like that in the kernel command-line. I assume the bootloaders arguments would overrule those settings but I'm just guessing as I've never tried it. Keep it simple and just remove that setting.
I think it's still there, but it boots. I'll remove it as soon as my system will be fully installed.
Do I need to create an initramfs ? All related UEFI options are not compiled as modules. By the way the PARTUUID is the partition of root, not my ESP partition. Finally, the output of efibootmgr: Not for UEFI. From what I can tell you dont need a initrd.
Yes, it was not necessary. Thank you for your help!
participants (3)
-
Cédric Macquat
-
Fredrik
-
Steve Volumetric