Skip to main content.
Shams Web

    1. How to dual boot linux with windows xp from linux rescue?
    2. How to dual boot linux from windows xp with Wingrub?
    3. How to install grub to ntfs with Wingrub?
    4. How to make a grub boot disk in fedora core?
    5. How to make a grub boot disk in windows?
    6. How to reinstall the grub to the mbr or roo partition?
    7. How to dual boot xp with linux with two hard disks?
    8. How to start linux from the grub prompt?
1. How to dual boot linux with windows xp from linux rescue?
We can add the linux to the windows xp ntldr, put the first cd of linux in the boot prompt type:
  linux rescue
follow the instructions untill you get the prompt, copy the first sectore of the /boot partition, if /boot is a separate partition then /x will be that otherwise it is the / partition number, copy with:
dd if=/dev/hdax of=bootsect.lnx bs=1 count=512
for linux and grub partition nomenclature read faq 15 and 16
This wil create a file bootsect.lnx in the current direcotry, need to copy this file to the C drive to add in boot.ini, mount the C drive , make a folder windows with:
mkdir windows
mount the C drive on windows with:
  mount /dev/hda1 windows
or   mount -t vfat /dev/hda1 windows
in the second command -t points to the partition file system for nfts change to ntfs. Check if the C drive is mounted: ls windows
This will list C drive contents, now copy the bootsect.lnx to the C drive with with:
cp -ivr bootsect.lnx windows
if can't mount the C drive in this way you can put in a floppy, create a directory floppy then mount the floppy with:
mount /dev/fd0 floppy
Copy to the floppy with:
cp -ivr bootsect.lnx floppy
The other wasy for copy is, in the prompt change to the installed linux system, type:
chroot /mnt/sysimage
Now it is the installed linux system, open the /root with 'cd /root' and run the command:
dd if=/dev/hdax of=bootsect.lnx bs=1 count=512
Now boot the xp, download the explore2fs-1.07_1.zip, unzip and open the linux icon this will let you to access linux partitions from windows, go to /root and copy the bootsec.lnx to the C drive.
Add the bootsect.lnx to the xp ntldr, open the dos, go to the C drive, and run the command:
  C:\>notepade boot.ini
Add this line in to the boot.ini:
  C:\bootsect.lnx="Linux"
save and exit and restart and select the linux from the boot menu.
Top 2. How to install the grub from window xp with Wingrub?
Downlaod the WINGRB0206.EXE, run the WINGRB0206.EXE with the option to create icon on the desktop, open the Wingrb from the desktop, in the Base setup window open the drive tab, select the partition where want to copy the wingrub setup files for example C, check the copy stage files and click ok.
Open the Grub folder from the partition you copied the setup files, open the file MENU in the wrodpad or any other text editor and replace the lines with this new ones:
  timeout=20
  root (hd0,x)
  kernel /boot/vmlinuz
  initrd /boot/initrd.img
or download the MENU, x is the partiton that holds the /boot direcotry ( that is / or if you have a separate boot partition then x will be that partition), remember grub has deferent partitions name that we use here, for example (/dev/hda2) is (/dev/hd0,1), for more details read faq 15 and 16, the vmlinuz and the initrd.img parameters should be the exact ones from the /boot directory.
Open the Install Grub from the Wingrb tool menu, System Drive is the location of BOOT.INI file, normaly is C, in the 'Boot From' options, check the BOOT.INI , for the title write Linux or any linux distro you have, set the timeout to 20 (it means 20 seconds wait for defualt boot), now click on Install, this will add the linux to the xp boot menu (ntldr), reboot and start the linux.
Top 3. How to install the grub to the mbr with Wingrub?
What if you insist on using GRUB as your primary boot manager in the mbr, Here is how to do.
1. Open WINGRUB, use the "Base Setup" menu item, click the "Copy stage files" checkbox,then "OK". (This step copy the stage files to your base directory)
2. Use "Install Grub", install GRLDR using the BOOT.INI method
3. Assure that there is an item in menu.lst to boot your Windows NT/2K/XP, it's something like this:(replace (hd0,0) with real deivce name)
  title Boot Windows NT/2K/XP
         root (hd0,0)
         chainloader +1
4. Reboot, when it gets to the grub console, press 'c', enter command mode
5. Type the following command (replace (hd0,0) with real deivce name):
        root (hd0,0)
        setup (hd0)
6. If all goes well, GRUB will be installed to MBR (the GNU way), reboot
7. Using GRUB to boot your Windows NT/2K/XP, add the linux to menu.list, read the section 2 for help.
8. Use "Install Grub", "Remove" grub from BOOT.INI
Top 4. How to make a grub boot disk in linux?
Open a terminal and type:
  grub
this will open the grub prompt, put a new formatted floppy in the floppy dirve and type:
  root (hd0,x)
x is your boot partition, rememer grub has deferent partitions name for example if the boot partition is /dev/hda5 write (hd0,4) , for /dev/hdb1 write (hd1,0),for details read faq 15 and 16, to preview your linux partition type df, (the partition hold the boot directory is boot partition), hit enter and type:
  setup (fd0)
this create the grub boot disk, make first boot device the floppy and start the linux with floppy.
  Top 5. How to make a grub boot disk in windows?
Downlaod the hd_grub.img, write the image to floppy with rawwritewin.exe, it is a nice graphical client for xp, for dos download the rawrite.exe, open the dos run the rawrite.exe and follow the on screen instructions.
Make a file menu.lst with a text editor, and copy these lines:
  default=0
  timeout=10
  fallback=1
  title Linux
  root (hd0,x)
  kernel (hd0,x)/vmlinuz
  initrd (hd0,x)/initrd.img
Or download the menu.lst, replace the x for proper partition number, x is your boot partition, remember grub has defrent partitions name for example if the boot partition number is /dev/hda6 write (hd0,5) and for /dev/hdb1 write (hd1,0)The first primary partition (C drive) of your first hard disk (primary master) is /dev/hda1 and your first logical partition in the extended partition is /dev/hda5 and so on, while second hard disk (primary slave) is /dev/hdb and so on, for more details read faq 15 and 16.
Use the correct parameters for vmlinuz and initrd.img from the /boot direcotry. Make the first boot device the floppy and start linux with floppy.
  Top 6. How to reinstall the grub to mbr or root partition?
Make the first boot device the cdcrom ,put the first cd of linux, in the boot prompt type:
  linux rescue
Follow the instrucitons unitll get the login prompt, to change to installed linux system type:
  chroot /mnt/sysimage
Open the /mnt direcotry, and type grub this will open the grub prompt,   then type:
  grub>root (hd0,x)
x is the /boot partition, remember grub has deferent partitions name, for example if /boot partition is /dev/hda6 then type (hd0,5), (the partition hold the boot directory is boot partition),for details of linux and grub nomenclature read faq 15 and 16, hit the enter and type:
  setup (hd0,0)
this will install the grub to the mbr, to install to the / partition change the 0 of (hd0,0) of setup to the /boot partition number.
7. How to dual boot xp with linux with two hard disks?
When xp hard disk is the primary master and grub is installed to the mbr, grub will boot the windows and linux, but in the situations when grub is intalled to the linux hard disk / prtition, and want to start xp with grub, then need to do the mapping. Start the linux, open the /boot/grub/grub.conf in a text editor and write the mapping for windows as:
    ## grub mapping:
        title Windows XP
    root (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1
To start the system with grub, change the bois sittings to boot from the linux hard disk.
Top 8. How to start linux from the grub prompt?
Linux can be start from the grub promp, grub has a lot of commands that cat be run from the grub prompt, to get a list of these commands hit the tab. To start linux in the grub prompt type:
root (hd0,x)
x is the partition holds the /boot drectory, remember grub has deferent partitions name for details read linux and grub nomenclature.
Hit enter and type:
kernel  /boot/vmlinuz
vmlinuz is the kernel image in the boot directory you should write the exact name what exist there. then hit enter and type:
initrd /boot/initrd.img
intird is the ram disk image, the name should be the exact one from the /boot directory, hit enter and type:
boot
This will start the linux, to get the correct parameters of boot from the windows, download the explore2fs-1.07_1.zip, unzip and click on the linux icon, this will open your linux partitions from the windows, open the /boot directory and note the vmlinuz and initrd.img exact names.
Top