LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2006, 03:30 PM   #1
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Rep: Reputation: 0
howto installing windows on an existing linux box


Hey guys/girls.
Im planing on installing windows xp pro on the same HD my linux ( kubuntu ) is on. how can i do it safe and without making the linux unbootable?
* using grub for a boot manager
 
Old 02-24-2006, 03:40 PM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
i think you can actually install windows into a parition that isn't the first on the disk since win 2000. but i don't think you can stop it blanking the mbr.

however, you can use dd to take a copy of the mbr and then restore it using a live cd.

dd if=/dev/hda of=mbr.save bs=512 count=1

to restore

dd if=mbr.save of=/dev/hda bs=512

Last edited by satinet; 02-24-2006 at 03:43 PM.
 
Old 02-24-2006, 03:49 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
How big is your drive?

First, backup important data
Second--from within Linux--create empty space on the drive.
Backup the mbr as satinet says---also put it on a floppy to make Linux easy to boot.
Install XP to the empty space--the installer will do the partitioning.
When all is working, then decide where you want GRUB.

If you can afford the space--or another drive--then seriously consider creating a data partition--formatted FAT32. This will be easily accessible to both Linux and XP.
 
Old 02-24-2006, 03:52 PM   #4
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Original Poster
Rep: Reputation: 0
tried it when i issue the dd if=/dev/hda of=mbr.save bs=512 count=1 command i get
"dd: opening `mbr.save': Input/output error"
any idea?

**pixellany sorry i forgot to mention im using a laptop and no floppy drive support
+ i have an external usb HD but i dont think i can install windows on that one.. correct me if im wrong

Last edited by Acidx; 02-24-2006 at 03:54 PM.
 
Old 02-24-2006, 03:56 PM   #5
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
dunno,

look at :

http://ubuntu.wordpress.com/2005/10/...ng-up-the-mbr/

thought i was getting it wrong.

have you got write permission to where u are issuing the command.

maybe i missed a bit of the restore mbr....

anyone??
 
Old 02-24-2006, 04:03 PM   #6
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Original Poster
Rep: Reputation: 0
ok my bad . i issued the command and its ok . im gonna try follow the other instruction hope it will work.
if im having more issue with this should i post a new thread or just post in this one?
thnx so much guys for the quick replays!
 
Old 02-24-2006, 04:09 PM   #7
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Original Poster
Rep: Reputation: 0
lol i got to read it all be4 i post. again my bad.

Last edited by Acidx; 02-24-2006 at 04:11 PM.
 
Old 02-24-2006, 04:13 PM   #8
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
post in this one if you lile. we're all part of your project now :-D
 
Old 02-24-2006, 05:07 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,724

Rep: Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120
Allow me to add a few thoughts.
Backing up the MBR like this especially just prior to changing it, then planning on restoring it, is nuts.
The MBR doesn't just consist of loader code - it also has the partition table, and some signature bytes. If *any* change is made to the partition layout by the XP install, it will be lost on the restore.
Kiss XP goodbye, and a very confused user is the result.
The XP install will also write a couple of signature bytes into the area prior to the partition table - what is nominally the area for loader code. Haven't figured out what they are for - or if they are ever used again.

Best solution is to reboot Linux in whatever rescue mode is offered, and simply re-install grub.
If you feel the need to backup the partition table (a *good* idea) have a look at the options provided by sfdisk. Even a read of the man page will be very worthwhile.

Last edited by syg00; 02-24-2006 at 05:08 PM.
 
Old 02-25-2006, 05:03 AM   #10
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
fair comment. you could just use a live cd and Chroot to the old linux partiton and run the grub installer again....
 
Old 03-02-2006, 07:15 PM   #11
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Im trully sorry but i think i was kinda misunderstood.

I have only one 60 gig hd and only 1 partition = hda1 .
on that partition i have linux installed. and thats it.
well i do have another small partition for swap.
now, i want to instal windows on hda . how can i do it without fuckin the linux?
i hope i discribed the situation well this time!
thnx in advance !
 
Old 03-03-2006, 12:02 AM   #12
IceChant
Member
 
Registered: Jan 2006
Location: Israel
Distribution: Windows Xp, Slackware
Posts: 316
Blog Entries: 3

Rep: Reputation: 30
Use QTParted to make partition for windows, windows will prolly take over the mbr but make boot floppy to linux and use it after you'll be in linux reinstall lilo or grub, there're more ways as to use "bootpart" from inside windows and get the windows bootloader to boot linux (will work only if you installed the linux bootloader to the root partition).
 
Old 03-04-2006, 10:43 AM   #13
Acidx
LQ Newbie
 
Registered: Sep 2005
Posts: 19

Original Poster
Rep: Reputation: 0
qpartd

i cant use qparted to resize my partition. the option grayed .. prolly coz im runing the linux on that partition.
and this is the real issue. i dont know how can i resize the partition im running linux from.
i've been suggested to use g4l to backup the partition into external drive (which i have. external usb hd).than using linux boot disk to repartitionize.but its a bit too complicated and im trying to find easier way acomplishing the task.

Last edited by Acidx; 03-04-2006 at 11:19 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Windows along with Pre-Existing Linux steyr Linux - Newbie 3 02-10-2004 06:49 AM
Installing new Ethernet Card in an Existing Linux Box ako Linux - Networking 3 01-08-2004 06:49 AM
Howto: Existing Win98 + Linux, dual boot using GRUB TheSwine Linux - Newbie 3 01-03-2004 10:06 AM
Adding linux box (wireless) to existing home network drwatts Linux - Wireless Networking 4 12-21-2003 03:31 PM
adding new hard drive to existing linux box jaysan Linux - Newbie 2 08-09-2001 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration