Els's blog

Friday, July 07, 2006

Booting from USB Stick

Most computers don’t have floppy drives anymore these days. But every now and then, I bet you still wish you had one!

A USB stick is a great and far better alternative, but you can’t boot from your stick. And in some cases that is exactly what you need.

After some searching and testing, I now have a bootable USB Stick. I use it to boot into Windows PE and from there you can start a complete OS install, troubleshoot a system, install additional drivers, …

First thing you need: a number of freeware tools.

Step 1: Format a floppy as DOS boot disk

Don’t worry; you don’t need a real physical floppy drive. Instead we will create a virtual floppy using ‘Virtual Floppy Driver’.

Install the Virtual Floppy Driver:

c:\VirtualFlop\vfd.exe install

c:\VirtualFlop\vfd.exe start

c:\VirtualFlop\vfd.exe link a /L

c:\VirtualFlop\vfd.exe open c:\flop.img

When the system asks you to create the file, say yes.

If you check Windows Explorer now, you should see the A: drive. Rightclick drive A: and choose format. Format the floppy as a DOS startup disk.

Step 2: Format your USB stick as a bootable device

Install the HP USB Disk Storage Format Tool. Then run the tool with the following options:

Device: USB Device

File system: FAT 16

Deselect Quick format

Select Create a DOS startup disk using DOS system files located at A: (virtual floppy drive)


Step 3: Copy Windows boot files to the memory stick

This depends on the version of Windows that you would like to boot in of course.

For XP, Windows 2003 and Windows 2000, you need the following boot files:

  • Ntldr
  • Ntdetect.com
  • Boot.ini

For Vista, you need the following files:

  • Bcd
  • Bootfix.bin
  • Bootmgr

Then copy Bootpart to your memory stick and the Windows PE image that you want to boot into.


Step 4: Set your BIOS to boot from USB

Make sure your USB stick is plugged in, restart your computer and enter the BIOS. There move USB device to the top of the boot order list.

On most Dell systems you can simply press F12 during the Dell screen and the list of available boot devices will show up. Select your USB device and press enter.

At this moment you are booting from your USB stick, but since you made a DOS boot stick, you boot in DOS.

To boot in Vista or XP or Windows 2003: at the DOS prompt, go to the bootpart directory and type the following:

C:\Bootpart\bootpart <part_type> boot:c:

where <part_type> is DOS622 – Win95 – Winnt – Vista. This will rewrite the bootsector on the C: drive to boot under the OS that you need.

Reboot your machine, boot from the USB stick again and the Windows boot process will start.


By the way, I am blogging in Word 2007 here. Pretty cool, isn’t it?

Just open a new document, choose new blog entry. Then select your blog provider from the list. You will be asked for your blog credentials and when you are ready you can just publish your blog!

Simple.

I’ll do that now.

Thursday, July 06, 2006

Vista deployment

The last few days I've been looking at Vista deployment methods.
And today I'll share some of my experiences with you.

There are quite some tools available for you to deploy Vista to your client machines.
  • Windows Deployment Services (the next version of RIS)
  • BDD 2007 Beta 1 (Business Desktop Deployment)
  • WAIK (Windows Automated Installation Kit)
  • Windows System Image Manager (the new Setup Manager)
  • Windows Image Format or WIM files
  • ImageX
Using BDD you can perform what is called a Lite Touch Installation. You can prepare almost everything on the server and only minimal user interaction will be required on the client.
To boot the client, you can use a CD containing a Windows PE image that you created with BDD.
When the client starts, this image will be loaded and it will ask you for credentials, a computername and whether you want to join a domain or not. Then you select an image from the list of available images, you choose extra applications to install and that's it. Everything else will happen automatically and after a few minutes your new Vista machine is up and running!

The images used are all Wim images, the new image file format for Vista.
By the way, even a normal manual Vista install uses Wim images. If you extract the Vista iso, you'll see that all there is in the iso is a bunch of Wim files.
So everything is Wim.

Since most IT Pros are lazy by default, we don't like to create boot CDs for every image that we need. No, it would be so much better if we could just boot from the network and start downloading the necessary image files.
That's what you need Windows Deployment Services for. As I said it is the next version of RIS and it works almost the same way. The only difference is that you can deploy Wim images with WDS. (In mixed mode it still supports deploying RIS and Riprep images too.)
With WDS you use a PXE boot to start the client, press F12 when the system tells you to and load a Windows PE image. From within the Windows PE environment, you select the correct image to load and there you go, Vista will be installed and ready to use in no time.

I do have 1 remark here, I keep wondering why Microsoft did not use ADS as a basis for WDS? I like ADS so much more than RIS.
It has everything you need (ADS already uses XML files, it uses imaging, task sequences, ...), all they had to do is make it support Wim images.
And it does not require you to do anything on the client, not even press F12!
So why???
If anyone has the answer, please enlight me!

Next week I hope to give you a detailed description on how to use all the tools I just mentioned and the steps to take.

By the way, during my experiments, I also tried to boot Windows PE from my USB stick. After a lot of googling, swearing and testing, I finally succeeded.
I can boot into Windows PE from my USB stick now, but I can't download the full Vista image.
Anyway, since I saw how many people have questions on how to boot from USB (for Vista or XP or whatever), I'll give you the details on how to accomplish this tomorrow!

Monday, July 03, 2006

Lingering Objects

Last week I taught my Active Directory In-Depth course, so today one more blog on AD.

This one is about lingering objects, an annoying phenomenon that could cause deleted objects to return in your Active Directory database.

Lingering objects will appear if one of your domain controllers hasn't been able to synchronize with its replication partners during a tombstone lifetime.

This is what happens: you create a number of objects. These objects will nicely replicate to all your DCs. Then, for some reason 1 of the DCs can no longer replicate with the others (due to a network problem, DNS failures, issues with time synchronization, ...).
In the mean time you delete a user from your database. The problem DC does not replicate this change however and the object still exists in that database.
After a tombstone lifetime (default 60 days, and 180 days if the forest was created on Windows Server 2003 SP1) the deleted objects are actually removed from the AD database on the good DCs, but the bad one still sees these objects as normal objects.
At that moment, you become aware of the problem. You solve the issues and try to replicate with the bad DC to get it up to date again.

Then, one of two things can happen.
  • If your DC is a Windows 2000 server, the bad DC will replicate with the good ones and the deleted objects will return in your environment.
  • If your DC is a Windows Server 2003 machine, the bad DC will not be allowed to replicate because it has been out of date for more than one tombstone lifetime.
How do you fix this?
  1. Use repadmin (Support Tools) to remove the lingering objects from the bad DC.
    repadmin /removelingeringobjects 'DNS name bad DC' 'GUID good DC' 'Directory partition DN' /advisory_mode
    For example: repadmin /removelingeringobjects dc1.example.com A0AE6093-15F5-4DB8-836B-4495E3A15396 dc=example,dc=com /advisory_mode
    This will display a list of lingering objects in the Directory Services event log (look for event id 1946). Then you can run the same command again, this time without the advisory_mode switch. This will actually remove all lingering objects from the problem DC (look for event id 1945).
  2. At this point, you still won't be able to replicate with the bad DC. To fix this, add the following registry key:
    HKEY_LM\System\CurrentControlSet\Services\Ntds\Parameters
    Allow Replication With Divergent and Corrupt Partner
    REG_DWORD
    1
  3. Force replication: everything should be fine now.
  4. After replication succeeded, do not forget to reset the above registry key to 0!!
This week, I'll be looking at Vista again. So you can expect more Vista blogs!