Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!
Showing posts with label dual boot. Show all posts
Showing posts with label dual boot. Show all posts

Tuesday, May 14, 2013

dual boot on a fakeRAID

http://www.overclockers.com/how-to-dual-boot-windows-and-linux-on-a-fake-raid-array/
This is a guide explaining how to dual boot Windows and Linux off a single RAID array. It was tested with a RAID0 array but it should work with all types.
Editors Note: This guide is for intermediate to advanced users, already comfortable with installing linux and issuing commands in a terminal
Why “fake” raid?
There are three ways to control a RAID array: by hardware, software and “fake”:
  • Hardware is when you have a dedicated RAID card that does all the work, leaving no work for the CPU, therefore yielding the best performance. Since it is connected to the control card, it has maximum mobility – that is, you can transfer the array between system worry-free.
  • Software RAID lets the operating system take care of the RAID array. This should be the easiest to set up and is recommended unless you want to dual boot Linux and Windows off a single array.
  • Fakeraid lets the southbridge control the array, and therefore both Windows and Linux can see and use the array.
There are more ways to install Linux on a fakeraid array, for example using the alternative CD, but I strongly prefer this method:
1. Set up your SATA configuration to RAID in BIOS, save and exit.
2. After the POST screen, a RAID configuration screen should be visible, prompting you to press a key to enter the configuration (CTRL+I in my case). Set up your RAID configuration; this varies between motherboards, so I suggest you look into your motherboard manual if you have problems.
You should now have a working RAID array.
Against the common procedure, we have to install Linux before Windows. This is because Windows partitions the array in a way Linux can’t read, but Windows can read the Linux partitioning.
3. Put in your Linux live CD – I used Ubuntu 9.04 and this should also work on 9.10. I have yet to test it on other distributions, I would love some feedback.
Editors note: This guide uses apt-get commands assuming your using Ubuntu, or an apt based distribution.
4. Boot up the live session.
5. Open up a terminal and type in these commands:
~$ sudo apt-get update
~$ sudo apt-get install dmraid
This will install dmraid, which is required to read the RAID array.
If you are using another kind of RAID than RAID0 or RAID1, you must execute this command
~$ sudo modprobe dm-raid4-5
6. Now, execute this command:
~$ sudo dmraid -ay
If everything is right, your RAID array should show up. I got a message saying it was already enabled, which is good. My RAID array is /dev/mapper/isw_dejihacffa_raid. Yours may vary, so in the rest of your guide adjust “isw_dejihacffa_raid” to what yours is called.
7. Set up the partitioning using gparted (if gparted is not found you must do ‘sudo apt-get install gparted’ first):
~$ sudo gparted
8. Now select your RAID array, isw_dejihacffa_raid. Right click on it and hit “new” – this should opt you to create a partition table. Create the table as ‘msdos’, which will be selected by default. Now right click and “new” again and create an EXT3 or EXT4 partition that takes up half the disk. EXT4 might cause incompatibility with older distros, so you might want to use EXT3. I do NOT recommend having a separate boot partition – I couldn’t get it to boot properly.
9. Now create a NTFS partition on the rest of the drive. If you have less than 4 GB of RAM, I recommend creating a 4 GB SWAP partition at the end of the drive. Now your partitioning scheme should look like this:

