AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题

问题[grub](unix)

Martin Hope
SuperDialga
Asked: 2024-07-20 03:33:16 +0800 CST

如何获取 libdevmapper 1.02.34 或更高版本的副本?

  • 5

我正在尝试在 Ubuntu 22.04.4 LTS 机器上将 GRUB 2.06 更新到 2.12,按照 tarball 中包含的 INSTALL 文本文件中的说明进行操作(在文章底部)。阅读先决条件(包括在下面),我发现我需要libdevmapper 1.02.34。我似乎没有这个文件,因为稍后当我运行 时./configure,./configure的输出以以下内容结尾:

*******************************************************
GRUB2 will be compiled with following components:
Platform: i386-pc
With devmapper support: No (need libdevmapper header)
With memory debugging: No
With disk cache statistics: No
With boot time statistics: No
efiemu runtime: Yes
grub-mkfont: No (need freetype2 library)
grub-mount: No (need fuse or fuse3 libraries)
starfield theme: No (No build-time grub-mkfont)
With libzfs support: No (need zfs library)
Build-time grub-mkfont: No (need freetype2 library)
Without unifont (no build-time grub-mkfont)
Without liblzma (no support for XZ-compressed mips images) (need lzma library)
With stack smashing protector: No
*******************************************************

我如何获得 的副本libdevmapper 1.02.34 or later?

部分内容INSTALL:

The Requirements
================

GRUB depends on some software packages installed into your system. If
you don't have any of them, please obtain and install them before
configuring the GRUB.

* GCC 5.1.0 or later
  Experimental support for clang 8.0.0 or later (results in much bigger binaries)
  for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64
* GNU Make
* GNU Bison 2.3 or later
* GNU gettext
* GNU binutils 2.9.1.0.23 or later
* Flex 2.5.35 or later
* pkg-config
* GNU patch
* Other standard GNU/Unix tools
* a libc with large file support (e.g. glibc 2.1 or later)

On GNU/Linux, you also need:

 * libdevmapper 1.02.34 or later (recommended)


...more content that I have cut out...


Building the GRUB
=================

The simplest way to compile this package is:

  1. `cd' to the directory containing the package's source code.

  2. Skip this and following step if you use release tarball and proceed to
     step 4. If you want translations type `./linguas.sh'.
  
  3. Type `./bootstrap'.

     The autogen.sh (called by bootstrap) uses python. By default autodetect
     it, but it can be overridden by setting the PYTHON variable.

  4. Type `./configure' to configure the package for your system.
     If you're using `csh' on an old version of System V, you might
     need to type `sh ./configure' instead to prevent `csh' from trying
     to execute `configure' itself.

     Running `configure' takes awhile.  While running, it prints some
     messages telling which features it is checking for.

  6. Type `make' to compile the package.

  7. Optionally, type `make check' to run any self-tests that come with
     the package. Note that many of the tests require root privileges in
     order to run.

  8. Type `make install' to install the programs and any data files and
     documentation.

  9. Type `make html' or `make pdf' to generate the html or pdf
     documentation.  Note, these are not built by default.

 10. You can remove the program binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package for
     a different kind of computer), type `make distclean'.  There is
     also a `make maintainer-clean' target, but that is intended mainly
     for the package's developers.  If you use it, you may have to get
     all sorts of other programs in order to regenerate files that came
     with the distribution.
grub
  • 1 个回答
  • 17 Views
Martin Hope
Pascal Vallaster
Asked: 2024-05-01 01:19:57 +0800 CST

SSD 多重启动 Grub 问题

  • 5

我在 SSD 上安装了 3 个 Linux 发行版(Ubuntu、Parrot、Kali)。它们都是彼此分开的,这意味着它们不共享/home分区或类似的东西。我也没有交换分区。

