1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Removing all files on an XP system partition without altering the MBR

Discussion in 'Windows XP' started by Codecutter, 2007/05/06.

  1. 2007/05/06
    Codecutter

    Codecutter Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    91
    Likes Received:
    0
    I want to clean all the files from an XP system partition without altering the format image on the drive, and that includes the MBR record.

    I need to do a reinstall, but keep my old MBR record intact.

    Normally a del *.* would achieve this, but this is a system drive. I can't physically remove the drive from the box, si I can't run it as a data drive on another system.

    There's plenty of software about for cleaning old discs, but the documentation I've read seems to indicate that the MBR would be wiped with the data.

    The partition is 20GB and the system has both a floppy and CD drive.

    Would this be just a matter of booting from a DOS floppy and executing Del *.*

    Any assistance appreciated.
     
  2. 2007/05/06
    TopFarmer

    TopFarmer Well-Known Member

    Joined:
    2005/01/24
    Messages:
    252
    Likes Received:
    6
    That would work only if the hdd file system is FAT32 and not NTFS.
    If you have a MS XP cd , boot into Recovery Console, very likely there is a del. command there.

    format does not do a thing with the MBR and does not change the file system type of hdd . Not to sure just what you mean by "format image ".

    Why ??

    If your XP cd is a restore cd and not a MS cd, then it may change the partitions and/or file system if they are not what it was when new.
     

  3. to hide this advert.

  4. 2007/05/07
    sparrow

    sparrow Inactive

    Joined:
    2004/03/21
    Messages:
    2,282
    Likes Received:
    0
    del *.* will work, but remember that there are hidden files etc. so for FAT32 first do
    attrib -r -h -s *.*
    in the root and in each directory. However, there's no reason to preserve the mbr.

    The quickest way to clean a disk for a reinstall is to delete its partition and then remake a new partition using the same space. That should take about a minute. Works for NTFS too.
     
    Last edited: 2007/05/07
  5. 2007/05/10
    Codecutter

    Codecutter Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    91
    Likes Received:
    0
    Thanks guys for the responses.

    I agree, before a re-install, delete partition, recreate partition, reformat.

    The problem I have lies in an oddball applications program I have which is quite valuable. It cannot be re-installed on a newly formated system partition, without a new key. Thses keys were readily supplied to users by the company, but now the company has gone bust and no more keys.

    Hence I cannot reformat my system partition, if I want to continue using this software.

    Question: Can I make a copy of just the old partition format information? (I'm sure you can) If so, how?

    Cheers
    Codecutter
     
  6. 2007/05/10
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Perhaps try some disk imaging software.
     
  7. 2007/05/11
    McTavish

    McTavish Inactive

    Joined:
    2005/06/24
    Messages:
    576
    Likes Received:
    1
    Not sure exactly what you mean by system partition, do you just mean the partition with Windows on it? Also, what do you mean by "format image" or "partition format informationâ€.

    How do you know the key to your application is in the MBR (or more likely somewhere on the first track that the MBR also uses). Most applications keep their key details in the Windows registry or the apps system files. What app is it?

    I take it you need to do a new clean install of Windows on the machine, or is it that you want to move the app to another machine?

    It would be easy enough to make a backup of the MBR and complete first track and restore this after a fresh install, (as long as you weren’t moving or changing the size of the original partition). The MBR does not hold the file system information for a partition, that’s in the PBR and the FAT or MFT.
     
  8. 2007/05/11
    sparrow

    sparrow Inactive

    Joined:
    2004/03/21
    Messages:
    2,282
    Likes Received:
    0
    Try a parallel install. You can then boot to it and do what you like, e.g. del *.*
     
  9. 2007/05/12
    Codecutter

    Codecutter Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    91
    Likes Received:
    0
    O.K. I've been able to scrub all OS installed files now and got everything going so, to speak, cleanly, but how is this key thingy working?

    Thanks Sparrow & Dude but McTavish has some great questions, here are my humble answers:

    By system partition, I mean the partition where Windows XP is installed. In this instance the C: partition using default clusters.

    By format partition information, I mean the information (or call it data if you will) Windows writes to the disk during the partition process.

    The applications software I am having trouble with does not keep key details in the registry. I think this is a legacy thing, going back to pre Win 95 and Win NT days. It's simple, but I don't know what it is. The applications software is looking for something (i.e. a string of bits) on the disk created by it at program installation time, and hidden with data written onto the disk at disc formatting time.

    Backing up the MBR and the complete first track may be the answer and copying that to a new drive (of course parameters must be identical). I don't think this key process has anything to do with the master file table.

    If I were to write some code in C and use ABSREAD (and then ABSWRITE) how many bytes should I read/write to pick up the MBR and its first track. presumably 2*512 byte sectors = 1024?

    codecutter
     
  10. 2007/05/13
    TopFarmer

    TopFarmer Well-Known Member

    Joined:
    2005/01/24
    Messages:
    252
    Likes Received:
    6
    each track is normally 63 sectors (some old hdds are different) so you would need 512*63=32256 .

    You can go to http://www.terabyteunlimited.com/utilities.html and down load MBRWORK 1.07b if you have a floppy drive.

    as far as the partition start sector and size.

    After you save the first track, could use a hex editor and try to find the key. The key may not be in the first track and other test methods would have to be made to find just where it is put.

    More explaining might be needed.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.