Windows 7, I want to change disk controller but can't get it to work... - Page 1
Forum section: electronics / general

author: Rick Law
author_rank: Super Contributor
timestamp: February 14, 2023, 04:29:45 am
content: This is long because I know a question should be accompanied by what has been tried...I am sure I am not the first to run into this issue. The issue is simple but finding a working solution has me stumped.I want to switch the disk controller mode on a Win7 laptop. The disk controller can run in RAID or ACHI mode -- switch in BIOS setting. I can't switch it while Window is running, so no easy "auto hardware detection and load driver". Both modes run properly when Window is loaded on the corresponding mode. Windows initial-setup using ACHI uses the generic "Windows Standard ACHI Driver". Windows initial-setup under RAID (with single disk non-raid) will use the Intel driver provided with the recovery CD. Post initial load, changing controller mode causes blue screen when loading CLASSPNP.I tried a lot of approaches and so far all ends with blue screen.My experiments lead me to think -- I need to de-link the boot disk device with it's former controller and then link it a different a different disk controller. But thus far, I can't get it done. Everything I've done so-far ends up in blue screen. (I reload the partition/volume image so each trial uses a fresh image of the working OS with RAID. With clean image reloaded before trial, each time is a "clean error" instead of error on top of prior errors.)This are the "what have I tried so far" and a question at the end:What I can't figure out is how to delete the controller in device driver, so it can reboot and detect the boot disk, and install the generic ACHI driver.Windows 7 initially setup was with RAID. I want to change it to ACHI. With mode switching done via BIOS setting, I can't change it with windows running and let it detect driver change.- Change mode to ACHI, simply run the Windows set up disk to repair and it will merely resets it back to raid controller (drivers as well) and it blue screens on boot.- Using windows setup disk "boot repair" to load the generic Microsoft ACHI Standard Driver (by hunting down the inf and all the dot-sys files to make it into a hardware install disk) -- I got the driver loaded but that doesn't help. The boot process continue to use the RAID controller for booting and blue screen (during CLASSPNP loading). It hits because the RAID controller is not there (in ACHI mode).- First run as RAID and use the working Window OS to delete the RAID controller - that cannot complete because rebooting (within the driver hardware delete process) will re-detect the RAID again in reboot and recreate the RAID controller.- Switching the controller mode during this delete+rebooting process also doesn't work It will just blue screen (and requires Windows set up to "repair" which return device driver to RAID controller).- Deleting the driver files (using another machine with this boot disk connected as another drive) and then reinsert as boot - blue screen hits. Hope is, it will boot far enough to detect no-RAID but detects ACHI controller and load ACHI driver to continue. No, that hits blue screen on CLASSPNP. Running Windows7 setup disk's repair will make it back to RAID and blue screen under ACHI mode.It appears to me that the bootmgr know the boot device and the boot device is tied to a specific hardware device (RAID), and it therefore loads the driver for that boot drive controller (now absent since it is in ACHI mode) and therefore blue screens before anything else can be done.May be a mass delete with regedit of all mounted volumes and the boot-device (currently define in the registry for use by bootmgr) would work?If so, I don't know the registry keys that define the tie between boot-device defined in bootmgr and the controller, and what other registry keys may need elimination.Suggestions and help are welcomed. Thanks

author: LateLesley
author_rank: Frequent Contributor
timestamp: February 14, 2023, 05:24:06 am
content: I take it you'll be getting the infamous STOP: 0x0000007B bluescreen when you change it?I've ran across this when trying to change from IDE to AHCI mode, and there's a couple of tweaks you need to do before you change it in the BIOS.https://us.informatiweb.net/tutorials/it/windows/windows-7-switching-from-ide-to-ahci-without-reinstalling-windows.htmlThat has instructions for changing from IDE to AHCI, but I'd wager that it would work in your case too, changing from RAID.So maybe give that a try, and see how it goes.

author: Rick Law
author_rank: Super Contributor
timestamp: February 14, 2023, 03:31:14 pm
content: Thanks for that clue! Setting up machine to give it a try. Will update if it works or not.EDIT (update 2/14/2023):That didn't work,yet. However, I am convinced registry hacking is the right path to follow -- particularly now I that know the key names in the registry to control the driver loading, I can experiment.Since I am using RAID, so besides the iaStorV, I have a few more iaStro entries in Services. I plan to reload Windows with AHCI mode plus intel's drivers while under AHCI. This will allow me to see how the registry is set up for those other isStroX files when using AHCI but also loaded with RAID drivers. I did that before but I am space-crunch, so I could not save an image of that. New disks coming, soon, I have room to experiment easier...