我想到了一个便携式驱动器(在我的例子中是 SSD),其中包含几个发行版,我可以随身携带,只需插入任何计算机即可从那里开始工作。用于此 SSD 的 grub 由 Ubuntu 管理。现在我遇到的问题是,到目前为止我使用的所有计算机也都插入了其他 SSD。因此,每次我切换设备时,现有的 Grub 条目都无效,因为有时我的 SSD 挂载到 /dev/sda/,有时挂载到 /dev/sdb/ 等。唯一始终有效的条目当然是 Ubuntu 条目。此外,大多数情况下,发生这种情况时,我仍然可以选择其他启动项,但随后系统会提示我进入 initramfs 救援控制台,通知我我的内存不知怎么损坏了。然后我会通过执行来解决问题blkid <uuid> -y我将能够启动进入操作系统。显然我的内存既没有损坏,也不会解决问题,因为它再次不允许我使用另一个设备启动它,而不执行 initramfs 控制台的事情。

我现在的问题是,是否可以创建类似“永久”的 grub 条目,无论 SSD 安装在何处都可以正常工作?例如,据我所知,使用 uuid 应该始终保持不变。


(我什至尝试分别为每个 Linux 发行版安装一个 grub,这样我就可以进入启动选项并简单地从每个发行版中选择 grub。但是,尽管 EFI 分区上存在这些 EFI 文件,但我的主计算机无法识别它们(Ubuntu 除外)。也许是因为第二台计算机创建了它们?我确信有比在一个地方安装 n 个 grub 更好的解决方案。)

grub
  • 1 个回答
  • 22 Views
Martin Hope
Nikita Kipriyanov
Asked: 2024-04-16 20:34:58 +0800 CST

UEFI 客户端上的 PXE 引导和客户端相关的配置文件

  • 5

每个人似乎都在使用 GRUB 通过 PXE 从网络启动 UEFI 机器。虽然它有效,但它缺乏一个能够立即指导某些已知客户的重要功能。GRUB 立即发出请求grub/grub.cfg。

PXELINUX 具有以下功能:在加载“默认”配置之前,它会尝试一些源自客户端 MAC 地址和 IP 地址的特殊名称。例如,对于具有 IP 172.31.1.38(十六进制AC1F0126)和 MAC 的客户端BC:24:11:21:4D:14,它将尝试按以下顺序从 TFTP 服务器加载配置:

pxelinux.cfg/01-bc-24-11-21-4d-14
pxelinux.cfg/AC1F0126
pxelinux.cfg/AC1F012
pxelinux.cfg/AC1F01
pxelinux.cfg/AC1F0
pxelinux.cfg/AC1F
pxelinux.cfg/AC1
pxelinux.cfg/AC
pxelinux.cfg/A
pxelinux.cfg/default

因此,使用 PXELINUX,我可以为某些已知客户端创建专用配置文件,其中可以包含对专门为该客户端制作的 preseed 或 kickstart 脚本的引用。它将执行完全无人值守的系统安装,所有这些都用于自动化(既生成虚拟机又准备裸机服务器)。当安装开始时,它只是删除这个专用的引导加载程序配置,因此下次机器将从网络启动,但现在它将命中default指示从本地硬盘启动的配置文件。事实上,我运行这样的基础设施已经有 10 多年了,非常棒。

但现在我们需要为 UEFI 客户端提供相同的功能,而 PXELINUX 似乎不适用于 UEFI。

有没有办法与 GRUB PXE 具有类似的功能,能够对 UEFI 客户端执行相同的操作,以便请求专用配置文件,或者使用通用客户端中特定于客户端的“默认”引导菜单选项配置文件?

或者,也许还有另一个 UEFI PXE 引导加载程序可以这样做?

grub
  • 1 个回答
  • 24 Views
Martin Hope
ChennyStar
Asked: 2024-02-23 13:36:51 +0800 CST

GRUB 2.12 现在支持分离标头吗?

  • 6

在FOSDEM 2022 上的 GRUB 项目状态更新中,他们讨论了在 GRUB 2.12 中添加分离标头支持(用于解密):

添加加密磁盘分离标头和密钥文件支持,Denis 'GNUtoo' Carikli、Glenn Washburn、Patrick Steinhardt

GRUB 2.12 于 2023 年 12 月发布,但我在其NEWS文件中找不到任何提及该功能的内容。

