这个问题是从超级用户迁移来的,因为我得到了不那里反馈。我希望在这里有更好的运气。
我的问题很可能比对象所说的要更深一些。
重点:
我的根本问题似乎是 GRUB2 无法完全安装,即使是从“实时”安装介质启动也是如此。所有其他问题似乎成为后果。更新3中的一些细节;我将留下所有历史供参考。
一些历史:
- 该工作站诞生时是一台 Debian SID 机器,root 位于 SSD(sda2,分区现已消失)和一个单独的 /home 磁盘(现已消失)。
- 我添加了一个重用交换区域 (sda4) 的 Linux Mint 20 安装(sda5,当前)。
- 主磁盘开始出现故障(SMART 是这样说的),我将其替换为 raidz2 中的 ZFS 阵列(sdc..sdf,当前)。
- 我将 sda DOS 分区表转换为 GPT。
- 在这种情况下,GRUB 仍然显示“debian”引导菜单。
- 我安装了一个全新的磁盘(sdb)并在上面安装了Windows10。注意:
- 我在安装时删除了(物理断开)所有磁盘,以防止其他分区的“意外更新”。
- 该磁盘实际上位于可移动托架中,因此可能碰巧它“丢失”,因此所有其他驱动器名称都会转移到 sdb..sde。
- 该磁盘实际上位于可移动托架中,因此可以更改(我实际上用它来进行备份)。
- 后来我处理掉了 Debian 分区,因为它没有被使用。
目前的情况有点奇怪:
- BIOS“启动覆盖菜单”显示:
- Debian 启动菜单(不起作用,如果选择,我只能看到左上角闪烁的光标)。
- Windows启动管理器(功能正常,正确启动Win10)
- Disk0(sda,功能性,启动 Linux Mint)
- 所有其他磁盘(未尝试)
- BIOS默认启动设置为Disk0,但它会不是自动启动,我每次都需要“启动覆盖”。
- Linux Mint
reboot
命令似乎没有通过 BIOS,而且我无法(即:我没有找到方法)覆盖启动,因此它会挂起。 update-grub
不会更改任何内容,即使安装了 win 分区也看不到 Win(见下文)。install-grub /dev/sda
拒绝工作,因为我有 UEFI BIOS。grub-install --target=x86_64-efi --efi-directory=/tmp/esp --bootloader-id=GRUB
失败(见下文)。grub-install --target=i386-pc --efi-directory=/tmp/esp --bootloader-id=GRUB
仍然失败(带有不同的消息)。
我该如何纠正这种情况?
mcon@cinderella:~$ sudo -i
root@cinderella:~# mount /dev/sdb4 /mnt
root@cinderella:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 476M 0 part
├─sda4 8:4 0 3,7G 0 part [SWAP]
└─sda5 8:5 0 143,1G 0 part /
sdb 8:16 0 698,7G 0 disk
├─sdb1 8:17 0 499M 0 part
├─sdb2 8:18 0 100M 0 part
├─sdb3 8:19 0 16M 0 part
└─sdb4 8:20 0 698G 0 part /mnt
sdc 8:32 0 2,7T 0 disk
├─sdc1 8:33 0 2,7T 0 part
└─sdc9 8:41 0 8M 0 part
sdd 8:48 0 2,7T 0 disk
├─sdd1 8:49 0 2,7T 0 part
└─sdd9 8:57 0 8M 0 part
sde 8:64 0 2,7T 0 disk
├─sde1 8:65 0 2,7T 0 part
└─sde9 8:73 0 8M 0 part
sdf 8:80 0 2,7T 0 disk
├─sdf1 8:81 0 2,7T 0 part
└─sdf9 8:89 0 8M 0 part
root@cinderella:~# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-53-generic
Found initrd image: /boot/initrd.img-5.4.0-53-generic
Found linux image: /boot/vmlinuz-5.4.0-52-generic
Found initrd image: /boot/initrd.img-5.4.0-52-generic
Found linux image: /boot/vmlinuz-5.4.0-51-generic
Found initrd image: /boot/initrd.img-5.4.0-51-generic
Found linux image: /boot/vmlinuz-5.4.0-40-generic
Found initrd image: /boot/initrd.img-5.4.0-40-generic
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
device-mapper: reload ioctl on osprober-linux-sdc1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdd1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sde1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdf1 failed: Device or resource busy
Command failed.
done
root@cinderella:~# mkdir /tmp/esp
root@cinderella:~# mount /dev/sda1 /tmp/esp
root@cinderella:~# grub-install --target=x86_64-efi --efi-directory=/tmp/esp --bootloader-id=GRUB
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
root@cinderella:~# grub-install --target=i386-pc --efi-directory=/tmp/esp --bootloader-id=GRUB
Installing for i386-pc platform.
grub-install: error: install device isn't specified.
更新1:
笔记: 我似乎在这里提出多个问题,因为我强烈怀疑我的根本问题就是其中之一,并且它导致了我报告的所有(或大部分)症状。我不相信它们是不相关的问题。
遵循我运行的建议grub-mkconfig
(参见下面的列表),实际上做运行os-probe
,但显然确实如此不是参见win10安装上/dev/sdb4
,安装上/mnt
。
sdc1
我在.. sdf1
(我的数组;我认为这是正常的)上看到错误,但我根本zfs
没有提及。sdb
还有进一步的建议吗?
mcon@cinderella:~$ sudo -i
root@cinderella:~# mount /dev/sdb4 /mnt
root@cinderella:~# apt install os-prober
Reading package lists... Done
Building dependency tree
Reading state information... Done
os-prober is already the newest version (1.74ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cinderella:~# grub-mkconfig
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
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 ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${initrdfail}" = 2 ]; then
set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
set next_entry="${prev_entry}"
set prev_entry=
save_env prev_entry
if [ "${next_entry}" ]; then
set initrdfail=2
fi
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 initrdfail {
if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
if [ -z "${initrdfail}" ]; then
set initrdfail=1
if [ -n "${boot_once}" ]; then
set prev_entry="${default}"
save_env prev_entry
fi
fi
save_env initrdfail
fi; fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
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=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=10
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 10 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
Found linux image: /boot/vmlinuz-5.4.0-54-generic
Found initrd image: /boot/initrd.img-5.4.0-54-generic
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
linux /boot/vmlinuz-5.4.0-54-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro quiet splash $vt_handoff
initrd /boot/initrd.img-5.4.0-54-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
menuentry 'Ubuntu, with Linux 5.4.0-54-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-54-generic-advanced-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-54-generic ...'
linux /boot/vmlinuz-5.4.0-54-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-54-generic
}
menuentry 'Ubuntu, with Linux 5.4.0-54-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-54-generic-recovery-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-54-generic ...'
linux /boot/vmlinuz-5.4.0-54-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro recovery nomodeset dis_ucode_ldr
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-54-generic
}
Found linux image: /boot/vmlinuz-5.4.0-53-generic
Found initrd image: /boot/initrd.img-5.4.0-53-generic
menuentry 'Ubuntu, with Linux 5.4.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-53-generic-advanced-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-53-generic ...'
linux /boot/vmlinuz-5.4.0-53-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-53-generic
}
menuentry 'Ubuntu, with Linux 5.4.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-53-generic-recovery-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-53-generic ...'
linux /boot/vmlinuz-5.4.0-53-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro recovery nomodeset dis_ucode_ldr
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-53-generic
}
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
menuentry 'Ubuntu, with Linux 5.4.0-26-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-26-generic-advanced-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-26-generic ...'
linux /boot/vmlinuz-5.4.0-26-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-26-generic
}
menuentry 'Ubuntu, with Linux 5.4.0-26-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-26-generic-recovery-cb358c7d-8b36-47d5-b59d-fd66e2b1ef74' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
else
search --no-floppy --fs-uuid --set=root cb358c7d-8b36-47d5-b59d-fd66e2b1ef74
fi
echo 'Loading Linux 5.4.0-26-generic ...'
linux /boot/vmlinuz-5.4.0-26-generic root=UUID=cb358c7d-8b36-47d5-b59d-fd66e2b1ef74 ro recovery nomodeset dis_ucode_ldr
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-26-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
device-mapper: reload ioctl on osprober-linux-sdc1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdd1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sde1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdf1 failed: Device or resource busy
Command failed.
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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
更新2:
遵循建议这里我完全重新安装了 GRUB;过一会儿我会看看情况是否有所改变(尽管win10似乎仍然缺失)。
root@cinderella:~# apt-get install --reinstall grub-efi-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
grub-efi-amd64-bin grub-efi-amd64-signed
The following packages will be REMOVED:
grub-gfxpayload-lists grub-pc
The following NEW packages will be installed:
grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed
0 upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
Need to get 1.219 kB of archives.
After this operation, 11,6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://es-mirrors.evowise.com/ubuntu focal-updates/main amd64 grub-efi-amd64-bin amd64 2.04-1ubuntu26.6 [703 kB]
Get:2 http://es-mirrors.evowise.com/ubuntu focal-updates/main amd64 grub-efi-amd64 amd64 2.04-1ubuntu26.6 [46,7 kB]
Get:3 http://es-mirrors.evowise.com/ubuntu focal-updates/main amd64 grub-efi-amd64-signed amd64 1.142.8+2.04-1ubuntu26.6 [469 kB]
Fetched 1.219 kB in 1s (1.030 kB/s)
Preconfiguring packages ...
(Reading database ... 466657 files and directories currently installed.)
Removing grub-pc (2.04-1ubuntu26.6) ...
Removing grub-gfxpayload-lists (0.7) ...
Selecting previously unselected package grub-efi-amd64-bin.
(Reading database ... 466635 files and directories currently installed.)
Preparing to unpack .../grub-efi-amd64-bin_2.04-1ubuntu26.6_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.04-1ubuntu26.6) ...
Selecting previously unselected package grub-efi-amd64.
Preparing to unpack .../grub-efi-amd64_2.04-1ubuntu26.6_amd64.deb ...
Unpacking grub-efi-amd64 (2.04-1ubuntu26.6) ...
Selecting previously unselected package grub-efi-amd64-signed.
Preparing to unpack .../grub-efi-amd64-signed_1.142.8+2.04-1ubuntu26.6_amd64.deb ...
Unpacking grub-efi-amd64-signed (1.142.8+2.04-1ubuntu26.6) ...
Setting up grub-efi-amd64-bin (2.04-1ubuntu26.6) ...
Setting up grub-efi-amd64 (2.04-1ubuntu26.6) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-54-generic
Found initrd image: /boot/initrd.img-5.4.0-54-generic
Found linux image: /boot/vmlinuz-5.4.0-53-generic
Found initrd image: /boot/initrd.img-5.4.0-53-generic
Found linux image: /boot/vmlinuz-5.4.0-26-generic
Found initrd image: /boot/initrd.img-5.4.0-26-generic
device-mapper: reload ioctl on osprober-linux-sdc1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdd1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sde1 failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdf1 failed: Device or resource busy
Command failed.
done
Setting up grub-efi-amd64-signed (1.142.8+2.04-1ubuntu26.6) ...
Processing triggers for man-db (2.9.1-1) ...
更新 2 报告:
重装后没有变化。我仍然在 BIOS 中看到(不起作用)“debian”启动项,并且仍然可以通过选择第一个物理驱动器来启动 Linux Mint。
更新3
根据@oldfred的建议,我尝试在以下之后运行启动修复:
- 修复
/etc/fstab
删除过时的引用/dev/sda2
(旧的 debian 安装,现已删除)。 - 从 Linux Mint 安装介质(USB 密钥)启动。
引导修复建议了一些修复,经过审查,我让它做他的事情而不做任何改变。
结果以错误告终。
修复期间发生错误。
检测到锁定 ESP。您可能想在创建 /boot/efi 分区(FAT32、100MB~250MB、磁盘起始位置、启动标志)后重试。这可以通过 gParted 等工具来执行。然后通过[Boot Repair]的[Separate /boot/efi partition:]选项选择该分区。
经过一番互联网搜索后,我同意了:
- 兰格分开
- 已删除
/dev/sda1
(UEFI) 分区 - 重新创建了一个 128MiB 分区(同样
/dev/sda1
,大小不同),格式为FAT32
- 在分区上设置启动标志
- 重新运行启动修复
- 检查
Separate /boot/efi partition:
实际上指向/dev/sda1
- 允许它运行。
- 得到相同的、相同的错误。
如果认为有用的话,两次运行的日志都是可用的(只需询问,我将上传到一些pastebin网站)。
更新4:
在启动磁盘 ( ) 上完全删除/重新创建 UEFI 分区/dev/sda1
并尝试多次重新安装 GRUB2 后,我现在遇到以下“稳定”情况:
- 如果我在没有手动干预的情况下启动,我就会进入 Linux Mint (
/dev/sda4
)。 - 如果我停止 BIOS 并要求“备用启动”,我会得到一个菜单(来自 BIOS),其中包含:
[ empty line ]
[ Windows Boot Manager (P1: ST750LM022 HN-M750MB B) ]
[ UEFI OS (P0: CT1000MX500SSD4) ]
[ P0: CT1000MX500SSD4 ]
[ P3: TOSHIBA HDWD130 ]
[ P4: TOSHIBA HDWD130 ]
[ P5: TOSHIBA HDWD130 ]
[ P2: TOSHIBA HDWD130 ]
[ P1: ST750LM022 HN-M750MB B ]
[ Enter Setup ]
Windows Boot...
正确启动Win10。UEFI OS
将显示 GRUB 菜单。- GRUB菜单将要有两个“Windows 条目”,但选择它们只会显示“无效签名”消息;只有与 Linux 相关的条目才起作用。
请指教。
答案1
这里有很多问题。我只是来回答一下标题所示的关于Windows 10缺失的问题。
确保您已安装该软件包os-prober
。 apt install os-prober
应该这样做。该应用程序用于grub
检测其他操作系统。
下次运行sudo grub-mkconfig
。输出被打印到标准输出。您应该在日志中看到类似这样的内容:
### BEGIN /etc/grub.d/30_os-prober ###
Found Windows 10 on /dev/sda1
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-967C12CC7C12A6D1' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 967C12CC7C12A6D1
else
search --no-floppy --fs-uuid --set=root 967C12CC7C12A6D1
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
如果是这样,那么您确实可以看到 os-prober 被调用了。如果您对输出感到满意,请再次运行该命令并将其通过管道传输到/boot/
如下所示:sudo grub-mkconfig > /boot/grub/grub.cfg
它的工作原理如下:
grub-common
部署/etc/grub.d/30_os-prober
由 grub-mkconfig 读取和运行。如果出现以下情况,这将运行os-prober
:
- 它存在(软件包已安装),并且
GRUB_DISABLE_OS_PROBER
不是“真实的”