Link to home
Start Free TrialLog in
Avatar of AllKnowing1
AllKnowing1Flag for United States of America

asked on

Change System Ramdisk Drive Letter in NTLDR

How can I change the system drive letter in BartPE from X: to something else? (Such as R:) I have a program that requires the use of X: and wish to run it in BartPE.

What area of the NTLDR file should I hexedit (if necessary)?

Is it possible to use a plugin for this? (even though the letter is assigned before the GUI?
SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AllKnowing1

ASKER

This is not what I am looking for. There is a simpler way of doing the solution you are posting, but that is for the extra drive in PE. I need to change the SYSTEM drive letter from X: (which is also a ramdrive) (not the temp ramdrive (B:))
Bart PE doesn't use NTLDR to get the system drive letter.  The system drive letter in NTLDR is ALWAYS specified by the REAL physical disk assignment in the BOOT.INI file.

It would almost NEVER be X in windows.  If you are finding that X is the system drive, it is BartPE, not NTLDR.

www.pcguide.com/vb/showthread.php?t=55329
forums.tweakguides.com/showthread.php?t=3296
www.annoyances.org/exec/forum/winxp/1135666163
OK. There is no boot.ini file that I can find in BartPE though. Any suggestions? These are the files I have on the root of my usb drive that boots BartPE: (I am showing all hidden files)

bartpe.iso
ntdetect.com
ntldr
startrom.com
winnt.sif

inside of winnt.sif:

[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=bartpe.iso"
Avatar of Kenneniah
Kenneniah

It's not a setting in BartPE, it's hard coded into Windows PE (BartPE is basically just a customized version of Microsoft's).
http://support.microsoft.com/kb/892846
So my question remains. I have a fully custom build of BartPE and need to not use x: . I need any other drive letter. How do I go about doing this? Copy files from somewhere and replace on my build?
Basically, you can't. Even if you could just change the letter by a hex edit, the PE environment would be messed up due to the hardcoded WMI paths. You have to remember Microsoft made the preinstallation environment for one purpose only.....preinstallation. It wasn't made to be customizable for using troubleshooting tools. While some people (BartPE etc.) have customized it to a degree, they can't reverse engineer Microsoft files (well legally anyway, which would cause the site to be shut down). So in short, it can't legally be done.
I notice all software and other system dependent files point to the environment variable %SYSTEMDRIVE%. I still think it is "legally" possible. If I have no further replies, I will accept your answer Kenneniah. I have noticed many other users have asked this question on BartPE forums. A solution has been found, but I am unable to find working links. Just trying to resurrect a dead topic I guess.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Kenneniah,

I am usually an expert helping people as well. If I am unable to find a solution, I believe someone that puts effort to the answer (not just a link) deserves points. So you will be given the points.

The program is a trending system for streaming data. Very proprietary. I basically need to load DOS, load network support (multiple NIC types), and run a batch file that maps X: Y: and C: (hard drive will be pulled). The drive mappings are the tough part as the ENTIRE system is dependent on x: and virtually unchangeable. If you have another system to load dos with network drivers, that would be an alternate solution. Something with an interface to load network drivers would be wonderful. The entire system simply needs a command prompt though.

Thanks for the help!
After MUCH research, I have found some work arounds. This is for all that are interested. I need further help though.

The NTLDR is referenced with ramdrive.sys both manipulated by setupreg.hiv. Well, you can load this reg hive, import drive letters from a certain device, and unload the hive. Then, inject setupreg.hiv back to your image, load bartpe, and whatever drive letter you give it, voila. This is all perfectly legal. This, however, is a workaround and is device specific.

Here is my theory.

What about loading a ramdrive in dos and giving it a drive letter. unpacking the image file to that ramdrive, then booting to the ramdrive. Would this create an additional drive letter once booted, or would it take its letter from the assigned ramdrive?

Need more help. I think I am getting really close to the solution.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just as an FYI, these are what I've used for DOS boot disks with network support.
http://tdonline.com/bootdisk.htm
http://www.netbootdisk.com/
Thanks Kenneniah. After much headache, I have turned up the method for changing the device letter. However, it becomes device specific. I will award points to Kenneniah for the work he put into this.

I ended up customizing a disk from www.netbootdisk.com as you said Kenneniah. I had done this before your comment. :)  great minds think alike. I had to compile some new .exe's to get everything customized how I wanted it. But all worked out great. Just need to figure out adding new drivers.

Thanks for all the help
Thanks for all of your help. Kenneniah, for your input. ve3ofa, I think you were on the right track. I have abandoned this project after finding a work-around to changing the drive letter.