有谁知道 2.12 现在是否支持分离标头(如最初计划的那样)?

grub
  • 2 个回答
  • 36 Views
Martin Hope
C-Otto
Asked: 2024-01-19 06:08:04 +0800 CST

由于磁盘太多而导致 grub“内存不足”错误?

  • 7

我在一台配备 24 个磁盘和 256 GB RAM 的新 Dell PowerEdge R760xd2 服务器上运行 Debian Stable(Debian 12、Bookworm)。初始安装(包括重新启动到新安装的操作系统)工作正常,但现在 grub 无法启动。

error: no such device: [some UUID].
Loading Linux 6.1.0-17-amd64
error: out of memory.
Loading initial ramdisk ...
error: you need to load the kernel first.

正如您所看到的,grub 无法加载内核,这与可能的 ramdisk (initrd) 问题无关。

我还观察到:

  • “欢迎来到 GRUB!” 大约需要一分钟
  • 当我在发生这种情况时取出(虚拟)可启动 CD 时,我会看到与多个磁盘相关的错误消息
  • ls (hd22,gpt1)/给出out of memory(在恢复控制台中)
  • 启用/禁用安全启动不会改变任何这些
  • 使用虚拟 CD 驱动器中的可引导映像 (grml),从设备读取数据,同时显示“欢迎使用 GRUB!” 显示:大小为 493 MB 的图像为 297 MB。当 CD 可用时,“欢迎使用 GRUB!” 阶段需要更长的时间

我正在使用 UEFI 并添加了 500 MB UEFI 分区(使用 Debian 的安装程序)。引导设备是使用两个磁盘的硬件 RAID1。

在上次成功重新启动和失败之间,我在 24 个磁盘中的 22 个上配置了 ZFS。此外,引导 RAID1 的剩余存储现在也用作第二个 zpool (ZFS)。我认为 22 个磁盘中的每一个都有两个(GPT?)分区,但我不知道为什么,因为我将整个磁盘用于 ZFS。

我的直觉是 grub 会扫描所有磁盘,并且对磁盘/分区的绝对数量有点不知所措。

如何让系统重新启动?

grub
  • 1 个回答
  • 59 Views
Martin Hope
LaserBeam
Asked: 2023-11-20 08:07:26 +0800 CST

加密启动分区:加密启动分区的优点

  • 6

我想了解有关 Linux 启动过程以及启动分区加密如何工作的更多信息。我有几个问题。

  • 我知道UEFI系统必须有ESP分区,可以挂载在/boot/efi或/efi. ESP 分区包含引导加载程序和内核。在我的 Endeavor OS 系统上,我也有/boot,它只包含英特尔微代码。我的理解是,系统首先加载引导加载程序(在我的例子中是 systemd-boot),然后加载所选的内核。/boot那么,根据我当前的配置以及一般在 UEFI 系统中的情况,如果单独存在的话,其目的是什么/efi?

  • 然后,我想加密我的系统,并且我正在阅读 Arch Wiki 指南“加密启动分区 (GRUB)”。在这种情况下,未加密的是 GRUB 和 ESP。对于UEFI系统来说,这种方式有什么好处呢?现在加密的内容在“正常”配置中是这样的?ESP 里面还有什么?

  • 我也在尝试了解什么是 EFISTUB 以及它是如何工作的。据我了解,不使用引导加载程序,统一的内核映像放在 ESP 内。这种情况下/boot还有必要吗?

grub
  • 1 个回答
  • 65 Views
Martin Hope
Jason Hunter
Asked: 2023-09-18 17:07:51 +0800 CST

如何在没有 CSM 的情况下在 UEFI 工作站上启动 BIOS 模式平台?

  • 8

GRUB 或 SuperGRUB 是否可以在 UEFI 工作站上启动像 Debian 这样的平台,而不使用 CSM?

实际上是什么阻止了这种情况?;)

grub
  • 1 个回答
  • 479 Views
Martin Hope
Eduardo Perez
Asked: 2023-07-05 09:13:21 +0800 CST

更新 grub 时无法获取规范路径

  • 5

