WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Howto dual boot linux win xp.  (Read 15530 times)

Offline pema

  • Newbie
  • *
  • Posts: 48
Howto dual boot linux win xp.
« on: January 17, 2009, 06:11:56 AM »
Background:
It is difficult leaving windows totally so you probably want dualboot on your computer to use both windows xp and linux. Problem is that most dualboot systems(usually grub or lilo) supplied with most linux dists mess up your windows master boot record (MBR), it directs boot procedure to the current linux install and if you change that linux install you loose your boot procedure and will not be able boot your computer.

This howto describes howto get a easy maintainable bootsystem where you can have several linux dists at same computer and choosing which linux to use at a boot menu when powering up your pc. Note that most computers support maximum 6 main logical partitions, trick here is that you can make one large extended partition after your windows part and put many logical partitions inside the extended. Tool for making partitions is for example gparted/partitionmanager supplied with examplewise slitaz or ubuntu.
Windows works best when located at first partition on harddrive.
I published this howto in slax forum and copying it to here.

Procedure:
1. Download grub4dos at https://gna.org/projects/grub4dos, extract to a temp directory.
2. Copy the file C:\ntldr in your windows xp root directory, the copy is your backup. Copy and paste at same place gives you both "C:\ntldr"(origin) and "C:\copy of ntldr"(backup) at your "C:\".
3. Copy the files "grldr", "grub.exe" and "menu.lst" from the grub4dos extraction in your temp folder into C:\
4. Now follows the sensitive part, do not turn off your puter at these moments:
4.1 Rename the file C:\ntldr to C:\ntldrxp
4.2 Rename the file C:\grldr to C:\ntldr

5. Open C:\menu.lst in a texteditor and edit to your preferences, below is an example of mine.
#*****sample of menu.lst*****
# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# utility under DOS/Win9x or Linux.
#color black/cyan yellow/cyan
color cyan/blue white/blue


#timeout 30
#default /default

title winxp
find --set-root /ntldrxp
chainloader /ntldrxp

title FETBUNTU
uuid e523cbab-12e4-463a-9cbd-b4d72be6662c
kernel (hd0,4)/boot/vmlinuz-2.6.27-7-generic root=UUID=e523cbab-12e4-463a-9cbd-b4d72be6662c ro quiet splash
initrd=(hd0,4)/boot/initrd.img-2.6.27-7-generic
boot


title SLAX
kernel (hd0,2)/boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/mnt/hda3/slax/
initrd=(hd0,2)/boot/initrd.gz
boot

title PUPPY
kernel (hd0,7)/boot/vmlinuz
initrd=(hd0,7)/boot/initrd.gz
boot

title    SliTaz
root (hd0,5)
kernel /boot/vmlinuz-2.6.25.5-slitaz home=/dev/hda6 screen=1024x768x24 lang=en kmap=se-lat6
initrd /boot/rootfs.gz
boot

title DSL
root=(hd0,6)
kernel /boot/linux24 fromhd=/dev/hda7 quiet vga=791 acpi noapm nodma noscsi
initrd /boot/minirt24.gz
boot

title TCL
root=(hd0,6)
kernel /boot/bzImage tinycore tce=hda7 restore=hda7 laptop syslog
initrd /boot/tinycore.gz
boot

#*************end of sample menu.lst********************
(As you see I play around a lot with several linux dists, some time at same partition as were used for other linux. It is easy testing new linux dists as you just explode the downloaded iso or zip to the partition of choice and redirect boot in your menu.lst to new linux dist, use for example isomaster supplied with slitaz for exploding isos to differents partitions.)

6. Edit menu.lst to fit your needs. I have on my computer a 800MB winxp install on first partition (windows C:\), this is called hd0,0 in menu.lst. Second partition (windows D:\) on my computer is my private documents and valuable files such as music etc, this is hd0,1 in menu.lst.
Following partitions (windows E:\) are my toy partitions where I play around with different os's, named hd0,2 in menu.lst.
Depending on number of partitions you just have to count the hd0,x likewise, presuming we are staying at your first harddrive, a second hardrive would be hd1,x.

Naming of partitions:
menu.lst                  windows                    linux
hd0,0                       C:\                             /dev/hda1
hd0,1                       D:\                             /dev/hda2
hd0,2                       E:\                             /dev/hda3
....and so on.
(Note that naming of partitions may vary between linux didsts, some uses for example hda2=hdb, hda3=hdc... there are other versions as well)

7. All done. Reboot and choose your os in the grub menu. Delete the temporary extracted grub4dos, we dont need it anymore.

Observe:
If you go back to windows and remove your linux partitions, just rename "ntldrxp" back to "ntldr"(overwrite the current ntldr which in fact is grldr), remove grub.exe and menu.lst.

Since I ditched vista first week and went back to xp I never got to learn the boot procedure for vista and do not cover that in this howto, I expect booting vista to be rather similar, maybe someone could fill that in in following posting.
« Last Edit: January 17, 2009, 12:06:31 PM by pema »

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: Howto dual boot linux win xp.
« Reply #1 on: August 23, 2009, 02:14:53 AM »
What version of grub4dos did you use?
« Last Edit: August 23, 2009, 02:18:12 AM by bigpcman »
big pc man

Offline StXh

  • Newbie
  • *
  • Posts: 15
Re: Howto dual boot linux win xp.
« Reply #2 on: January 25, 2010, 10:21:33 PM »
Quote
4.1 Rename the file C:\ntldr to C:\ntldrxp
4.2 Rename the file C:\grldr to C:\ntldr
You needn't rename any filename.
Use grub4dos is a very easy way to boot TC in XP.
Just put grldr and menu.lst in root or any folder.
Add one line in your boot.ini as this:
c:\grldr=grub4dos menu text bla bla ....

grub4dos will check your hard disk and try to find menu.lst
It will find at / or /boot or /boot/grub or you can press c and use command 'configfile' to point the menu file.
http://grub4dos.sourceforge.net/wiki/index.php/Main_Page

grub4dos supports NTFS, so you can put your bzImage and tinycore.gz in your XP partition.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Howto dual boot linux win xp.
« Reply #3 on: January 26, 2010, 01:54:12 AM »
Many people see what is. Some people see what can be, and make a difference.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Howto dual boot linux win xp.
« Reply #4 on: January 26, 2010, 02:44:28 AM »
Nice How_To ! But since grub4dos is a win app, so:
1) Can windows viruses affect grub4dos and windows extended partitions
2) And hence can security of Linux partitions be compromised ?
Kindly explain !
~ Pats

Offline MakodFilu

  • Newbie
  • *
  • Posts: 46
Re: Howto dual boot linux win xp.
« Reply #5 on: February 02, 2010, 10:05:17 PM »
Grub4DOS is not a Windows application, neither a DOS one and not even a Linux one. It is all of those at the same time, just try:

Code: [Select]
wget http://download.gna.org/grub4dos/grub4dos-0.4.4-2009-06-20.zip
unzip grub4dos-0.4.4-2009-06-20.zip
chmod 755 grub4dos-0.4.4/bootlace.com
./grub4dos-0.4.4/bootlace.com

If you are that worried, always use it from within TinyCore. Just read the manual:

Code: [Select]
dos2unix grub4dos-0.4.4/README_GRUB4DOS.txt
less grub4dos-0.4.4/README_GRUB4DOS.txt
« Last Edit: February 02, 2010, 10:09:06 PM by MakodFilu »

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Howto dual boot linux win xp.
« Reply #6 on: February 02, 2010, 10:37:08 PM »
Quote
If you are that worried,

Welcome to TCL forums !  :)

~ Pats