Skip to content

Reparation af Linux bootfejl i GRUB 2 rescue mode

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

 

 

GRUB 2 er en bootloader, der bruges af de fleste Linux-distributioner. Hvis GRUB 2 fejler, kan din VPS-server ikke starte korrekt. Denne vejledning viser, hvordan du reparerer bootfejl i GRUB 2 rescue mode.

Hvad er GRUB 2 rescue mode?

Hvis GRUB 2 ikke kan finde de nødvendige filer til at starte dit system, starter den i rescue mode. Du vil se en “grub rescue>” prompt, hvor du kan indtaste kommandoer for at reparere boot-processen.

Almindelige årsager til GRUB 2 fejl

  • Forkert installation eller opdatering af GRUB 2.
  • Ændringer i partitionstabellen.
  • Fejl på harddisken.
  • Installation af et andet operativsystem.

Reparation af bootfejl

Følg disse trin for at reparere bootfejl i GRUB 2 rescue mode:

  1. **Identificer Linux-partitionen:**

    Brug ls kommandoen til at liste de tilgængelige partitioner. For eksempel:

    grub rescue> ls
    (hd0) (hd0,msdos1) (hd0,msdos2) (hd1) (hd1,msdos1)

    Brug ls kommandoen med hvert partitionsnavn for at finde den partition, der indeholder din Linux-installation. For eksempel:

    grub rescue> ls (hd0,msdos1)/
    /boot /etc /home /lib ...
  2. **Indstil root-partitionen:**

    Når du har fundet Linux-partitionen, skal du indstille den som root-partitionen. For eksempel, hvis Linux er installeret på (hd0,msdos1):

    Visual overview of Reparation af Linux bootfejl i GRUB 2 rescue mode
    Visual overview: Reparation af Linux bootfejl i GRUB 2 rescue mode
    grub rescue> set root=(hd0,msdos1)
  3. **Indlæs GRUB-modulerne:**

    Indlæs de nødvendige GRUB-moduler:

    grub rescue> insmod normal
    grub rescue> normal
  4. **Start Linux:**

    Kør boot kommandoen for at starte Linux:

    grub rescue> boot
  5. **Opdater GRUB:**

    Når du har startet Linux, skal du opdatere GRUB for at forhindre fremtidige fejl. Åbn en terminal og kør følgende kommandoer:

    sudo update-grub
    sudo grub-install /dev/sdX

    Erstat /dev/sdX med navnet på din harddisk (f.eks. /dev/sda).

Yderligere noter

  • Hvis du har problemer med at identificere Linux-partitionen, kan du bruge en Live CD eller USB til at starte dit system og undersøge partitionstabellen.
  • Hvis du har installeret flere operativsystemer, skal du sørge for at vælge den korrekte Linux-partition.
  • Hvis ovenstående trin ikke løser problemet, kan du bruge et værktøj som Boot-Repair til at reparere GRUB 2.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

Key topics covered in Reparation af Linux bootfejl i GRUB 2 rescue mode
Key topics covered in this NetCloud24 guide.

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Practical checklist for Reparation af Linux bootfejl i GRUB 2 rescue mode
Practical checklist for applying the guidance in this article.

Windows VPS

Reparation af Linux bootfejl i GRUB 2 rescue mode
Reparation af Linux bootfejl i GRUB 2 rescue mode
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.