0

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).

Thanks.

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: http://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
  • Mounting an ext3 device as ext2 work fine, but will not provide file system journaling. This can be handy in situations where a system lacks ext3 support. You can think of ext3 as roughly just ext2 plus journaling. – jscott Apr 18 '11 at 10:22

1 Answers1

1

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)!