grub defekt nach Festplattenausfall/Grub doesnt work after HDDcrash

tsaenger

Renowned Member
Mar 10, 2010
136
2
83
Hallo zusammen,

ich hatte einen Festplattenausfall, den ich wieder reparieren konnte. Die MDs sind nun wieder alle da.
Leider bekomme ich mein System aber nicht zum booten, denn Grub gibt mir nur die SHELL aus.
Ich muss dazu sagen, das ich den Grub erst versucht habe auf sda zu übertragen. Da das aber nicht klappte habe ich ihn neu installiert:

Code:
mount /dev/md2 /mnt/ 
mount /dev/md1 /mnt/boot 
mount -o bind /dev /mnt/dev 
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc

chroot /mnt/

grub-install /dev/sda
update-grub 
[CODE]

die Grub.cfg sieht wie folgt aus:
[CODE]
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
insmod raid
set root=(md2)
search --fs-uuid --set fe63770c-b7e6-4a27-a738-f5dd070b26bd
if font /usr/share/grub/ascii.pff ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  terminal gfxterm
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
Ich meine da fehlt doch einiges. Aber was genau muss ich hier reinschreiben, das mein Grub wieder bootet?

Vielen Dank für eure Hilfe

Tobias
 
Last edited:
Re: grub defekt nach Festplattenausfall

wie finde ich denn raus, welches vmlinuz und initrd drauf war?
Ich müsste das doch noch aus den sourcen (die sind ja nicht gelöscht) wieder kompilieren können oder?
Mein /boot-Verz beinhaltet nur noch den GRUB-Ordner. Sonst ist da gähnende leere.

Vielen Dank.
 
Re: grub defekt nach Festplattenausfall

hallo nochmal.

im var/cache/apt/archives habe ich den "pve-kernel-2.6.32-4-pve_2.6.32-33_amd64.deb" Ich denke, das war der letzte den ich drauf hatte.
Wie bekomme ich den denn wieder installiert, ohne mir alles zu zerschießen?

Vielen Dank.
 
Re: grub defekt nach Festplattenausfall

This is an English forum only, so writing in English will increase the change to get help.
 
Re: grub defekt nach Festplattenausfall

Hello Tom,
i will try it in english.
I have had an HDD Crash and i must rebuild my array. That worked now and i can access my / -Filesystem with Hetzner Recovery-console.
Actually my problem is, that i can not boot with GRUB. I only get a shell at startup. I deleted the files located in /boot by a mistake. Now i reinstalled GRUB but vmlinuz and all the other files are missing.
Code:
mount /dev/md2 /mnt/ 
mount /dev/md1 /mnt/boot 
mount -o bind /dev /mnt/dev 
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc

chroot /mnt/

grub-install /dev/sda
update-grub
how can i rebuild the missing files to boot my system normal?

Thanks a lot

Tobias
 
Last edited:
Re: grub defekt nach Festplattenausfall

After chrooting make sure you have a [highlight]/etc/grub.d/10_linux[/highlight] file around. This is what's responsible for detecting the current OS and is part of the grub-common package.
Then make sure you actually have the necessary files in [highlight]/boot[/highlight] and that they're healthy (no suspiscious size, like zero):


  • /boot/config-$VERSION-pve
  • /boot/vmlinuz-$VERSION-pve
  • /boot/System.map-$VERSION-pve


If any of them look suspiscious reinstall your pve-kernel-$VERSION-pve package.

If these conditions are met then grub-update should work.
If not, there may be some more damage. Try to make a manual entry with the first 2 files listed above.
 
Re: grub defekt nach Festplattenausfall

hello,

thanks for your Answer. I reinstalled the kernel and now it works fine.

Thanls a lot.

Tobias
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!