public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  dual boot: XP installed last?
@ 2006-10-30 14:55 James
  2006-10-30 15:17 ` Allan Spagnol Comar
  0 siblings, 1 reply; 10+ messages in thread
From: James @ 2006-10-30 14:55 UTC (permalink / raw
  To: gentoo-user

Hello,

Usually when installing a portable, I leeave the windows and resize the disk
space to set up gentoo as the second OS with grub......


On one portable, The windows XP was a pain so I nuked it and got gentoo
working first.  Now I need to install XP on the portable, but do not
wish XP to rewrite he MBR or any other such nefarious acts against the
gentoo partitions.

Any suggestions as to best methods are most appreciated. Heres the part info:
/dev/hda2        /boot   reiserfs        defaults        1 2
/dev/hda5        none    swap            sw              0 0
/dev/hda6        /       reiserfs        defaults        0 1
/dev/hda7     /usr/local reiserfs        defaults        0 1


hda1 is reserved for XP

Here's the portion of grub.conf already set up for gentoo & XP:

title= Linux 2.6.17-gentoo-r8
root(hd0,1)
kernel /boot/kernel-2.6.17-gentoo-r8 root=/dev/hda6

title=Possible Windows P1
rootnoverify (hd0,0)
makeactive
chainloader +1

So I thinking after installing XP in the first partition,
all I have to do is execute/copy something to set up 
the MBR so it sees grub.conf again, whilst XP is booted
up?


suggestions?

James




I thinking I just need to copy this 

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] dual boot: XP installed last?
  2006-10-30 14:55 [gentoo-user] dual boot: XP installed last? James
@ 2006-10-30 15:17 ` Allan Spagnol Comar
  2006-10-30 16:11   ` [gentoo-user] " james
  0 siblings, 1 reply; 10+ messages in thread
From: Allan Spagnol Comar @ 2006-10-30 15:17 UTC (permalink / raw
  To: gentoo-user

you just have to rerun grub setup.

On 10/30/06, James <wireless@tampabay.rr.com> wrote:
> Hello,
>
> Usually when installing a portable, I leeave the windows and resize the disk
> space to set up gentoo as the second OS with grub......
>
>
> On one portable, The windows XP was a pain so I nuked it and got gentoo
> working first.  Now I need to install XP on the portable, but do not
> wish XP to rewrite he MBR or any other such nefarious acts against the
> gentoo partitions.
>
> Any suggestions as to best methods are most appreciated. Heres the part info:
> /dev/hda2        /boot   reiserfs        defaults        1 2
> /dev/hda5        none    swap            sw              0 0
> /dev/hda6        /       reiserfs        defaults        0 1
> /dev/hda7     /usr/local reiserfs        defaults        0 1
>
>
> hda1 is reserved for XP
>
> Here's the portion of grub.conf already set up for gentoo & XP:
>
> title= Linux 2.6.17-gentoo-r8
> root(hd0,1)
> kernel /boot/kernel-2.6.17-gentoo-r8 root=/dev/hda6
>
> title=Possible Windows P1
> rootnoverify (hd0,0)
> makeactive
> chainloader +1
>
> So I thinking after installing XP in the first partition,
> all I have to do is execute/copy something to set up
> the MBR so it sees grub.conf again, whilst XP is booted
> up?
>
>
> suggestions?
>
> James
>
>
>
>
> I thinking I just need to copy this
>
> --
> gentoo-user@gentoo.org mailing list
>
>


-- 
An application asked:
"Requires Windows 9x, NT4 or better",
so I´ve installed Linux

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gentoo-user]  Re: dual boot: XP installed last?
  2006-10-30 15:17 ` Allan Spagnol Comar
@ 2006-10-30 16:11   ` james
  2006-10-30 16:48     ` Alan McKinnon
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: james @ 2006-10-30 16:11 UTC (permalink / raw
  To: gentoo-user

Allan Spagnol Comar <allan.comar <at> gmail.com> writes:


> you just have to rerun grub setup.

Hmmmm,

If I install XP in the partition and it writes over the MBR,
then, upon reboot, how do I get to grub.conf so I have the
option to reboot the gentoo, then run grub setup?

something like this for my previously shown setup?:
grub> root (hd0,0)    (Specify where your /boot partition resides)
grub> setup (hd0)     (Install GRUB in the MBR)
grub> quit            (Exit the GRUB shell)

Do I run grub setup when XP is booted up? 
Should I use a lived CD to boot up and fix grub?

easy and painless is what I had in mind...
Not to mention any potential gotchas....



James




-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user]  Re: dual boot: XP installed last?
  2006-10-30 16:11   ` [gentoo-user] " james
@ 2006-10-30 16:48     ` Alan McKinnon
  2006-10-30 16:49     ` Neil Bothwick
  2006-10-31 18:05     ` Régis Décamps
  2 siblings, 0 replies; 10+ messages in thread
From: Alan McKinnon @ 2006-10-30 16:48 UTC (permalink / raw
  To: gentoo-user

On Monday 30 October 2006 18:11, james wrote:
> Allan Spagnol Comar <allan.comar <at> gmail.com> writes:
> > you just have to rerun grub setup.
>
> Hmmmm,
>
> If I install XP in the partition and it writes over the MBR,
> then, upon reboot, how do I get to grub.conf so I have the
> option to reboot the gentoo, then run grub setup?

Boot off a rescue or live cd and reinstall grub from that environment

> something like this for my previously shown setup?:
> grub> root (hd0,0)    (Specify where your /boot partition resides)
> grub> setup (hd0)     (Install GRUB in the MBR)
> grub> quit            (Exit the GRUB shell)
>
> Do I run grub setup when XP is booted up?

This won't work - grub-install is a Linux program and it can't run under 
XP

> Should I use a lived CD to boot up and fix grub?

Yes

> easy and painless is what I had in mind...

LiveCD is easy and painless. However you are reqauired to think and not 
leave that step up to the machine as some other OS vendors would like 
you to do :-)

> Not to mention any potential gotchas....

If grub was previosuly successfully installed ont he machine there are 
no gotchas worth mentioning

alan

>
>
>
> James
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user]  Re: dual boot: XP installed last?
  2006-10-30 16:11   ` [gentoo-user] " james
  2006-10-30 16:48     ` Alan McKinnon
@ 2006-10-30 16:49     ` Neil Bothwick
  2006-10-30 21:57       ` James
  2006-10-31 18:05     ` Régis Décamps
  2 siblings, 1 reply; 10+ messages in thread
From: Neil Bothwick @ 2006-10-30 16:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Mon, 30 Oct 2006 16:11:39 +0000 (UTC), james wrote:

> If I install XP in the partition and it writes over the MBR,
> then, upon reboot, how do I get to grub.conf so I have the
> option to reboot the gentoo, then run grub setup?

Run it from the live CD.


-- 
Neil Bothwick

What is a "free" gift ? Aren't all gifts free?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gentoo-user]  Re: dual boot: XP installed last?
  2006-10-30 16:49     ` Neil Bothwick
@ 2006-10-30 21:57       ` James
  2006-11-01 17:53         ` Mark Shields
  0 siblings, 1 reply; 10+ messages in thread
From: James @ 2006-10-30 21:57 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick <neil <at> digimed.co.uk> writes:

> > If I install XP in the partition and it writes over the MBR,
> > then, upon reboot, how do I get to grub.conf so I have the
> > option to reboot the gentoo, then run grub setup?

> Run it from the live CD.


Ok here's what I did in case anyone else has to do this:

Booted up ran a terminal session, when root and issued:


grub-install /dev/hda  <did not work>

so I mounted :   mkdir /mnt/boot
mount /dev/hda2
grub-install /dev/hda   <did not work>

grub-install /mnt/dev/hda2 <did did not work>

grub /mnt/dev/hda2   <throws me into 'grub>'>
grub> root (hd0,1)
grub> setup (hd0)
grub> quit


reboot Works great!

Thanks Neil....


James



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Re: dual boot: XP installed last?
  2006-10-30 16:11   ` [gentoo-user] " james
  2006-10-30 16:48     ` Alan McKinnon
  2006-10-30 16:49     ` Neil Bothwick
@ 2006-10-31 18:05     ` Régis Décamps
  2006-11-01 19:28       ` Mick
  2 siblings, 1 reply; 10+ messages in thread
From: Régis Décamps @ 2006-10-31 18:05 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

On 10/30/06, james <wireless@tampabay.rr.com> wrote:
>
> Allan Spagnol Comar <allan.comar <at> gmail.com> writes:
>
>
> > you just have to rerun grub setup.
>
> Hmmmm,
>
> If I install XP in the partition and it writes over the MBR,
> then, upon reboot, how do I get to grub.conf so I have the
> option to reboot the gentoo, then run grub setup?
>
>
On windows run:
fdisk /mbr
(or somethink similar I can't recall exactly)

That restores your previous bootloaker, ie grub.

Then boot normally and add in your grub/menu.lst:
title Windows/Mac OS X/whatever
    root (hd1,2)  <--- !!! change this !!!
    makeactive
    chainloader (--force )+1

-- 
Régis

http://regis.decamps.info/blog/

[-- Attachment #2: Type: text/html, Size: 1176 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Re: dual boot: XP installed last?
  2006-10-30 21:57       ` James
