J'ai flingué Grub2

Salut,

Je suis dessus depuis 4 heures…
J’ai été absent pendant 8 jours, et 250 Mo de MAJ m’attendaient.
J’ai lancé ça comme d’hab, sans m’en inquiéter plus que ça. Le problème c’est que je faisais autre chose en même temps, et absorbé, j’ai fait la MAJ de grub comme un cochon.
Résultat… ça marche plus.

J’ai essayé avec des LiveCD mais bien sur impossible, je suis en RAID1 + LVM.
J’ai essayé avec un CD d’installation Debian en mode Rescue, je retombe toujours sur grub rescue >
Dans grub rescue > j’ai essayé 50 possibilité (set root et set prefix) mais je m’y perd…

Une idée de la façon dont je peux me dépatouiller avec ça ?

Donc RAID1 + LVM
Boot séparé mais en Raid, racine et home dans le LVM

[code]# fdisk -l

Disk /dev/sda: 750.2 GB, 750155292160 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x744bc8e4

Device Boot Start End Blocks Id System
/dev/sda1 * 1 91 730926 fd Linux raid autodetect
/dev/sda2 92 3130 24410767+ fd Linux raid autodetect
/dev/sda3 3131 91201 707430307+ 5 Extended
/dev/sda5 3131 91201 707430276 fd Linux raid autodetect

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000be274

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 91 730926 fd Linux raid autodetect
/dev/sdc2 92 3130 24410767+ fd Linux raid autodetect
/dev/sdc3 3131 91201 707430307+ 5 Extended
/dev/sdc5 3131 91201 707430276 fd Linux raid autodetect

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004f5fd

Device Boot Start End Blocks Id System
/dev/sdd1 1 243201 1953512001 83 Linux

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aa86e

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6374 51199123+ 83 Linux

Disk /dev/md0: 748 MB, 748355584 bytes
2 heads, 4 sectors/track, 182704 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/md1: 25.0 GB, 24996544512 bytes
2 heads, 4 sectors/track, 6102672 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md2: 724.4 GB, 724408532992 bytes
2 heads, 4 sectors/track, 176857552 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/dm-0: 7998 MB, 7998537728 bytes
255 heads, 63 sectors/track, 972 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn’t contain a valid partition table

Disk /dev/dm-1: 50.0 GB, 49996103680 bytes
255 heads, 63 sectors/track, 6078 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn’t contain a valid partition table

Disk /dev/dm-2: 350.0 GB, 349997891584 bytes
255 heads, 63 sectors/track, 42551 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn’t contain a valid partition table
[/code]

# cat /media/dm-1/boot/grub/grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod raid
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(lvm-root)'
search --no-floppy --fs-uuid --set e58aee60-18f8-4beb-ade8-0ac4190ad902
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
if terminal_output gfxterm ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal gfxterm
fi
insmod raid
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(lvm-root)'
search --no-floppy --fs-uuid --set e58aee60-18f8-4beb-ade8-0ac4190ad902
set locale_dir=($root)/boot/grub/locale
set lang=C.UTF-8
insmod gettext
set timeout=5
play 480 440 1
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod raid
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(lvm-root)'
search --no-floppy --fs-uuid --set e58aee60-18f8-4beb-ade8-0ac4190ad902
insmod png
if background_image /usr/share/images/desktop-base/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

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

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

J’ai installé une SID vite fait (20 minutes avec apt-cacher-ng :smiley: ) sur sdb pour accéder à mes fichiers…
Maintenant que la SID est installée je peux facilement faire un chroot.

# mount /dev/sdb1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) /dev/mapper/lvm-root on /dev/mapper/lvm-root type ext3 (rw) /dev/mapper/lvm-home on /dev/mapper/lvm-home type ext3 (rw) /dev/md0 on /media/md0 type ext3 (rw) /dev/md1 on /media/md1 type ext4 (rw) /dev/sdd1 on /media/sdd1 type ext4 (rw)

J’installe grub sur /dev/sd, /dev/mapper ou /dev/md ? Je ne sais plus :blush:
Un coup de main pour m’aider à y voir clair serait le bienvenu… :006

Salut,

Moi je choisirais /dev/sda :slightly_smiling:

Salut,

[quote=“ggoodluck47”]Salut,

Moi je choisirais /dev/sda :slightly_smiling:[/quote]

Oui, c’est ce que j’avais essayé avec le rescue CD Debian (Pour une fois Super Grub Disk avait été incapable de me sortir de l’impasse) et je retombe à chaque fois sur le grub rescue…
J’ai essayé aussi /dev/sdc sans plus de succès.

Je me demande si je ne vais pas tenter Lilo, mais je n’ai aucune expérience de Lilo…

Salut,
Je viens de relire mon premier post.
Mon grub.cfg est complètement en vrac… pas même un noyau ! :017
Je crois que c’est de ce côté là qu’il faut que je regarde en priorité !
J’ai mis un moment à voir ça… :blush:

insmod raid
insmod mdraid
insmod lvm
insmod part_msdos
insmod part_msdos

Un peu partout tu en as en trop (j’ai supprimé chez moi, un seul suffit) mais ce n’est pas çà ton problème :blush:

[quote=“ggoodluck47”]Salut,

Moi je choisirais /dev/sda :slightly_smiling:[/quote]

:023 Réglé…

Le Live CD ou le SuperGrub ne sont pas suffisants pour mon genre de config…
Il fallait un “vrai” système pour monter proprement le Raid et le LVM, ensuite faire un chroot propre.

Un simple grub-install /dev/sda à réglé le problème.
Merci

Salut,

Cela m’étonne que tu n(aies pas essayé le live de Sidux qui gère les lvm :slightly_smiling:

Re,

[quote=“ggoodluck47”]Salut,

Cela m’étonne que tu n(aies pas essayé le live de Sidux qui gère les lvm :slightly_smiling:[/quote]

Si… mais je n’ai pas le live amd64.
Et Raid me posait un problème, donc pas moyen de faire un chroot propre!

Je le télécharge aujourd’hui d’ailleurs pour ne plus avoir de mauvaise surprise…