Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.

Linux and XP - loading a dual boot system

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

Related Material

Web Application Deployment - Backups and File System Management
  [4115] More or less back - what happened to our server the other day - (2013-06-14)
  [4063] Backups by crossover between network centres - setting up automatic scp transfers - (2013-04-13)
  [4056] An overpractical test of our backup strategy! - (2013-03-30)
  [2299] How much space does my directory take - Linux - (2009-07-20)
  [1893] Some Linux and Unix tips - (2008-11-18)
  [1801] Will your backups work if you have to restore them? - (2008-09-18)
  [1765] Dialects of English and Unix - (2008-08-21)
  [1648] The tourists guide to Linux - (2008-05-20)
  [1439] Linux / Unix - layout of operating system files - (2007-11-20)
  [1288] Linux run states, shell special commands, and directory structures - (2007-08-03)
  [1023] Finding public writeable things on your linux file system - (2007-01-06)
  [1013] Copy multiple files - confusing error message from cp - (2006-12-30)
  [754] tar, jar, war, ear, sar files - (2006-06-10)
  [735] Boys will be boys, saved by Ubuntu - (2006-05-27)
  [703] Copying files and preserving ownership - (2006-04-28)
  [593] Finding where the disc space has gone - (2006-02-06)
  [554] What backup is adequate? - (2006-01-04)
  [334] Symbolic links and hard links - (2005-06-02)
  [153] Linux - where to put swap space - (2004-12-16)

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.

1 unpublished comment pending on this page

edit your own (not yet published) comments

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/solutions/general- ... ystem.html • PAGE BUILT: Wed Mar 28 07:47:11 2012 • BUILD SYSTEM: wizard