You are not logged in.
Pages: 1
After updating with yay -Syu I can't get into the system. The boot system can be displayed normally but after selecting arch to enter I can only see black screen,. I tried to reinstall the boot with a USB flash drive to fix it to no avail, the record is as follows. What should I do now?
[root@archiso /]# grub install --target=x86_ 64-efi --efi-directory=/boot --boot loader id=Arch
lnstalling for x86_64-efi platform .
Installation finished. No error reported.
[root@archiso /]# grub mkconfig -o /boot/grub/grub .cfg
Generating grub configuration file
Found thene: /usr/share/grub/themes/Tela/theme .txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/ initranfs- linux. img
Found limux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initranfs- linux . img
Warning: 0S-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB driue for /dev/sda1. Check your device.map.
Warning: 0S-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB driue for /dev/sda1. Check your device.map.
Adding boot menu entry for UEFI Firmware Settings .. .
Found Linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/ initranfs- linux. img
Adding boot menu entry for UEFI Firmware Settings
done
rootearchisd /1#
Last edited by lyxzcx (2024-02-14 05:28:18)
Offline
You have to mount your system and chroot into it:
mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
reboot
This assumes your ESP on p1 and root on p3 - use your layout.
When you just try to install grub and update it you do this within the archiso live system - which doesn't affect your installation - you have to mount it first.
Offline
You have to mount your system and chroot into it:
mount /dev/sda3 /mnt mount /dev/sda1 /mnt/boot arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub grub-mkconfig -o /boot/grub/grub.cfg exit umount -R /mnt reboot
This assumes your ESP on p1 and root on p3 - use your layout.
When you just try to install grub and update it you do this within the archiso live system - which doesn't affect your installation - you have to mount it first.
I have mount it before.
Offline
I have mount it before
You have to mount your system and chroot into it:
Also
grub mkconfig -o /boot/grub/grub .cfg … cannot find a GRUB driue for /dev/sda1
OCR or manual transcript?
Don't.
grub-mkconfig -o /boot/grub/grub.cfg 2>&1 | tee /tmp/grub-mkconfig.log
cat /tmp/grub-mkconfig.log | curl -F 'file=@-' 0x0.st
Online
I have mount it before
cryptearth wrote:You have to mount your system and chroot into it:
Also
grub mkconfig -o /boot/grub/grub .cfg … cannot find a GRUB driue for /dev/sda1
OCR or manual transcript?
Don't.grub-mkconfig -o /boot/grub/grub.cfg 2>&1 | tee /tmp/grub-mkconfig.log cat /tmp/grub-mkconfig.log | curl -F 'file=@-' 0x0.st
Sorry for using OCR. I mount and chroot before and you can see " [root@archiso /]# " at the beginning of command.
Here's my log.
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 2d053c4d-84be-4b49-939f-1f543283308b
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
Found theme: /usr/share/grub/themes/Tela/theme.txt
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 2d053c4d-84be-4b49-939f-1f543283308b
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_32.pf2
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/Tela/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/Tela/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/Tela/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/Tela/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/Tela/terminus-18.pf2
insmod jpeg
insmod png
set theme=($root)/usr/share/grub/themes/Tela/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/01_grub-customizer_menu_color_helper ###
### END /etc/grub.d/01_grub-customizer_menu_color_helper ###
### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-2d053c4d-84be-4b49-939f-1f543283308b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 2814-8224
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=2d053c4d-84be-4b49-939f-1f543283308b rw loglevel=3 systemd.unified_cgroup_hierarchy=false ibt=off quiet
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-2d053c4d-84be-4b49-939f-1f543283308b' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-2d053c4d-84be-4b49-939f-1f543283308b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 2814-8224
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=2d053c4d-84be-4b49-939f-1f543283308b rw loglevel=3 systemd.unified_cgroup_hierarchy=false ibt=off quiet
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_linux_proxy ###
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
menuentry "Arch Linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-2d053c4d-84be-4b49-939f-1f543283308b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 2814-8224
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=2d053c4d-84be-4b49-939f-1f543283308b rw loglevel=3 systemd.unified_cgroup_hierarchy=false ibt=off quiet
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux.img
}
### END /etc/grub.d/10_linux_proxy ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sda1. Check your device.map.
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_os-prober_proxy ###
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sda1. Check your device.map.
### END /etc/grub.d/30_os-prober_proxy ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
Adding boot menu entry for UEFI Firmware Settings ...
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/33_linux_proxy ###
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
submenu "Advanced options for Arch Linux"{
menuentry "Arch Linux, with Linux linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-2d053c4d-84be-4b49-939f-1f543283308b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 2814-8224
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=2d053c4d-84be-4b49-939f-1f543283308b rw loglevel=3 systemd.unified_cgroup_hierarchy=false ibt=off quiet
echo 'Loading initial ramdisk ...'
initrd /intel-ucode.img /initramfs-linux.img
}
}
### END /etc/grub.d/33_linux_proxy ###
### BEGIN /etc/grub.d/34_linux_xen ###
### END /etc/grub.d/34_linux_xen ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/37_uefi-firmware ###
Adding boot menu entry for UEFI Firmware Settings ...
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/37_uefi-firmware ###
### BEGIN /etc/grub.d/38_fwupd ###
### END /etc/grub.d/38_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
done
Offline
chroot *how*?
If you're not using arch-chroot you'll have to mount/link the pseudo FS yourself.
The errors in the os-prober run however should™ not be fatal
Online
chroot *how*?
If you're not using arch-chroot you'll have to mount/link the pseudo FS yourself.The errors in the os-prober run however should™ not be fatal
I use this
mount /dev/nvme0n1p4 /mnt
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt
Offline
So what's sda? The install iso?
lsblk -f # withOUT chrooting
Online
So what's sda? The install iso?
lsblk -f # withOUT chrooting
I have two ssds. My arch,boot and disk c for windos are on sda 0 and the whole sda1 is for disk d for windows.
Last edited by lyxzcx (2024-02-13 15:57:25)
Offline
Yeah, that's not the way anything works. Clear up the confusion, post the output seth asked for.
Offline
@seth
When booting archiso and using arch-chroot you don't have to re-bind mount dev,sys,proc by yourself - the script does this for you. If you use regular chroot - I'm not quite sure ...
@OP
According to your pre-chroot mounts they look fine to me - you should be able to just clean and reinstall grub from within chroot just fine.
Maybe check your boot entries with efibootmgr -v (should work from both within and outside of chroot).
Offline
Yes, I know - thanks.
lsblk will still not properly work out of a chroot which is why I stressed that.
blkid might work.
Online
Yes, I know - thanks.
lsblk will still not properly work out of a chroot which is why I stressed that.
blkid might work.
Since I can't use git, it took me some time to send the results.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 766.5M 1 loop /run/archiso/airootfs
sda 8:0 1 476.7G 0 disk
├─sda1 8:1 1 917M 0 part
└─sda2 8:2 1 15M 0 part
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 150M 0 part
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 100G 0 part
└─nvme0n1p4 259:4 0 376.8G 0 part
nvme1n1 259:5 0 476.9G 0 disk
└─nvme1n1p1 259:6 0 476.9G 0 part
Offline
@seth
When booting archiso and using arch-chroot you don't have to re-bind mount dev,sys,proc by yourself - the script does this for you. If you use regular chroot - I'm not quite sure ...@OP
According to your pre-chroot mounts they look fine to me - you should be able to just clean and reinstall grub from within chroot just fine.
Maybe check your boot entries with efibootmgr -v (should work from both within and outside of chroot).
check my boot entries with efibootmgr -v
version 18
Offline
So you currently have 3 disks. sda is your live USB, then you have nvme0 and nvme1. cryptearth has been giving you some questionable info, assuming your disks and their layout, and efibootmgr -v isn't used anymore, really, you want efibootmgr -u now. You posted -V, which nobody asked for.
So why are we on the bootloader, anyway? It seems to be working, but you get a black screen after that, correct?
Offline
So you currently have 3 disks. sda is your live USB, then you have nvme0 and nvme1. cryptearth has been giving you some questionable info, assuming your disks and their layout, and efibootmgr -v isn't used anymore, really, you want efibootmgr -u now. You posted -V, which nobody asked for.
So why are we on the bootloader, anyway? It seems to be working, but you get a black screen after that, correct?
you are right. I removed the usb after arch-chroot and the grub-mkconfig ran successfully. However, it can't detect windows and when I boot arch it will turn back to boot menu. After I select arch twice, it shows following.
Loading Linux linux
Loading initial ramdisk
error: you need to load the kernel first .
Press any key to continue..
Last edited by lyxzcx (2024-02-14 04:08:07)
Offline
I removed "ibt=off" and everything works well now. Anyone tell me what's the problem?
Offline
Yes, I know - thanks.
lsblk will still not properly work out of a chroot which is why I stressed that.
blkid might work.
Oh, I wasn't aware of that - but yea, makes sense to call lsblk from outside of chroot but from the boot-environment.
and efibootmgr -v isn't used anymore
Yea, I guess -v is only helpful for some deeper diagnostics.
As for -u: according to man it only affects additional paramter like when adding a new entry manual. For simple listing just efibootmgr without any paramters seems sufficient
@OP
To stay polite I will not reply with "error 12/40", but still something is weird:
The archiso boot media like your thumbdrive should not be picked up by the initial grub-mkconfig from within the arch-chroot environment. That should only detect the fresh arch install itself. So when removing the thumbdrive after booting causes some effect to me it looks like you either not in the arch-chroot environment when calling grub-mkconfig or you have modified the /etc/default/grub file - which, at least for the initial setup, should not be done but only after you successfully booted into the new system for the first time. Either way - behaving different when the boot media gets isn't something I've encountered so far - after using arch for about 2 years now. And I played around a lot - both within VMs as well as on bare metal.
As for detecting windows: For this you need os-prober and set the override in /etc/default/grub so it gets run. It should detect the bootmgr in <esp>/EFI/Microsoft/bootmgfw.efi and add an entry for it. But I still recommend to only do this after you booted into the arch install for the first time to verify it can boot correctly.
As for IBT - as I don't know what that is I can't tell.
Offline
seth wrote:Yes, I know - thanks.
lsblk will still not properly work out of a chroot which is why I stressed that.
blkid might work.Oh, I wasn't aware of that - but yea, makes sense to call lsblk from outside of chroot but from the boot-environment.
Scimmia wrote:and efibootmgr -v isn't used anymore
Yea, I guess -v is only helpful for some deeper diagnostics.
As for -u: according to man it only affects additional paramter like when adding a new entry manual. For simple listing just efibootmgr without any paramters seems sufficient@OP
To stay polite I will not reply with "error 12/40", but still something is weird:
The archiso boot media like your thumbdrive should not be picked up by the initial grub-mkconfig from within the arch-chroot environment. That should only detect the fresh arch install itself. So when removing the thumbdrive after booting causes some effect to me it looks like you either not in the arch-chroot environment when calling grub-mkconfig or you have modified the /etc/default/grub file - which, at least for the initial setup, should not be done but only after you successfully booted into the new system for the first time. Either way - behaving different when the boot media gets isn't something I've encountered so far - after using arch for about 2 years now. And I played around a lot - both within VMs as well as on bare metal.
As for detecting windows: For this you need os-prober and set the override in /etc/default/grub so it gets run. It should detect the bootmgr in <esp>/EFI/Microsoft/bootmgfw.efi and add an entry for it. But I still recommend to only do this after you booted into the arch install for the first time to verify it can boot correctly.
As for IBT - as I don't know what that is I can't tell.
I call grub-mkconfig in the arch-chroot environment. I called grub-mkconfig with the same steps about one year ago and it can automatically detect the windows entry.
As for IBT, I added "ibt=off" into /etc/default/grub file long time ago because I can't use nvidia without it at that time.
Last edited by lyxzcx (2024-02-14 08:47:40)
Offline
You added ibt=off because at the time the nvidia binaries would greet your w/ an ENDBR when it was enabled.
It's since been fixed by nvidia and is no longernecessary nor a good idea.
It has nothing to do with being able to boot or finding windows, though.
For a status quo: everything works again and os-prober detected and added windows to your grub configuration?
Online
You added ibt=off because at the time the nvidia binaries would greet your w/ an ENDBR when it was enabled.
It's since been fixed by nvidia and is no longernecessary nor a good idea.It has nothing to do with being able to boot or finding windows, though.
For a status quo: everything works again and os-prober detected and added windows to your grub configuration?
The windows was not found ar first. I entered the arch and used grub-customizer to fix my grub back to my previous settings. Now i can select and enter windows on boot menu. Everything seems well now.
Offline
Pages: 1