I'm having Windows 7 64-bit installed in my Lenovo G580 and due to capability problems i decided to installed Windows XP 64-bit and after completing text mode installation it restarted, i was installing from bootable pendrive, when i started 2nd GUI installation i got an error "NTOSKRNL.EXE not found. Than i thought of booting into windows 7 but my laptop still boots into half-installed Windows XP and shows me some errors related to HDD capability, i know its related to changing the mode from AHCI & Capability mode but i'm wondering where is Primary OS windows 7?
Why its not showing option to select the OS even after hitting F8, i still have only Windows XP listed there.

If you changed the SATA mode in the BIOS settings after Windows 7 was installed, that's the reason for your problem. You have to re-install Windows 7 if you change the SATA mode from what it was when Win7 was installed. Or change the SATA mode back to what it was when Win7 was installed.
XP 64-bit wasn't well supported not to mention it's over 10 yrs old & nearing it's end of support life. Why would you bother? Your problems are related to the lack of SATA drivers for XP (you should have slipstreamed them into the disc in advance), plus you've screwed up the boot loader. Try this:
Thanks its fixed now used this "bootsect/ nt60 C:
Win7 boots nowbut can you people teach me how can i use both OS in my laptop?
Please answer the question - what is the purpose of installing an outdated, poorly supported OS?
Quite simply, install the older OS first. XP doesn't know anything about the win7 service partition and overwrites it in the MBR.
Install & run XP in Virtual Machine instead of Dualbooting. Goin' Fishin' (Some day)
So if i format windows7 than install XP and than install Windows7 i will get the option to choose the OS everytime i boot? I dont want virtual machines they are horribly slow and does not has a support for Directx
How can i integrate AHCI drivers in windows xp installation steup, i have nlite but its asking for .inf file and i have .exe file in my laptop's drivers CD
Not sure what you mean by format win7 first. You're going to go with NTFS, and XP will handle that as well as 7. For simplicity I would use a boot disk to create and format the partitions before the disk ever saw windows, but you can resize the partitions with the 7 installer if you wish. Win 7 will recognize all previous windows versions and give you the opportunity to boot to them. You can customize the boot menu after the install. As for the .exe driver, try opening it in 7 zip and see if the .inf is extractable.
i found my AHCI drivers & its working but now when the text mode of installation completes & when the laptop reboots, i face an error ntoskrnl.exe is missing and when i debug it its I\O error. I'm fu***d up of this but i want XP.
Completely wipe the HDD of all partitions. Create at least 2 new partitions - one for XP, one for Win7. Install XP 1st, preferrably using a newly created XP disc with the SATA drivers slipstreamed into it. Once XP is installed, updated & running OK, pop the Win7 disk in the drive, do NOT boot off it! Wait for the disc to spin up & the menu to appear, then direct Win7 to install to the 2nd partition. The boot menu will be created automatically.
If you need to integrate sata drivers into windows XP, why not give nlite a try.. here is a tutorial made by someone else who did the same thing - just replace the drivers he is using with your own extracted ones
I managed to install windows XP but now i have no option to select between windows XP & 7 Windows 7 boots up by default
