Sunday 25 January 2004

Removing Windows Me from a dual-boot PC

Back in November 2001, I had a 20 gigabyte unpartitioned hard drive with Windows Me running on it.

I wasn't sure whether to upgrade Windows Me or to start all over again so I lurked in the Windows XP Newsgroups for a while and noticed all the problems experienced by Windows Me users who upgraded their PC to Windows XP.

I bought Partition Magic and made three partitions; one for Windows Me, one for Windows XP and one for data. It turned out that not all my hardware was compatible with Windows XP anyway so I had to boot into Windows Me in order to use my scanner and I eventually ended up buying a new modem.

I was never really happy with having Windows Me on my PC for various reasons including the file system being FAT32 but I didn't know there was a way to remove it without starting all over again until I ran out of disk space on my other two partitions as I had originally given Windows Me 8 gigabytes to play with and I didn't want to risk resizing partitions since Windows Me is on FAT32 and the others are on NTFS so I had to consult Google for the way forward.

I spent the weekend removing Windows Me from my PC and converting the partition to NTFS and I now have 6 gigabytes of disk space to play with1.

This is how I did it:

If you are dual-booting your Windows PC with Windows Me on drive C and Windows XP on drive D and you do not wish to format and reinstall Windows XP on Drive C, here is how I removed Windows Me from Drive C:

  1. Edit the boot.ini file to remove the last line C:\="Microsoft Windows"

    1. First, make a backup copy of the boot.ini (optional)
    2. Control Panel >> System >> Advanced tab.
    3. Click the Settings button under "Startup and Recovery".
    4. Make sure that Windows XP is selected as the default operating system.
    5. Click the Edit button.
    6. Open your boot.ini file in Notepad
    7. Remove the Windows ME line from the [operating systems] section
    8. Change the number of seconds the boot menu shows to 0
    9. Save the file

    See also How to Edit the Boot.ini File in Windows XP

  2. Delete all non-data files from the c:\ drive except the following:
    1. c:\boot.ini
    2. c:\ntldr
    3. c:\ntdetect.com
    4. c:\ntbootdd.sys (if you have an SCSI adapter installed)
    5. c:\bootsect.dos (not really necessary)
    6. c:\autoexec.bat (not really necessary)
    7. c:\config.sys (not really necessary)
    8. c:\io.sys (not really necessary)
    9. c:\msdos.sys (not really necessary)

    On my Windows Me partition, I have three main folders: My Documents folder, Program Files folder and the Windows Folder, therefore, I deleted the Program Files folder and the Windows folder (after rescuing 4 years worth of screensavers from the Windows folder2) but left the My Documents folder alone.

    If your folder structure is not like mine, you will have to do some tidying up before deleting; for the purpose of this exercise, all data files should be moved to the My Documents folder, this should enable you to see what to delete and what to save.

    When removing the Windows Folder and the Program Files Folder, you may wish to do this via the command line tool; it is much faster - providing you are familiar with the various switches3 for dir, rd and del.

    These critical files you left alone should also be backed up on a boot floppy (select full format under Windows XP - do not select quick format)

    Do not format the c:\ drive or Windows XP will not load, however, you may wish to defragment the volume at this stage.

    Find out how to use the Recovery Console to repair the Windows XP boot (just as a precaution - it isn't necessary but see also the following articles:)

  3. Convert the c:\ drive from FAT32 to NTFS but before you do this, I suggest reading Converting FAT32 to NTFS by Alex Nichol, an MS-MVP.

    Basically, you need to realign the c:\ drive partition by moving all the data area up to a 4k boundary. I followed Alex's advice which involves the following:

    1. Download BootIT NG
    2. Extract the ZIP file
    3. Run bootitng.exe in order to make a bootable floppy
    4. Reboot the PC with the boot floppy
    5. At the prompt, do not install bootitng, instead, click cancel
    6. In Maintenance, select Partition Work
    7. Select the Partition you need to work with and click Slide
    8. Select the option: Align for NTFS only and click OK
    9. When it is done, reboot the PC, log in as Administrator and defragment the volume

    Now convert the c:\ drive from FAT32 to NTFS but first make a note of the Volume by typing vol c: at the command line.

    Here's how I did mine:

    c:\>convert c:/fs:ntfs
    

    System Response:

    The type of the file system is FAT32
    Enter current volume label for Drive C:
    

    Input the Volume Number noted when typing vol c:. You may or may not get the following, it depends on how your system is set up:

    Convert cannot run because the volume is in use by 
    another process.
    Convert may run if this volume is dismounted first.
    ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
    Would you like to force a dismount on this volume? (Y/N)
    

    I didn't know what this meant so I consulted Google, the MS KB article advises typing Y but I went with N on the strength of a suggestion by an MS Employee4 so that the system will schedule the convert at the next boot. After typing N I get:

    Convert cannot gain exclusive access to the C: Drive,
    so it cannot convert it now. Would you like to
    schedule it to be converted the next time
    the sytem restarts (Y/N)
    

    Me: Y. (It appears that typing Y or N makes no difference to the next step).

    The conversion will take place automatically the next 
    time the system restarts.
    
  4. The final step is to set up the permissions on the volume but you may first need to take ownership of the files. Here are some resources to help you with the last part:
  5. And that's it! Next step for me is to install the Cygwin Tools, then Apache, MySQL, PHP and finally uninstall Perl from its old location and reinstall here but that's for another weekend.

1Windows Me was on an 8 gigabytes partition made up of data files, program files and Windows Me itself with 3 gigabytes leftover. Removing Windows Me and the Program files saved another 3 gigabytes.

2Screensavers can be identified by searching for *.scr on the Windows Folder and transferring to Windows XP

3You can read up on the switches by typing c:\help dir or c:\help del or c:\help rd at the commandline - for an example of what switches can do, try typing c:\dir /q /a: /o: to see a sorted version of all files including hidden and system files with their owners.

4Her suggestion made sense to me, the suggestions made in the KB article seemed illogical to me