site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
557
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM ·FreeBSD Handbook
AuthorAll Replies


FastEddie
iMod
join:2000-12-29
Channel Z
kudos:6
Host:
All Things Unix
Mozilla Software
Android
Cyberonic
Rogers

Dual Boot Question


Here's some background before I ask my question(s).

I'm dual booting right now. I have one hard drive with 3 partitions.

WindwsXP (installed first C:\) | Saved Data (FAT32) | Kubuntu 9.10 (installed after WindowsXP installation)

With GRUB as the boot loader. I don't think it is GRUB 2 as it still uses the menu.lst file.

Now in the past when I had to reinstall WindowsXP it was no problem since GRUB was already set to load WindowsXP. Now I want to install Windows 7 where XP now resides ... a clean install. Once I do that:

Will GRUB see Windows 7?

Or

Will Windows 7 take over as boot lader?

How badly will I bork things up?


--
Here's To You


adsldude
Premium,Ex-Mod 2003-9
join:2000-11-10
Colorado
kudos:1
Reviews:
·Callcentric

Windows assumes it's the one and only OS when it writes to the MBR. That's why in a multi-boot situation it is recommended to install windows first then follow the the others like *nix. Since I use LILO I would normally expect to reinstall LILO to the MBR and make provisions for all the OS.



TransitMan
Premium,MVM
join:2000-09-05
Dayton, OH
kudos:1
Reviews:
·RoadRunner Cable

reply to FastEddie
Win7 will take over as boot-loader.
You will not be able to access Kubuntu with the help of a LiveCD and some directions on how to reset Grub.

As soon as I get back I'll find the info you need.
--
Perhaps TODAY IS a good day to die!
Worf on the Defiant - ST First Contact
Proud Host of Crunchie #2.



nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
kudos:7
Reviews:
·AT&T U-Verse

reply to FastEddie
This will probably work:

Step 1: Save a copy of the MBR into a file

dd if=/dev/sda of=/path/mbr count=1

Step 2: Make sure that you can boot from a live CD/DVD or rescue CD/DVD, and see where you saved that mbr file.

Step 3: Install Windows 7.

Step 4: Use that live CD. Make another copy of the MBR as installed by Windows 7, but to a different file name. Then put to old MBR back:

dd if=/path/mbr of=/dev/sda count=1

The chances are that will get you to where you want to be. If it fails, then undo step 4 (that's why you made a copy of the Windows 7 installed MBR), which should get you back to a Windows 7 system, and then you can try reinstalling grub from a rescue boot.
--
AT&T Uverse; Zyxel NBG334W router (behind the 2wire gateway); openSuSE 11.0; firefox 3.0.17



FastEddie
iMod
join:2000-12-29
Channel Z
kudos:6
Host:
All Things Unix
Mozilla Software
Android
Cyberonic
Rogers

reply to TransitMan

said by TransitMan:

Win7 will take over as boot-loader.
You will not be able to access Kubuntu with the help of a LiveCD and some directions on how to reset Grub.

As soon as I get back I'll find the info you need.


Yeah, I spent yesterday reading all I could and trying to figure out how to do it without screwing things up. The Kubuntu I have setup the way I want it and really don't feel like doing the whole install Windows first and then Kubuntu and redo all my linux tweaks.

nwrickert See Profile? you lost me at dd if=/dev/sda of=/path/mbr count=1 Even after reading the dd command explanation I still don't think I understand it.


--
Here's To You


nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
kudos:7
Reviews:
·AT&T U-Verse

said by FastEddie:

nwrickert See Profile? you lost me at dd if=/dev/sda of=/path/mbr count=1 Even after reading the dd command explanation I still don't think I understand it.
The "if=/dev/sda" identifies your disk. You should check to make sure it is the right disk (the one you are booting off). The "if=" says that this is the input file.

The "of=/path/mbr" is the output file. Change that path to whatever you want it to be. The "count=1" says to copy exactly one block.

The command would copy the first block at the beginning of your disk into the named file. That first block is the MBR (main boot record). So all the command does is make a backup of the current MBR. Incidently, you would have to run that as root.

Going the other way restores the MBR to its original content, which should be what is needed to invoke the grub loader. But that is a bit more scary, in that you are overwriting the current MBR to replace with the older one. That's why you should back it (the MBR) up first (perhaps to a usb flash drive).

If you are uneasy about doing this, then try booting from your install CD/DVD, and see if there is a rescue option that allows you to reinstall grub. This would just be a trial run. When you find the right place, just abort (cancel out of it). Then you will know where to go to fix things after the Windows 7 install.

------

A side note: In my recent linux installs, I have created a small primary "/boot" partition, and I have grub installed there. I can then reinstall windows as often as I like. All I have to do is change the active (bootable) partition to the "/boot" partition, and I am back in action with linux.
--
AT&T Uverse; Zyxel NBG334W router (behind the 2wire gateway); openSuSE 11.0; firefox 3.0.17


adsldude
Premium,Ex-Mod 2003-9
join:2000-11-10
Colorado
kudos:1

1 edit

reply to FastEddie
I suggest you learn how to reinstall grub from a live or bootable cd first. Once you understand that then you can install windows 7 in the xp partition. After the windows install you'll reinstall grub and all will be well with the world.



orion940
My 2 cents is now taxable
Premium
join:2001-12-23
Windsor, CT
Reviews:
·Comcast
·AT&T Yahoo

3 edits

reply to FastEddie
There are a couple of distros who's install ISO help you reinstall GRUB. I don't know if the Kubuntu does or not. But it might be something like Suse where it was in the Advanced installation, Repair GRUB, MBR something.

Alternatively, dump the drive, don't resize partitions, install Windows 7 overlaying XP in the the same partition as XP, then use the restore program to restore everything except the Windows partition. I did that once and it worked for me with a little diddling.

O.
--
Nothing has more momentum than mass stupidity.



linuxnoleech

@sbcglobal.net

reply to FastEddie

 # grub                                                                                       
Probing devices to guess BIOS drives. This may take a long time.
 
    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. ]
grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,4)
 (hd6,0)
 (hd6,4)
grub> root (hd0,4)
root (hd0,4)
 Filesystem type is reiserfs, partition type 0x83
grub> setup (hd0)
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)"...  23 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,4)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
quit
# 
 

Most linux live cds will have grub installed and the grub shell can be invoked as root.

The 'find' command in grub will identify the partition(s) in grub nomenclature where grub finds the specified file, given as the absolute path from the root of the partition. /boot/grub/stage1 is the classic file to ask grub to find when determining how grub sees the partition where your grub files are installed.

On this machine, there are 7 hard drives and multiple instances of remnants of grub installations. I happen to know my operating grub files (menu.lst, e.g.) are on sda5 or (hd0,4). It seems there should be little doubt which is your operating grub partition.

The 'root' command tells grub where the bootloader files are.
The 'setup' command tells grub where to install the bootloader, (hd0) being the MBR of the first disk. Alternately, a partition can be specified to grub to have the bootloader installed to the boot sector of that partition, useful for chainloading multiple installations of the linux os.

Be sure to use 'quit' to exit the grub shell. That can be done before writing anything to disk with 'setup'.


tim_k
Buttons, Bows, Beamer, Shadow, Kasey
Premium,VIP
join:2002-02-02
Stewartstown, PA
kudos:8
Reviews:
·Armstrong Zoom ..

reply to FastEddie
I was dual booting with Vista & Ubuntu when I replaced Vista with win7. I read all the docs on how to get Grub back as the boot loader and all seemed overly complicated to me. So I installed EasyBCD under win7 and used it as my boot loader. It works with Windows, OSX, & Linux. The 2.0 beta works better, but you have to register for their forum in order to download it. »neosmart.net/forums/showthread.php?t=642 Or download an older version.
--
RIP my babies Buttons 1/15/94-2/9/07, Beamer 7/24/08, & Bows 12/17/94-10/11/09



El Quintron
... a faint odor of kerosene
Premium
join:2008-04-28
Etobicoke, ON
kudos:2
Reviews:
·TekSavvy DSL
·voip.ms
·WIND Mobile
·TekSavvy Cable

reply to FastEddie
I created a post a while back in the TSI forum detailing my adventures with this:

»Grub Hand-coded!

Before this I had tried with BCD but didnt' have any success... I think EasyBCD migh be fine if you have your dual boot with a single disk, but I was using multiple disks at the time...
--
Now, as the more perceptive of you have probably realised by now, this is Hell, and I am the Devil. Good evening. You can call me Toby, if you like - we try and keep things informal here, as well as infernal.



El Quintron
... a faint odor of kerosene
Premium
join:2008-04-28
Etobicoke, ON
kudos:2
Reviews:
·TekSavvy DSL
·voip.ms
·WIND Mobile
·TekSavvy Cable

