Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
QTParted and XP boot sector? XP now only boots from floppy!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jkn
n00b
n00b


Joined: 17 Apr 2005
Posts: 24

PostPosted: Thu Nov 30, 2006 2:34 am    Post subject: QTParted and XP boot sector? XP now only boots from floppy! Reply with quote

Hi all
This is a problem about booting into Windows on a dual-boot XP/Gentoo system. I got myself into this state using Gentoo and figured I'm much more likely to get knowledgable assistance here than on a Windows forum...

Briefly: I have a T23 Thinkpad laptop which dual-boots XP and Gentoo. I bought a larger hard disk and went through the stages of cloning the HD partitions, and dd'ing the data over. I put both laptop drives in a PC and booted into Gentoo. Here's how it went.

- copy partition table over; fine
- create hda1 (ext2 partition for GRUB); fine
- dd over from old hda1 to new hda1; fine
- dd over from old hda2 (XP) to new hda2; fine
Check: put new drive in laptop, boot into XP. It works! Now I want to make this XP partition a little bigger...
- put new laptops back in big machine; run QTParted.
- Delete old partitions after hda1; fine
- Increase size of hda2 from ~12G to ~25G. QTparted says fine.
Now I want the rest of the new hard drive to be for my Gentoo system:
- with cfdisk, create new swap partition (hda3) and Linux partition (hda4)
- dd ver my old hda4 to my new hda4; fine

Now all this went well. I can now boot up my new hard drive into Gentoo - hurrah! However when I try to boot into the new (enlarged) XP partition, Grub hangs at the 'chainloader +1' prompt.

I can only guess that QTParted has done something weird. But I can't see what. The boot sector for my XP partition looks OK, and if I mount the FAT32 partition under Gentoo, all is well.

Even more weird: I have made an XP boot floppy by copying BOOT.INI, NTLDR, and NTDETECT.COM from this same partition onto a floppy. This successfully boots XP??!! How can this be?

The only thing I can think of is that QTParted has done something with the boot sector, maybe connected with the FAT32 Directory structure of my partition. I did a dd of the new hda2 boot sector and there is one byte different (relating to the FAT32 sector offset, I think).

Any clues anyone? How can I get my laptop to boot into XP without using a floppy?!

Thanks a lot
Jon N
Back to top
View user's profile Send private message
barzakovich
n00b
n00b


Joined: 07 Nov 2006
Posts: 9
Location: Germany, Karlsruhe

PostPosted: Thu Nov 30, 2006 2:02 pm    Post subject: Reply with quote

Hi Jon,

can you post your grub.conf? I have had the same problem
Back to top
View user's profile Send private message
SirYes
Apprentice
Apprentice


Joined: 15 Jan 2006
Posts: 282
Location: Lodz, Poland

PostPosted: Thu Nov 30, 2006 2:27 pm    Post subject: Reply with quote

There's always the possibility to boot your laptop off the Windows XP CD-ROM and choose "Recovery Console" (IIRC). Then you "log on" to the existing Windows installation in text mode and have access to the limited (sic!) command interpreter. Then you issue "fixmbr" command which reinstalls Windows boot manager ("fixboot" might be also needed, but only if "fixmbr" didn't work alone). This should let you boot Windows off the hard drive.
Some links:

The next step would be to setup a dual boot in a way that you'd be able to boot Linux using the Windows' boot manager.

[The rough steps for this: copy the working Windows MBR into a file, reinstall GRUB, copy GRUB MBR into another file, restore Windows MBR, reboot into Windows, copy GRUB MBR to the Windows partition, modify boot.ini] If you're interested, I can help you here (I've done it many times).

But let's get your first problem straight. Try the Windows CD-ROM and see what happens.

Also, there's a nice Linux utility "testdisk" that should be able to help you with restoring partitions. (It saved me several times already ;))
_________________
My blog: In search for ultimate programming language
Back to top
View user's profile Send private message
jkn
n00b
n00b


Joined: 17 Apr 2005
Posts: 24

PostPosted: Thu Nov 30, 2006 9:23 pm    Post subject: Reply with quote

Hi there
Thanks for your suggestions:

- I'll be happy to post my grub.conf when I can (I'm away from this machine for a little while). I don't think that this is related to the problem though. the entry for XP is the very standard one, pretty much as listed in the GRUB manual. And this hasn't changed during what I've been doing.

- having done some more reading it looks as if the recovery console is the 'MS-approved' way to go. Unfortunatley I don't have an XP CD-ROM! (the laptop was sold on to me with XP already installed ;-( ). Anyone know how to get to the recovery console without this?

I have also been looking at the Hard Drive using Testdisk. I too have found this useful; on my previous drive I had trouble using VMWare and testdisk helped with this, by matching the number of heads reported by the HDD and the Partition Table if I remember right.

When I use Testdisk on this drive - the 'analyse filesystem' option I think - it tells me there's a problem and starts displaying what it thinks is the root folder. This doesn't look correct and as you know the Testdisk documentation is not the clearest ... Anyone experience of repairing FAT32 tables using testdisk?

Thanks for your comments. i'll report further when I can.

Jon N
Back to top
View user's profile Send private message
jkn
n00b
n00b


Joined: 17 Apr 2005
Posts: 24

PostPosted: Fri Dec 01, 2006 1:33 am    Post subject: Reply with quote

Hi there
here's my grub.conf FYI.

Code:

#
# Sample boot menu configuration file
#

# Boot automatically after 1 secs.
timeout 3

# By default, boot the second entry.
default 1

# Fallback to the first entry.
fallback 0

#hiddenmenu

# Entry #0 - For booting GNU/Linux
title  Gentoo-2.6.9
root (hd0,3)
kernel (hd0,0)/kernel-2.6.9-gentoo-dev root=/dev/hda4 vga=0x305 video=vesa:ywrap,mtrr,1024x768 splash=verbose,theme:emergence
initrd (hd0,0)/fbsplash-emergence-1024x768
#initrd /initrd.img

### Current Default ###
# Entry #1 - Kernel 2.6.16-gentoo-r9 test for udev and EAC, also ALSA as modules
title  Gentoo-2.6.16-r9-udev
root (hd0,3)
kernel (hd0,0)/kernel-2.6.19r9-udev root=/dev/hda4 video=vesafb:ywrap,mtrr:2,1024x768@70 splash=verbose quiet CONSOLE=/dev/tty1
initrd (hd0,0)/fbsplash-emergence-1024x768
#initrd /initrd.img

# Entry #2 - For booting Windows NT or Windows95
title Windows XP
rootnoverify (hd0,1)
makeactive
chainloader  +1
# For loading DOS if Windows NT is installed
# chainload /bootsect.dos

# For installing GRUB into the hard disk
#title Install GRUB into the hard disk
#root    (hd0,0)
#setup   (hd0)

# Change the colors.
#title Change the colors
#color light-green/brown blink-red/blue

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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