Skip to content

Instantly share code, notes, and snippets.

@NaWer
Last active February 26, 2018 09:12
Show Gist options
  • Save NaWer/a0fe88910f7748201f0cf451116e24e2 to your computer and use it in GitHub Desktop.
Save NaWer/a0fe88910f7748201f0cf451116e24e2 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 - grub & busybox restoration

Grub

Conversion qwerty azerty

( 9
) 0
--- ---
/ !
--- ---
, ;
--- ---
m ,
--- ---

prompt grub

root (hd0,[TAB]
      Possible partitions are:
        Partition num: 0,  Filesystem type is fat, partition type 0xb
        ...
        Partition num: 6,  Filesystem type is ext4fs, partition type 0x83
        ...
# /dev/sda6 will probably be the / partition (first ext4fs)

Boot sur l'avant dernier noyau

set root=(hd0,1)
linux /vmlinuz.old root=/dev/sda6
initrd /initrd.img.old
boot

Boot sur le dernier noyau

set root=(hd0,1)
linux /vmlinuz root=/dev/sda6
initrd /initrd.img
boot

prompt busy-box

blkid
mkdir /mnt
mount /dev/sda6 /mnt
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
chroot /mnt
update-grub
grub-install /dev/sda

exit
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment