LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grub.conf to add a windows partition (https://www.linuxquestions.org/questions/linux-software-2/grub-conf-to-add-a-windows-partition-562151/)

SpartacusJones 06-15-2007 09:42 PM

Grub.conf to add a windows partition
 
Hey everyone-

I tried to install Ubuntu on an external on my mom's computer because I didn't want to disturb her Windows partition, but it didn't work (apparently her BIOS can't load from an external). Now it won't boot into either OS.

I tried to repair the MBR with an XP disk, but no one knows the admin password, so I can't do FIXMBR.

Plan B is to alter the Grub.conf file to default to Windows. Here is the text of the file:

grub_kernel_partition=""
grub_root_partition="(hd0,3)"
kernel_boot_options="root=/dev/hda2"
grub_menu_lst="/boot/grub/menu.lst"

I've seen lots of pages which explain how to change things for Linux, but have not seen a way to change it for Windows.

Anyone know how I can fix it?

Junior Hacker 06-15-2007 10:30 PM

To restore Windows XP MBR

1: Boot with Windows XP CD in the drive
2: Hit any key to boot from the CD
3: Wait for installer to load drivers in memory
4: When asked to press enter to install, type: r
5: When asked which Windows installation would you like to log onto,
if there is only one, type: 1 (and hit enter)
6: When asked to type the Administrator password, I hit enter without
typing anything which will be the administrator password for most OEM
Windows installations, (No password). If you installed Windows XP
yourself and added an administrator password, type this password.
7: At the prompt type: fixmbr (and hit enter)
-**CAUTION** and a warning appear
8: When asked "Are you sure you want to write a new MBR?:" type: y
-The new master boot record has been successfully written.
9: When the prompt returns, type: exit
-The computer re-boots and Windows kernel is loaded.

SpartacusJones 06-15-2007 11:08 PM

Yeah, it was a Gateway OEM instalation, but the password isn't blank- I tried that.

I do have a disk at home that will reset the password to 12345 by 'installing' a 3rd party SCSI driver. If worse comes to worse I can do that.

Junior Hacker 06-15-2007 11:24 PM

I use the Helix live CD to clear passwords, you can also find the actual application here.

Junior Hacker 06-16-2007 12:01 AM

Here is the grub manual, the thing with grub is that the configuration files for grub are in the 1st sector of the /boot partition, or / if you don't have a separate /boot partition. So if grub cannot access it's configuration files in the external, you're hooped. Because even if it could, you should have been able to boot Windows off the internal.


All times are GMT -5. The time now is 01:37 AM.