I have a virtual box hosting xubuntu. I did not have enough space anymore on the /boot partition, so I (temporary) moved the /boot/grub to /tmp in order to be able to run 'sudo apt-get -f install'.

Unfortunately, I forgot to put back the grub/ folder... (doh)

So now I can only go into the 'grub rescue' mode...

Is there any way to fix it from there?

enter image description here

As you can see I don't have any boot folder anymore!

PS: so this thread doesn't help: Recovering from 'grub rescue>' crash

EDIT: I am hosting my virtual box (Xubuntu) on Windows.

Thank you in advance.

Chroot in your installation with an Iso or CD/DVD from installations-medium in virtualbox.

dpkg -l | grep grub | awk '{print $2}' | xargs sudo apt-get install --reinstall -o Dpkg::Options::="--force-confnew" -y
  • thank you, do you have any link which explain how to do that? – Bast Jan 4 '17 at 6:35
  • Only a german link, that is current. If you have no LVM and encryption . You need to know the /-partiton and if you have a own /boot-partition. mount /dev/xxx /mnt/ for bios-installation with own boot-partition mount /dev/xxx /mnt/boot With efi mount /dev/xxx /mnt/boot/efi This will mount the necessary virtual FS for dir in /dev /dev/pts /proc /sys /run; do sudo mount --bind $dir /mnt/$dir; done For Network-access cp -a /etc/resolv.conf /mnt/etc/resolv.conf Now you can chroot. chroot /mnt/ /bin/bash In chroot mount -a so all partiton in the System will be mounted. – user192526 Jan 4 '17 at 10:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.