reinstall grub debian / ubuntu

reinstall f*cking grub after f*cking upgrade , not so frequently

  1. boot using systemrescuecd
  2. mount the localdisk , you can find all disks usingfdisk -l
  3. now add system mount ( /dev and /sys ) on the mounted disk
    mount --bind /dev /mnt/dev &&
    mount --bind /dev/pts /mnt/dev/pts &&
    mount --bind /proc /mnt/proc &&
    mount --bind /sys /mnt/sys
  4. chroot in the partition% chroot /mnt/linux /bin/bash
  5. install grub grub-install -root-directory=/mnt/ /dev/sdX
  6. umount everything to reboot the rescue system
    umount /mnt/sys &&
    umount /mnt/proc &&
    umount /mnt/dev/pts &&
    umount /mnt/dev &&
    umount /mnt
  7. reboot
Torna in alto