Nakatomi2010 Posted April 7, 2006 Posted April 7, 2006 There have been cases where when I can't Ghost a system so I begin a Windows XP install on a system and then boot into a PE when it reaches the GUI phase (After the boot sector is created)...I know I can use Diskpart to create the partition at a command prompt, and use XCopy to copy the contents of a drive, so I was wondering how to go about creating a boot sector from a PE would be done through a command prompt...My hope is to eliminate the need to have to do the "Install XP" step and just do everything in one fell swoop...
LLXX Posted April 8, 2006 Posted April 8, 2006 There is a fixboot command that writes a boot sector to the drive.If you already have a boot sector that you want to use, there are some small programs that will read/write the boot sector - they're meant to be run in pure DOS, so I'm not sure if they'll work under XP command prompt. Google should find them, if not I can quickly write one for you
Nakatomi2010 Posted April 11, 2006 Author Posted April 11, 2006 Oddly enough 'fixboot' isn't present when run WinPE, any idea which CAB file it's in so I can grab it?
aloima Posted April 12, 2006 Posted April 12, 2006 not really sure what you're trying to do exactly, but if the boot sector is hosed then when you boot up with the winxp/2k cd you could enter the command console and run both fixboot and fixmbr. that usually fixes the disk so it'll boot up. you should be able to ghost after that. other possibility is that the NTFS system has a 'dirty' flag on it and needs to be removed before you can proceed. hope that helps you out!not really sure what you're trying to do exactly, but if the boot sector is hosed then when you boot up with the winxp/2k cd you could enter the command console and run both fixboot and fixmbr. that usually fixes the disk so it'll boot up. you should be able to ghost after that. other possibility is that the NTFS system has a 'dirty' flag on it and needs to be removed before you can proceed. hope that helps you out!
Nakatomi2010 Posted April 12, 2006 Author Posted April 12, 2006 Ghost does not always work, even if you try Fixboot and fixmbr... Hell there are times that doing either of those causes the drive to become blank...My process allows me to manually copies files from drive A to drive B, however the important thing about Ghost is that it also copies the boot sector, which my method doesn't, so I need to be able to create the NTFS boot sector required to make 2k/XP work...I'm NOT doing it through the recovery console, I'm doing it from within a BartPE Windows...
Mordac85 Posted April 12, 2006 Posted April 12, 2006 I've never had an issue w/Ghost not creating a bootable image. That is as long as you're doing a dump and not a copy or partition dump, which does not grab the MBR. I've been using Ghost for years w/o issue so I'm kinda stumped as to why you'd be in a situation like this. Could you post the command line used that gives you grief?
Plamdi Posted April 13, 2006 Posted April 13, 2006 Assuming you can boot to MS-DOS:Save as BSSAVE.BAT:@echo offmd c:\dosecho LCS:100 2 0 1 > c:\boot.tmpecho rcx >> c:\boot.tmpecho 200 >> c:\boot.tmpecho n c:\bootsect.dat >> c:\boot.tmpecho wcs:100 >> c:\boot.tmpecho q >> c:\boot.tmpecho. >> c:\boot.tmpdebug < c:\boot.tmpdel c:\boot.tmpECHO HARD DISK BOOTSECTOR STORED AS C:\BOOTSECT.DATSave as BSWRITE.BAT:@echo offECHO THIS FILE WILL WRITE A:\BOOTSECT.DAT TO THE PRIMARY HARD DISK BOOTSECTOR!ECHO EXPECT YOUR COMPUTER TO RESTART UPON COMPLEATION.ECHO.ECHO PRESS ANY KEY TO CONTINUE, OR CTRL-C TO QUIT.echo WCS:100 2 0 1 > a:\boot.tmpecho q >> a:\boot.tmpecho. >> a:\boot.tmpdebug a:\bootsect.dat < a:\boot.tmpdel a:\boot.tmpecho g=ffff:0|debugNote that you may modify them, but from memory you CANNOT run bswrite from C:\. If desired use a ramdrive (eg, boot into DOS from CD and create a ramdrive, copy bootsect.dat to your ramdrive and replace A: with the drive letter of your ramdrive, eg R:). Also note that HDD must be identical (ie same size, same manufacturer, same partition size) to use bswrite - or writing the bootsector WILL CAUSE PROBLEMS. This is dangerous! But, if you know what you're doing - go for it.I used to use if for MANUALLY installing MS-DOS7.1 AFTER WinXP... What I would do is install windows xp on a FAT-32 patition, create a C:\DOS directory and copy all the files I needed, then boot from a bootdisk, run BSSAVE... to back-up the NT (XP's) bootsector, then SYS C:, then run BSSAVE again edit the bootsector (to use IO.DOS and MSDOS.DOS rather than .SYS ... which in turn would use config.dos instead of config.sys) - this would allow me to install Windows 98 later and have them independently boot. And then I would run BS-WRITE to restore the NT-bootsector (the only other way to do this is with recovery console which takes a lot longer if you boot into it then doing it with the batch file). You MUST run it from the floppy (or ramdrive) and not from C:. That is your bootsector and your files .bat and debug.exe - and your boot (io.sys, msdos.sys, autoexec.bat, config.sys, command.com) must all be booted from your floppy (or CD) and NOT from your HDD or there will be problems writing the bootsector (but you can read it booted from the HDD).Oh by the way, I assume you can only use this on drives formatted FAT or FAT32. Use MS-DOS 7.1 if possible. Oh and don't say I didn't warn you...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now