PDA

View Full Version : [all variants] [SOLVED] Grub wont boot Windows ("Setting up... GRUB" error)



LostOverThere
December 16th, 2008, 04:50 AM
I'm having a problem where I cannot boot into Windows.

Whenever I start my system and select WINDOWS from the GRUB boot menu, all it says is:

Starting Up...
GRUB

And then it constantly beeps internally. The only way to get out of this is Control-Alt-Delete. Windows is on sda1, and my main boot option is this:

title Windows XP
root (hd0,0)
makeactive
chainloader +1

However, I have also used these:

title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1

title XP
rootnoverify (hd0,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

None of them work. In addition to this, Ubuntu doesn't want to mount the Windows hard drive. I didn't install over it and when I try to mount it with sudo mount /dev/sda I get an error:

mount: can't find /dev/sda in /etc/fstab or /etc/mtab

Thanks in Advanced.

LostOverThere
December 16th, 2008, 05:46 AM
Anyone?

bumanie
December 16th, 2008, 05:55 AM
Post the output of
sudo fdisk -lu and
cat /etc/fstab

LostOverThere
December 16th, 2008, 07:07 AM
It works, except when i select Windows XP I get an error stating NTLDR is missing, I've tried almost every solution I can find and nothing has worked. But I wont discuss that here seeing this is a Ubuntu forum.

Never the less, heres the two commands.

sudo fdisk -lu

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa84da84d

Device Boot Start End Blocks Id System
/dev/sda1 * 63 602598149 301299043+ 7 HPFS/NTFS
/dev/sda2 602598150 625137344 11269597+ f W95 Ext'd (LBA)
/dev/sda5 602598213 624077054 10739421 83 Linux
/dev/sda6 624077118 625137344 530113+ 82 Linux swap / Solaris


cat /etc/fstab

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=095516a7-8c3e-4763-a0a9-3c3cee2be9b2 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda6 :
UUID=33f40492-1729-46f6-90db-321814b4bf57 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sda1 /media/Drive\040of\040Awesome ntfs-3g defaults,locale=en_AU.UTF-8 0 0

bumanie
December 16th, 2008, 07:37 AM
NTLDR is one of the three important files needed for xp to boot. This can be fixed in a couple of ways. Do you have a xp installation disc? You can either boot into windows and FIXBOOT and FIXMBR via console mode and then reinstall grub via a live cd or you can copy NTLDR off the windows cd and then copy it to the windows partition. Can you see and open the windows partition from within ubuntu? If not, will probably have to do it via command line.

LostOverThere
December 16th, 2008, 07:46 AM
Yeah, I've tried all that. Thanks. Still didn't work, I can't understand what could have happened though.

But yeah, I still can't access (or mount) the Windows partition.

bumanie
December 16th, 2008, 07:59 AM
What codes have you used to try to mount the xp partition?

caljohnsmith
December 16th, 2008, 02:38 PM
So did Windows hang after booting it when you used this entry:

title Windows XP
root (hd0,0)
makeactive
chainloader +1
Since your Windows is on sda1, the above should be the correct entry to boot Windows. I suspect your problem might be that your XP boot sector was slightly corrupted during your repartitioning, which can sometimes happen, but fortunately "testdisk" usually can fix that problem if that is your case. To use testdisk, first make sure the Ubuntu Universe repository is enabled in System > Admin > Software Sources, and then download and run testdisk with the following commands:

sudo apt-get install testdisk
sudo testdisk
After starting testdisk, choose "no log", choose the correct HDD and "proceed", choose "intel", choose "advanced", select the Windows partition, choose "boot", then choose "Rebuild BS"; if testdisk gives you a warning that the "sectors are not identical", then choose "write". After you are done doing the "rebuild BS" in testdisk, reboot, use the Windows entry above in your menu.lst, and let me know exactly what happens when you try and boot Windows again. We can work from there if you want.

LostOverThere
December 17th, 2008, 01:44 AM
Thank-you caljohnsmith. I ran testdisk and at first it said sectors are not identical and that they were 'bad', after writing, it said they were 'ok' and were identical. When I boot up, I select Windows from the GRUB list and it just says "Starting up..." and just stays like that. Luckily though, there is no 'NTLDR.exe is missing' errors which says it sorted that.

Would it be wise to use the Windows disc and use fixmbr and fixboot or would that just lead to more chaos?

Also, mounting /dev/sda1 (windows) now gives this:

$LogFile indicates unclean shutdown (0, 0)
Failed to mount '/dev/sda1': Operation not supported
Mount is denied because NTFS is marked to be in use. Choose one action:

Choice 1: If you have Windows then disconnect the external devices by
clicking on the 'Safely Remove Hardware' icon in the Windows
taskbar then shutdown Windows cleanly.

Choice 2: If you don't have Windows then you can use the 'force' option for
your own responsibility. For example type on the command line:

mount -t ntfs-3g /dev/sda1 /media/Drive of Awesome -o force

Or add the option to the relevant row in the /etc/fstab file:

/dev/sda1 /media/Drive of Awesome ntfs-3g force 0 0

Thank-you once again.

caljohnsmith
December 17th, 2008, 02:32 AM
Would it be wise to use the Windows disc and use fixmbr and fixboot or would that just lead to more chaos?

Definitely "fixmbr" would cause more chaos, because that will just replace Grub in the MBR; then you won't be able to boot Ubuntu, and most likely you won't be able to boot Windows either. But about running the fixboot command, that won't hurt, but I'm doubtful that will fix the problem based on the symptoms. But since it won't hurt, how about going ahead and running that and also:

fixboot
chkdsk /r
And run the chkdsk command as many times as it takes until it reports no errors. Also, you didn't mention, but are you using the (hd0,0) Grub entry to boot Windows I assume? After doing the above commands from your Windows Install CD, how about rebooting and let me know if you get any further about booting Windows.

LostOverThere
December 17th, 2008, 06:51 AM
Thank-you so much. That solved my problem, I'm very happy to have my XP back (which I need for work) while keeping Ubuntu beside it.

Thank-you all so much. I've thanked all your posts. Thanks once again!

caljohnsmith
December 17th, 2008, 03:04 PM
Thank-you so much. That solved my problem, I'm very happy to have my XP back (which I need for work) while keeping Ubuntu beside it.

Thank-you all so much. I've thanked all your posts. Thanks once again!
Glad to hear that did the trick; cheers and have fun with your Windows and Ubuntu. :)