Hello,
I am installing CRUX 3.5 following the handbook online at crux.nu.
The system will be Linux-only, installing onto a new SSD drive, and using EFI.
The installation was started by booting from an ISO on a USB stick.
At the end of the installation instructions, I built the kernel, installed grub2, and rebooted the system.
It does not boot Linux, and instead comes up in grub command mode (grub version 2.02).
I suspect that I am not installing grub2 correctly.
Here are the steps I used (the /boot directory is initially empty):
Code:
cd /usr/src/linux-4.19.48
cp arch/x86/boot/bzImage /boot/vmlinuz
cp System.map /boot
mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi
grub-install --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
At this point, the tree at /boot looks as follows:
Code:
/boot
+---efi
| +---EFI
| +---grub
| +---grubx64.efi
+---grub
| +---fonts
| +---grub.cfg
| +---grubenv
| +---locale
| +---x86_64-efi
| +---<266 files>
+---System.map
+---vmlinuz
After the above didn't work, I tried mounting the ESP partition on /boot instead of on /boot/efi.
Here are the steps I used (the /boot directory is initially empty):
Code:
mount /dev/nvme0n1p1 /boot
cd /usr/src/linux-4.19.48
cp arch/x86/boot/bzImage /boot/vmlinuz
cp System.map /boot
grub-install --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
At this point, the tree at /boot looks as follows:
Code:
/boot
+---EFI
| +---grub
| +---grubx64.efi
+---grub
| +---fonts
| +---grub.cfg
| +---grubenv
| +---locale
| +---x86_64-efi
| +---<266 files>
+---System.map
+---vmlinuz
There are two differences from the first time:
1. The extra "efi" directory before "EFI" is not there.
2. The grub directory and System.map and vmlinuz are on the ESP partition.
In both situation, typing "exit" from grub2 command mode puts me into the BIOS.
I have followed suggestions from archlinux.org and unix.stackexchange.com
to try booting from grub2 command mode, but without success.
Something looks wrong with the contents of /boot in both situations,
like maybe the two "grub" directories should be the same directory?
Update:
I added the following command, which seems to be necessary:
efibootmgr -c -d /dev/nvme0n1 -p 1 -l \\EFI\\grub\\grubx64.efi
However, adding this made no difference.
I tested with the first setup (grub directory, System.map, and vmlinuz are NOT on the ESP partition).
Any help would be appreciated.
Thank you.
Update 2:
After reading through the CRUX manual more closely, I now realize that
I may not need the ESP partition at all: It seems to be needed only for
booting Windows, either alone or in a dual-boot setup. I am not using
Windows, so my bootloader should be able to use BIOS.