reply to FastEddie
This link in my first post of the topic is where I extrapolated what I did...

»help.ubuntu.com/community/Recove···gWindows

It should give you enough details to recover Ubuntu (you'll just have to tailor it to your individual setup.)
--
Now, as the more perceptive of you have probably realised by now, this is Hell, and I am the Devil. Good evening. You can call me Toby, if you like - we try and keep things informal here, as well as infernal.


Darkk

join:2003-10-03
USA
Reviews:
·Charter

reply to FastEddie
I never have let any Linux distros install their bootloaders in the MBR. Whether these were lilo years ago, or more recently GRUB. It isn't hard to reinstall these, but even GRUB isn't exactly point and click to configure and reinstall. It's not hard mind you, but there are easier ways.

If I allow each distro to install it's respective bootloader into the root sector of the boot partition instead of the MBR, each distro's bootloader will never interfere with any of the others' bootloaders. Kernels can be added and changed etc. and the interaction between distros is avoided.

I have several other partitions where I have XP, Windows 7, and DOS installed too. And,like a Linux distro, the actual Windows bootloader is installed in the root sector of that partition.

I use the old and reliable XOSL as a bootloader in the MBR. This is a GUI based bootloader, though it does need a small partition (FAT32 will work) at the beginning of the drive to hold it's files. You can restore this back into the MBR easily after any Microsoft product overwrites the MBR, and add that new OS to the list of bootable operating systems on the machine. I have found it a lot easier than using a GRUB bootloader in the MBR.

XOSL just chains to the bootloader of whatever OS you want to start.



EUS
Kill cancer
Premium
join:2002-09-10
canada
Reviews:
·voip.ms

said by Darkk:

I have several other partitions where I have XP, Windows 7, and DOS installed too. And,like a Linux distro, the actual Windows bootloader is installed in the root sector of that partition.
How do you manage to do that? I have never seen an option that allows you to manage the location of the bootloader.
--
~ Project Hope ~
Good God! Who's manning the internet?!
When the President does it, that means it is not illegal. -- Richard Nixon


adsldude
Premium,Ex-Mod 2003-9
join:2000-11-10
Colorado
kudos:1
Reviews:
·Callcentric

said by EUS:

How do you manage to do that? I have never seen an option that allows you to manage the location of the bootloader.
google chainloading


EUS
Kill cancer
Premium
join:2002-09-10
canada

I have mis-understood Darkk's comment, I thought he was saying that upon installing windows there were options to stop windows from overwriting the MBR.
Sorry for taking your topic off course FE


Darkk

join:2003-10-03
USA
Reviews:
·Charter

1 edit

reply to FastEddie
No, you can't stop Windows from overwriting the MBR. As was mentioned up the thread, any Microsoft operating system assumes it owns the machine and re-writes the MBR.

Linux installation options allow you to place the bootloader anywhere you want, the best place if you are not going to let it install into the MBR is to install it to the root sector of that distro's boot partition.

XOSL than chains to lilo or GRUB in the root sector of the distro's partition, you see it as per normal, get to add any boot time options, select a kernel if you want to, and all of the distros are kept separate and from interfering with each other's bootloader settings.

Windows actual bootloader is also already in the root sector of it's boot partition. NTLDR just chains to it from the MBR, the same way you chain to one of the Linux bootloaders in the root sector of their partitions.

The great part about XOSL is that it is easy to configure using the GUI, maintains copies of the MBR in it's own dedicated partition, and is easy to reinstall after a Microsoft OS wiped the MBR. A few clicks and XOSL is re-installed, a few more and you have added the new partition to the boot list.

I wouldn't want to do multi-boot any other way, even using GRUB, etc. This is just so simple and easy to manage with no interactions between operating systems.

XOSL hasn't been developed for a long time, but it works great still, and there is an active Yahoo Group for it, with a lot of users still tweaking ti and supporting it.

Plus, it's free.



Selenia
I love Debian
Premium
join:2006-09-22
Lanesboro, MA
kudos:2
Reviews:
·Verizon Online DSL
·AT&T Wireless Br..
·Verizon Wireless..

reply to FastEddie
Just reinstall grub from a LiveCD. Win7 will not damage your actual install. It will only overwrite the boot loader. Soon as you put grub back, everything will be like it was, tweaks and all. Just make sure you don't install Win7 on the same partition as Linux, but I'm sure you already knew that(but some who know do make mistakes).
--
deltree /y C:\*.*


Sunday, 12-Feb 00:49:37 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online! © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics