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
    • 最新
    • 标签
主页 / user-611428

SuperDialga's questions

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
SuperDialga
Asked: 2024-06-05 23:02:57 +0800 CST

crypttab 的“密钥槽”选项是否意味着 LUKS 将“仅”或“首先”尝试该密钥槽?

  • 8

我正在遵循Debian 开发者的全盘加密指南。我目前正在进行第 4 节第 3 步 - 编辑/etc/crypttab。

在指南中,在第 3 节中,他们为其他内容设置了键槽 0,现在在第 4 节中设置了键槽 1。

但是,在我的设置过程中,第 3 部分默认为键槽 1,因此对于第 4 部分,我需要使用键槽 0,方法是将其添加到我的/etc/crypttab:

root_crypt UUID=... /etc/keys/root.key luks,discard,key-slot=0(指南在key-slot=1这里代替)

我认为。我担心我可能错了,key-slot=0在应该 put 的时候put key-slot=1,所以 LUKS 解密时查找错误的槽位,由于密码错误而无法解密,并且无法继续。由于所有内容都已加密,因此我无法使用实时操作系统来修复它。

所以我的问题是:该key-slot=选项是否使 LUKS只尝试该键槽,或者先尝试该键槽,如果失败则尝试其他键槽?假设我错了,key-slot=0在我应该 put 的时候put key-slot=1,LUKS 会尝试插槽 0,失败,然后尝试插槽 1,并成功吗?

我已通读/etc/crypttab 的联机帮助页,除了对 的引用之外什么也没找到cryptsetup -S,但找不到描述此选项的联机帮助页。我只能在 cryptsetup 上找到一页,其中不包含 -S 选项。

非常感谢!

boot
  • 2 个回答
  • 57 Views
Martin Hope
SuperDialga
Asked: 2024-06-04 01:24:04 +0800 CST

如何使 GRUB 阶段解锁的密钥槽成为第一个活动槽?

  • 5

我正在遵循Debian 开发人员的全盘加密指南来保护 Ubuntu 机器,但我对第 3 部分感到困惑。它指出:

注意:cryptomount 缺少指定要打开的密钥槽索引的选项。所有活动密钥槽将按顺序尝试,直到找到匹配项。运行 PBKDF 算法是一个缓慢的操作,因此为了加快速度,您需要将 GRUB 阶段要解锁的密钥槽设置为第一个活动槽。运行以下命令来发现其索引。

root@debian:~# cryptsetup luksOpen --test-passphrase --verbose /dev/sda5
Enter passphrase for /dev/sda5:
Key slot 0 unlocked.
Command successful.

这就是本节的结尾。似乎我们还没有完成?好的,我们已经找到了索引(在我的情况下是 1,而不是 0),现在做什么?我们如何“设置”要在 GRUB 阶段解锁的密钥槽为第一个活动槽,正如指南中所说?似乎指南早早就结束了。

谢谢你!

security
  • 2 个回答
  • 27 Views
Martin Hope
SuperDialga
Asked: 2024-05-25 03:56:58 +0800 CST

GRUB 密码似乎没什么用,那为什么还要麻烦呢?

  • 5

我的系统除了 /boot 之外都有全盘加密。我按照这篇文章设置了 GRUB 密码,但随后可以通过启动 Kali Live 并运行来禁用它:

mkdir /mnt/dev/sda2
sudo mount /dev/sda2 /mnt/dev/sda2
sudo vim /mnt/dev/sda2/grub/grub.cfg

3 个命令。十分简单。

如果用户可以物理访问计算机,则只会看到 GRUB 菜单或被要求输入 GRUB 密码(对吗?)。如果他们有物理访问权限,他们可以禁用 GRUB。如果用户无权访问 GRUB(即他们通过 ssh 连接或者这是一个虚拟机(因为 ssh 仅在 GRUB 完成后才启动,对吧?)),那么他们永远不会被它阻止。

因此,似乎在唯一使用 GRUB 密码的情况下,它也很容易被绕过。如果 GRUB 密码阻止了某人,他们可以禁用它。

那么,有什么意义呢? GRUB密码真如我想的那样没用吗?他们是否以其他方式提高安全性?如果我们将 /boot 加密加入其中会怎样?这会改善情况吗?

谢谢你!

grub2
  • 1 个回答
  • 34 Views
Martin Hope
SuperDialga
Asked: 2024-05-24 03:39:55 +0800 CST

避免每次启动时受到 Grub2 密码保护的更好方法? --unrestricted 被覆盖

  • 4

我读过这篇文章,内容是当您尝试编辑 GRUB 设置时仅需要 GRUB 密码,但仍然允许在没有密码的情况下启动操作系统。我找到的唯一解决方案是编辑/etc/grub.d/10_linux.问题是,正如本 wiki第 6.1 节中所述,/etc/grub.d/10_linuxgrub 更新时将被覆盖,这将破坏这一点。但是,他们不提供替代方案。那么......我们该怎么办呢?有什么更好的方法可以避免 grub 更新时出现这种情况?

grub2
  • 1 个回答
  • 26 Views
Martin Hope
SuperDialga
Asked: 2024-05-24 01:17:42 +0800 CST

LUKS - 如何加密根分区,但/boot和/boot/efi分区不加密?

  • 6
这是一个更多出于教育和好奇心的问题,而不是试图解决一个问题。我有一台使用LUKS的Ubuntu系统。`lsblk`显示如下: ![磁盘分区图](https://isstatic.askoverflow.dev/KnVNJvpG.png) 值得注意的是,`/`(根目录)是加密的,但`/boot`和`/boot/efi`不是。这很重要,因为LUKS需要`/boot`未加密才能启动GRUB。 但是... `/` 包含了 `/boot`。所以,如果 `/` 是加密的,那似乎会强制 `/boot` 也是加密的。毕竟,你怎么知道磁盘上 `/boot` 从哪里开始,因为 `/` 指向 `/boot` 的指针是加密的吗?(我假设) 谢谢!
filesystems
  • 1 个回答
  • 41 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