author: LateLesley
author_rank: Frequent Contributor
timestamp: February 15, 2023, 12:08:17 am
content: actually, I just had a thought. you had it set up as RAID...that means if you had more than one drive, your data will be striped across drives, unless it was raid 1. You might need to back up all the data off the drives, and then rebuild from scratch. Any other type of raid, 0,5,6, spreads data across different drives, so if you were using the drives in a RAID pool, there's no way to change them to AHCI mode without losing data and repartitioning/reformatting them. With mirroring (RAID 1) there is a chance you could get it working in AHCI mode, but you might need to do some boot sector stuff for that to work too.What a lot of people miss, is drives when they are set up, get 2 boot sectors, they have the disk boot sector, with partition table info, then each bootable partition gets its own partition boot sector, and both need to be right for a drive to boot. Or at least that's kinda my understanding, it's been a while now, since I jumped to linux after Win 7.Anyway, you might need to do a combination of fixing the Master Boot Record, the MBR, and Also the BCD Boot Configuration Data to finally get it all working. It may be easier to backup, repartition, format, and reinstall.IF you want to check the MBR and BCD, here's a couple of links.https://neosmart.net/wiki/fix-mbr/#Fix_the_MBR_in_Windows_7https://neosmart.net/wiki/bcdedit/#BCDEdit_on_Windows_7

author: philwong5176
author_rank: Unknown
timestamp: February 15, 2023, 01:29:36 am
content: https://superuser.com/questions/471523/changing-from-raid-to-ahci-and-windows-7-will-not-boot

