LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2004, 11:23 PM   #1
Zullocrit
LQ Newbie
 
Registered: Sep 2004
Location: Austin, TX
Distribution: SuSE 9.1 pro, Fedora 2, Red Hat 9
Posts: 7

Rep: Reputation: 0
Question Will "grub-install /dev/hda" kill Windows XP MBR?


Howdy from Austin, TX

hda has Windows XP, 20Gb partition
hda has RH9, 20Gb worth, defaults partitions accepted at install

sda was my target for Knoppix 3.6 "sudo knoppix-installer"

hda drive geometry was trashed, as far as XP was concerned, got it back eventually.

Here's the question:

If I "grub-install /dev/hda", will XP show up in the grub menu?

Anything I should look out for?

Thanks

Zullo
zullocrit@yahoo.com
 
Old 09-24-2004, 12:14 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
grub doesn't use drive names such as hda, hdb, etc. grub uses hd0, hd1, etc, where hd0=hda, hd1=hdb, etc. If you simply tell grub to install the first part to hd0, then it will overwrite the MBR, and windows will not be bootable without a boot disk until you edit /etc/grub.conf (if that's what your distro uses), or edit /boot/grub/menu.lst (if that's what your distro uses) to add windows to the menu.
If you install grub to (hd0,1) or whatever the linux partition is, then all of grub will be installed in the linux partition, and you won't be able to boot linux without a boot disk, or loadlin in the windows partition.
For more info on the ins and outs of grub, google up a copy of 'Zen and the Art of Using Grub'.
For more info on how to setup loadlin in the windows partition, use google to search for the loadlin HOWTO that explains how to do it.
 
Old 09-25-2004, 09:16 AM   #3
Zullocrit
LQ Newbie
 
Registered: Sep 2004
Location: Austin, TX
Distribution: SuSE 9.1 pro, Fedora 2, Red Hat 9
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your reply.

After I put grub back on hd0 and reboot, the system boots into the grub shell.

The menu.lst and grub.conf conform to the suggested reading.

Thoughts?

Zullo
 
Old 09-25-2004, 10:50 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
This is what my /boot/grub/menu.lst has for my windows partition:
title windows
root (hd0,0)
chainloader +1

My /etc/grub.conf has this:
root (hd0,2) #where boot is located
install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 0x8000 (hd0,2) /grub/menu.lst
quit

Copy/paste and edit to suit your system's needs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 04:49 AM
how to add "hdparm -c 1 -d 1 -k 1 /dev/hda" to startup script (as root)? jimothy05 Linux - Distributions 2 10-07-2004 08:32 AM
"unable to find device node for /dev/x in /dev!" during install zombiedeth *BSD 0 02-02-2004 03:38 AM
fdisk returns "unable to find /dev/hda" cfdisk crashes. cirofren Linux - Newbie 2 11-06-2003 01:03 AM
"Error: cannot open /dev/hda" morbius Linux - Software 4 05-30-2001 09:12 AM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration