Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Due to a fatal mistake I made, I may lose all my data on HDD. I am hoping someone might be able to help me out of this tricky situation.

I upgraded my 10.04 LTS server to 12.04 LTS, upgrade went fine and system rebooted however on trying to access apache, I noticed lot of "out of resources" error and no mysql based app hosted on the server was working fine. I noticed a message saying clearing or moving some files may help (This is where I screwed up). I moved all files from /boot partition to a directory in /opt and rebooted the system. Since I moved the boot files, server didn't boot.

Since I have saved (moved) the files to /opt directory, I thought replacing those files back in /boot partition would resolve the issue. Now the problem is that no OS (Ubuntu and Windows) is detecting the file system (except /boot partition). I tried connecting the HDD to windows, installed several file recovery tools but no software could help me get access to ext4 file system on my HDD, all of them show file system as raw (Linux LVM). Even Ubuntu shows the same.

I have lot of important data on my server and I simple can't afford to lost the data. I am hoping if I could somehow mount the LVM and access the file system then I can copy the files from /opt back to /boot and everything will return to normal.

Please help!!

UPDATE: I followed this article and was able to access the files system. I copied files back in /boot directory but now the problem is when I try to boot the server, I get the error below with grub rescue prompt. I am sure all files which I moved have been copied back.

error: file not found
grub rescue >
share|improve this question
Try to update iniramfs and grub. sudo update-initramfs -u -k all & sudo update-grub –  NikTh Nov 14 '12 at 6:40
@NikTh Problem is I am not into the system. System doesn't boot itself so there is no question of executing any command. I am trying to boot the system using live usb. Will post what I find. –  Vikram Nov 14 '12 at 7:30
Fixed problem by following this - askubuntu.com/questions/187862/… –  Vikram Nov 15 '12 at 7:49
add comment

Your Answer


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

Browse other questions tagged or ask your own question.