所以,我遇到了这个问题,我的 PC 默认情况下不启动 NVME,并且没有在 BIOS 中选择它作为启动选项的选项,但它也有 SATA SSD 和 NVME 插槽并启动 Linux我会按 F12 并从那里选择 NVME 启动选项。否则,它将直接启动至 SATA SSD 上的 Windows。考虑到它是 Alienware X51 R3 并且采用最新的 BIOS,这种行为很奇怪,但该信息仅供参考。

为了解决这个问题,我尝试将 Linux 引导加载程序(我使用 Pop OS 22.04)移动到 SATA SSD,但由于引导分区上没有足够的空间,我最终调整了它的大小,一切顺利。一旦我移动了引导加载程序,我就无法启动 Linux,然后尝试通过 Live CD 进行引导修复,但始终会收到“NVRAM 已锁定”消息。然而,我设法通过使用 Windows 安装 rEFInd 来启动 Linux,尽管现在当我尝试更新系统时却失败并出现以下 grub 错误:

Need to get 0 B/840 kB of archives.
After this operation, 14.8 MB disk space will be freed.
(Reading database ... 570790 files and directories currently installed.)
Removing linux-image-unsigned-6.3.2-060302-generic (6.3.2-060302.202305111150) .../etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.3.2-060302-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/usr/sbin/grub-probe: error: failed to get canonical path of `/boot/grub/unicode.pf2GRUB_DISABLE_OS_PROBER=false'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
dpkg: error processing package linux-image-unsigned-6.3.2-060302-generic (--remove):
 installed linux-image-unsigned-6.3.2-060302-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-unsigned-6.3.2-060302-generic
Processing was halted because there were too many errors.

这到底意味着什么?我该如何解决它?

grub
  • 1 个回答
  • 19 Views
Martin Hope
Greendrake
Asked: 2023-07-04 21:12:00 +0800 CST

grub-install 从哪里获取 grub-mkimage 的参数?

  • 7

当我运行时,grub-install /dev/vda -v我在输出中看到这一行:

grub-mkimage --directory '/usr/lib/grub/i386-pc' --prefix '(,msdos1)/boot/grub' --output '/boot/grub/i386-pc/core.img'  --dtb '' --format 'i386-pc' --compression 'auto'  'ext2' 'part_msdos' 'biosdisk' 

如何配置 GRUB 以在参数列表中添加特定模块grub-mkimage?

背景故事:我正在尝试将 PureOS 的 BIOS/MBR 安装从 ext4 迁移到 btrfs,因此我需要在运行之前将 btrfs 模块添加到 GRUB 映像中grub-install。这里的说明很好,但它是针对 UEFI/GPT 的。

grub
  • 1 个回答
  • 31 Views
Martin Hope
Ainyaku
Asked: 2023-06-06 05:28:34 +0800 CST

计算机在 grub“选择操作系统”屏幕上死机

  • 5

我有一台运行 KDE Neon 的计算机。我最近尝试使用修复 grub,boot-repair因为我在启动时一直显示grub-rescue屏幕。现在,当我尝试启动时,我看到了 grubSelect Operating System屏幕,但是在选择列表中的任何选项、单击E或C编辑选择或打开 grub 命令行后,整个计算机只是冻结,迫使我按住电源按钮将其关闭。

今天,出于完全无关的原因,我在我的(不同的)Windows 计算机上的 VirtualBox 中安装了 KDE Neon 的全新安装。安装操作系统后我可以使用它,但是在我使用它几分钟后重新启动 VM 后,我看到 grub 屏幕的地方发生了同样的问题,并且在选择任何选项后 VM 冻结Select Operating System。我还收到了来自 VirtualBox 的消息说A critical error has occurred.

在此之前,我已经重新启动了 VM 几次,并且运行良好。我不确定这个问题是否与另一台计算机的问题有任何关系,但我想我至少会提到它。此外,与 VM 相比,我更担心修复另一台计算机。如果有人知道如何让我的计算机再次启动,我将不胜感激。谢谢。

grub
  • 1 个回答
  • 23 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve