I installed Ubuntu alongside Windows 7. After I installed Ubuntu ran the first time. After I restarted I couldn't get it to boot.
I went on Windows and looked for a fix. I tried it in the terminal, not sure what it was, was like sudo (something something). The command that I used I believe moved something (can't remember).
I then restarted and it took me to the GNU GRUB. I can't reinstall Ubuntu because it won't find a device for boot-loader installation.
i think that i had ubuntu working fine when i did the sudo command and that i should have just waited longer for it to start up (could be wrong)
if i can just boot windows i will be happy so if there is a way from the grub menu i will take that
found the command i used not sure if it could have done much harm ---- sudo e2fsck -n -v /dev/sdXY
2 Answers
If you only want to get into Windows with the Windows bootmgr, do this:
Way 1
- Put the installation disc in the CD drive and boot from it.
- When it shows
Installdialog, go to the lower left corner and clickComputer repair options. - Then select
Command Promptand typebootsect /nt60 ALL /force,bootrec /fixbootand thenbootrec /fixmbr. - Reboot.
Way 2
- Put the installation disc in the CD drive and boot from it.
- After it has loaded and you see the first dialog, press [Shift]+[F12].
- Type
bootsect /nt60 ALL /force,bootrec /fixbootand thenbootrec /fixmbr. - Reboot.
If nothing works
- Put the Ubuntu Live CD or a similar Linux disc in the CD drive and boot from it.
- Use a partitioning program like GParted to format (delete) your Ubuntu partition. You can also format your entire drive to start it all over with a fresh system.
e2fsck command is for checking an ext2, 3 or 4 filesystem. It shouldn't do any harm.
Once I wanted to restore Windows XP bootloader, but had trouble doing that with Windows installation CD. I've found something called Rescatux. It's a small Linux liveCD for repairing GRUB, MBR and similar things. It has a beta option to restore Windows bootloader. It worked for me, but may not work for you.
Alternatively you can try to install Ubuntu again (create ext4 partition on unallocated part of hard disk and install it there). If during Ubuntu's installation you are using the advanced partitioning method (not the one with one big slider) then make sure to set your main disk as device for bootloader installation. (Probably it's /dev/sda . Don't choose /dev/sda4 or something else ending with number, because it means "partition with this number". And it won't work.)
Also it would help, if you could run sudo fdisk -l and paste output here. It shows info about all disks and partitions.