Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Legacy GRUB 0.97 system passes precheck; leapp system_facts crashes on missing /boot/grub2/grub.cfg

オープン
#143 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
linux, python

調査の方向性

The failing crash is in the leapp system_facts actor (systemfacts.py, get_bios_grubcfg_details, around line 352), but the fix belongs in the precheck of cloudlinux7to8. Start by reading how --precheck runs its checks, then check for the GRUB2 install, /boot/grub2/grub.cfg, and grub*/grubby* in yum exclude. Done means a legacy-GRUB BIOS host fails precheck with a message that points to the manual migration steps.

索引モデルが issue の本文から書いたものです。

説明

Environment

  • cloudlinux7to8 v1.2.1
  • CloudLinux 7.9 (TuxCare ELS), Plesk Obsidian 18.0.81.3
  • KVM guest, BIOS boot, single disk /dev/vda, one ext4 partition (/boot on /)

Describe the bug
The server (long history of in-place upgrades) was still booting with legacy GRUB:

  • package grub-0.97-94.el6 installed, no grub2* packages installed
  • MBR: GRand Unified Bootloader, stage1 version 0x3 ... GRUB version 0.94
  • config in /boot/grub/grub.conf; /boot/grub2/ existed but had no grub.cfg
  • /etc/yum.conf contained exclude=grub2* grubby*, which is why grub2 had never been installed

./cloudlinux7to8 --precheck passed. The conversion then failed in leapp preupgrade:

Actor system_facts unexpectedly terminated with exit code: 1
  File ".../systemfacts/libraries/systemfacts.py", line 352, in get_bios_grubcfg_details
    with open('/boot/grub2/grub.cfg') as fo:
IOError: [Errno 2] No such file or directory: '/boot/grub2/grub.cfg'

By that point Plesk services had already been stopped and several packages removed.

Expected behavior
On BIOS systems the precheck should verify that GRUB2 is actually installed and that /boot/grub2/grub.cfg exists (and ideally that the MBR contains GRUB2), and point to the required manual migration. Detecting grub2* / grubby* in yum exclude would also help, since leapp needs to replace both.

Workaround
Remove the exclude, yum install grub2 grub2-pc grub2-tools, fix /boot/grub2/device.map and GRUB_CMDLINE_LINUX in /etc/default/grub, grub2-mkconfig -o /boot/grub2/grub.cfg, grub2-install /dev/vda, test reboot, then rpm -e grub and remove /etc/grub.conf. After that the conversion proceeded.

Possibly related: #56

主要言語
Python
スター
7
フォーク
5
平均マージ
11分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plesk/cloudlinux7to8 のほかの issue

plesk/cloudlinux7to8 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。