10. Apply the settings and close gparted. Now start up ubiquity (install shortcut on desktop).
11. Install as you normally would, and when you get to the partitioning, click manual and edit the EXT3/EXT4. Use it as EXT3/EXT4, format it and set the root as / and if you created a swap partition, edit it and select use as swap.
12. At the last step, click advanced and uncheck “Install GRUB”. We will install grub manually later.
13. Finish installing, now put in your Windows installation CD/DVD.
14. If you are using Windows XP you will need a floppy with your RAID drivers; if you are using Vista you will need a floppy/USB/local folder with RAID drivers; Windows 7 might have your RAID drivers by default.
15. Select your language, click Install Now, and custom. Now select the second partition on your RAID array and install on it. It should install without problems because it was set up correctly as NTFS.
16. Finish installing Windows.
17. Boot into the live CD again.
18. Once again:
~$ sudo apt-get update
~$ sudo apt-get install dmraid
19. Now mount the new Linux install:
~$ sudo mount /dev/mapper/isw_dejihacffa_raid1 /mnt/
20. Bind your /dev, /proc and /sysfs and copy over the resolv.conf then chroot into it:
~$ sudo mount –bind /dev /mnt/dev/
~$ sudo mount -t proc proc /mnt/proc/
~$ sudo mount -t sysfs sys /mnt/sys/
~$ sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
~$ sudo chroot /mnt
21. Now install dmraid and grub:
~$ apt-get update
~$ apt-get install dmraid grub
22. Create the GRUB directory:
~$ mkdir /boot/grub/
23. Copy over the GRUB files to the new grub folder:
~$ cp /usr/lib/grub/x86_64-pc/* /boot/grub/
(Replace x86_64-pc with your architecture if you are using something other than AMD64)
24. Now run grub:
~$ grub
And type these commands, replacing isw_dejihacffa_raid1 with the name of your RAID:
grub> device (hd0) /dev/mapper/isw_dejihacffa_raid1
grub> find /boot/grub/stage1
grub> root (hd0,0)
grub> setup (hd0)
This is assuming that your RAID array is the first drive in the BIOS and will override your MBR.
If ‘fine /boot/grub/stage1′ shows something else than 0,0, for example 1,0, then do ‘root (hd1,0)
25. Now you can create a menu.lst by running:
~$ update-grub
And assuming that you set up Windows as the second partition on the RAID array, you can add it to GRUB by editing menu.lst:
~$ nano /boot/grub/menu.lst
And at the bottom of the file, add:
title                 Windows
rootnoverify (hd0,1)
makeactive
chainloader +1
And if you are running a different RAID than 0 or 1 do this:
~$ echo dm-raid4-5 >> /etc/initramfs-tools/modules
~$ update-initramfs -u
Then add [code]dm-raid4-5[/code] to /etc/modules:
~$ nano /etc/modules
You should now be able to boot into both Linux and Windows residing on the same RAID array when prompted in GRUB.
This guide was heavily based on the Ubuntu Community Fakeraid Guide.

Sydney @ Overclockers Forums

Monday, March 4, 2013

Boot-Repair

http://sourceforge.net/p/boot-repair/home/Home/
simple tool to recover access to your Operating Systems.
  • Easy-to-use (repair in 1 click ! )
  • Free (GPL open-source license)
  • Helpful (Boot-Info summary to get help by email or on your favorite forum)
  • Safe (automatic backups)
  • Can recover access to Windows (XP, Vista, Windows7, Windows8).
  • Can recover access to Debian, Ubuntu, Mint, Fedora, OpenSuse, ArchLinux...
  • Can recover access to any OS (Windows, MacOS, Linux..) if your PC contains Debian, Ubuntu, Mint, Fedora, OpenSuse, ArchLinux, or derivative.
  • Can repair MBR-locked OEM computer boot if the original bootsector has been saved by Clean-Ubiquity
    Automatic backup of MBRs and partition tables during Ubuntu installation. Makes the Ubuntu installer safer.
    Clean-Ubiquity is a small (<100ko addon="" for="" installer="" p="" the="" ubiquity="" ubuntu=""> It automatically performs a backup of the MBR of:
    1) the partition tables of all disks
    2) the MBRs of all disks
    before Ubuntu's installation. No visible change for the user.
    If one MBR is altered by Ubiquity, Clean-Ubiquity links its backup with the UUID of the new OS.
    This special backup can be automatically restored via OS-Uninstaller and Boot-Repair (see https://launchpad.net/os-uninstaller and https://launchpad.net/boot-repair ).
    This can be extremely useful if the computer is MBR-locked. MBR-lock is a system that can be found on some OEM computers with pre-installed Windows. It is (was?) put in place by some manufacturers in order to fight against Windows piracy, by preventing or making difficult the use of a Windows with a different version from the one that was originally on the computer. MBR-lock is now forbidden in some countries (e.g. France), so it should not be on recent computers. Basically, this system uses data written on the motherboard and/or the MBR. If the MBR has been altered (e.g. by GRUB), this system will detect it and prevent Windows (or the entire computer) to boot.
    Clean-Ubiquity needs 2 preseeds integrated during the ISO building.
    Proposal of integration in Ubuntu repositories: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/747279
    Forum: http://ubuntuforums.org/showpost.php?p=10084551&postcount=1
  • Can repair the boot when you have the "GRUB Recovery" error message
  • Options to reinstall GRUB2/GRUB1 bootloader easily (OS by default, purge, unhide, kernel options..)
  • and much more ! (UEFI, SecureBoot, RAID, LVM, Wubi, filesystem repair...)
GET BOOT-REPAIR: whatever the systems installed on your disk, choose one of the 3 methods below:
  • RECOMMENDED: boot on a Ubuntu-Secure disk, choose "Try Ubuntu", and run Boot-Repair via the shortcut at the left of the desktop. Advantages: multi-languages, ok for Wifi, RAID and LVM, 32 or 64bits, based on recent Ubuntu, the 64bits version is UEFI-compatible.
  • OR boot on a Boot-Repair-Disk, choose 32 or 64 bit, Boot-Repair will be launched automatically. Advantages: smaller (~400MB) ISO, 32 AND 64bits compatible. Drawbacks: English only, based on Debian-live so Wifi, LVM and RAID drivers are old.
  • OR boot on a Debian (or derivatives: Ubuntu, Linux Mint...) disk, either normal session, or live-CD, or live-USB. Then install Boot-Repair in it, either via PPA for Ubuntu/Mint, or DEBs for Debian.
USE BOOT-REPAIR:
Launch Boot-Repair, then click the "Recommended repair" button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a paper, then reboot and check if you recovered access to your OSs. If the repair did not succeed, indicate the URL to people who help you by email or forum.
Warning: the default settings of the Advanced Options are the ones used by the "Recommended Repair". Changing them may worsen your problem. Don't modify them before asking advice.
GET HELP: by Email (boot.repair ATT gmail DOT com)
HELP THE PROJECT: Translations, Bug report, Code, Donate (Paypal account:boot.repair@gmail.com)
DISCLAIMER: Boot-Repair is distributed in the hope that it will be useful, but without any warranty. Please be aware that Boot-Repair writes logs&backups on disks, collects anonymous statistics about its use, and creates Pastebin containing basic system data such as partition labels, UUIDs and mount points (just disconnect internet if you want these data remain local).
====================
https://launchpad.net/os-uninstaller
Small tool to uninstall any OS in 1 click !
Small tool to uninstall any Operating System (Windows, MacOS, Ubuntu, other GNU/Linux ..) in 1 click !
Get a CD containing OS-Uninstaller :
OS-Uninstaller is included in Ubuntu Secured Remix, Boot-Repair-Disk and Hybryde NirvanOS.
Install Os-Uninstaller :
OS-Uninstaller can be installed on Debian, Ubuntu and derivatives.
And in any type of session (normal session, or live-CD, or live-USB).
Mailing-list: https://lists.sourceforge.net/lists/listinfo/os-uninstaller-help
Thread on Ubuntu forum : http://ubuntuforums.org/showthread.php?t=1769489
Translate : https://translations.launchpad.net/boot-repair
Debian ITP:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636977

Sunday, June 12, 2011

Threesome OS und Bootsektor zerstört

"Der Startstatus besagt, dass das Betriebssystem erfolgreich gestartet wurde"
windows recovery cd or original then   you know...
   bootsect /nt60 C:\

Quelle"winXP - Vista - Linux  ... dual or threesome boot Projekt"
Ziel: ein normales vista-system auf mehrfach-boot mit windows xp und linux umstellen
Schlechte methode:1.) gparted cd rein und ein paar partitionen erstellen
2.) wildwest alle arten von betriebssystemen installieren, ändern, löschen
3.) wundern warum nichts mehr geht
4.) schwitzen
5.) angst haben, googlen, 40 foren und informationsseiten gleichzeitig öffnen
6.) irgendwie doch noch reparieren und freuen

Nicht so schlechte methode
1.) vollständig defragmentieren (dazu später)
2.) ein backup des vorhandenen systems erstellen
(idealerweise gleich mit acronis oder ähnlichem, da wird der mbr auch gleich mitgesichert)
3.) nachdenken und vernünftig partitionieren (super ist hier gparted):
- vista partition so weit schrumpfen dass noch genug für eventuelle programme, daten, etc bleibt..
- je 1 primäre partition für vista, xp und linux boot partition, eine erweiterte mit partitionen für linux, swap, daten, ...)
-- hier macht sich das defragmentieren bemerkbar, weil das partitionen-verkleinern bei ner defragmentieren platte viel schneller geht
4.) windows xp installieren (achtung: vista wird jetzt nicht mehr starten)
5.) linux installieren: /boot auf die boot-partition, den rest in die linux-partition rein
--; beim start des computers kommt jetzt der boot-manager (z.b. grub)
--; jetz können wir linux oder xp starten
6.) xp booten, mit easyBCD oder VistaBootPro den Vista-MBR wiederherstellen und dazu den eintrg für windows vP und den Linux-Bootmanager zu den einstellungen dazugeben.
Voila - jetzt haben wir im vista bootloader 3 einträge, die jeweils separat startbar sind
anscheindend (noch nicht getestet) soll es sogar schon möglich sein, vista über grub zu starten.
mir war aber die lösung mit 1 eintrag für grub im bootloader lieber, weil mir die struktur so mehr gefällt
- jeweils ein eintrag für vista, xp und linux
- bei der auswahl von linux kommt man dann in den zweiten bootloader, wo man dann die verschieden startoptionen (normal, abgesichert, eventuell mehrere linuxe,.. hat.
Eventuelle probleme die auftreten können:
Problem: nachdem xp installiert wurde hat die vista-partition einen anderen laufwerksbuchstaben. über den bootloader startet es zwar, bekommt aber dann massive probleme (einloggen möglich, aber desktop ist weg, explorer nicht verfügbar, eigentlich geht nix ausser die anzeige von fehlermeldungen)
Lösung:
- vista im abgesicherten modus starten
- regedit starten, in den ordner
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices gehen
- den ordner zur sicherheit exportieren
- den Wert \DosDevices\C: (wo die xp-daten drauf sind) in z.b. \DosDevices\Z: umändern
- die vorhandene vista-partition suchen (die z.b. momentan F ist) und in\DosDevices\C: ändern
- neu starten
--> jetz starten wir unsere windowse jeweils so dass das system-laufwerk C: heisst
Problem: das xp-setup schreibt den mbr nicht richtig, nach dem die daten vom setup kopiert wurden, startet der eigenliche installations-vorgang nicht
Lösung: vor dem setup mit hilfe von ubcd (im menü file-tools/bootloaders/[irgendwas mit smartboot] die vista-partition auf "Hidden" setzen, danach das xp-setup neu starten, nach dem setup die partition mit dem gleichen tool wieder sichtbar machen
problem: easyBCD trägt zwar meine anderen partitionen richtig in das BCD ein, aber der befehl "mbr" schreiben schein nicht zu funktionieren, es startet nach wie vor xp oder der grub-bootloader
lösung: mit der vista-recovery-disk starten und mit der eingabeaufforderung der reihe nach
bootrec /fixmbr
bootrec /fixboot
 ausführen. das sollte den bootloader wieder richtig starten
Problem: ich habe xp und vista oben, möchte jetzt noch linux draufgeben, ohne meinen bootloader neu installieren zu müssen
Lösung: im setup bei der installation des bootloaders nicht die standartoption "bootloader in mbr schreiben" auswählen, sondern "in den ersten sektor der bootpartition"
Besitzt der PC ein BIOS, liest bootmgr.exe die BCD-Datenbank aus und zeigt das Bootmenü. Der BIOS-Nachfolger EFI kann die BCD direkt auslesen.
Bootmgr /bcd
Fehlermeldung:
Bildschirm bleibt schwarz. Der PC hängt, Sie sehen einen schwarzen Bildschirm mit blinkendem Cursor.
Lösung:
BCD-Datenbank erneuern. Bleibt ein Rettungsversuch mit der »Systemstartreparatur« erfolglos, starten Sie die Reparaturkonsole und geben die folgenden Befehle ein:
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /rebuildbcd


LESEN
Quelle
Windows XP stoert die Vista bootloader!
- Vista starten und den Vista Bootloader mit BCDedit oder anderem Programm  entfernen
- mit Paragon Partition Manager oder anderem Programm die XP-Partition inaktiv und unsichtbar machen
- Vista CD einlegen und neu Booten (im Bios CD/DVD-Boot aktivieren)
- Computerreparaturotionen anwählen und Systemreparatur starten
- erneute Systemreparatur ausführen (bootet evtl. durch Fehlermeldung neu)
- wenn der Rechner immer noch nicht bootet dann evtl. mehrmals erneute Systemreparatur durchführen
- Nach der Reparatur "Diagnose und Reparaturdeteils" anzeigen lassen. Wenn ganz unten die Meldung "Der Status besagt, dass das betriebssystem erfolgreich gestartet wurde" erscheint dann neu Starten ausführen, aber vorher die Vista DVD entfernen!
- Wenn Vista immer noch nicht startet dann nochmals DVD einlegen und Systemreparatur durchführen (evtl. mehrmals)
- wenn Vista gestartet ist dann die verstecktet Partitionen wieder sichtbar und aktiv machen
- einen Bottmanager installieren, wenn nicht schon daruf ist, der das jeweils inaktive Betriebssystem verstecken kann (gibt es genug im www)
- Bootmanager konfigurieren
- System starten

Als Bootmanager habe ich den "boot-us" von Dr. Ulrich Straub eingesetzt (Privatanwender kostenlos) Kommerzielle Anwendung 1-Lizenz 15,-Euronen. Die Hotline war hervorragend und sehr schnell (auch am Sonntag). Ich kann diesen Bootmanager nur empfehlen näheres unter http://www.boot-us.de.
Vorsicht mit meiner Anleitung!!!
Ich habe mittlerweile bei meinen 6 Rechnern festgestellt daß jeder Rechner ein Unikat ist und selbst wenn evtl. gleiche Konfigurationen vorherrschen diese sich evtl. anders verhalten. Deshalb kann diese Anleitung nur eine Hilfestellung sein. Ich übernehme für diese Anleitung keinerlei Haftung!

 Werner

Monday, May 9, 2011

No Restore Points in dual-boot configuration

Source
When you use the System Restore feature in Windows Vista, you receive the following message:
No Restore Points have been created on your computer's system disk.
Additionally, only the most recent backup files from Windows Vista Complete PC Backup are available. Earlier versions of the backup files are unavailable. You experience this problem if you are running Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2 on a computer that is also configured to run an earlier Windows operating system in a configuration known as a "dual-boot configuration."
--------
You can use either of the following methods to work around this problem.
Method 1
 To keep Windows XP from deleting restore points of the volume in Windows Vista, add the following registry entry under the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\Offline registry subkey in Windows XP:
Value name: \DosDevices\D:
Type: REG_DWORD
Value data: 1
Note If the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\Offline registry subkey does not exist, you must manually create this registry subkey. Create this registry entry when you have installed Windows Vista on the "D" partition in Windows XP.
Effects of this workaround
After you restart Windows XP, you cannot access the volume that is created in Windows Vista from Windows XP. However, you can still access the volume that is created in Windows XP from Windows Vista. You must use Windows XP drive or an additional drive such as a USB thumb drive for data exchange.
Limitations of this workaround
This workaround only protects the volume in Windows Vista from being accessed or changed by Windows XP. If you have more volumes or if you want to add a volume from Windows XP to the system restore settings in Windows Vista, the system restore (Volume-Shadow-Data) on those volumes will be still overwritten. To avoid this problem, you must add those volumes to the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\Offline subkey. If you add the Windows XP volume to that subkey or if you delete this volume drive letter, you cannot then start Windows XP.
You can use this workaround only when the restore points for Windows XP and for Windows Vista are mutually exclusive. The restore points are mutual exclusive when no restore points are common across the volume in Windows XP or the volume in Windows Vista. For example, consider the following scenario:
  • The C driver is a volume in Windows XP.
  • The D driver is a volume in Windows Vista.
In this scenario, the Windows Vista restore points are added on the E driver. Then, you must change the registry entry of the E driver under the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\Offline" registry subkey to 1.
Also, a common volume can be used for data exchange between Windows XP and Windows Vista. However, restore points must not be defined on this common volume.
Support Status of this workaround
Adding this key can have unwanted side-effects to your installation. For example, applications that put data on this drive before available may fail. If there is a reporting problem reported to Microsoft, you will be asked to delete this value
Method 2
To work around this problem, use the Bitlocker feature on the volume in Windows Vista.
Bitlocker is a built-in security feature in Windows Vista. When Windows Vista starts, the Bitlocker feature should be enabled on the Windows Vista volume on which Windows Vista restore points are enabled. When Windows XP or Windows Server 2003 starts, the Windows Vista volume on which the Bitlocker feature is enabled is inaccessible. Therefore, the Windows Vista restore points are intact.
This workaround works for dual-boot configurations (Windows XP or Windows Server 2003 together with Windows Vista).This workaround requires no changes to Windows XP. Therefore, the volume in Windows Vista is still inaccessible when the system is started in Windows XP or in Windows Server 2003.
Note The Bitlocker feature is available for Windows Vista Enterprise Editions and for Windows Vista Ultimate Editions.

Information for advanced users
Consider the following scenario. A shadow copy is created on a volume in Windows Vista or in Windows Server 2008. Then, you access the volume from an earlier Windows operating system. In this scenario, the shadow copy is deleted. You experience this problem if one or more of the following conditions are true:
  • You use Windows Vista or Windows Server 2008- based system in a dual-boot configuration with Windows XP or with Windows Server 2003. In this scenario, any restore points that have been created in Windows Vista are lost when the computer is started in an earlier Windows operating system. Additionally, shadow copies that were created in Windows Server 2003 are lost when the computer is started in Windows Vista or in Windows Server 2008.
  • You create Windows Vista restore points on an internal hard disk or an external hard disk. Then, you move the hard disk to a computer that is running Windows Server 2003 or Windows XP.
  • You use an internal hard disk or an external hard disk to store Complete PC Backup files, and you then access the volume from either Windows Server 2003 or Windows XP. In this scenario, all earlier versions of the backup files are lost. Only the most recent backup files are still available.
This problem occurs because the volume snapshot driver that is included with Windows Vista and with Windows Server 2008 uses disk structures that are incompatible with earlier versions of Windows. Therefore, the earlier operating system deletes Windows Vista shadow copies or Windows Server 2008 shadow copies together with the associated restore points. This behavior occurs because the earlier Windows operating systems do not recognize the new disk structures.

Notes
  • In Windows Vista, shadow copies are used to maintain restore points. Additionally, shadow copies are used to maintain Complete PC Backup files. Therefore, when you access the volume from an earlier operating system, the restore points or the earlier versions of Complete PC Backup files are lost.
  • Although Windows Server 2008 does not include the System Restore feature, Windows Vista and Windows Server 2008 use shadow copies for other purposes, such as for backups. Windows Vista and Windows Server 2008 also delete shadow copies that are created by earlier versions of Windows.
    Therefore, after you use the earlier version of Windows to start the computer in a dual-boot environment, no restore points are available to the System Restore feature when you next start Windows Vista.

Dual-Boot Problems

Source
Unfortunately, as a result of the convoluted process used to load Windows NT through XP/2003 up and running, there is plenty of room for confusion and error.

The Boot Process

Regardless of what your booting - and even what bootloader you are using - the basic boot process starts off in the same way. When you power on your PC, the BIOS is loaded which first detects and initializes basic hardware, then loads a small amount of binary code stored in the MBR of the primary boot disk. The MBR then loads some more binary code in the bootsector of the active partition on that same disk. The code in the bootsector is then run, which typically loads a binary file from the root of the same active partition, which typically presents the user with a menu of operating systems to boot from (assuming there is more than one) and proceeds to boot into the selected OS.... usually by loading yet another binary file which initializes the environment bringing the machine out of real mode and into protected mode with virtual memory and launches the kernel. The first part of this procedure is depicted below:

NTLDR, NTDETECT, and BOOT.INI

While the new Windows Vista/7 bootloader (known as bootmgr) can load Windows Vista and up directly 1 , it doesn't know how to start up older versions of Windows. As a work around, Microsoft configured bootmgr to load the old NTLDR boot menu, which will then display its own list of legacy operating systems, according to boot.ini. NTLDR then loads the older version of Windows. NTLDR is stored in the root of the FAT16, FAT32, or NTFS partition set as active and primary. This 16-bit program calls up several other files that need to be in the same root directory of the single active partition on the primary boot disk that carry out of the different tasks needed to get your system up and running:

Once NTLDR has finished calling these child processes, it will display a second menu which gives you a choice of which Windows NT-based operating system to load. If there is only one such legacy entry, no menu will be displayed.
  • NTLDR uses a file called NTDETECT.COM to detect and configure access to the various hardware components of your machine. Without NTDETECT.COM, NTLDR cannot access your hard drives and load Windows. NTDETECT.COM must be present in the root of the active partition on disk 0, together with BOOT.INI, or else Windows XP will fail to load.
  • A file called BOOT.INI stores information regarding the physical location(s) of your various Windows NT-based installations. NTLDR accesses this file to get a list of the installed operating systems and display them in the on-screen boot menu for the end user to pick and OS to load into.
Can you detect the problem in this design? Hint: what happens if you try to add a second Windows XP entry to the mix? Keep in mind that there's only one active partition on disk 0, and that one and only one boot.ini may exist at a time. NTLDR can't get its list of operating systems from anything other than the boot.ini on the active partition on disk 0, so if you add another operating system to the mix, you end up with something like this:

Basically, you have to go through a two-level boot menu, and you cannot - however hard you try - add both Windows XP entries to the main bootmgr boot menu. In order to load either of the two XP entries, you'll need to select the NTLDR entry (called "Legacy Entries" by default) from the bootmgr/bcd boot menu, and then select the copy of Windows XP you wish to boot into from the second menu presented by NTLDR.
EasyBCD and EasyLDR Annoying, right? With EasyBCD 2.0 though, there is a solution. We've developed our own version of NTLDR, and bootmgr will load a separate copy of EasyLDR for each Windows XP entry in the menu. Each copy of EasyLDR is configured to boot into one and only one copy of Windows XP, so your complicated two-level boot menu in the previous picture boils down to a much simpler and prettier result:
Keep in mind that since there's only one entry in each EasyLDR instance, no second menu will ever appear. Selecting the first Windows XP entry in the top-level BCD menu will directly load the first copy of Windows XP and selecting the second Windows XP entry in the top-level BCD menu will take you directly to the second copy of Windows XP, with no additional menu or action in between. EasyLDR sits quietly and invisibly in the middle, making sure everything works as expected.
The Mechanics of NTLDR and EasyLDR As mentioned before, NTLDR and EasyLDR need several other files to do their job correctly. While NTLDR/EasyLDR can be located anywhere, they will only look for their helper files and read their configuration from the root of the active partition on disk 0. As a result, the disk that EasyBCD shows is the location of NTLDR/EasyLDR and not the disk that Windows XP is located on. EasyBCD supports the creation of both standard (NTLDR) entries and its own custom EasyLDR ones. The type of entry created depends on whether or not the "autoconfiguration checkbox" is selected when adding a new Windows XP entry in EasyBCD 2.0 and above (see the next section for more info).
NTLDR

When a new NTLDR-based entry is created, EasyBCD creates the following files:

In this case, boot.ini will contain one or more entries in the standard boot.ini format. In case the boot partition (the active partition on disk 0) is not assigned a drive letter, the NST folder and its contents will be created on the system disk, while NTDETECT.COM and BOOT.INI will still be placed on the unmounted boot partition.

EasyLDR

When a new EasyLDR-based entry is created, EasyBCD creates the following files:

Each ebcd.00x file in the diagram above is a boot configuration file that tells EasyLDR from which partition to load Windows XP. To keep things simple, ebcd.00x files are in the same exact format as BOOT.INI, but only contain the information for a single Windows XP entry. In case the boot partition is not assigned a drive letter, the NST folder and its contents will be created on the system disk, while NTDETECT.COM and the ebcd.00x files will still be placed on the unmounted boot partition. Each easyldrX file in the NST folder corresponds to a single ebcd.00X file in the root of the boot drive (the opposite also holds true). And each ebcd.00X file corresponds to one and only one Windows NT/XP install.
Adding a Windows XP entry with EasyBCDCreating a new Windows XP entry with EasyBCD is very easy. By default, EasyBCD will create a Windows XP entry via the NTLDR method described above in order to minimize confusion and because most users will not have multiple legacy entries alongside their Vista/7 installs. However, creating a EasyLDR-based entry is also simple, and only a checkbox away.
NTLDR

NTLDR-based entries require you to only point and click. Just enter a name for the new entry that will appear in the boot menu, and click "Add Entry" and EasyBCD will automatically create the needed boot files. NTLDR will be placed in the NST subfolder as shown above, and NTDETECT will be placed in the root of the boot partition. EasyBCD's "BootGrabber.exe" helper module will scan all mounted partitions for legacy NT-based installs (Windows NT through 2003), and automatically generate a boot.ini that contains all detected legacy installations:
When viewing entry details/settings, EasyBCD will show the drive letter that the NST folder is on for Windows XP entries. This is the drive that the BCD menu should load either NTLDR or EasyLDR from, and not the drive that Windows XP is installed on. Do not change this path, it won't do any good and will stop BOOTMGR from correctly loading NTLDR/EasyLDR, preventing Windows XP from loading!
General Troubleshooting Guidelines
  1. Make sure EasyBCD's Windows XP entry points to the "system" drive and that it has NTLDR, NTDETECT.COM, BOOT.INI in the root directory. You can grab those files here.
  2. Quadruple-check your BOOT.INI [operating systems] list. Make sure the default entry matches one of the entries in the [operating systems] list. Make sure rdisk(x)partition(y) points to the right partition that Windows XP is installed to.
  3. Make sure you only have one copy of NTLDR, NTDETECT.COM, and BOOT.INI on your system. Having multiple copies leads to lots of confusion as to which files you should edit and check.
  4. Make sure you selected "Windows XP" from the drop-down menu in EasyBCD's Add/Remove Entries section when you added XP to the Vista bootloader. If you kept it at the default option ("Windows Vista/Longhorn Server"), Windows XP will never boot.
Specific Error Messages
NTLDR is missing or corrupt (or one of its variants) 
Windows Boot Manager has experienced a problem.
File: \ntldr
Status: 0xc000000f
Info: The selected entry couldn't be loaded because the application is missing or corrupt.
As this error message says, NTLDR could not be located. Make sure the Windows XP entry in EasyBCD points to the system drive and keep in mind that this is not necessarily the same as the drive that Windows XP is installed to.
If the drive is correct, make sure NTLDR and NTDETECT.COM exist in the root partition. If they don't or if they're corrupted, you can download them here.

After choosing to boot into Windows, I get a black, blank screen.
This means that NTLDR was found, but NTDETECT.COM wasn't.
Grab it here.
winload.exe is missing or corrupt
Windows Boot Manager has experienced a problem.
File: \windows\system32\winload.exe
Status: 0xc000000f
Info: The selected entry couldn't be loaded because the application is missing or corrupt.
You added a Windows XP entry without setting the "Type" drop-down box in EasyBCD to Windows XP. Delete this entry, go back to the Add/Remove Entries section, and re-create it. This time, make sure to set its type to Windows XP before doing so.
ntoskrnl.exe is missing or corrupt

"Windows could not start because the following file is missing or corrupt:
\system32\ntoskrnl.exe.
Please re-install a copy of the above file"
This means the ARC paths in the [operating systems] section or the default entry in BOOT.INI is incorrect. Double-check that multi() and disk() are both set to 0, and verify that rdisk(x)partition(y) points to the correct partition where Windows XP is installed. Instructions on the correct configuration of boot.ini can be found here.
Hal.dll is missing or corrupt

Windows\System32\Hal.dll missing or corrupt:
Please re-install a copy of the above file.
This means the ARC paths in the [operating systems] section or the default entry in BOOT.INI is incorrect. Double-check that multi() and disk() are both set to 0, and verify that rdisk(x)partition(y) points to the correct partition where Windows XP is installed. Instructions on the correct configuration of boot.ini can be found here.
Windows could not start because of a disk hardware configuration problem

Windows could not start because of a computer disk hardware configuration problem. Could not read from the selected boot disk.
Check boot path and disk hardware. Please check the Windows documentation about hardware disk configuration and your hardware reference manuals for additional information.
This means the ARC paths in the [operating systems] section or the default entry in BOOT.INI is incorrect. Double-check that multi() and disk() are both set to 0, and verify that rdisk(x)partition(y) points to the correct partition where Windows XP is installed.
Generally speaking, this particular error message means that the partition referenced in the ARC paths in boot.ini does not exist, so check the partition() number first. If you're sure the partition() value is correct then try different rdisk() values until you get a working configuration. Further instructions on the correct configuration of boot.ini can be found here.
I get a BSOD when I boot into Windows XP

Congratulations! As hard as it may be to believe, this means your dual-boot is working just fine. Unfortunately, after EasyBCD successfully starts to load Windows XP, it crashes. This can be caused by using an imaged copy of a Windows XP installation from another PC, a hardware mis-configuration, or one of the zillion other BSOD-causing problems. Your best bet is to perform an in-place upgrade/repair install of Windows XP and/or ask for help in our friendly forums.

Thursday, September 30, 2010

nVidia RAID configuration and Windows 7

forums.techarena.in/vista-setup-install/1128278.htm
The infamous Grub error! When installing which distro? ubuntu or  another? you inadvertently allowed Grub to be installed onto the array instead of seeing it installed to the new sata drive you added in.
When installing Grub where any Windows installations are present on one of the drives with Linux going onto a separate hard drive you use the custom option when reaching the partitioning section to designate the root as the "/" mount point and simply click on the Linux drive when asked where Grub will be installed. That will generally leave the Windows mbr intact.
The bootrec /scanos command at the prompt while booting from the Vista dvd was the correct method to start with. Once answering Y for yes and seeing the installation shown successfully added message you then use the Fixboot and Fixmbr commands to correct the Vista mbr seeing the Grub entries removed. You may have to do this a few times to actually see Windows booting normally again.
booted into the Windows Recovery Environment and did the following:
X:\Sources>
bootrec /rebuildbcd
  Scanning all disks for Windows installations.
  Please wait, since this may take a while...
 Successfully scanned Windows installations.
 Total identified Windows installations: 1
  [1] C:\Windows
  Add installation to boot list? Yes(Y)/No(N)/All(A):Y
  *Element not found.*
So what's 'Element not found.'?

The element not found is when the rebuild tool is unable to detect the installation presently on the system. That can be for different reasons like the order you type the commands in. 
Try typing the bootrec /scanos entry before using the bootrec /rebuildbcd
Once successfully added you simply type the bootrec /fixmbr and /fixboot commands.
Another option if the BCD store itself isn't able to be rebuilt is to delete the present one. The second section seen on the MS page for this is at 'Error message when you start Windows Vista: "The Windows Boot Configuration Data file is missing required information"'
http://support.microsoft.com/kb/927391
The easier commands to use at the command prompt are:
bcdedit /export C:\BCD_Backup (C being used here for the single OS/system drive)
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /RebuildBcd
-------------
Are you loading the RAID controller driver in the recovery environment?
--------------
There's a freeware BCD editing tool recommended by an article titled "'Tech Solution: Vista Boot Error 0×000000f (C:\boot\BCD)'
(http://alextaldren.wordpress.com/2008/12/27/tech-solution-vista-boot-error-0x000000f-cbootbcd/)"
that may be just what you need there along with the repair tools. 'Tech Solution: Vista Boot Error 0×000000f (C:\boot\BCD) « The AT Wire'
alextaldren.wordpress.com/200...000f-cbootbcd/)
Shortly after Vista's initial release I ran across the free tool mentioned there available at 'Download EasyBCD 2.- NeoSmart Technologies'
neosmart.net/
The general documentation for use is seen at 'List Pages - Tree View -NeoSmart Technologies Wiki'
neosmart.net/wiki/pages/listp...ageInHierarchy
For the problem you are seeing there however there's a page seen with other commands to enter for seeing the boot loader repaired in the last section called "Step Four: Nuclear Holocaust" seen at 'Recovering the Vista Bootloader from the DVD - NeoSmart Technologies Wiki'
neosmart.net/wiki/display/EBC...r+from+the+DVD
The NeoSmart Forums' 
---------------
It looks that way since that would clean everything up. Most of the commands are assuming that Vista is on a single drive not an array. That would be something to consider as well. When correcting a ubuntu glitch some time back that trashed the Vista mbr the quick the use of the bootrec commands at the prompt saw the Grub error taken care of. But that was with Vista on one single drive.
--------------
Did you attempt to reinstall Vista back onto the array or the new sata drive you added in? It sounds like you left the boot drive for the array left default in the bios setup even if you installed over ubuntu on the new sata drive you added in. The fast method is to look at which drive is set as default there.
The first thing to look at when setting up a dual boot of simply two versions of Windows if not two OSs is just which drive is set as default especially when adding a new drive onto the system. That includes  external usb hard drives and usb flash drives at times since the new drive will tend to offset the order.
Now you have to find out which drive or paritition/drive saw the fresh install go to and see that set as default since the original host drive still sees the altered mbr info on that.
----------------------
One way I saw a working dual boot with ubuntu was to first unplug the Vista drive after running into the same Grub error problem. Once ubuntu went on an extra drive at the time and the Vista was plugged back later I first saw the root partition made the "/" mount point seeing Grub installed to that drive.
Later I simply used a free tool called EasyBCD to see the Linux entry
added in with one item definitely checked off namely the "Grub isn't installed into bootsector" box.
(http://www.freeimagehosting.net/imag...1f29de8af9.jpg
Hosted by FreeImageHosting.net Free Image Hosting Service
You can still see ubuntu work. But you have to play it smart in order to prevent the Vista mbr from being trashed while doing it.
--------------------- 
Got it fixed! :D
What I ended up doing was using KillDisk to completely erase the SATA drive, then I unplugged the SATA drive so as not to 'confuse' the windows recovery environment. Then I ran startup recovery, fixmbr, and fixboot, and then I could boot into Vista successfully. After this, I plugged the SATA drive back in and formatted it and everything's back to normal--and a little faster too, since I have a clean install of Vista.
I think I've had enough of trying to dual boot--for awhile at least, especially since I use this computer for school!
Thanks, NightHawk, for your prompt replies and all. I'll have to get someone who can physically look over my shoulder and help me out when I decide to pursue Linux again! But not for a little while. Hope this thread helps anybody else out having similar issues
======================
How to safely update the nForce SataRaid drivers of a running Vista x86/x64
Warning: The update of the nForce IDE (S-ATA/RAID) drivers is dangerous, because this is a severe modification of the system with a lot of changes within the registry. There is always the risk, that the reboot into Vista will fail after the update. Exactly this is the main reason why I suggest to load the newest/best available nForce IDE drivers during Vista Setup.
Advice: Before you are going to update any mass storage controller driver, you should do a backup of your running Vista partition by using a tool like Acronis True Image.
If you are going to update the nForce SataRaid drivers and just follow the advices of Vista's driver update pop-up windows, you probably will get a BSOD.
Warning: DON'T REBOOT UNLESS YOU HAVE UPDATED ALL NVIDIA SATA AND RAID DEVICE DRIVERS (even the usually hidden ones)!
Here is the exact procedure (detected by TheMaxx32000) for an update of the nForce S-ATA and RAID drivers:
  • Open the "Device Manager", select "View" and check the "Show hidden devices" option.
  • Search for devices named "NVIDIA nForce Serial ATA Controller" (within the "IDE ATA/ATAPI Controllers" or "Storage Controllers" section) and update ALL listed devices with the said name by loading the SATA_IDE driver folder of your prepared new nForce driver package. DO NOT REBOOT!
  • Open the "Storage Controllers" section and update ALL listed the "NVIDIA RAID Controller" devices and ALL listed devices named "NVIDIA RAID DEVICE" by loading the SATARAID driver folder of your prepared new nForce driver package. DO NOT REBOOT!
  • Check the driver version of all previous mentioned devices to verify, that all of them have properly updated drivers.
  • NOW YOU CAN REBOOT.
  • Have fun with the updated nForce S-ATA and RAID drivers.
Notice:
1. If you are trying to load any modded or not yet WHQL certified driver, you have to force the driver update by choosing the "Browse my computer ...." - "Let me pick ...." - "Have Disk" options. Otherwise Vista will give a message, that it has already installed the best driver software.
2. If you want to update just the RAID driver, you have to do all steps shown above except the second one.[/list]

Sunday, August 16, 2009

Dual OS Installation of WindowsXP 32-bit/64-bit

Source
Page 1: Dual OS Installation of WindowsXP 32-bit/64-bit
Page 2: Why do I need a second partition?
Page 3: Installing Windows XP x64 Edition as a dual-boot
Page 4: Dual OS Installation 101
Page 5: Enjoy your dual 32-bit/64-bit system!
Page 6: Un-doing a 32/64-bit dual-boot
Page 7: Editing the Boot.ini file

If you'd like to keep Windows XP x64 Edition installed, but want the 32-bit version of XP to be the default operating system selected at bootup, open the BOOT.INI file as described above and replace the multi(0)disk(0)rdisk(0)partition(1) settings of the 'default=' line with those of the 'Microsoft Windows x64' line. Your BOOT.INI file should now look something like this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\Windows="Microsoft Windows x64 " /fastdetect

Microsoft Windows XP 32-bit will now load by default.
------------------------------------
wrote:

1. Boot from Windows XP32 CD; select new installation.
2. On the screen that shows the disks and their partitions, the drive letters will be C: and E: on the first disk, and D: and F: on the second disk, because Setup enumerates primary partitions first, then logical drives in the extended partition.
3. Install in the first partition on the second disk.
Do you want to? If you use Microsoft dual boot, all four partitions will be visible.
If you install into the default Program Files folder, there won't be any conflicts.
As long as you don't do anything stupid, you'll be fine.
--------------------------------
Use boot manager to dual-boot between 32- and 64-bit
Serdar Yegulalp, Contributor

The most commonsense way to transition between 32- and 64-bit editions of Windows is to dual-boot between the two systems. However, even though both are versions of Windows (and in theory they're the same versions of Windows), they install different boot tools that may render dual-booting difficult.

The 32- and 64-bit editions of Windows use two files loaded at boot time to recognize Windows system files: NTLDR and NTDETECT.COM. The 32-bit Windows edition of these files only recognizes 32-bit editions of Windows—or, rather, it can only correctly boot 32-bit editions of Windows. The 64-bit boot loader can recognize 32- and 64-bit editions of Windows.
As a result, if you install the 64-bit edition on a given system and then install the 32-bit edition in such a way that the boot files are replaced, you'll no longer be able to boot to 64-bit Windows unless the boot files are repaired. This can be done from the 64-bit Recovery Console with the FIXBOOT and FIXMBR commands.
However, a better option is to use a third-party boot manager to segregate each edition of Windows onto its own separately-booted partitions. This way the boot loader for each OS is kept discrete, and they won't overwrite each other.
One program I've used myself is Terabyte Unlimited's BootIt Next Generation. (The program costs very little per-seat to use and also comes in a free trial version.) Using a program like this, you can install 32-bit Windows on one partition, temporarily mark it as inactive, install 64-bit Windows on the other, and then use BootIt to choose which partition to start from at boot time.
Note: Windows Vista, in both its 32- and 64-bit editions, has a new boot-loader mechanism that is apparently even less user-friendly then the existing BOOT.INI system.
----------------------------------------
How-to-hide-partitiondrive-in-Windows
Dual boot with Windows XP and two separate Linux installations

Monday, June 15, 2009

Dual boot probs: XP & 2k3

Source (remastered)
The boot partition in M$-speak is where the OS resides ie. winnt/windows folder.
The system partition is where the master boot record points to and contains ntdetect, ntldr and boot.ini.
In M$DOS days it was exactly the opposite. Boot files where the boot partition and where the OS was, was called system partition.

Windows 2003 in D: and reinstallation of Windows XP on C: instead of an installed Windows 2003
XP has since been running flawlessly, though win 2003 on D: will not boot any longer, that is, i see the dual boot screen, but if i go for win 2003, it will try to boot up, but at the precise moment when the moving win2003 logo (that moving bar from left to right) should show up, the PC reboots, leaving me no option other than boot in win XP.

All the important boot files from D: win2003 are on C:, so when you redid it, you killed them and that's why 2003 on D: no longer boots. You can likely fix this by doing a "Repair" of Win2003.
So when you formatted you erased the boot related files of Win2003. Now XP was the lone owner of the pc world.
To get the 2003 master boot record back you run the 2003 recovery console command FIXMBR.

To fix the 2003 versions of ntldr and ntdetect of win2003 on C: (over winXP)
Start the Win2003 installCD and when give the choice between new or repair, you will choose repair.

After this you should be able to multiboot both OS's. If there is a issue it will be with the boot.ini.
Either use the recovery console Bootcfg utility to autocorrect the boot.ini or manuall edit it:
Add the following line to c:\boot.ini of winXP and try to boot in Windows 2003:

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows 2003 Server" /fastdetect

It assumes that win2k3 is installed on Partition 2 on your first harddrive.
If it doesn't work restart the windows 2003 installation CD, after first reboot remove the Windows 2003 Disk & edit boot.ini & add the above line.

Wednesday, May 20, 2009

Install and boot 145 OS in a PC

How to install and boot 145 operating systems in a PC

This is the "howto" I promised to write after this thread.
The 145 systems are:-
3 Dos
5 Windows
137 Linux
I have also installed most of the PC-based BSD and Solaris together with a Darwin x86 too but these systems dislike to co-exist with a large number of other systems so I have to keep them off in another PC until I find a way to tackle the technical issues. (edited : latest arrangement in Post #32, #33 and #34)
There are only 3 steps in this howto.

Step 1 – A simple hardware scheme
An operating system needs to reside in a home. That is a partition to me. I used 2x300Gb Pata disk and 2x200 Sata Disk to set up 152 partitions. I always put one operating system in one partition. As an extended partition of each hard disk has no storage of its own, one data-only partition is needed for my personal data, another data-only partition to house the common boot loader and one Swap partition is needed for all the Linux I ended up losing 7 partitions leaving 145 partitions to house the 145 operating systems.

Step 2 – A simple boot scheme
I put Grub in a data-only partition, created a boot menu to boot all the partitions before any of the operating systems was installed. When a partition is filled the system inside becomes bootable instantly. This scheme is dead simple, technically sound, perfectly applicable is every situation but can be viewed unconventional to some PC users. For those who know nothing about Grub it is just one of the two boot loaders commonly used in Linux. The other one is called Lilo possibly used by less than 40% of the Linux distros at the begining of 2007.
In a nutshell I use this Grub to boot up the boot loader of any of the 145 systems that I choose to use. Afterward it is the duty of the second boot loader that brings up its master.

Step 3 – A simple installation scheme
It is really simple. I just installed each system inside a single partition. For MS systems there is more work as I had to install each as a stand alone system so that it always boot to a “C” drive. I then moved the disks with the MS systems to the final position and edit Grub's menu file to boot it back to a “C” drive status.
My scheme depends every system having a boot loader inside its root partition. This is inherent in every MS systems and other operating systems that rely on booting from a bootable primary partition. For Linux it is an optional choice.

Hardware used
The PC is a self-assembled unit using the cheap components available. Nothing to write home about. Just average for an ordinary PC user say 5 years behind the latest technology as this is all I can afford.
Motherboard : Asrock 939NF4G-SATA2
CPU : AMD 939 64 +3200
Ram :1025Mb
Video : Onboard integrated NV44 graphics DX9.0 VGA
Hard disk 2x300Gb Maxtor 133/Mb/s Pata Diamond Max 10
2x200Gb 150Mb/s Sata-I Maxtor Diamond Maxline III
Sound card : SoundBlaster 5.1
Network card : Generic Realtek 8139 10/100 Entrnet
Keyboard : Generic PS/2 keyboard
Mouse : Generic PS/2 mouse

Essential tools
(1) A bootable Grub floppy or a bootable Grub CD.
(2) A Linux Live CD. Ideally one that has Grub inside.
(3) A Dos 6 or above bootable floppy with fdisk.exe inside
(4) A Win2k or XP installation CD
For the production of the Item (1) above and how to use the rest see the last link of my signature.

Partition tables
Here is the details of the partitioning scheme as output by “fdisk-l” Linux command.
Code:
Warning: omitting partitions after #60.
They will be deleted if you save this partition table.

Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 122 979933+ 16 Hidden FAT16
/dev/hda2 123 244 979965 16 Hidden FAT16
/dev/hda3 245 366 979965 16 Hidden FAT16
/dev/hda4 367 36483 290109802+ 5 Extended
/dev/hda5 367 609 1951866 82 Linux swap
/dev/hda6 610 1217 4883728+ 83 Linux
/dev/hda7 1218 1825 4883728+ 83 Linux
/dev/hda8 1826 2433 4883728+ 83 Linux
/dev/hda9 2434 3041 4883728+ 83 Linux
/dev/hda10 3042 3649 4883728+ 83 Linux
/dev/hda11 3650 4257 4883728+ 83 Linux
/dev/hda12 4258 4865 4883728+ 83 Linux
/dev/hda13 4866 5473 4883728+ 83 Linux
/dev/hda14 5474 6081 4883728+ 83 Linux
/dev/hda15 6082 6689 4883728+ 83 Linux
/dev/hda16 6690 7297 4883728+ 83 Linux
/dev/hda17 7298 7905 4883728+ 83 Linux
/dev/hda18 7906 8513 4883728+ 83 Linux
/dev/hda19 8514 9121 4883728+ 83 Linux
/dev/hda20 9122 9729 4883728+ 83 Linux
/dev/hda21 9730 10337 4883728+ 83 Linux
/dev/hda22 10338 10945 4883728+ 83 Linux
/dev/hda23 10946 11553 4883728+ 83 Linux
/dev/hda24 11554 12161 4883728+ 83 Linux
/dev/hda25 12162 12769 4883728+ 83 Linux
/dev/hda26 12770 13377 4883728+ 83 Linux
/dev/hda27 13378 13985 4883728+ 83 Linux
/dev/hda28 13986 14593 4883728+ 83 Linux
/dev/hda29 14594 15201 4883728+ 83 Linux
/dev/hda30 15202 15809 4883728+ 83 Linux
/dev/hda31 15810 16417 4883728+ 83 Linux
/dev/hda32 16418 17025 4883728+ 83 Linux
/dev/hda33 17026 17633 4883728+ 83 Linux
/dev/hda34 17634 18241 4883728+ 83 Linux
/dev/hda35 18242 18849 4883728+ 83 Linux
/dev/hda36 18850 19457 4883728+ 83 Linux
/dev/hda37 19458 20065 4883728+ 83 Linux
/dev/hda38 20066 20673 4883728+ 83 Linux
/dev/hda39 20674 21281 4883728+ 83 Linux
/dev/hda40 21282 21889 4883728+ 83 Linux
/dev/hda41 21890 22497 4883728+ 83 Linux
/dev/hda42 22498 23105 4883728+ 83 Linux
/dev/hda43 23106 23713 4883728+ 83 Linux
/dev/hda44 23714 24321 4883728+ 83 Linux
/dev/hda45 24322 24929 4883728+ 83 Linux
/dev/hda46 24930 25537 4883728+ 83 Linux
/dev/hda47 25538 26145 4883728+ 83 Linux
/dev/hda48 26146 26753 4883728+ 83 Linux
/dev/hda49 26754 27361 4883728+ 83 Linux
/dev/hda50 27362 27969 4883728+ 83 Linux
/dev/hda51 27970 28577 4883728+ 83 Linux
/dev/hda52 28578 29185 4883728+ 83 Linux
/dev/hda53 29186 29793 4883728+ 83 Linux
/dev/hda54 29794 30401 4883728+ 83 Linux
/dev/hda55 30402 31009 4883728+ 83 Linux
/dev/hda56 31010 31617 4883728+ 83 Linux
/dev/hda57 31618 32833 9767488+ 83 Linux
/dev/hda58 32834 34049 9767488+ 83 Linux
/dev/hda59 34050 34657 4883728+ 83 Linux
/dev/hda60 34658 35265 4883728+ 83 Linux

Disk /dev/hdc: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 122 979933+ 16 Hidden FAT16
/dev/hdc2 123 730 4883760 1c Hidden W95 FAT32 (LBA)
/dev/hdc3 731 3162 19535040 17 Hidden HPFS/NTFS
/dev/hdc4 3163 36483 267650932+ 5 Extended

/dev/hdc5 3163 3770 4883728+ 83 Linux
/dev/hdc6 3771 4378 4883728+ 83 Linux
/dev/hdc7 4379 4986 4883728+ 83 Linux
/dev/hdc8 4987 5594 4883728+ 83 Linux
/dev/hdc9 5595 6202 4883728+ 83 Linux
/dev/hdc10 6203 6810 4883728+ 83 Linux
/dev/hdc11 6811 7418 4883728+ 83 Linux
/dev/hdc12 7419 8026 4883728+ 83 Linux
/dev/hdc13 8027 8634 4883728+ 83 Linux
/dev/hdc14 8635 9242 4883728+ 83 Linux
/dev/hdc15 9243 9850 4883728+ 83 Linux
/dev/hdc16 9851 10458 4883728+ 83 Linux
/dev/hdc17 10459 11066 4883728+ 83 Linux
/dev/hdc18 11067 11674 4883728+ 83 Linux
/dev/hdc19 11675 12282 4883728+ 83 Linux
/dev/hdc20 12283 12890 4883728+ 83 Linux
/dev/hdc21 12891 13498 4883728+ 83 Linux
/dev/hdc22 13499 14106 4883728+ 83 Linux
/dev/hdc23 14107 14714 4883728+ 83 Linux
/dev/hdc24 14715 15322 4883728+ 83 Linux
/dev/hdc25 15323 15930 4883728+ 83 Linux
/dev/hdc26 15931 16538 4883728+ 83 Linux
/dev/hdc27 16539 17146 4883728+ 83 Linux
/dev/hdc28 17147 17754 4883728+ 83 Linux
/dev/hdc29 17755 18362 4883728+ 83 Linux
/dev/hdc30 18363 18970 4883728+ 83 Linux
/dev/hdc31 18971 19578 4883728+ 83 Linux
/dev/hdc32 19579 20186 4883728+ 83 Linux
/dev/hdc33 20187 20794 4883728+ 83 Linux
/dev/hdc34 20795 21402 4883728+ 83 Linux
/dev/hdc35 21403 22010 4883728+ 83 Linux
/dev/hdc36 22011 22618 4883728+ 83 Linux
/dev/hdc37 22619 23226 4883728+ 83 Linux
/dev/hdc38 23227 23834 4883728+ 83 Linux
/dev/hdc39 23835 24442 4883728+ 83 Linux
/dev/hdc40 24443 25050 4883728+ 83 Linux
/dev/hdc41 25051 25658 4883728+ 83 Linux
/dev/hdc42 25659 26266 4883728+ 83 Linux
/dev/hdc43 26267 26874 4883728+ 83 Linux
/dev/hdc44 26875 27482 4883728+ 83 Linux
/dev/hdc45 27483 28090 4883728+ 83 Linux
/dev/hdc46 28091 28698 4883728+ 83 Linux
/dev/hdc47 28699 29306 4883728+ 83 Linux
/dev/hdc48 29307 29914 4883728+ 83 Linux
/dev/hdc49 29915 30522 4883728+ 83 Linux
/dev/hdc50 30523 31130 4883728+ 83 Linux
/dev/hdc51 31131 31738 4883728+ 83 Linux
/dev/hdc52 31739 32346 4883728+ 83 Linux
/dev/hdc53 32347 32954 4883728+ 83 Linux
/dev/hdc54 32955 33562 4883728+ 83 Linux
/dev/hdc55 33563 34170 4883728+ 83 Linux
/dev/hdc56 34171 34778 4883728+ 83 Linux
/dev/hdc57 34779 35386 4883728+ 83 Linux
/dev/hdc58 * 35387 35994 4883728+ 83 Linux
/dev/hdc59 35995 36483 3927861 83 Linux

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 6315 9767520 83 Linux
/dev/sda3 6316 6923 4883760 83 Linux
/dev/sda4 6924 24792 143532742+ 5 Extended
/dev/sda5 6924 7531 4883728+ 83 Linux
/dev/sda6 7532 8139 4883728+ 83 Linux
/dev/sda7 8140 8747 4883728+ 83 Linux
/dev/sda8 8748 9355 4883728+ 83 Linux
/dev/sda9 9356 9963 4883728+ 83 Linux
/dev/sda10 9964 10571 4883728+ 83 Linux
/dev/sda11 10572 11179 4883728+ a9 NetBSD
/dev/sda12 11180 11787 4883728+ 83 Linux
/dev/sda13 * 11788 12395 4883728+ 83 Linux
/dev/sda14 12396 23916 92542401 c W95 FAT32 (LBA)
/dev/sda15 23917 24792 7036438+ 83 Linux

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1216 9767488+ 7 HPFS/NTFS
/dev/sdb2 1217 1338 979965 1b Hidden W95 FAT32
/dev/sdb3 1339 1460 979965 83 Linux
/dev/sdb4 1461 24792 187414290 f W95 Ext'd (LBA)
/dev/sdb5 1461 2676 9767488+ 83 Linux
/dev/sdb6 2677 3892 9767488+ 83 Linux
/dev/sdb7 3893 6324 19535008+ 83 Linux
/dev/sdb8 6325 8756 19535008+ 83 Linux
/dev/sdb9 8757 11188 19535008+ 83 Linux
/dev/sdb10 11189 13620 19535008+ 83 Linux
/dev/sdb11 13621 16052 19535008+ 83 Linux
/dev/sdb12 16053 18484 19535008+ 83 Linux
/dev/sdb13 18485 20916 19535008+ 83 Linux
/dev/sdb14 20917 23348 19535008+ 83 Linux
/dev/sdb15 23349 24792 11598898+ 83 Linux
My hda has partitions hda61, hda62 and hda63 but they are not shown by fdisk program.
Continued with next post
__________________
Last edited by saikee; 04-08-2009 at 04:45 PM.
Technical details
Hard disk considerations
Most MS systems are designed to reside in a primary partition and there can be a maximum of four of 4 primaries in each hard disk. To get more partition a user “must” give up one primary to turn it into an extended partition. In Linux a Pata (or IDE) disk can have 63 partitions maximum and the limit of a Sata or SCSI disk is 15.

The number of partition plus the whole disk itself make up 64 and 16 devices repeactively.
(Updated note: Since the publication of this thread Linux kernel 2.6.20 and newer have ceased to support Pata disk names and the 63 partitions limit, stated in the blue text above, is no longer supported. Please read Post #21 for further explanation)

Latest 8 Apr 09 - Kernel 2.6.28 and later have decided to breach the maximum 15 partitions per hard disk. The number of partitioins is currently open-ended. This is because the number of logical partition in a hard disk, since Dos era, is also bottomless. However the individual software has not yet been updated to cope with the new changes. The 130+ partitions have not been rejected by MS systems and Linux with the new kernel. More information will be offered later.

An extended partition also consume a device name but cannot be used for storage because it is just the border defining the beginning and the finishing points of the logical partitions.
Linux can be installed and booted from either a primary or a logical partition so it pays to give the primaries to MS systems that dependent on them.
Linux always name the first logical partition as the 5th partition in any hard disk. Therefore theoretically in a Pata disk, say a hda, the maximum usage is hda1, hda2 and hda3 as the primaries, hda4 being the extended partition holding a maximum 59 logical partitions inside (from hda5 to hda63).
In practice some Linux programs stop to display beyond the 60th partition and some distros, like those from the Red Hat family, do not show partitions beyond the 15th, even the distros itself has been installed beyond this limit.
The maximum number of partition one can get out of 2 Pata and 2 Sata is 2*(63+15)= 156. Thus I could have 4 partitions more if I want.

The partitioning scheme
I let the MS systems to have all the primary partitions and Linux are house mainly in logical partitions. One swap, also in a logical partition, to serve all the Linux. For BSD and Solaris systems I use separate hard disks.
As a rule I always install an operating system in a single partition. It is easier to maintain, to boot and to understand. It may not the optimum solution but it works in every Linux I installed.
Here are the partition sizes I allocate to each system
(a) Dos in 1 or 2Gb (primary, type fat16 or fat32)
(b) XP and Vista in 25Gb and 20Gb (primary, type NTFS)
(c) For Win2k I used 15Gb (primary, type NTFS)
(d) For Win98 I used 5Gb (primary, type fat32)
(e) Linux 5Gb (majority) and 10Gb ( say for a few for big distros) (logical, either Ext3 or Reiserfs filing types)
(f) One swap 1 Gb common to all Linux
(g) Personal data 95Gb large fat32

Actual sizes can be seen in the fdisk -l output in Post #1.
I use exclusively one Linux partitioning tool “cfdisk” and use “fdisk” as a second check. Both programs are standard tools in a Linux Live CD. I specify the partition type number of 83, 82, 6, c and 7 for native Linux, swap, fat16, fat32 and ntfs partitions respectively. In using cfdisk for partitioning the partition type is 83 by default and this is recognised by every Linux installer.
I never format the partitions myself as every installer wouldn’t trust me and likes to format its own home.
At a later date I started to use a free partitioning tool called “gparted” which has been branched into “Parted Magic”. They are available as free downable iso files that could burn into a CD.
I believe it is a good strategy to have the partition ready and in the correect partition type so that it is recognised by the system installer. If you you make life easier for the installer. In return it will give musch less trouble.

The mother of all booting schemes - Grub in a data-only partition
This is really my suggestion and is completely unnecessary to a normal Linux user, who can lay his/her hand on the first Grub he/she comes across and make this Grub to do all the things I say below. However my proposal carries the following advantages if taken up
(1) Grub is not attached to any operating system and so it can be used manually as a mini operating system.
(2) Every operating system can be booted indirectly (known as chain loading) using an identical set of commands with only difference in the partition reference. It works for all the operating systems regardless it is a Dos, Windows, Linux, BSD or Solaris.
(2) Every MS system and Linux can control Grub if it is installed in a partition, say type fat16 or fa32, which every system can read, write and alter its boot menu.
(3) Grub is the only boot loader that can be arranged to boot a partition even before its is created, formatted and installed with an operating system. That has to be the coolest thing in booting.
(4) The data-only partition, where Grub resides, has no operating system inside but can be booted by any Linux. Any Dos or Windows MBR can also boot this Grub if it is housed in a “primary” partition with the bootable flag set active.

It should be understood that I propose to install Grub “WITHOUT” being attached to any operating system! Grub cannot read a ntfs filing system so it should be installed into a fat16 or fat32 partition. I put it in the 3nd partition of my 1st Pata disk. In Linux it is known as hda3, as my 1st, 2nd, 3rd and 4th disks are hda, hdc, sda and sdb respectively.

To install Grub into a data-only partition involving the following steps
(A) Format the data partition first say in fat16 format. Best way is boot up a Linux Live CD, click terminal mode and issue the command for formatting a partition hda3 in fat16
Code:
mkdosfs –F16 /dev/hda3
Alternatively the partition can be formatted by a Dos floppy, downloadable from Bootdisk.com, in a Dos command prompt with command
Code:
format c:/
, assuming any partition before hda3 is non-Dos or hidden.

The use of Fat16 is deliberate because with such a filing system a Dos cannot address hard disk beyond 2Gb, cannot recognise a Sata but we can still use Grub there to boot 145 systems in the PC.
(B) The next task is to get hold of 3 files Grub needs for installation. They are called stage1, stage1.5 and stage2, which are held together in a directory, and are available in any Linux Live CD that supports Grub. So just boot up a Live CD and ask Linux to report to you their position by command
Code:
find / -name stage1
you will find these files are typically held in the following directories

Red Hat, Fedora C2 to C6
/usr/share/grub/x86_64-redhat/stage1
/usr/share/grub/i386-redhat/stage1

Mandriva
/lib/grub/i386-mandriva/stage1

Mandrake
/usr/local/lib/grub/i386-pc/stage1
/usr/lib/grub/i386-pc/stage1


Suse
/usr/lib/grub/i386-suse/stage1

Gentoo, Knoppix, Mepis, Xubuntu, Ubuntu, Kubuntu, Debian
/lib/grub/i386-pc/stage1


Frugalware, Kanotix
/usr/lib/grub/i386-pc/stage1

Next stage is to create a temporary directory in the directory /mnt of the boot-up Live CD Linux, mount the data-only hda3 partition, create /boot/grub directory inside it, copy all the Grub’s stage1, stage1.5 and stage2 files into it, invoke a Grub shell, setup Grub in the MBR and exit. Using Ubuntu CD as an example the commands would be
Code:
mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3
mkdir /mnt/hda3/boot
mkdir /mnt/hda3/boot/grub
cp /lib/grub/i386-pc/* /mnt/hda3/boot/grub
grub
root (hd0,2)
setup (hd0)
quit
On a reboot the hda3 will be booted to a Grub prompt and nothing else. This indicates Grub is now in charge of the MBR, linked to partition hda3 and is controllable by the configurator file always named “menu.lst” if there is one in the /boot/grub or /boot directory of hda3. When Grub can't find it it defaults to a Grub prompt.

Note some versions of Grub, especially in the Red Hat family, can be modified to read "Grub.conf" instead.

Although the Grub Manual does not claim it but it is in my experience no PC operating system cannot be booted by a Grub prompt. It doesn’t look much at the first sight but there is seldom something so simple can be so powerful.

(C) Now is the time to write a menu to boot 145 systems. It is just a text file must named menu.lst to be stored in the subdirectory /boot/grub. Grub boots each system iy 3 lines as follow:-

A “title” statement to display the name of the system in the screen. Any ttext after the word "title" is displayed and has consequence to the booting except to remind you what the system is.

A “root” statement specifies the root of the operating system. This means the partition the target system residing. Grub counts everything from 0 so to boot a system at the 9th partition of the 2nd disk is “root (hd1,8)”. Similarly (hd0,0) mean the 1st partition of the 1st disk.

A “chainloader” statement which always ends with “+1”.

So you see there is nothing to it. Even a simpleton like me can cope with this.

Being lazy I wrote a small program to generate the booting menu because it is just doing 4 loops, each loop per hard disk in my case.

Therefore my menu.lst initially will look like this
Code:
title Empty @ hda1
chainloader (hd0,0)+1

title Empty @ hda2
chainloader (hd0,1)+1

title Empty @ hda3
chainloader (hd0,2)+1

title Empty @ hda4
chainloader (hd0,3)+1

and so on
The menu is edited whenever I wish to update it with the name of the operating system replacing the word “Empty”. Life could be so simple except the MS systems which needs extra work. That I shall go into later.

The simplified installation scheme
Linux is easy to install so I describe it first.
Linux rarely need to defrag its filing system because it makes use of a scratch area call swap. Thus a swap partition is needed for the first Linux system. Thereafter all the other Linux will proceed to use it without saying a thank you. There is nothing needed done except to create it using the Linux cfdisk program, to the size about twice the physical memory, and select it partition type as 82. Every Linux installer will know how to use it. Some insist on checking it, others ask you for permission to format it and many don’t even tell you what they do with it. I create one in partition hda5 so whenever an installer asks for it I just respond with “hda5”.

In the installation of every Linux we can “instruct” the installer to place Linux in any partition we want. This is done by nominating a single partition to mount the root or “/” of the Linux. If no more than one partition is given to an installer it will place a Linux's directories of /boot, /home, /usr…..as subdirectories to "/" inside the single partition, stacking them back to back so that you only need to worry only if the accummulative content starts to excced the overall partition capacity.

The choice of the boot loader, usually either Lilo or Grub, is immaterial to the proposed scheme.
When it comes to the location of the boot loader it is another matter. Every Linux installer would let the boot loader installed either in (a) the MBR or (b) the root partition of the Linux being installed. My proposed scheme “ONLY” works if the latter is chosen. Some naughty Linux could omit giving you a choice and steals the MBR position. You could also having tea and press the wrong button to lose the MBR. In such a case you can claim the original MBR back again by booting up the Live CD (with Grub inside), click terminal and fire these commands to restore Grub
Code:
root (hd0,2)
Setup (hd0)
which literally asking Grub to “source” the necessary file from the specified root and install itself in the whole of disk (hd0) and that could only be the MBR.

A word of caution on Linux’s ability to be installed/booted at high-number partitions or beyond 137Gb barrier in a hard disk

The systems that I arranged can all be booted as per menu.lst. Some older distros will have difficulties to recognise partitions higher than 16, not anticipating device names for high-number partitions and can’t access beyond 137 Gb in the hard disk. These distros have to be installed at the lower-number partitions and inside the first 137Gb of the hard disk. If you find a distro refuses to boot or install take a look at my menu.lst and check the partition position it is known to work.

Dos and Windows systems

There are many ways to install MS systems. For simplicity, ease of control and maintenance I recommend each system to be installed in a “C” drive as a stand-alone independent system. This is to say no dual booting among the MS systems by NTLDR. I have a mobile rack system so I can pull out all the other hard disks and leave only one to install a MS system. Thus every MS system in my case was installed as the first bootable disk. Once installed I do not change its partition position but can put hard disk in other positions. Grub has a facility to re-map the hard disk order on-the-fly and gives back the first bootable disk status to a MS system.

To install a MS system in a “C” drive means there should be no partition recognised by the installer except the partition for installation so it can rightfully claim the first partition status. If there is a partition the MS can recognised, say a Dos partition, then this can be overcome by hiding it, using the Live CD again. If one wants to hide the first disk’s 1st partition, unhide the 2nd partition and make it bootable for a MS system the command in Grub prompt are
Code:
hide (hd0,0)
Unhide (hd0,1)
Makeactive
Hiding a partition in a PC doesn’t physically hide the partition away. It just alters its partition type number. Normally a digit “1” is added. Thus if a fat32 and ntfs partition with type c and 7 will become invisible to a MS system when the type number is altered to 1c and 17 respectively. To unhide it is to strip off the digit “1”. It is the oldest trick in a PC, invented at the time Dos was the de facto operating system, to allow a user to bootmore than one operating system.

A MS system may need its own MBR for an installation. It has come to my notice that the MS systems share a common MBR. This MBR's function is to search each of the 4 primary partitions and load the one with the booting flag switched on.

As an example these are brief steps of how I installed Windows Vista in hdc3

Removed disk hda, sda and sdb disks and slide hdc into the rack previously occupied by hda. The original hdc3 partition is know as (hd0,2) to Grub.

Boot up a Dos floppy and restore the MS MBR into the hard disk by command
Code:
fdisk /mbr
Boot up a Grub floppy and hide the first two partitions and then check disk geometry
Code:
hide (hd0,0)
Hide (hd0,1)
Geometry (hd0)
The geometry command is to check everything is in order before installation. Hda3 should have already been created with sufficient space in type 7 for ntfs filing system.
Install Windows Vista and select the 3rd partition for its home.
Check Vista working satisfactory on a reboot after installation.
Power down the PC, add the hard disk that is intended for the permanent home for the Vista, say this is a slave drive called hdc already has in the third primary position a partition with identical size as hda3, insert a Live CD, boot up the system and clone the Vista system across by root terminal command
Code:
dd if=/dev/hda3 of=/dev/hdc3 bs=32768
I then power down again, restore all the hard disk, boot up a Live CD again and use it to amend the /boot/grub/menu.lst in hda3 with the following entries for booting hdc3 partition
Code:
title        Vista @ hdc3
root (hd1,2)
hide (hd0,0)
hide (hd0,1)
hide (hd0,2)
hide (hd1,0)
hide (hd1,1)
unhide (hd1,2)
makeactive
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
The two map statement instructed Grub to swap the (hd0) and (hd1) position so that when Vista boots it will find itself still in the first bootable disk as per the original installation. The 5 hide statements are necessary to hide the 5 Dos and Windows partitions which if Vista picks up can upset its “C” drive status.
I used the same principle on every other MS systems and managed to get 3 Versions of Dos and 5 versions of Windows in the same PC. More MS systems can be accommodated but these are all I got.

Ending notes
My original intention was to learn Linux, understand how it work and be able to boot it. It was a huge surprise to see how easy and logical in a Linux world. It almost seems everything I could not understand how a computer works, after all these years with MS systems, suddenly become comprehensible in Linux when the inner working of the system is a published public knowledge.

People can say anything they like about Linux but my 2.5 years with it has taught me using one of the oldest partition (fat16) to house an obsolete boot loader (as the Grub described here is known as the Grub legacy that the GNU/Grub maintainers had already declared cesation of support to move their effort to the new Grub 2 at the time I started Linux) to boot the 145 operating systems I can access. The scheme is laughingly simple.

I am hugely indebted to many GNU/Linux volunteers who unselfishly maintain and develop the open source software. I come to know some of them could risk litigations from the money-grabbing corporation because their effort has reduced our dependency on the commercial software.
From the 2.5 years into Linux I witnessed a huge leap in functionalties and user-friendliness in Linux. I am also inspired by so many nations contributing efforts in bringing this operating system to the public. Many of their distros are technically outstanding.