Dual-Boot Linux and Windows 2000/Windows XP with GRUB
Dual-Boot Linux and Windows NT/2000/Windows XP with GRUB
Requirements for /boot Partition
On older systems, location of the /boot partition on the hard drive is critical. The infamous BIOS 1024 cylinder limit – where the BIOS can't access data beyond cylinder 1024, ~8.5 GB on 24 bit hardrive geometry within which /boot must be created. Since the introduction of LBA and native 32bit hardrive support around 2000, this is seldom an issue on modern WINTEL architecture systems.
If you have multiple hard drives (disks), /boot must be on the same hard drive (probably the first hard drive) that has the Windows boot loader (NTLDR) on the MBR.
Dual-Boot Setup
Step 1: Shrink the Windows Drive
To non-destructively shrink the Windows partition, you can use the free software program fips or (qt/g/yp)parted or a commercial product like Partition Magic. Do not use the RedHat installation disk partition GUI Disk Druid. However, once you've shrunk the Windows partition, you can use Disk Druid during the Red Hat/Fedora installation to create all the partitions you need for Linux.
For many users Windows unmovable files will stop the shrinking process far too soon or may even prevent it starting. The unmovable culprits are virtual memory (paging file), hibernation, and VSS shadow copy by turning off Restore Points. Another major culprit is the Master File Table (MFT) which can be anywhere on the disk (even at the very end of it!) and this cannot, and must not, be switched off even temporarily. Disk Defragmentation will not touch any files marked as unmovable.
Different versions of Parted support different drives and filesystems formats. Knoppix or other “Live CD” implementations will usually have a Parted version on it. The Fedora version is typically problematic and cannot be recommended for this procedure.
a) This procedure assumes you have Windows installed or will install Windows and you have local administrative rights. Set Folder Options to Display Hidden System Files.
b) BACKUP YOUR DATA!!!! Burn files to a CD, clone an image of your hard disk, copy files to a USB flash/pen/thumb drive, or USB external drive.
c) “Clean” your hardrive using Windows, freeware (ccleaner) a or 3rd party disk cleaner.
d) Disable System Restore and VSS (Control Panel > System and ..... > System > System Protection - clear the Win7/Vista tick box, click Apply. Note: Disabling System Restore automatically removes all previously created Restore Points so enable it later.
e) Disable the pagefile - Virtual Memory (Control Panel >System and ..... > System > Advanced System Settings > Advanced tab > Settings button in Performance > Advanced tab > Change button > Uncheck automatic setting, select No Paging File (or make it very small), click Set button, click OK.
f) Disable Write Debugging if applicable (in Advanced System Settings > click Settings button in Startup and Recovery > click the drop-down under 'Write debugging information', and select None.
g) Disable Hibernation (Under Command Prompt, type powercfg.exe /hibernate off).
Use 'powercfg.exe /hibernate on' to re-enable it.
h) Restart computer.
i) Delete c:\Pagefile.sys file or the hibernation file (differs by vendor)
j) defragment the Windows OS (C:\) partition. Make sure there are no unmoveable files at the end of the hardrive that prevent partion size change.
k) Boot a “LiveCD” containing (qt/g/yp)parted. Startup that version.
l) Resize the Windows partition as desired; but not past the endpoint of the defragged Windows hardrive file location. Write the new partition table. If the write fails, try a different parted version
m) Reboot into Windows and verify all is well. If not, sorry about that. See step 1.b
Step 2: Install LINUX with /boot on the second partition; separately or under /.
a) Select GRUB as the bootloader and install it on the disk partition where /boot will reside or on the MBR (back it up first using dd).
b) After finishing the Red Hat installation, reboot into Linux “live CD” or “RESCUE” mode.
c) Run the following command: grub-install /dev/sda2/. Usually not needed if installing the first time.
(This assumes /boot is on the first hardrive, second partition).
Step 3: Add Windows to your LINUX startup.
a) Mount /dev/sda2 and vi /boot/grub/grub.conf from that mountpoint. Add an entry to the end of the file as follows for your version of Windows:
title Windows
(tab>rootnoverify (hd0,0)
chainloader +1
Step 4: Add LINUX to your Windows startup:
Copy the MBR of the /boot partition it to the C: drive (or the base drive) of Windows as linux.bin using a LINUX LiveCD. To be safe regarding LINUX NTFS R/W support, try copying to a separate DOS compatible media instead of a direct copy to the NTFS partition:
a) Make a copy of the Linux boot sector onto a floppy, USB drive or onto a FAT32 partition.
( on a floppy,
Insert a floppy drive. Run the command:
modprobe floppy
mkfs –t msdos /dev/fd0
mkdir /mnt./floppy
mount -t msdos /dev/fd0 /mnt/floppy
dd if=/dev/sda2 of=/mnt/floppy/linux.bin bs=512 count=1
( on a DOS formatted USB drive (varies):
Mount the USB drive at /media/USBDrive (or AUTOMOUNT). Run the command:
dd if=/dev/sda2 of=/media/USBDrive/linux.bin bs=512 count=1
( on a FAT32 (vfat) partition:
mount a VFAT or FAT32 partition (/osshare in this example)
Run the following command:
dd if=/dev/sda2 of=/osshare/linux.bin bs=512 count=1
Substitute the path for the if= parameter (the input file) with the appropriate partition containing /boot where GRUB was installed.
b) Reboot into Windows
c) Copy the linux.bin file to C:\
d) c:\boot.ini is a hidden system file. Remove the hidden and ro attributes using explorer or the attrib command.
e) Run notepad and edit c:\boot.ini. Add the following line at the end:
c:\linux.bin="LINUX"
f) Reboot again. You should be able to pick either Windows or Linux. Selecting Linux will start GRUB.
Dual-Boot Linux and Windows Vista or 7 with GRUB
Comments for /boot remain the same.
Step 1: Shrink the Windows Drive
The above described procedure Parted will still work with Windows Vista or 7 with the appropriate Parted version. You should still clean up your hardrive and remove and fixed files as described above.
However, the recommended procedure is to use the Windows 7 and Vista Shrink option in Disk Management. Just right-click the volume in Disk Management, select Shrink, enter the amount to shrink by. You can only shrink volumes that use the NTFS file system or have no file system (RAW). Unfortunately, W7/Vista Shrink has the same limitations involving unmoveable files as Parted process described above. In that case, a commercial product like PartitionMagic is recommended. You need a version that will recognize your current OS version NTFS filesystem.
Step 2-3: No change. Decide where you want to install the bootstrap. Note the LINUX default is to replace the Windows MBR so back it up with dd first.
Step 4: Add LINUX to your Windows startup:
For Windows Vista or Windows 7 Boot Manager, use bcdedit as follows (or download bcdeasy):
bcdedit /create /d "Linux" /application BOOTSECTOR
The entry {27385c40-b336-11dc-a4e7-9b7501ef3253} was successfully created.
...... The value in {}, otherwise known as {ID}, cut and paste this value into the below commands:
bcdedit /set {ID} device Partition=c:
The operation completed successfully.
bcdedit /set {ID} PATH \linux.bin
The operation completed successfully.
bcdedit /displayorder {ID} /addlast
The operation completed successfully.
bcdedit /timeout 5
The operation completed successfully.
run bcdedit one more time to check if it was entered.
bcdedit
Real-mode Boot Sector
———————
identifier {27385c40-b336-11dc-a4e7-9b7501ef3253}
device partition=C:
path \linux.bin
description Linux
To remove the LINUX startup: try listing the entries with
bcdedit /enum all /v
And delete it.
bcdedit /delete {ID}:
Recovering the Windows MBR (after writing a LINUX MBR)
- dd restore
- W7- boot install CD into Repair mode:
bootrec.exe /fixmbr
- Vista - boot install CD into Repair Mode
bootrec.exe /fixmbr
bootrec.exe /fixboot
- XP - boot install CD into Repair Mode
fixmbr
- DOS:
fdisk /mbr
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- pc reach for windows setup order form
- servers down gettysburg college
- ch 1 introducing windows xp
- lab 1 1 determine hardware compatibility with windows 7
- performing an attended installation of windows xp
- dual boot linux and windows 2000 windows xp with grub
- how to hack windows xp admin passwords
- answers to end of cse at uc riverside
Related searches
- dual boot uefi and mbr
- fix dual boot windows 10
- how to dual boot windows 10
- how to dual boot windows and linux
- dual boot two versions of windows 10
- windows 10 dual boot ubuntu
- dual boot windows 10 linux
- mint dual boot windows 10
- ubuntu dual boot windows 10
- dual boot mint windows 10
- dual boot mint and ubuntu
- dual boot windows 10 and 7