Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#143 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
7
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di plesk/cloudlinux7to8

Tutte le issue di plesk/cloudlinux7to8

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.