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
    • 最新
    • 标签
主页 / server / 问题

问题[grub](server)

Martin Hope
Bruce Merry
Asked: 2022-11-05 03:22:34 +0800 CST

GRUB 在 net_dhcp 之后无法启动内核

  • 7

我最初在尝试使用 MAAS 重新部署机器时遇到了这个问题,但我可以使用已经安装的操作系统和 GRUB,以及 Ubuntu 20.04 重现它。机器设置为 UEFI 启动。

重现(但见下文):

  1. 引导机器并获取 GRUB 菜单。
  2. 按 'c' 获取命令行,运行net_dhcp efinet1(或只是net_dhcp;efinet1 是该机器的主要网络接口)。
  3. 按 escape 返回书本菜单,选择 Ubuntu 并按 enter。
  4. 出现空白屏幕,没有任何反应。

通过添加set debug=linux我得到的消息loader/efi/linux.c:96: kernel_addr: 0x3c7d1000 handover_offset: 0x190 params: 0x3ffff000表明它已经达到了打算启动内核的程度,但是内核没有引导输出。

这就是它变得奇怪的地方:我们有 8 台几乎相同的机器,这是唯一表现出这种行为的机器。我知道这个唯一的区别是它有一个 ConnectX-5 EN NIC 而不是 ConnectX-6 Dx(但这不是主要接口,即不参与 DHCP)和一个不同的 GPU(它们是不过都是 RTX 30xx)。BIOS是同一个版本(最新的),BIOS设置都一样,BMC设置都一样。我已经看过 DHCP 提供的内容,除了 IP 地址之外,它们似乎是相同的。由于当 MAAS 执行 PXE 启动时也会发生这种情况,我认为这不太可能是由于硬盘驱动器上的任何问题。

任何想法,要么缩小原因,要么确定是什么让这台机器与众不同?

编辑:我还使用 重现了该行为net_dhcp efinet2,并且该接口甚至没有插入电缆。所以我认为这排除了 DHCP 提供的罪魁祸首,这让我比以往任何时候都更加困惑。

grub
  • 1 个回答
  • 24 Views
Martin Hope
Rolo787
Asked: 2022-04-12 09:04:14 +0800 CST

减少 Amazon Linux 1 上的 Amazon EBS 根卷大小

  • 1

我一直在尝试使用本文档中的过程来减小我的 Amazon Linux 1 AMI 根卷的大小(在失败后进行了一些修改),并且在该步骤中不断遇到错误:

$ sudo grub-install --root-directory=/mnt/new-volume/ --force /dev/xvdf

这是旧版 GRUB(版本0.97-94.32.amzn1)

起初我收到以下错误:

Unrecognized option `--force'

结果删除了--force标志并使用了:

$ sudo grub-install --root-directory=/mnt/new-volume/ /dev/xvdf

此后导致:

/dev/xvdf does not have any corresponding BIOS drive

我尝试按照该线程中提到的说明使用 parted 或 fdisk 创建 BIOS 引导分区,但每种方法都导致了同样的失败。请注意,我使用的特定实例类型 (r5.large) 将驱动器重命名为相应的“nvme*”名称,如 lsblk 输出中所述:

nvme0n1       259:3    0  200G  0 disk
├─nvme0n1p1   259:4    0  200G  0 part /
└─nvme0n1p128 259:5    0    1M  0 part
nvme1n1       259:0    0   40G  0 disk
├─nvme1n1p2   259:2    0   40G  0 part /mnt/new-volume
└─nvme1n1p1   259:1    0    1M  0 part

在这篇Linux Questions 帖子中找到了一篇与错误消息相关的文章,但这并没有证明可以解决我的问题。我尝试通过 chroot-ing 进入分区并遇到同样的问题,并尝试使用中间 Amazon Linux 1 或 Amazon Linux 2 主机,但继续遇到问题。

我确实注意到在 Amazon Linux 1 中单独使用根卷时也会出现同样的问题:

grub-install /dev/sda OR grub-install /dev/sda1

但无论如何,除非它被列为辅助驱动器,否则新磁盘无法启动。grub单独使用Legacy GRUB 手册中的命令进行安装也失败了。我是否正在寻找错误的程序来创建一个新的较小的根卷,或者我在上述步骤中遗漏了什么?可以根据需要提供进一步的细节。

linux grub amazon-web-services amazon-linux amazon-ami
  • 3 个回答
  • 146 Views
Martin Hope
sherpaurgen
Asked: 2021-11-29 20:28:28 +0800 CST

由于磁盘/控制器速度慢而导致冻结启动

  • 2

我在戴尔 r740xd 上运行 ubuntu 20.04,其中一个磁盘控制器似乎在服务器启动时显示磁盘(用于 openzfs 池的多路径磁盘)速度很慢。如果服务器从“恢复模式”->“恢复正常启动”启动,则检测到慢速控制器磁盘并正常导入。直到现在我已经尝试通过编辑文件 /etc/default/grub 在 grub cmdline 选项中添加 rootdelay=300 选项

GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=300"
update-grub
update-initramfs -u

但是我没有观察到任何延迟并且启动卡住了

如果控制器插槽从 BIOS 中禁用,服务器将正常启动而不使用恢复模式(但它不是一个选项)。

在此处输入图像描述

linux zfs grub zfsonlinux
  • 2 个回答
  • 73 Views
Martin Hope
Maximiliano Segovia
Asked: 2021-09-12 09:43:29 +0800 CST

Ubuntu 无法在 HPE Proliant ML30 Gen9 上启动的问题

  • 0

我们用于数据库备份程序的其中一台服务器出现问题,我没有办法了。在某些时候,它完全冻结了,因此它被强制重启。之后,机器无法再启动到操作系统。

这台机器在 HPE Proliant ML30 Gen9 上运行 Ubuntu 18.04.3 LTS,经过仔细检查,我意识到 ubuntu 启动选项不见了。

HPE Proliant 配置了智能阵列、禁用安全启动和 UEFI。

经过一番研究,我尝试修改 UEFI Shell 但无济于事,因为操作系统未列为文件系统,但显示了存储设备。

UEFI SHELL 映射命令

然后我尝试运行 HPE Embedded Smart Storage Administrator,在加载 HPE SSA 时我看到了 GRUB 2 界面的片刻。HPE SSA 完成加载后,我按下c并能够进入 GRUB 的 cli。

HPE 环境中的 GRUB cli

在这里,我能够导航硬盘,最终发现所有数据都正常,没有数据丢失,但不知何故,引导加载程序丢失到 UEFI 环境中。

Ubuntu的硬盘

该/boot/efi目录是空的,但该/boot/grub目录有一些文件和文件夹。

然后我尝试启动 Ubuntu,但结果如下:

Ubuntu 启动

在这一点上,我的想法已经用完了,我无法继续寻找答案,因为问题变得太具体了。

I even went back to the UEFI Shell trying to enter the BLK3 device (because it looks like it is that partition) but I couldn't navigate to the /boot folder so I could use the bfcg command.

I don't know what else I can do to restore Ubuntu's bootloader. Any advice or help will be appreciated.

PS: The server used to have a graphical interface. The team uses TeamViewer to monitor the server and check on the backup procedures.

PS2: insmod all_video didn't work. grub prompted a " file not found" error, even after setting the root variable.

PS3: I tried plugging some USB flash drives. I tried Ubuntu 18.04.3 partitioned as GPT, Ubuntu 20.04.3 partitioned as GPT, and Ubuntu 20.04.3 partitioned as MBR. None were picked up by HPE Proliant (Legacy AND UEFI), nor do they appear in UEFI Shell, nor do I know how to mount them from the GRUB interface.

PS4: As a last resort, I could install RHEL using the HPE Embedded Intelligent Provisioning tool.

PS5: This is my first time using HPE Proliant systems.

Edit: (hd2), (hd3), (hd4) and their related partitions were created when I used HPE tools. On reboot, those partitions and their associated file systems would be gone from the UEFI Shell and the Boot options.

ubuntu grub uefi hpe
  • 1 个回答
  • 549 Views
Martin Hope
xandercagexxx
Asked: 2021-08-20 02:37:30 +0800 CST

升级到 debian 11(从 debian 10)不在 /boot/ 中添加内核(Dedibox 服务器)

  • 1

我已经在我的服务器上进行了升级并重新启动服务器以使用最后一个内核,但重新启动后,服务器只使用旧内核(4.19.0-16-amd64)。

在/boot/,我刚刚看到了内核文件4.19.0-16-amd64。如果我这样做apt install linux-image-amd64,结果是linux-image-amd64 is already the newest version (5.10.46-4),但是这个内核版本在 中不可用/boot/,所以update-grub什么也不做。

我的服务器有什么问题?

如果我这样做ls -lon /,我可以看到这两行:

lrwxrwxrwx   1 root root    27 Aug 18 16:22 vmlinuz -> boot/vmlinuz-5.10.0-8-amd64
lrwxrwxrwx   1 root root    28 Aug 17 13:38 vmlinuz.old -> boot/vmlinuz-4.19.0-17-amd64

但这两个内核不存在于/boot/文件夹中。

仅供参考:我的服务器也使用 Raid5 进行/boot/分区。

debian grub kernel upgrade
  • 1 个回答
  • 715 Views
Martin Hope
the_nuts
Asked: 2021-06-02 12:26:19 +0800 CST

ubuntu 18.04“grub-install:错误:找不到 EFI 目录”

  • 1

我在多个 ubuntu 18.04 服务器上有这个问题。

在常规期间,apt update && apt upgrade我收到此错误:

Setting up grub-efi-amd64-signed (1.167~18.04.1+2.04-1ubuntu44) ...
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1

我在服务器上,我不使用 grub,也从未听说过 EFI,据我所知,我没有更改它的任何设置。

我在 /boot 上安装了 /dev/md1,我看到我有一个目录 /boot/efi,但它是空的。

我该如何解决这个问题?


fdisk -l:

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F4BBD515-6E5E-4152-AD41-6D80A4A69583

Device          Start        End    Sectors    Size Type
/dev/sda1          40       2048       2009 1004.5K BIOS boot
/dev/sda2        4096 3905976319 3905972224    1.8T Linux RAID
/dev/sda3  3905976320 3907022847    1046528    511M Linux swap


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2C2D425C-9EAF-472D-8820-068D587A47D0

Device          Start        End    Sectors    Size Type
/dev/sdb1          40       2048       2009 1004.5K BIOS boot
/dev/sdb2        4096 3905976319 3905972224    1.8T Linux RAID
/dev/sdb3  3905976320 3907022847    1046528    511M Linux swap


Disk /dev/md2: 1.8 TiB, 1999857713152 bytes, 3905972096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

fdisk -l,第二台服务器:

Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x762b7381

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         4096   1050623   1046528   511M fd Linux raid autodetect
/dev/sda2         1050624 467808255 466757632 222.6G fd Linux raid autodetect
/dev/sda3       467808256 468854783   1046528   511M 82 Linux swap / Solaris


Disk /dev/md2: 445.1 GiB, 477958766592 bytes, 933513216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes


Disk /dev/md1: 511 MiB, 535756800 bytes, 1046400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x41167758

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *         4096   1050623   1046528   511M fd Linux raid autodetect
/dev/sdb2         1050624 467808255 466757632 222.6G fd Linux raid autodetect
/dev/sdb3       467808256 468854783   1046528   511M 82 Linux swap / Solaris
grub ubuntu-18.04
  • 1 个回答
  • 2963 Views
Martin Hope
Mlok
Asked: 2021-03-27 03:35:22 +0800 CST

传统引导模式下的 HPE ProLiant gen 10 在引导顺序部分看不到硬盘

  • 0

我有带 8 个驱动器的 HPE ProLiant gen 10 服务器。如果我使用传统引导模式,但传统引导顺序设置中没有任何内容。服务器尝试仅从以太网启动。

我已经在硬盘驱动器上安装了 grub,需要从它们启动。

请知道该怎么做?某种其他的BIOS设置?我不是硬件/BIOS设置方面的专家。

boot grub legacy
  • 1 个回答
  • 1404 Views
Martin Hope
Phantom
Asked: 2021-01-02 09:18:36 +0800 CST

“内核消息”和“来自初始化系统和系统记录器的消息”有什么区别

  • 1

在这篇博客中,它给出了一个推荐的串行内核参数,PCs with video card。

console=tty0 console=ttyS0,9600n8

它说Kernel messages will appear on both the first virtual terminal and the serial port. Messages from the init system and the system logger will appear only on the first serial port.

正如之前所说When multiple consoles are listed output is sent to all consoles and input is taken from the last listed console,这不是矛盾吗?“内核消息”和“来自初始化系统和系统记录器的消息”有什么区别?

我想知道:

  1. 为什么是这样 ?更新:为什么在多个终端之间不能得到相同的输出?
  2. 去哪儿Messages from the init system and the system logger?
  3. ttyx等虚拟控制台重定向到什么样的设备,为什么我只能在qemu的图形界面中看到,比如Debian GNU/Linux 10 mindebian tty1?

更新:在正常情况下,我们将收到来自内核和 rootfs 的消息,来自内核的消息以时间戳内核消息开头,来自 init/rootfs 的消息以 OK rootfs 消息开头。当我在博客中使用这个引导参数时,正如它所描述的那样:我只会从 qemu 图形窗口获取内核消息。

linux boot grub linux-kernel qemu
  • 1 个回答
  • 221 Views
Martin Hope
posop
Asked: 2020-05-30 16:29:35 +0800 CST

zfs root 上的 arch linux 无法在 bios 上配置 grub

  • 3

正如标题所示,我无法跨越在 zfs 上安装 arch 的终点线。在从 live cd chroot 到我的 /mnt 之后,我尝试在我的 /boot 上安装 grub。无论如何,这是我的命令和错误:

# nvim /etc/grub.d/40_custom
set timeout=5
set default=0

menuentry "Arch Linux" {
   search -u UUID
   linux /vmlinuz-linux zfs=rpool/ROOT/default rw
   initrd /initramfs-linux.img
}

然后我尝试通过以下方式制作我的 grub:

# ZPOOL_VDEV_NAME_PATH=1 grub-mkconfig -o /boot/grub/grub.cfg

我得到这个错误:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
/usr/bin/grub-probe: error: unknown filesystem.
Found fallback initrd images(s) in /boot: initramfs-linux-fallback.img
done

如您所见,我收到了一个未知的文件系统错误,但是当我运行时:

# grub-probe /

我明白了

zfs

所以我在运行 grub-probe 时看到了 zfs,但在运行 grub-mkconfig 时得到了未知的文件系统。

不知道你需要什么信息来帮助我追踪这个......现在已经用谷歌搜索和黑客攻击了 2 天,我真的很感激能在这方面提供一些帮助。

bios zfs arch-linux grub
  • 1 个回答
  • 229 Views
Martin Hope
Oleg
Asked: 2020-05-29 09:29:06 +0800 CST

如何在软件 RAID 磁盘上安装 grub?

  • 3

我正在运行带有mdadmRAID 1 的 Debian 9。以前两个硬盘都可以启动到操作系统,现在只有一个可以。

我最近有一个需要更换的故障磁盘,所以我更换了它。

首先,我跑了

mdadm --add /dev/md0 /dev/sda

效果很好。在那之后我跑了

grub-install /dev/sda

这给了我以下输出:

Installing for i386-pc platform.
grub-install: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..
grub-install: error: unable to identify a filesystem in hd0; safety check can't be performed.

这是我的输出lsblk:

sda           8:0    0 447.1G  0 disk
└─md0         9:0    0 232.8G  0 raid1
  ├─md0p1   259:0    0  14.9G  0 md    [SWAP]
  ├─md0p2   259:1    0     1K  0 md
  ├─md0p3   259:2    0   216G  0 md    /
  └─md0p5   259:3    0   1.9G  0 md    /boot
sdb           8:16   0   5.5T  0 disk
├─sdb1        8:17   0   5.5T  0 part
└─sdb9        8:25   0     8M  0 part
sdc           8:32   0   5.5T  0 disk
├─sdc1        8:33   0   5.5T  0 part
└─sdc9        8:41   0     8M  0 part
sdd           8:48   0 232.9G  0 disk
└─sdd1        8:49   0 232.9G  0 part
  └─md0       9:0    0 232.8G  0 raid1
    ├─md0p1 259:0    0  14.9G  0 md    [SWAP]
    ├─md0p2 259:1    0     1K  0 md
    ├─md0p3 259:2    0   216G  0 md    /
    └─md0p5 259:3    0   1.9G  0 md    /boot

这是来自的输出mdadm --detail /dev/md0:

/dev/md0:
        Version : 1.2
  Creation Time : Wed Dec 12 15:26:35 2018
     Raid Level : raid1
     Array Size : 244066304 (232.76 GiB 249.92 GB)
  Used Dev Size : 244066304 (232.76 GiB 249.92 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu May 28 18:59:51 2020
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : localserver:0  (local to host localserver)
           UUID : 83d5a386:66110e10:e5f3c600:734423a8
         Events : 5339803

    Number   Major   Minor   RaidDevice State
       2       8        0        0      active sync   /dev/sda
       1       8       49        1      active sync   /dev/sdd1

我试过用 just 引导/dev/sda,但无济于事。我也尝试过 running blockdev --flushbufs /dev/sda,正如一些人推荐的那样,但无济于事。

运行GParted时,我可以看到有boot和raid/dev/sdd1标志,而没有标志。我还看到' 的第一个扇区从 0 开始,而' 的第一个扇区从 2048 开始。/dev/sda/dev/sda/dev/sdd1

谁能建议我可以解决这个问题的方法?

我不介意分离“奇怪”的硬盘驱动器,格式化它,然后重新连接它。

debian grub md
  • 1 个回答
  • 4931 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve