Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XP Dual boot and GRUB

0 views
Skip to first unread message

D0d6y

unread,
Oct 8, 2007, 11:35:43 AM10/8/07
to
Hi all,

I'm a bit of a linux n00b, but I've been happily running my IBM ThinkPad
R52 with XP and Etch dual booted via GRUB for many months... Until last
night...

I saw there was an update for the XP rescue and recovery software for
the Thinkpad and installed it... I think it's broken my MBR!

When I turn the machine on I just get the word GRUB in the top left, and
that's it! D'oh! Reminds me of the day many years ago of LILO writting LI

I have the Etch DVDs, I can boot off them, but all it wants to do is
install a whole new Linux setup. So what I need help with is how to fix
the GRUB setup without loosing the XP and Etch setups that are already
on the drive.

Can anyone help?

I've tried a few googles, but all the pages I find are about setting up
the dual boot, not fixing one that already exists!

Ta

Dodgy.

D0d6y

unread,
Oct 8, 2007, 12:31:43 PM10/8/07
to

Ahhh... Semi progress... found the rescue option in the etch menus,
tried the reinstall grub, didn't get anywhere...

So then I booted off the XP install, went into recovery console, ran
fixmbr and now the grub menu appears, and I can boot into linux (YAY!).

I know a load of you are now thinking "Job done!", but I really need to
get the xp boot working!

Dodgy.

Roby

unread,
Oct 8, 2007, 12:44:40 PM10/8/07
to
D0d6y wrote:

Boot a Linux liveCD or maybe SystemRescueCD and ask Grub to
re-write the MBR:

# Assuming boot partition is on first hard drive (hd0):

$ sudo grub

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

# You can find where grub is installed like this:
grub> find /boot/grub/menu.lst
(hd0,5)

# or type "root (hd0," then press tab key to get list of partitions:

grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type is fat, partition type 0x16
Partition num: 2, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type unknown, partition type 0x82
Partition num: 5, Filesystem type is reiserfs, partition type 0x93
Partition num: 6, Filesystem type is fat, partition type 0xb

# Here, partition 5 has grub directory, so tell grub:

grub> root (hd0,5)
Filesystem type is reiserfs, partition type 0x93

# now rewrite the bootsector:

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"... 18 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+18 p
(hd0,5)/boot/grub/stage2 /boot/grub/menu.lst
"... succeeded
Done.

#Time to try it out:
grub> reboot # ... and remove the CD!

D0d6y

unread,
Oct 8, 2007, 1:04:41 PM10/8/07
to

Hi Roby,

Thanks for the prompt reply... I've managed to actually get the grub
menu to appear, ironically it was by booting an XP disk and doing fixmbr!

Unfortunately although I have all the old grub menu items appearing,
only the linux one currently works. An error message appears when I try
to get the XP or 2000 one too boot (I think the 2000 one is the Thinkpad
rescue and recovery one).

So I have a linux boot at least...

menu.lst is (hd0,2)

Part 0 unknown fs, partition type 0x7
Part 1 unknown fs, partition type 0x12
Part 2 ext2fs, partition type 0x83
Part 4 unknown fs, partition type 0x82
Part 5 ext2fs, partition type 0x83

> root (hd0,2)
Filesystem type is ext2fs, partition type 0x83

> setup (hd0)

All looked fine, just like yours except with ext2fs

I managed to hit the pause button when trying to make XP boot... I'm not
sure if I have all the debug info, but I have the following..

Booting 'Microsoft Windows XP Professional'

root (hd0,0)


Filesystem type unknown, partition type 0x7

savedefault
makeactive
chainloader +1

GRUB Loading stage2..


If I pick the NT/2000 option (the thinkpad rescue) I get

Booting 'Windows NT/2000/XP'

root (hd0,1)
Filesystem type unknown, partition type 0x12
savedefault
makeactive
chainloader +1

GRUB Loading stage2..

Next thing I have is the grub menu back again :-(

Any ideas?

Dodgy.

Roby

unread,
Oct 8, 2007, 5:29:58 PM10/8/07
to
D0d6y wrote:

Type 0x7 is NTFS and type 0x12 is Compaq diagnostic. Your
menu.lst stanzas look right for windows, but I don't know
much about The Other Side anymore. You MIGHT have problem(s)
with the boot records in your Windows partitions, which
oughta be fixable by booting your Windows install disk and
choosing FIXBOOT C: (or whatever letter). Don't use FIXMBR
as it re-writes the MBR (which is the route to Grub).

D0d6y

unread,
Oct 8, 2007, 7:09:06 PM10/8/07
to

Hi Roby,

Thanks again for the quick reply.

Too late for not doing the fixmbr! Ironically that's what actually got
the grub menu to appear. Before I did that I just had the word GRUB on
the screen and a blinking cursor.

After doing the fixmbr, grub loaded and I could actually use the linux
options to get the OS up and running. Just the the windows ones refusing
to work.

I've just booted the XP CD again, and from the recovery console did fixboot.

If said the file system was FAT and the boot record was corrupt, and it
had fixed it.

Linux works as before. The XP option in grub now says:
root (hd0,0)
Filesystem type unknown, partition type 0x7
savedefault
makeactive
chainloader +1

NTLDR is missing
Press any key to restart

The NT/2000 option still says:
root (hd0,1)
Filesystem type unknown, partition type 0x12
savedefault
makeactive
chainloader +1

GRUB Loading stage2..

So we have some progress! lol!

Do you know how I can get Linux to read my ntfs partition? I've never
managed to make it work, but as the machine is always on a lan, I've
just taken to copying files between using that... So now I really need
the linux boot to read the NTFS partition so I can get some files off it
and then wipe the machine and start again. The partition shows in Linux
as unknown, and although I've thrown pretty much every module with NTFS
in the name into the kernel, I've never managed to get it to read it.
My removable USB drive (200gig hard drive in a box) which is NTFS I can
read, but I can't write to, which is damn annoying!

Dodgy.

D0d6y

unread,
Oct 8, 2007, 7:25:37 PM10/8/07
to

Oh bum... I've broken it properly again...

I decided that I really needed the windows back up and running to get
the data off it, so I was willing to risk loosing the linux partition,
so I did the fixboot and a fixmbr too... Hoping I would just end up with
a nice simple single boot XP system with some odd linux partitions
laying about that I could try to deal with later...

Ha, it wasn't gonna be that simple was it! lol! I now have a thinkpad
that pops up
Disk error
Press any key to reboot

Grrrrr!

I really wish the XP recovery consoles DISKPART would show NTFS for the
first partition and not fat32 too! It's your own format you stupid OS!

At this rate I think I had better look about for a 3.5-2.5 drive adapter
and go rescuing data that way!

Dodgy.

D0d6y

unread,
Oct 8, 2007, 8:18:40 PM10/8/07
to

*phew*

I booted the etch dvd, and went into rescue, told it to install grub on
(hd0) and I now at least have linux back up and running!

Both windows partitions are doing the normal grub stage 1 part, then
come up with disk error, so it looks like the partitions are not happy!

I'm going to walk away from it now and stop fiddling before i really
break something (assuming I haven't already) and wait for some words of
wisdom from this group! (HINT! lol!)

Dodgy

Jim Beard

unread,
Oct 8, 2007, 8:51:05 PM10/8/07
to
D0d6y wrote:
>>> Do you know how I can get Linux to read my ntfs partition?

[jim@jb etc]$ grep ntfs *tab
fstab:/dev/sda1 /var/mnt/windows ntfs umask=0,nls=utf8,ro 0 0
mtab:/dev/sda1 /var/mnt/windows ntfs ro,umask=0,nls=utf8 0 0

>>> My removable USB drive (200gig hard drive in a box) which is NTFS I
>>> can read, but I can't write to, which is damn annoying!

By default, Linux mounts ntfs read only. Depending on the driver
in use, mounting it read-write can result in corruption of the file
system.

>> Oh bum... I've broken it properly again...

What does the stanza in /boot/grub/menu.lst look like?
For XP Home on my machine, it is simply:

title windows
root (hd0,0)
makeactive
chainloader +1

Cheers!

jim b.

--
UNIX is not user-unfriendly; it merely
expects users to be computer-friendly.

Mumia W.

unread,
Oct 8, 2007, 10:17:03 PM10/8/07
to
On 10/08/2007 07:18 PM, D0d6y wrote:
>
> *phew*
>
> I booted the etch dvd, and went into rescue, told it to install grub on
> (hd0) and I now at least have linux back up and running!
>
> Both windows partitions are doing the normal grub stage 1 part, then
> come up with disk error, so it looks like the partitions are not happy!
>
> I'm going to walk away from it now and stop fiddling before i really
> break something (assuming I haven't already) and wait for some words of
> wisdom from this group! (HINT! lol!)
>
> Dodgy

Get a knoppix 5.1.1 disk and backup your data. Knoppix should be able to
read (but not write to) NTFS partitions. It looks like you're nearing
reinstall time.

If you do reinstall, do what I do when I must dual-boot XP and Linux.
Let XP have the MBR and let Grub have the bootsector for the Linux
partition; use NTLOADER to let Windows boot Linux. Legend has it that
Windows likes to have the MBR, and it can throw a fit when it loses it.

After you have your system running again, backup your bootsectors and
MBRs to a floppy disk.

Dodgy

unread,
Oct 9, 2007, 6:55:04 AM10/9/07
to
On Tue, 09 Oct 2007 00:51:05 GMT, Jim Beard <jim....@verizon.net>
waffled on about something:

>D0d6y wrote:
>>>> Do you know how I can get Linux to read my ntfs partition?
>
>[jim@jb etc]$ grep ntfs *tab
>fstab:/dev/sda1 /var/mnt/windows ntfs umask=0,nls=utf8,ro 0 0
>mtab:/dev/sda1 /var/mnt/windows ntfs ro,umask=0,nls=utf8 0 0
>
>>>> My removable USB drive (200gig hard drive in a box) which is NTFS I
>>>> can read, but I can't write to, which is damn annoying!
>
>By default, Linux mounts ntfs read only. Depending on the driver
>in use, mounting it read-write can result in corruption of the file
>system.

Ah, so no real ntfs compatibility yet then?

>>> Oh bum... I've broken it properly again...
>
>What does the stanza in /boot/grub/menu.lst look like?
>For XP Home on my machine, it is simply:
>
>title windows
>root (hd0,0)
>makeactive
>chainloader +1

Yup, just like that, except I have 2.

One for the XP on hd0,0 and the other for the IBM recovery partition
software on hd0,1

That's the recovery software that screwed everything up when I
stupidly let it try to do an update. Grrrrr!

Dodgy.
--
MUSHROOMS ARE THE OPIATE OF THE MOOSES

Dodgy

unread,
Oct 9, 2007, 7:09:41 AM10/9/07
to
On Mon, 08 Oct 2007 21:17:03 -0500, "Mumia W."
<paduille.4061....@earthlink.net> waffled on about
something:

>On 10/08/2007 07:18 PM, D0d6y wrote:
>>
>> *phew*
>>
>> I booted the etch dvd, and went into rescue, told it to install grub on
>> (hd0) and I now at least have linux back up and running!
>>
>> Both windows partitions are doing the normal grub stage 1 part, then
>> come up with disk error, so it looks like the partitions are not happy!
>>
>> I'm going to walk away from it now and stop fiddling before i really
>> break something (assuming I haven't already) and wait for some words of
>> wisdom from this group! (HINT! lol!)
>>
>> Dodgy
>
>Get a knoppix 5.1.1 disk and backup your data. Knoppix should be able to
>read (but not write to) NTFS partitions. It looks like you're nearing
>reinstall time.

It's on the way!

>If you do reinstall, do what I do when I must dual-boot XP and Linux.
>Let XP have the MBR and let Grub have the bootsector for the Linux
>partition; use NTLOADER to let Windows boot Linux. Legend has it that
>Windows likes to have the MBR, and it can throw a fit when it loses it.

I thought that's what I did... Unfortunately there is no knowing
exactly what the Thinkpad rescue and recovery software did to the
partitions when it tried to update itself (well apart from making a
complete dogs dinner of it!).

>After you have your system running again, backup your bootsectors and
>MBRs to a floppy disk.

Ah, now that sounds like a handy thing to do... How?! lol

Ta.

Mumia W.

unread,
Oct 9, 2007, 9:53:35 AM10/9/07
to
On 10/09/2007 06:09 AM, Dodgy wrote:
> On Mon, 08 Oct 2007 21:17:03 -0500, "Mumia W."
> <paduille.4061....@earthlink.net> waffled on about
> something:
> [...]

>> After you have your system running again, backup your bootsectors and
>> MBRs to a floppy disk.
>
> Ah, now that sounds like a handy thing to do... How?! lol
>
> Ta.
>
> Dodgy.

Install doc-linux-text and read Linux+NT-Loader.gz.

Good luck.

Dodgy

unread,
Oct 9, 2007, 12:46:13 PM10/9/07
to
On Tue, 09 Oct 2007 08:53:35 -0500, "Mumia W."

<paduille.4061....@earthlink.net> waffled on about
something:

>On 10/09/2007 06:09 AM, Dodgy wrote:
>> On Mon, 08 Oct 2007 21:17:03 -0500, "Mumia W."
>> <paduille.4061....@earthlink.net> waffled on about
>> something:
>> [...]
>>> After you have your system running again, backup your bootsectors and
>>> MBRs to a floppy disk.
>>
>> Ah, now that sounds like a handy thing to do... How?! lol
>>
>> Ta.
>>
>> Dodgy.
>
>Install doc-linux-text and read Linux+NT-Loader.gz.

Hi... It's not looking hopefully, I've booted from the Knoppix CD, and
it sees all the partitions... Unfortunately the first one, the NTFS
one, looks a bit of a mess. :-(

I'm gonna dig about for a 2.5 to 3.5 adapter and chuck it into my XP
desktop as a slave drive and see if that makes any more sense of a
partition, that certainly used to be in it's native format! lol!

Thanks everyone for your assistance, and if you dual booted thinkpad
ever says there is a new version of rescue and recovery to install,
don't do it!!!

Dodgy

unread,
Oct 9, 2007, 2:33:47 PM10/9/07
to
On Tue, 09 Oct 2007 08:53:35 -0500, "Mumia W."

<paduille.4061....@earthlink.net> waffled on about
something:

>On 10/09/2007 06:09 AM, Dodgy wrote:
>> On Mon, 08 Oct 2007 21:17:03 -0500, "Mumia W."
>> <paduille.4061....@earthlink.net> waffled on about
>> something:
>> [...]
>>> After you have your system running again, backup your bootsectors and
>>> MBRs to a floppy disk.
>>
>> Ah, now that sounds like a handy thing to do... How?! lol
>>
>> Ta.
>>
>> Dodgy.
>
>Install doc-linux-text and read Linux+NT-Loader.gz.
>
>Good luck.

Oh well, windows is well and truly screwed.

I removed the drive, plugged it into my XP desktop machine as a
secondary and let Active File recovery for windows have a look at
it... Well it sees a partition, that's the end of the good news! lol!

It thinks it's FAT!

I told it to scan it as NTFS and see what it can find, well it's 40%
through at the moment, and it says it's found 1 partition and 0 files!

*sniff*

Guess who's reinstalling from his recovery cd and backups tonight.
Only 2 weeks old, so not too much lost, but I think I'll have to nuke
the whole drive, linux included. I don't fancy my chances of getting
windows on there with the Grub loader et al. At least etch installed
like a dream on the R52 thinkpad, only manual thing I had to do was
install the non-open source centrino wifi drivers.

I might have a play with automatix this time too, it seems to do all
the things that caused me headaches the first time.

Thanks everyone for your help. Pity there wasn't a happy ending.

wimpunk

unread,
Oct 12, 2007, 2:00:12 AM10/12/07
to

Maybe ubcd from http://www.ultimatebootcd.com/ will help you. Write
down your grub configuration and after reinstalling windows you can boot
to linux wit ubcd. Check the grub manual on howto reintall it.

gregor herrmann

unread,
Oct 13, 2007, 10:42:52 PM10/13/07
to
On Tue, 09 Oct 2007 11:55:04 +0100, Dodgy wrote:

>>>>> My removable USB drive (200gig hard drive in a box) which is NTFS I
>>>>> can read, but I can't write to, which is damn annoying!
>>By default, Linux mounts ntfs read only. Depending on the driver
>>in use, mounting it read-write can result in corruption of the file
>>system.
> Ah, so no real ntfs compatibility yet then?

ntfs-3g provides read- and write-support for ntfs partitions under
linux.


gregor
--
.''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
: :' : debian: the universal operating system - http://www.debian.org/
`. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/
`- NP: Elton John: On Dark Street

0 new messages