I was installing a software library using apt-get and all of a sudden I see it tampering with my /boot directory. I canceled the installation but somehow it deleted all the sda device files from the /dev directory. When I try to boot now, all of my OSs are listed but when I selected Ubuntu, I get an error saying that it cannot find the device and I should try to boot manually. I can't do that though because the device files are gone. I've followed the advice from these questions:
http://ubuntuforums.org/showthread.php?t=1769391
Boot error > no such device: grub rescue
But I think my situation is different. My partitions are intact; I was able to mount my Ubuntu partition while running the Live CD and all the data is there. How can I restore the device files?
-- Extra Info --
Here's the output from BootInfo script:
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks for (,msdos6)/boot/grub on this drive.
sda1: __________________________________________________ ________________________
File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Windows Vista Boot files: /bootmgr /boot/bcd /Windows/System32/winload.exe
sda2: __________________________________________________ ________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: /bootmgr
sda3: __________________________________________________ ________________________ File system: Extended Partition Boot sector type: Unknown Boot sector info:
sda5: __________________________________________________ ________________________ File system: swap Boot sector type: - Boot sector info:
sda6: __________________________________________________ ________________________ File system: ext3 Boot sector type: - Boot sector info: Operating System: Ubuntu 11.10 Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
I also tried to run grub-install on the mounted partition as suggested by one of the posts I linked to but I got this error
ubuntu@ubuntu:~/tmp$ sudo grub-install --root-directory=/home/ubuntu/tmp /dev/sda6 /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
Bookmarks