LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-27-2007, 01:04 PM   #1
MrFixit
Member
 
Registered: Aug 2004
Posts: 32

Rep: Reputation: 15
grub missing.. -or bad partitioning?


hi,
I want to dual boot MS-Dos, WinXP, winXP recovery console, and Linux (Xubuntu)...
now i got one hard disk (hdb) (my older one) with the following partitions:
hdb0 : primary and active fat32 for Ms-Dos (actually win98)
hdb1: extended NTFS with winXP and the recovery console...

currently the boot is winXP's and it shows winXP, MS-Dos, and recovery console.

the second hard disk (hda) (the newer one) has the following partitions:
hda0: extended ext3 for /
hda1: extended swap
hda2: extended NTFS for storing my data...

the weird thing is that i can access the data partition from winXP, or the / partition from the liveCD, but partition magic wont show these partitions - it just paints it all yellow and says BAD...

I have installed Linux to the newer hd (hda)
but Grub won't load...

I want to preserve my windows boot screen and have Grub ask me whether i want to see my windows boot screen or load Linux.

what should i do?

Last edited by MrFixit; 08-27-2007 at 01:07 PM.
 
Old 08-27-2007, 01:12 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
If you want to use Grub, use grub for all your boot entries

If you want the windows boot loader use it for all your boot options (including booting to Linux)

Don't expect to be using both ...


So which one do you want to use ?
 
Old 08-27-2007, 01:28 PM   #3
MrFixit
Member
 
Registered: Aug 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Ok, since the winXP boot works fine for me right now, i wish to use it..
how do i tell it to show Linux as an option?
 
Old 08-27-2007, 01:34 PM   #4
leong3779
LQ Newbie
 
Registered: Mar 2007
Location: uk
Distribution: ubuntu 7.04
Posts: 22

Rep: Reputation: 15
1st thing is your old hd why be a "hdb" and new one be "hda" ? is your hd cable wrong post? make the new hd replace with the old hd , take the org cable(connected to old hd cable) to new hd ? might the master and salve (IDE) problem ?

normal the new one well be hdb .
 
Old 08-27-2007, 01:45 PM   #5
MrFixit
Member
 
Registered: Aug 2004
Posts: 32

Original Poster
Rep: Reputation: 15
yes, the newer one is the master, and the older one is the slave, it doesn't bother winXP's boot... so it doesn't bother me either

by the way - any idea why partition magic says the disk is bad, and won't show any of it's partitions - but i can still access them with winXP and a Linux liveCD?

I've read a bit about using winXP's boot to load linux.. but every guide wants me to use dd -if=/dev/hd# (wherever the /boot partition is) -of=linboot bs=512 count=1

but i don't have a /boot partition... its in a directory in /.
what file do i need to put in the NTFS partition so that boot.ini would know how to boot linux?
 
Old 08-27-2007, 03:50 PM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Your version of partition magic is probably older and doesn't recognize the Linux partitions.,.



Where did you install grub when you installed linux ?

since the system is booting with windows right now, you didn't install grub to the mbr of the windows drive..

Since you didn't create a boot partition you didn't install grub there.. did you install grub to the / partition of your drive ?

You need to put the file created by that dd command on your windows box and add the entry in boot.ini. first you have to determine where the information is you are trying to capture with dd..

How did you install linux on the other drive ? did you disconnect the windows drive connect the new one and install linux to it ? if so grub was probably installed to the mbr of the new drive..
 
Old 08-27-2007, 04:21 PM   #7
MrFixit
Member
 
Registered: Aug 2004
Posts: 32

Original Poster
Rep: Reputation: 15
i installed grub to /boot/grub (in hda0), and yes it's in the MBR of the newer hd.
I changed the BIOS to boot from it and grub loads - and when i select windows it shows the boot screen of winXP - just as i wanted to begin with....

but now I'm curious - what path do i give dd if i install grub like i did - on /boot/grub and not on a separate partition?
 
Old 08-27-2007, 07:22 PM   #8
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
dd if=/dev/hda of=linboot bs=512 count=1
then copy the resulting file to your windows machine and create the entry for it in boot.ini keep following the how-to you found, you're almost there.
 
Old 08-27-2007, 07:32 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Point 1 - Do NOT use Partition Tragic. It is a Windows program which claims to know something about Linux partitions but doesn't. If you take up its advice your hard disk partition table will be corrupted.

Point 2 - You can boot XP and Linux in two different hard disk without touching the XP's MBR. Details are here.

Point 3 - You can use XP's NTLRD to boot LInux. It is just 10 times more work than using Linux to dual boot XP. Basically you must have a working Linux first, has it boot loader installed in the root partition or in the MBR of the 2nd disk and then copy the stage1 of its boot loader into the "C" drive of XP. The theory is XP does not support Linux and cannot or will not read a Linux partition. You therefore has to hand the first part of the Linux boot loader on a plate to XP so that its NTLRD loads it inside the "C" drive, without going out to fetch it itself, and passes the control to Linux. You can find many thread written on this subject. Task E4 of the last link of my signature gives a run down of the commands you need.

Point 4 - You should let Linux chainload your first partition of hdb. In chainloading one boot loader boots another boot loader. It is the most powerful weapon in booting. I think farslayer might have you wrong-footed by telling you can't have Grub and Windows boot loader together.

As far as I am concerned when I boot 145 systems I have 145 boot loaders and am free to choose anyone to take over the MBR. One can do relays in booting and it is a fundamental ability of any boot loader to boot another one. In other word one can use system A's boot loader to boot system B, C, D, and E. When select E one can make E's boot loader to boot system A, B, C and D and so can jump to system B. The booting menu of system B can have choices for A, C, D and E and so one can go around hooping from one boot loader to another in never ending circles if one want to.

My point is you can have as many boot loaders as you want and use them in any way you see fit.
 
Old 08-27-2007, 11:52 PM   #10
MrFixit
Member
 
Registered: Aug 2004
Posts: 32

Original Poster
Rep: Reputation: 15
thank you very much =)
 
Old 08-28-2007, 09:01 PM   #11
johnhamiltion
Member
 
Registered: Aug 2007
Posts: 92

Rep: Reputation: 15
saikee: Thanks for the links. They point to some really great stuff.
 
Old 08-29-2007, 02:27 AM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I was just correcting the misconception that a user cannot have two boot loadrers at the same time.

It is half correct.

A user can have as many boot loaders as he/she wants but only one boot loader can control the MBR at any one time. What is not generally known is a user can freely select any of the available boot loader into the MBR.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning in spite of bad sector EGR Linux - Newbie 4 05-23-2006 03:42 AM
Partitioning gone bad-deleted /usr ertyu2000 Linux - Newbie 3 05-04-2004 03:26 PM
bad kernel tree ? version.h missing !!! 2.4.22 qwijibow Linux - Software 2 11-11-2003 11:53 AM
Missing / Bad Version JDK 1.2 christer Linux - Software 2 10-16-2003 01:09 PM
Partitioning: Am I Missing Something? General_Tso Debian 2 06-30-2003 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:35 PM.

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
Open Source Consulting | Domain Registration