Question:
Major Computer problem, please help!?
2009-01-02 19:19:30 UTC
I have a HP pavillion m9000t Elite.

It WAS running Windows Vista Home Premium.
When i had tried to dual boot, and have Ubuntu 8.10 and Vista, Thats when everything when KABOOM

Since i installed Ubuntu on an external HDD, i went into my BIOS and changed it to boot from the EHDD.

When it tries to boot and error shows up:

GRUB error 17

Hence, i went back into BIOS and reset all my changes.

So now when i try to Boot Vista, i get:

GRUB error 17

(I've tried F8, and all that nonsense, and it doesnt work, i just get the GRUB error 17)

(I cant even do a complete Restore because my recovery is on a partition i cannot acess,)

(I had homemade recovery CD's, but with my luck, disk 16 is invalid**Just ******* great right?8**)

Please god help, im typing this of the Ubuntu OS, with the Ubuntu Live CD in the tray
Five answers:
Doc
2009-01-02 19:27:10 UTC
--------------------------------------------------------------------------------

The error usually happens because Linux and your BIOS detect your hard disks in different orders. GRUB tries to translate between the two using the device.map file in /boot/grub/device.map, which is automatically generated. Chances are, it guessed wrong.



In my case, I have three SATA hard disks.



My BIOS sees them as:

HDD1 - 80 GB - Windows

HDD2 - 80 GB - Linux

HDD3 - 250 GB - Media



Linux sees them as:

/dev/sda - 80 GB - Windows

/dev/sdb - 250 GB - Media

/dev/sdc - 80 GB - Linux



So it generated device.map assuming that order was correct, i.e.:

(hd0) /dev/sda

(hd1) /dev/sdb

(hd2) /dev/sdc



When the installer installed GRUB using that data, it tried to install the first part of GRUB on /dev/sda and told it to look for the OS on /dev/sdc. Unfortunately, this translated to "install on (hd0) then look for the OS on (hd2)", so it was looking for the OS on the wrong drive.



To fix it, you have to teach GRUB which order the BIOS uses. To do this, follow these steps:



1) Boot from the Ubuntu CD

2) Open a Terminal (Applications->Accessories->Terminal)

3) Run "sudo -s"

4) Run "mkdir /ubuntu"

5) Run "mount /dev/sdc1 /ubuntu" (where /dev/sdc1 is your Linux root partition)

6) Run "chroot /ubuntu"

7) Run "cd /boot/grub"

Edit device.map (using vi or another text editor)



In my case, my new device.map was:

(hd0) /dev/sda

(hd1) /dev/sdc

(hd2) /dev/sdb



which told GRUB that sdc was really the second hard drive, not the third.



9) Run "grub --device.map=device.map"

10) Type "root (hd1,0)" (where hd1,0 is your Linux boot or root partition using the BIOS order)

11) Type "setup (hd0)" (where hd0 is your first boot drive, almost always hd0)



You should see a message that it's now telling GRUB to load 17+(hd1,0) instead of 17+(hd2,0) or something like that. This is what we want.



12) Edit menu.lst



You need to change references from (hd2,0) to (hd1,0), or whatever your Linux boot drive was autodetected as to whatever it is according to your BIOS.



If you get this step wrong, you'll see an error message something like:

Error 17: Cannot mount selected partition



meaning it's looking for a Linux file system on that partition, but it can't find one (because the drive device number is wrong in menu.lst).



13) Reboot
Shadow Wolf
2009-01-02 20:23:19 UTC
It looks like you allowed the Ubuntu install to overwrite the MBR with Grub.



Vista does not support dual boot options and I'm not enough of a Grub guru to know what needs to happen to make that work or even if it will work. If you can get Grub to load and run the NTLDR file then Vista should boot. Then the problem will be getting Grub to boot from the external drive and I'm not sure it can do that. In my adventures with several bootable USB drive installations I think you need a different loader and I don't have the info handy to check.



In any case, this should get you close to what you want hopefully without further damage.



If you have any data you are worried about, almost any recent live CD should be able to read the drive and you have the external drive you can store it on. Be sure to check your data files once Vista is booting again before overwriting anything that may be saved on the external drive.



Get your original Vista install disk out, boot it and restore the MBR. This should be part of the recovery option. That should get Vista to boot again. There may even be a live CD that has the tools to fix this. Worse case scenario, re-install Vista and don't let it repartition the drive. Once Vista is booting, There are tools that will save your MBR and allow easy recovery from mistakes like this.



Next, using the Ubuntu CD or any other Linux install CD, install to the external drive only. Be sure you have the correct drive selected. This should be about equivalent to installing to a USB drive and I don't think it uses Grub. You may have the option to create a boot CD or boot floppy to boot from the external drive also.



Now, if you set the BIOS to boot from the USB/external drive, it will boot from it when it is attached. This will also work for any number of the live CD's that will install to a USB drive. To boot from Vista, just unplug the external drive and reboot. Vista may or may not know how to access the external drive once Linux is installed depending on how it formats the drive.



I think I've left this generic enough. Pretty much the same thing would happen with if you were using XP with this type of hardware. Same goes for the USB/external drive with any number of Linux installs.



Shadow Wolf
2009-01-02 19:28:25 UTC
Oh geez. Windows Vista isn't properly compatible with the GRUB bootloader so you pretty much screwed everything up. GRUB overwrites the proper Vista boot file so you're not able to boot, unless you somehow get a BCD file back on there.



The first thing to do is to see if you have an actual Vista install disc (recovery CDs are useless as they don't contain the proper files). Then follow these instructions: http://neosmart.net/wiki/display/EBCD/Repairing+the+Windows+Vista+Bootloader



If you don't have an install disc, then you'll have to just wipe the drive clean somehow and entirely reinstall Vista.



Here's the proper thing to do when preparing to dual-boot Vista and Linux: http://neosmart.net/wiki/display/EBCD/Ubuntu



EDIT: Doc, that's absolutely going to fail. Vista DOES NOT deal with GRUB properly. It uses BCD, and following your steps is just going to screw it up even worse.
2016-10-20 07:20:33 UTC
do no longer try changing the BIOS settings coz it is going to easily make it worst, plus in spite of the fact that if it is on 640x480 the colours of your show are all dwindled... I propose no longer in actual colorations (256 colorations mode) 2 issues you may desire to do. a million) top click on the computing gadget click properties - settings- then there is this option show section drag it until eventually it is going to 1024x768. or 2) re-installation your video motive force
lb-rans
2009-01-02 19:26:18 UTC
once you settings a reset try unplugging the external with linux.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...