Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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