Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Happy Linux+XP Partitions? (was: Both Grub & Lilo hangin
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 7:50 am    Post subject: Happy Linux+XP Partitions? (was: Both Grub & Lilo hangin Reply with quote

I've got a very annoying problem thats been bugging me for 2 days

I can't get a boot loader to work at all

my grub.conf & lilo.conf are correct and I have double checked them numerous times I also have reemerged grub without any optimization as read in these here forums. Have switched settings in the bios including turning off my other hdd drive (a sata one) and tried booting of a floppy as well ..

Grub hangs at Grub loading. Please wait...

And lilo hangs with "L" and a flashing cursor....

On top of all this, my windows XP cd wont boot so i can recover the mbr so i'm left with an unusable system

The partition layout is very simple

/hda1 = WinXP
/hda2 = /boot
/hda3 = swap
/hda4 = /

There are 2 things i can think that i havent really checked yet....

a. This is an 80 gb hdd and the XP partition is around 40gigs...that means that my /boot partition starts after 40gigs (although i thought this was not a problem with grub or lilo)
I havent checked this because it would require a huge xp backup and modifying of partitions

b. According to the bios boot-up screen it seems as LBA is turned off on my drive although it is set to auto (there is no Enabled option, just Disabled and Auto...Auto turns LBA on unless the disk was formatted & partitioned with LBA off)
This would explain the booting problems if it wasnt for 2 things... Grub obviously reads the stage1.5 file and then hangs so it should be able to get the stage 2 file as well
And i can access all 40 gigs completely and with no problems in Win XP which i dont think would be possible with LBA off...
If this is the problem though i need to also repartition/reformat the entire drive as well as backup my entire XP install

Anyone have any idea?

This is obviously a hardware settings/bios or partitioning issue since i never get as far loading anything and i have doublechecked my grub.conf and reemerged it as per different suggestions numerous times...

Also, the livecd boots normally and i can mount/chroot etc with no problems..


Last edited by alexynr on Mon Sep 06, 2004 10:29 pm; edited 3 times in total
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Mon Sep 06, 2004 10:53 am    Post subject: Re: Both Grub & Lilo hanging Reply with quote

  • Can you post your /etc/fstab and grub.conf please
  • I dont see any problem with your /boot starting after 40gb

_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
coax
Apprentice
Apprentice


Joined: 08 Sep 2003
Posts: 231
Location: Antwerp - Belgium

PostPosted: Mon Sep 06, 2004 10:59 am    Post subject: Reply with quote

It's a long shot, but maybe you could try emerge grub-static.
As I think I once heard of someone having trouble on an amd.
_________________
- There is no such thing as having too many computers -
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 11:28 am    Post subject: Re: Both Grub & Lilo hanging Reply with quote

cokehabit wrote:
  • Can you post your /etc/fstab and grub.conf please
  • I dont see any problem with your /boot starting after 40gb


well my fstab doesnt have anything to do with it since grub never gets as far as needing it anyway

grub.conf
Code:

default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Gentoo! Dev 2.6.8
   root (hd0,1)
   kernel /kernel-2.6.8-dev root=/dev/hda3 vga=792
title WinXP
   rootnoverify (hd0,0)
   chainloader +1
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 11:29 am    Post subject: Reply with quote

coax wrote:
It's a long shot, but maybe you could try emerge grub-static.
As I think I once heard of someone having trouble on an amd.


will try that once i get home...thnx
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Mon Sep 06, 2004 1:20 pm    Post subject: Reply with quote

Since you are having trouble with grub I'd recommend getting rid of your splashimage line and the vga entry. Experiment with this stuff one step at a time after you have a booting system.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
black_knight
n00b
n00b


Joined: 04 Sep 2004
Posts: 27

PostPosted: Mon Sep 06, 2004 3:05 pm    Post subject: Reply with quote

first things first

was the bootloader working before on this or anyother distro??

another thing...since u can chroot properly ur hdd can indeed see beyong 40G's to boot up a OS

one thing....can u download smart boot manager(do a google, dont have the link handy) and then try to boot up /hda2 from the created fdd as its possible that grub didnt install on the mbr

well do post up the results
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 4:34 pm    Post subject: Reply with quote

black_knight wrote:
first things first

was the bootloader working before on this or anyother distro??

another thing...since u can chroot properly ur hdd can indeed see beyong 40G's to boot up a OS

one thing....can u download smart boot manager(do a google, dont have the link handy) and then try to boot up /hda2 from the created fdd as its possible that grub didnt install on the mbr

well do post up the results


there was no bootloader on the machine before...I had setup winxp before i left for holiday and then i waited till my adsl line was connected so i could set up gentoo properly

i'm almost confident that it is the lba thing now...my bios indeed reports lba off and for some reason, when using a livecd (gentoo, fc1 rescue etc.) it can see the drive albeit as 155000 cyl 16 heads 63 sec (which i'm not an expert but doesnt seem like lba to me)

Which would explain why grub reads the stage1.5 (embedded in the mbr) but not stage2 (somewhere after 40 gigs)

I will try that smart boot manager but in the mean time anyone have any idea how the lba thing can be fixed short of reinstalling everything?
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 4:52 pm    Post subject: Reply with quote

I though i'd risk it and got lucky....

booted my fc1 cd in rescue mode and did a

sfdisk -d /dev/hda | sfdisk --no-reread --force -H255 /dev/hda

the partition table was translated to LBA and everything worked like a charm...

I still would like to know why the partition table was borked in the first place so if anyone has any ideas.... :)

I'll make a post to add to the grub sticky on top...

Thanx to everyone for their suggestions...

Thats why i love these forums.. :P

Thanks,

Alex
Back to top
View user's profile Send private message
black_knight
n00b
n00b


Joined: 04 Sep 2004
Posts: 27

PostPosted: Mon Sep 06, 2004 4:59 pm    Post subject: Reply with quote

good to hear u got ur problem fixed

can u tell me what exactly u did using

Code:
sfdisk -d /dev/hda | sfdisk --no-reread --force -H255 /dev/hda


what i can understand in sfdisk dumped the partition table of hda and then u forced hda to have 255 sectors, am i correct??

if so what did u use "|" for and whyd u dump the partition table in the first place and where did u dump it?
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 5:16 pm    Post subject: Reply with quote

black_knight wrote:
good to hear u got ur problem fixed

can u tell me what exactly u did using

Code:
sfdisk -d /dev/hda | sfdisk --no-reread --force -H255 /dev/hda


what i can understand in sfdisk dumped the partition table of hda and then u forced hda to have 255 sectors, am i correct??

if so what did u use "|" for and whyd u dump the partition table in the first place and where did u dump it?


hmmm

well that's the way to recreate the exact partition table ....
unless i've always understood sfdisk wrongly,

sfdisk -d /dev/hda will output the current partiton table as it reads it in the same format that sfdisk uses as input...

no-reread ignores what the kernel thinks of the partition table and -H255 translates the inputed partition table (the piped output of sfdisk -d) to 255 heads
--force is used because the 1st (ntfs) partition will not end on a cylinder boundary after the change and sfdisk thinks this is bad...

hmmm...now that i think about it it might be as simple as :
sfdisk --no-reread --force -H255 /dev/hda
by itself
but i've never tried it... (and im not about to start playing with partition tables again :P)
Back to top
View user's profile Send private message
black_knight
n00b
n00b


Joined: 04 Sep 2004
Posts: 27

PostPosted: Mon Sep 06, 2004 5:22 pm    Post subject: Reply with quote

Quote:
hmmm...now that i think about it it might be as simple as :
sfdisk --no-reread --force -H255 /dev/hda
by itself



exactly what i thot so why did u need to do sfdisk -d /dev/hda and what does "|" do?? (guess we r all newbies abt 1 thing or another)
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 5:28 pm    Post subject: Reply with quote

black_knight wrote:
Quote:
hmmm...now that i think about it it might be as simple as :
sfdisk --no-reread --force -H255 /dev/hda
by itself



exactly what i thot so why did u need to do sfdisk -d /dev/hda and what does "|" do?? (guess we r all newbies abt 1 thing or another)


doublechecked it...

from the sfdisk manpage:
Code:

Create partitions

The fourth type of invocation: sfdisk device will cause sfdisk to read the specification for the desired partitioning of device from its standard input, and then to change the partition tables on that disk. Thus, it is possible to use sfdisk from a shell script. When sfdisk determines that its standard input is a terminal, it will be conversational; otherwise it will abort on any error


so sfdisk reads from the standard input to create partitions...

sfdisk -d /dev/hda

dumps the partition table to std out in the same format as it reads from std in when creating partitions...

| does exactly that... redirects the std out of the 1st command to the std in of the following command
Back to top
View user's profile Send private message
black_knight
n00b
n00b


Joined: 04 Sep 2004
Posts: 27

PostPosted: Mon Sep 06, 2004 5:32 pm    Post subject: Reply with quote

got it...

thnx dude

black_knight
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 6:36 pm    Post subject: Reply with quote

I reopened this because ...guess what....

XP wont boot...

i booted to the xp recovery console and did a fixmbr (just to get more info about the error)

it seemed the partition table is invalid (so windows was using the 16 head version...)

reinstalled grub to get linux working at least

is there a way to get both working without reinstalling xp to the new partition table (if it even accepts that) and not havin to switch partition layouts every time ?

i'm guessing that if i switch the partition table layout back to 16 heads and boot the xp recovery cd and do a fixmbr to get rid of grub (which would not be working due to the changed geometry) , XP would boot....

but it is not something i want to do every time....

ARGH....
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 9:03 pm    Post subject: Reply with quote

Can anyone tell me what the fsck an XP partition table is supposed to look like cause i cant seem to get it right
It seems that the problem is that XP is reading the start and end CHS as well (although it is fake cause the drive is obviously larger than 1024 cylinders) and i wanna try and figure out how these are supposed to be calculated

if anyone especially has an xp install on their /dev/hda1
PLEASE

do a
Code:

dd if=/dev/hda of=/tmp/mbrcopy bs=512 count=1


and post the results

thnx
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 10:31 pm    Post subject: Reply with quote

anyone?

Before i backup and reinstall everything?

Which in retrospect would have taken less time seeing as due to a bad assumption and a dodgy floppy disk i just spent 2 hrs recreating partitions by hand (thank god i kept notes on paper)
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Mon Sep 06, 2004 10:44 pm    Post subject: Reply with quote

0000 eb 48 90 8e d0 bc 00 7c 8b f4 50 07 50 1f fb fc .H.....| ..P.P...
0010 bf 00 06 b9 00 01 f2 a5 ea 1d 06 00 00 be be 07 ........ ........
0020 b3 04 80 3c 80 74 0e 80 3c 00 75 1c 83 c6 10 fe ...<.t.. <.u.....
0030 cb 75 ef cd 18 8b 14 8b 4c 02 8b ee 83 c6 03 02 .u...... L.......
0040 ff 00 00 20 01 00 00 00 00 02 fa 80 ca 80 ea 53 ... .... .......S
0050 7c 00 00 31 c0 8e d8 8e d0 bc 00 20 fb a0 40 7c |..1.... ... ..@|
0060 3c ff 74 02 88 c2 52 be 79 7d e8 34 01 f6 c2 80 <.t...R. y}.4....
0070 74 54 b4 41 bb aa 55 cd 13 5a 52 72 49 81 fb 55 tT.A..U. .ZRrI..U
0080 aa 75 43 a0 41 7c 84 c0 75 05 83 e1 01 74 37 66 .uC.A|.. u....t7f
0090 8b 4c 10 be 05 7c c6 44 ff 01 66 8b 1e 44 7c c7 .L...|.D ..f..D|.
00a0 04 10 00 c7 44 02 01 00 66 89 5c 08 c7 44 06 00 ....D... f.\..D..
00b0 70 66 31 c0 89 44 04 66 89 44 0c b4 42 cd 13 72 pf1..D.f .D..B..r
00c0 05 bb 00 70 eb 7d b4 08 cd 13 73 0a f6 c2 80 0f ...p.}.. ..s.....
00d0 84 f0 00 e9 8d 00 be 05 7c c6 44 ff 00 66 31 c0 ........ |.D..f1.
00e0 88 f0 40 66 89 44 04 31 d2 88 ca c1 e2 02 88 e8 ..@f.D.1 ........
00f0 88 f4 40 89 44 08 31 c0 88 d0 c0 e8 02 66 89 04 ..@.D.1. .....f..
0100 66 a1 44 7c 66 31 d2 66 f7 34 88 54 0a 66 31 d2 f.D|f1.f .4.T.f1.
0110 66 f7 74 04 88 54 0b 89 44 0c 3b 44 08 7d 3c 8a f.t..T.. D.;D.}<.
0120 54 0d c0 e2 06 8a 4c 0a fe c1 08 d1 8a 6c 0c 5a T.....L. .....l.Z
0130 8a 74 0b bb 00 70 8e c3 31 db b8 01 02 cd 13 72 .t...p.. 1......r
0140 2a 8c c3 8e 06 48 7c 60 1e b9 00 01 8e db 31 f6 *....H|` ......1.
0150 31 ff fc f3 a5 1f 61 ff 26 42 7c be 7f 7d e8 40 1.....a. &B|..}.@
0160 00 eb 0e be 84 7d e8 38 00 eb 06 be 8e 7d e8 30 .....}.8 .....}.0
0170 00 be 93 7d e8 2a 00 eb fe 47 52 55 42 20 00 47 ...}.*.. .GRUB .G
0180 65 6f 6d 00 48 61 72 64 20 44 69 73 6b 00 52 65 eom.Hard Disk.Re
0190 61 64 00 20 45 72 72 6f 72 00 bb 01 00 b4 0e cd ad. Erro r.......
01a0 10 ac 3c 00 75 f4 c3 00 00 00 00 00 00 00 00 00 ..<.u... ........
01b0 00 00 00 00 00 00 00 00 61 63 61 63 00 00 80 01 ........ acac....
01c0 01 00 0c ef ff ff 3f 00 00 00 21 73 67 01 00 00 ......?. ..!sg...
01d0 c1 ff 05 ef ff ff 60 73 67 01 e0 ca 16 02 00 00 ......`s g.......
01e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
01f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa ........ ......U.

The partition table actually begins on the line 01b0 with the 61 63... This has XP booting from /dev/hda1 and using /dev/hda5 as an NTFS partition, with several Linux partitions.

Under fdisk you have the option of creating a new DOS partition table. Have you tried using it? That way both XP and Linux (and Grub) should be able to read it without any trouble.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 11:00 pm    Post subject: Reply with quote

FreeFly42 wrote:


The partition table actually begins on the line 01b0 with the 61 63... This has XP booting from /dev/hda1 and using /dev/hda5 as an NTFS partition, with several Linux partitions.

Under fdisk you have the option of creating a new DOS partition table. Have you tried using it? That way both XP and Linux (and Grub) should be able to read it without any trouble.


thanx but i doubt this will help me...

it seems hda1 for you is an LBA mapped FAT32 partition (type: 0c) which i guess is your system partition...

It seems as far as i can tell that XP w/NTFS system uses an INVALID partition table that it then ignores and uses LBA by itself

The result is that my BIOS switches LBA off automatically when it sees the partition table (it only has disable and auto settings...cant explicitly turn it on)
which in turn doesnt allow grub or lilo (in my original problem) to work (since theyre somewhere past 40 gigs)
If i could explicitly turn LBA on (as is the suggestion for this problem in many message boards) it would probably solve everything... but i cant...

I think i'll just ghost the drive...recreate the NTFS partition in linux and see if xp will boot from it or at least install to it if i have to...
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Mon Sep 06, 2004 11:18 pm    Post subject: Reply with quote

If you are ghosting your NTFS partition, you may as well try creating a small Linux boot partition in the first few sectors, so you will be able to boot Linux. My primary XP partition is Fat32, the second partition is NTFS.

Another option for you would be to use XP's boot loader and create a boot.ini file for your Linux installations. I know there are directions for that around here somewhere...
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
alexynr
n00b
n00b


Joined: 23 Mar 2004
Posts: 45

PostPosted: Mon Sep 06, 2004 11:21 pm    Post subject: Reply with quote

FreeFly42 wrote:
If you are ghosting your NTFS partition, you may as well try creating a small Linux boot partition in the first few sectors, so you will be able to boot Linux. My primary XP partition is Fat32, the second partition is NTFS.

Another option for you would be to use XP's boot loader and create a boot.ini file for your Linux installations. I know there are directions for that around here somewhere...


yeah ...there are a couple of different options now that ive calmed down a bit :)

i'm too tired to try anything and i have to me up for work in 5 hrs so...maybe tomorrow

the funny thing is that my work pc has an almost identical hardware config and has always worked flawlessly...

although that one was set up with gentoo 2004.0

thansk anyway
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum