/boot mounted pt is removed/formated

hehachris

Verified User
Joined
Nov 24, 2004
Messages
533
Location
Hong Kong
my case:
1, normally there are 3 mounted points
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 x x x x% /
/dev/sda1 x x x x% /boot
none x x x x% /dev/shm

2, one day sda1 is unmounted/format(not sure wt he did..) by an idiot

3, now, the server will stop at grub command line after reboot....

rilly dont know wt to do.....except killing the idiot...
can i solve the problem at the grub command line?
if the answer is no....how can i get back the data in sda2????
thx in advance:(
 
I hope you mean sda1 and not sda2...

If this is a linux box, I'd suggest booting into it with a rescue CD (I like knoppix for this) then chroot into the real root. Then, you can fix /boot (reformat, etc.) and then reinstall the kernel packages (via RPM if you're running RH/Centos) and probably grub as well.

All that lives in /boot should be restored by a kernel and grub reinstall. You may also need to tweak grub, but the MBR is probably okay.
 
If /boot is unmounted you can mount it manually (see the output of /etc/fstab to see how it should be mounted; see the output of "df -h" to see if it is mounted.

If it's deleted then as ballyn wrote, you'll have to restore /boot manually. The easiest way to do it would be to rebuild the system, but you probably don't want to do it...

So instead build another system with the same version of the same OS... and then copy over the /boot partition, maintaining rights and ownerships.

Yes, you'll probably need to temporarily move the hard drive to another system to do this.

Jeff
 
Back
Top