I have just managed to break my Debian install.

I was having problems with a kernel update, and had to edit menu.lst to get it to install. I have managed to typo and set the boot device to /dev/xvda11 instead of /dev/xvda1

Now, every time I boot I get dropped back to the BusyBox shell.

This would be fine if I could press e when grub was loading, but this is an "in the cloud" server, and I have access to an "emergency console" but it doesn't let me view anything until after the grub loading stage. This also means that live CD's are out.

Can anyone tell me how I can edit the boot device from within BusyBox? I have tried mounting /dev/xvda1 (mount /dev/xvda1 /tmp/) but get an unknown file or folder error (this happens whatever folder I try to mount to, I have even tried creating new folders).


Edit: I can get a partial dmesg which I've uploaded here http://i.stack.imgur.com/FRV5w.jpg

  • Can you download the image? If yes then you can edit it and re-deploy, but doesn't your service provide a 'console ssh' or something like that? – coredump Apr 16 '11 at 19:18
  • They do, but the console ssh doesn't load until past the grub loading stage. – Matt McDonald Apr 16 '11 at 19:19
  • do you have a dmesg of the boot you can see? If so, add it to your question. – coredump Apr 16 '11 at 19:20
  • This is what I can see: i.imgur.com/FRV5w.jpg – Matt McDonald Apr 16 '11 at 19:29
  • I have managed to fix this. I managed to get /dev/xvda1 mounted by adding the -o ext2 option. No idea that was an ext2 device! Particularly as fstab lists it as ext3... very strange! Once that was done just edited /boot/grub/menu.lst to point to the correct device. – Matt McDonald Apr 16 '11 at 20:48

To fix this, you need to mount the boot drive (in my case I had to use -o ext2; if you have a different file system obviously substitute that there).

Now just edit /boot/grub/menu.lst (the text editor in BusyBox is vi) and change the drive listed to boot from.

Save and reboot (and cross your fingers)!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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