author: Rick Law
author_rank: Super Contributor
timestamp: February 15, 2023, 09:16:00 pm
content: Quote from: LateLesley on February 15, 2023, 12:08:17 amIt has only single SSD, using the RAID mode - so the RAID controller automatically set the disk as non-RAID. I thought I might use the RAID someday when I initially set up (de-bloat) the machine with the recovery-CD (no-bloat). Now some my apps can no longer be activated (supplier long since gone) and it only works in this RAID controller based image...I am aware that the MBR has it's info and partition boot sector has it's info.Just in case you are curious... I normally has MBR and three bootable partition going:P1 = A small DOS/WinXP PXE -- this one needs ATA mode to run WinXP-PE, a home made version BART-PXE with Server2003 base instead of XP base. This is my problem fixing/re-imaging partition.P2 = Second partition (p2) is my normal working Win7x64, and...P3 = my "for-experimenting" oneP4 = extended partition serving my data-storage needs.I am still using PQ-Magic's PQBOOT (win32, works in Win7x64) to switch between booting partitions. At this moment, I have P2 being RAID and P3 being AHCI, both bootable with proper controller setting in BIOS.This funny 3-bootable partition habit came from my pre-retirement days. P3 (experimental) is usually use for the version of windows of different locality to verify that stuff my department produces work in different "local versions" of Windows. I keep the habit of having an "experimental version" even now: When I visit or download strange things, I can lock down the other partitions and have a reasonably separate OS to test that strange things.I was impatient. I said I wanted to wait for new drives before I dive further...Instead, I again wipe my working partition and use that for experiment last night. P2=RAID to be changed, P3=AHCI working, and use regedit (load hive from the other) to determine what to edit.Following the clues (from the link) you laid down earlier, I hunted. The said \hklm\...\services editsdidn't bring fruit. Matching the StorA, StoreF, StoreV. msahci and pciide (between RAID boot and AHCI boot) settingswas still was not enoughto do it.So I know there is more I need to hunt for...This new reply below resets my next step!Quote from: philwong5176 on February 15, 2023, 01:29:36 amThanks indeed, one more to track.May be the one this article points out is the missing one...HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\atapi\Start(I use Intel chip set, so the AMD chip set one probably doesn't apply)Time to switch P2 back as "play partition" and see if I can make this fellow boot (after last nights experiment, I have P2 loaded back as my day-to-day working partition)...This is somewhat a pointless exercise -- other than wanting to keep my post-retirement mind working on something more interesting - unlike another boring to-do's like fixing the broken toilet flush chain...Thanks again, guys... Works or not, thank-you both!This keeps my life interesting.If this still doesn't work, I am going to do my next thing, which would be both bare-bone newly loaded partitions, one with RAID and the other one with AHCI, and then compare...================EDIT:(Update an hour or two later after this reply was first posted)HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\atapi\StartThat was the missing key indeed - Saved me having to load a basic Win7 for both RAID & AHCI to compare key settings on each.Now I don't have to keep using the RAID mode with a single disk! That is what I wanted.So, (for intel chip set), I have to change- iaStorA- msahci- atapi- pciide (which was indicated in the first linked article as necessary for ATA to AHCI, but not needed in this case. Wont harm, but not necessary)Thanks Again!!!

author: 2N2222A
author_rank: Regular Contributor
timestamp: March 11, 2023, 07:12:24 pm
content: I believe you can create a new hardware profile for the other mode. If you do get it to work, on profile can be for AHCI and the other for RAID.It also helps when editing the registry. That way you still have one good configuration in your default hardware profile.You could reinstall Windows on a different hard drive in AHCI mode. Then copy the relevant registry sections from the other hard drive over to the AHCI hardware profile on your current Windows when you put the original hard drive back in.I think changing from AHCI to RAID may actually change the Vendor:Product ID of the storage controller.One solution is an add in PCI card to boot from temporarily during the change. It gets installed first, then the hard drive is moved to it. In your case a non RAID hard drive may need to be put on it, and all the files copied over to a new C drive, since your software RAID hard drive may be in a different format. The registry files will need to be copied using a boot CD or such. They can't be copied from within Windows. Now the built in storage controller can be changed and redetected, and the hard drive can be moved back over.

author: Rick Law
author_rank: Super Contributor
timestamp: March 11, 2023, 08:31:50 pm
content: My system cannot "store" different profiles. My "final" (final since Win7 is EOL-ed) "clean but with all-must-have-apps" image now has both AHCI and RAID enabled. Now I wont be shocked by the "recovered image wont boot!!!" That was what started my quest -- I reload an older image just to "quickly" copy off some stuff turned to spending a couple of days trying to figure out why this image doesn't boot...Image from this point forward, upon image reload, I can regedit it so it runs either or set it as AHCI or RAID matching BIOS setting or leave it as is.This could have been done by merely leaving myself a note. But in doing so, besides having better understanding, having spend a few days figuring out how to do both/either RAID/AHCI is helpful in ensuring I remember -- trouble of older brains, it seem to forget things quicker and a few days of hunting solutions makes it harder to forget. The joy of understanding/solving a problem is however very satisfying.So, thanks again for helping me solve this puzzle.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 11, 2023, 08:45:59 pm
content: I was wondering what your goal was exactly but your last post makes it clearer.Note that if a recovered Win 7 image does not boot, you can usually make it bootable again by running the repair tool (boot from the Win 7 install media, DVD or USB). Not as convenient for sure, but quick enough.

author: Rick Law
author_rank: Super Contributor
timestamp: March 12, 2023, 12:58:59 am
content: The DVD recovery tools with the install disk works most of the time, but it is confusing.Often, after install dvd recovery fix, I am presented with 2, 3 or even > 4 entries of "Windows 7 Professional (Recovered)" and I have to guess which one works. I think this is perhaps because (a) It has been "fixed" many times before as I change disc drive or partition and (b) I have more than one Win7Pro partitions on my machine (typical use, test, and a third for a specific downloaded app that I only run with everything else hidden).At times, the recovery fails - may be after an earlier "wrong guess" of the 3 or 4 choices, something on disk changed.The time I spend resolving that boot issue far exceeded what I can expect to save even with the slow 0.001x cd boot speed. But, understanding what actually cause the blue screen is worth it.With the last image, I took the time to "fix" one more thing - bcdedit to remove all the outdated/unuse entries.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 12, 2023, 01:14:33 am
content: Sometimes you also need to run bcdedit to get the standard Win 7 boot animation back after cloning a Win 7 partition. I don't remember the exact command. Otherwise you get the old boot screen with a progress bar, not that it makes much difference though. Just a minor cosmetic issue.

author: Nusa
author_rank: Super Contributor
timestamp: March 12, 2023, 03:33:27 am
content: The one and only time I had to deal with that was right after an install where nothing else was on the machine yet. I solved it just by reinstalling windows 7 from scratch again.

author: Rick Law
author_rank: Super Contributor
timestamp: March 12, 2023, 05:42:00 am
content: The good thing about knowledge is: one can expand from it.In this process of learning to AHCI instead of RAID, I learned to "dual boot" regardless BIOS setting for AHCI or RAID. With that, I also figure out that I don't even need to run "Install disc's boot recovery" when I migrate an image to from one MBR disk drive to another MBR disk drive.Before migration, run DiskPart to change the current disk signature in the MBR to match the new MBR disk. Then run BcdBoot to make it boot based on that MBR. With both old and new disks having the same signature, now image it and that image will just boot on the new MBR disk.Now I can actually eliminate a lot of old images - the "before" and "after" that I made when I upgraded disks. I just need one.For old images that I may not even have the drive anymore, I can still get the MBR signature by running regedit from install DVD. The mounted devices will tell me what disk signature for "C drive" was. DiskPart can then be use to set the new drive to match.I only tested it for MBR drives, that is what I am still using - MBR makes partition change and drive change so much easier and that fits my usage pattern a lot better.