I have been running dual boot windows7/ubuntu. Recently I reinstalled windows 7, and I no longer have the option to boot to ubuntu. I would like to be able to get my dual boot working again or at least be able to access that drive so that I can recover my data. These are some of the things that I have tried and their results.
sudo grub-install --root-directory=/mnt/ /dev/sda
but that lost me the ability to boot from cd drive. ( can still boot from flash drive)
Eventually I tried boot-repair but It still boots directly to windows. It gave me the file: http://paste.ubuntu.com/7814117
When I do "restore the mbr of sda", it says:
partition booted by the MBR" sda1 (windows7(boot))
But none of my windows stuff should have been on sda. Is it possible that windows 7 installed its boot over my main ubuntu partition (or the ubuntu grub)? I also believe this may have happened because in the paste file, boot-repair says that my ex-linux partition is now "Boot sector type: Windows 7/2008: NTFS"
My partition table looks like this:
$ sudo fdisk -l /dev/sda1 * 2048 819202047 409600000 7 HPFS/NTFS/exFAT /dev/sda2 819204094 1953523711 567159809 5 Extended Partition 2 does not start on physical sector boundary. /dev/sda5 1936891904 1953523711 8315904 82 Linux swap / Solaris
plus the windows stuff which is on
/dev/sdb. My Ubuntu drive was
$ sudo mount /dev/sda1 /mnt $ sudo chroot /mnt chroot: failed to run command `/bin/bash': No such file or directory
I also tried mounting sda1 under media, but that didn't work
ubuntu@ubuntu:/media$ sudo mount -t cifs -o ro /dev/sda1 /media/sda1 mount.cifs: bad UNC (/dev/sda1)