CAN WINDOWS XP AND LINUX CO-EXIST ON THE SAME SYSTEM?
Yes, they can; you can set up a dual boot system if you're careful, but sometimes it's a bit of a minefield to make sure that you meet all of the requirements, which include:
- having partition handling tools that understand all the file
system layouts
- Ensuring that your boot loader can handle an XP boot as well
as a Linux Boot
- Placing your XP and your Linux root partitions early enough on
the disc so that they'll boot OK, and also ensuring that they're on a physical rather than extended partition if appropriate.
Before you do anything, you should ensure that you have everything backed up, and also that you have a full set of CDs that will let you reformat and restore XP is necessary - and NOT just a reset disc that grabs a copy of the O/S back from some hidden area of the hard disc.
EXAMPLE OF SUCCESS
We purchased a Sony Vaio notepad recently, pre-loaded with XP Professional. We also purchased an official Redhat 7.3 release, and Partition Magic 7.0 ... now on to the install.
a) Run XP and install Partition magic; run it, and add:
1. 1 Mbyte physical slice at start of disc for Linux
2. Swap space for Linux, further up the disc
3. /usr and /home for Linux, also "up the disc"
Ensure that the XP partition doesn't creep too far up the disc.
b) Install Linux, placing / on the physical slice at the start of the disc (/usr and /home on the other two slices) and install your boot loader onto the start of the boot slice and NOT onto the master boot record of the disc. You do not want to overwrite your XP loader, so do NOT place the loader onto the Master Boot Record.
Upon completion of steps a) and b) you have two complete operating systems on your machine -an XP which boots and runs, and Linux which is installed but not boot-able. You now need to add Linux to the XP boot options ...
c) Start Linux in rescue mode from the install cd. This allows you to access the / file system. Set the root of your file system to the hard disc installed Linux:
cd /mnt/sysimage
chroot /mnt/sysimage
Copy the boot sector of the / partition into a plain file
dd if=/dev/hda3 of=/bootsect.lnx bs=512 count=1
(Change "hda3" to the name of your raw disc slice; use df to find out if you're not sure ;-) )
d) Save the file bootsect.lnx to some media that you can also read in XP. We used FTP to transfer the file across our network; we had to "su" to one of the user accounts we set up during the build first as we can't FTP as root around our network.
e) Reboot into XP. Log in as a user with admin rights, and start a command window.
cd c:\
load in the boot sectors via FTP (BINARY mode!!)
attrib -h -s -r \boot.ini
(You have now set the system file boot.ini so that you can get at it / edit it).
f) Edit boot.ini, adding the line
C:\BOOTSECT.LNX=linux
at the end, and rehide the file
attrib +h +s +r \boot.ini
The job is done; XP's boot loader will now offer you Linux or XP whenever you reboot the machine
See also
Linux backup and file system management
Please note that articles in this section of our
web site were current and correct to the best of our ability when published,
but by the nature of our business may go out of date quite quickly. The
quoting of a price, contract term or any other information in this area of
our website is NOT an offer to supply now on those terms - please check
back via
our main web site
Web Application Deployment - Backups and File System Management [153] - ()
[334] - ()
[554] - ()
[593] - ()
[703] - ()
[735] - ()
[754] - ()
[1013] - ()
[1023] - ()
[1288] - ()
[1439] - ()
[1648] - ()
[1765] - ()
[1801] - ()
[1893] - ()
[2299] - ()
[4056] - ()
[4063] - ()
[4115] - ()
[4390] - ()
[4400] - ()
[4405] - ()
[4481] - ()
resource index - Deployment
Solutions centre home page
You'll find shorter technical items at
The Horse's Mouth and
delegate's questions answered at
the
Opentalk forum.
At Well House Consultants, we provide
training courses on
subjects such as Ruby, Lua, Perl, Python, Linux, C, C++,
Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer)
many questions, and answers to those which are of general
interest are published in this area of our site.