@ 2006-11-01 17:53         ` Mark Shields
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Shields @ 2006-11-01 17:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On 10/30/06, James <wireless@tampabay.rr.com> wrote:
>
> Neil Bothwick <neil <at> digimed.co.uk> writes:
>
> > > If I install XP in the partition and it writes over the MBR,
> > > then, upon reboot, how do I get to grub.conf so I have the
> > > option to reboot the gentoo, then run grub setup?
>
> > Run it from the live CD.
>
>
> Ok here's what I did in case anyone else has to do this:
>
> Booted up ran a terminal session, when root and issued:
>
>
> grub-install /dev/hda  <did not work>
>
> so I mounted :   mkdir /mnt/boot
> mount /dev/hda2
> grub-install /dev/hda   <did not work>
>
> grub-install /mnt/dev/hda2 <did did not work>
>
> grub /mnt/dev/hda2   <throws me into 'grub>'>
> grub> root (hd0,1)
> grub> setup (hd0)
> grub> quit
>
>
> reboot Works great!
>
> Thanks Neil....
>
>
> James
>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>
Just so you know, it's possible to do a grub-install with just a minimal cd,
provided your existing gentoo environment works:

mount /dev/rootpart /mnt/gentoo
mount /dev/bootpart /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
grep -v rootfs /proc/mounts > /etc/mtab
grub-install /dev/hda (or whatever your hdd is called)


-- 
- Mark Shields

[-- Attachment #2: Type: text/html, Size: 1887 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Re: dual boot: XP installed last?
  2006-10-31 18:05     ` Régis Décamps
@ 2006-11-01 19:28       ` Mick
  0 siblings, 0 replies; 10+ messages in thread
From: Mick @ 2006-11-01 19:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

On Tuesday 31 October 2006 18:05, Régis Décamps wrote:
> On 10/30/06, james <wireless@tampabay.rr.com> wrote:
> > Allan Spagnol Comar <allan.comar <at> gmail.com> writes:
> > > you just have to rerun grub setup.
> >
> > Hmmmm,
> >
> > If I install XP in the partition and it writes over the MBR,
> > then, upon reboot, how do I get to grub.conf so I have the
> > option to reboot the gentoo, then run grub setup?
>
> On windows run:
> fdisk /mbr
> (or somethink similar I can't recall exactly)

The fdisk /mbr is a MSDOS command.  I think you mean the more modern command 
fixmbr and if you run this from a Recovery Console (using your WinXP 
installation CD) your computer will self-destruct in 3 seconds (only 
kidding! :) ) What either of these two commands do is write into the MBR the 
M$Windoze bootloader code.  Your Gentoo installation will thereafter be 
inaccessible without a LiveCD.  You can chainload grub from the WinXP 
ntldr.exe or you can reinstall grub in the MBR.  I would recommend the 
latter, unless you do not intend to keep the linux OS or its /boot partition 
on this machine.

> That restores your previous bootloaker, ie grub.

Err, no it won't.  To restore grub boot using a LiveCD, or a Grub floppy and 
install grub as per the Gentoo handbook.

-- 
Regards,
Mick

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Re: dual boot: XP installed last?
@ 2006-11-01 21:25 Eric Bohn
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Bohn @ 2006-11-01 21:25 UTC (permalink / raw
  To: gentoo-user

You can also backup and and restore the MBR using the Linux dd program available on the Gentoo LiveCD.

>From http://www.inference.phy.cam.ac.uk/saw27/notes/backup-hard-disk-partitions.html :

dd if=/dev/hda of=backup-of-hda-mbr count=1 bs=512 
This stores the first 512 bytes of the disk (contianing the MBR and the primary partition info - i.e. the first four primary entries) into the file "bcakup-of-hda-mbr" which you can then copy to somewhere safe. 
To restore (be careful - this could destroy your existing partition table and with it access to all data on the disk): 
dd if=backup-of-hda-mbr of=/dev/hda 
If you only want to restore the actual MBR code and not the primary partition table entires, just restore the first 446 bytes: dd of=/dev/hda if=backup-of-hda-mbr bs=446 count=1. (Those first 512 bytes are 446 bytes of MBR, then 64 bytes of primary partition table).



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-11-01 21:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-30 14:55 [gentoo-user] dual boot: XP installed last? James
2006-10-30 15:17 ` Allan Spagnol Comar
2006-10-30 16:11   ` [gentoo-user] " james
2006-10-30 16:48     ` Alan McKinnon
2006-10-30 16:49     ` Neil Bothwick
2006-10-30 21:57       ` James
2006-11-01 17:53         ` Mark Shields
2006-10-31 18:05     ` Régis Décamps
2006-11-01 19:28       ` Mick
  -- strict thread matches above, loose matches on Subject: below --
2006-11-01 21:25 Eric Bohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox