Re: [gentoo-user] Re: dual boot: XP installed last?

2006-11-01 Thread Mark Shields
On 10/30/06, James [EMAIL PROTECTED] 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/hdadid not workso I mounted : mkdir /mnt/bootmount /dev/hda2grub-install /dev/hda did not workgrub-install /mnt/dev/hda2 did did not work
grub /mnt/dev/hda2 throws me into 'grub'grub root (hd0,1)grub setup (hd0)grub quitreboot Works great!Thanks NeilJames--
gentoo-user@gentoo.org mailing listJust 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/gentoomount /dev/bootpart /mnt/gentoo/bootmount -t proc none /mnt/gentoo/procmount -o bind /dev /mnt/gentoo/devchroot /mnt/gentoo /bin/bashenv-update  source /etc/profile
grep -v rootfs /proc/mounts  /etc/mtabgrub-install /dev/hda (or whatever your hdd is called)-- - Mark Shields


Re: [gentoo-user] Re: dual boot: XP installed last?

2006-11-01 Thread Mick
On Tuesday 31 October 2006 18:05, Régis Décamps wrote:
 On 10/30/06, james [EMAIL PROTECTED] wrote:
  Allan Spagnol Comar allan.comar at gmail.com writes:
   you just have to rerun grub setup.
 
  H,
 
  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


pgpOQq7xX2qqu.pgp
Description: PGP signature


Re: [gentoo-user] Re: dual boot: XP installed last?

2006-11-01 Thread Eric Bohn
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



[gentoo-user] Re: dual boot: XP installed last?

2006-10-30 Thread james
Allan Spagnol Comar allan.comar at gmail.com writes:


 you just have to rerun grub setup.

H,

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



Re: [gentoo-user] Re: dual boot: XP installed last?

2006-10-30 Thread Alan McKinnon
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.

 H,

 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



Re: [gentoo-user] Re: dual boot: XP installed last?

2006-10-30 Thread Neil Bothwick
On Mon, 30 Oct 2006 16:11:39 + (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?


signature.asc
Description: PGP signature


[gentoo-user] Re: dual boot: XP installed last?

2006-10-30 Thread James
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