页次: 1
1. 电脑正常运行的情况下,使用reboot和shutdown命令再启动电脑每次卡在加载初始化内存盘,似乎是跳了三次,第三次黑屏字小一点,分辨率高了然后就卡住了,还没有进入图形界面。
2. 然后我按电源键强制关机后,再按电源键启动电脑正常进入
3. 重新生成 /boot/grub/grub.cfg 和/boot/initramfs-linux-lts.img问题没有解决
最后解决禁用了:systemctl mask mkinitcpio-generate-shutdown-ramfs.service
$sudo grub-mkconfig -o /boot/grub/grub.cfg
正在生成 grub 配置文件 ...
找到 Linux 镜像:/boot/vmlinuz-linux-lts
找到 initrd 镜像:/boot/intel-ucode.img /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-lts-fallback.img
警告: os-prober 将运行以检测其它可引导分区。
将使用 os-prober 的输出,以检测分区中可引导的二进制文件,并为其创建新的启动项。
正在添加 UEFI 固件设置的引导菜单项……
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: 警告: 未知的设备类型 nvme0n1.
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: 警告: 未知的设备类型 nvme0n1.
完成
$sudo mkinitcpio -p linux-lts
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts.img
==> Starting build: '6.6.30-2-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [resume]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: '6.6.30-2-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [resume]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts-fallback.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
# /boo/grub/grub.cfg
#
# 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="${saved_entry}"
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
}
set menu_color_normal=light-gray/black
set menu_color_highlight=green/black
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=zh_CN
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=5
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 5 ; then
set timeout=0
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux,使用 Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen-fallback.img
}
menuentry 'Arch Linux,使用 Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img
}
menuentry 'Arch Linux,使用 Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-70e6b447-72e8-464c-a284-127a291d2b6c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
echo '加载 Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=70e6b447-72e8-464c-a284-127a291d2b6c rw quiet splash apparmor=1 security=apparmor udev.log_priority=3 zswap.enabled=0 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold resume=UUID=70e6b447-72e8-464c-a284-127a291d2b6c resume_offset=55035904
echo '加载初始化内存盘...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###
### 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 ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
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/35_fwupd ###
### END /etc/grub.d/35_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 ###
### BEGIN /etc/grub.d/41_snapshots-btrfs ###
### END /etc/grub.d/41_snapshots-btrfs ###
### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
search --fs-uuid --no-floppy --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
linux16 /boot/memtest86+/memtest.bin
}
fi
### END /etc/grub.d/60_memtest86+ ###
### BEGIN /etc/grub.d/60_memtest86+-efi ###
if [ "${grub_platform}" == "efi" ]; then
menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
if loadfont unicode ; then
set gfxmode=1024x768,800x600,auto
set gfxpayload=800x600,1024x768
terminal_output gfxterm
fi
search --fs-uuid --no-floppy --set=root 70e6b447-72e8-464c-a284-127a291d2b6c
linux /boot/memtest86+/memtest.efi
}
fi
### END /etc/grub.d/60_memtest86+-efi ###
最近编辑记录 arterxu (2024-05-23 11:53:51)
离线
看看 /boot/grub/grub.cfg。另外你为什么不压缩 initramfs 呀?
在线
systemctl mask mkinitcpio-generate-shutdown-ramfs.service 禁用这个之后解决了
离线
页次: 1