Category Archives: Deployment

Testing Out the New Computer

In IT, it is common to do a “burn-in test” for new computer equipment.  The theory is if something is going to fail, it usually will within 48 hours of normal usage.  There are stress tests you can run on equipment to see if it stacks up or not.

If you’re not in IT, you might not know how to test or what to test, though.  Lifehacker attempts to answer this question in their article “How Can I Make Sure My New Computer Isn’t a Dud?”  There are pointers in it to stress test your machine.  Under “Stress Test Your CPU”, they mention some temperature monitoring programs that I highly recommend you try out on any new laptop.

Geek Friday: Using Ubuntu to Wipe a Hard Drive

How do you protect your personal data when you sell that used PC?  What if you upgrade hard drives?  You can format it, but then a hard drive can be unformatted.  You can buy a program that will do a secure DoD wipe, but that might be overkill in some situations.

Well, it turns out you can also use Ubuntu to do the same thing.  This comes in really handy if you have Ubuntu installed on a machine already, and you can connect the drive and use Ubuntu to check out the drive’s SMART data as well (which will tell you beforehand whether or not it is near failure).  According to the How-To Geek’s article “Use an Ubuntu Live CD to Securely Wipe Your PC’s Hard Drive”, you can download wipe to securely wipe a hard drive.  However, check out the comments as to how to use the built-in shred command to zap a hard drive by booting Ubuntu from a Live CD.

In theory, given enough time and money, a forensic specialist might recover some deleted data from a given hard drive even after a wipe.  However, you can at least make it expensive enough that the casual thief isn’t going to try to scrape off enough personal data to make a buck or two.

Another free alternative is DBAN (Darik’s Boot And Nuke) from www.dban.org.  I haven’t personally tried it, though.  From what I’ve read, it does a good job of automatically wiping a drive.  Of course, this can be dangerous if you have more than one drive.

Thumb Drives and Booting

I can remember when it used to be so easy.  What you did in the old days was stick a diskette into the drive, and then, if you were running Windows, you would open up a command prompt.  Then, you would type:

format a: /s

The “/s” was important, as that made the diskette bootable.  If you rebooted the machine while it was still in the drive, it would boot up to a command prompt waiting for you to type something in.

That was then; this is now.

Now, you have boot CDs and even boot thumb drives.  Both are a pain, and needlessly so.  However, nothing tops the pain of trying to boot Windows from a thumb drive.

What’s that?  You have never seen Windows boot from a thumb USB flash drive?  Well, it so happens, neither have I!

Let’s see, I had a flash drive with AVG on it up until yesterday, and it booted Linux.  I have an Avira drive that boots Linux.  I have a thumb drive with Ubuntu on it.  Oh, and I have a USB drive with Clonezilla on it, which of course is also Linux.

You get the idea.

With netbooks becoming more popular, you’d think it would be easy to create a boot drive with Windows XP on it so you can boot up and install.  You would think.  I have tried about 5 different programs out there that claim to aid you in this, but I have yet to see a single one work.  I’m tired.  I have a headache.  I don’t understand how I can have 4 working Linux boot thumb drives and not a single Windows XP one.

Here’s an idea:

format e: /s

xcopy d:i386 e:

echo “i386winnt.exe”>>e:autoexec.bat

Too simple?  I guess so.

Follow-Up To Windows XP Recovery Partition: The Dell Utility Partition

I just cannot bash Symantec enough. I was working on a Dell machine old enough to still have the recovery partition that was created using Norton Ghost.

Now, Ghost was the one product they had that was actually worth something. However, the way it was implemented for the Dell Dimension 3000 recovery partition earns it the right to be placed under Stupid Software.

At any rate, it was FAT or VFAT, don’t remember which, and it was at the end of the drive. Duh. Tried to move it here, move it there, and all it did was complain that the MBR had changed. It’s a newer, bigger drive. Duh.

So, I’m just glad I can whip out my instructions for creating a Windows XP Recovery Partition. I even wrote a script to run from a USB drive once Ubuntu is installed that greatly simplifies getting GRUB to boot up Clonezilla. I’ll share it in a future post.

I installed, I overwrote, I backed up, and I restored. Life was good.

Until …

Until I tried to boot into the Dell Utility partition. Wait, isn’t that controlled in the BIOS? Apparently, they have some sort of boot loader to get it going, and GRUB is in the way. It really would be nice if Dell documented these things.

Oddly enough, it took me quite a while to find a workable solution. Yet, it is so easy. Just add the partition to the GRUB menu! OK, so you won’t be able to boot via [F12], but does that really matter?

According to the topic “Can’t boot to Dell Utility System Partition after installing Kubuntu 9.10 (Grub2 [sic]” on the Kubuntu Forums, just add this to 40_custom:

menuentry “Dell Utility partition” {
set root=(hd0,1)
chainloader +1
}

Naturally, don’t forget to run “sudo update-grub2” afterwards.

So, life is good once again.

Windows XP Recovery Partition 5: Prepare For Distribution with Sysprep

This last step is only necessary if you are preparing an image for a customer. If you are preparing it as a backup for your own system, you only need to do steps 1, 6 and 7.

First, as much as I’d like to totally avoid the Microsoft Deployment Toolkit (MDT), this one is necessary to allow customization for the enduser. The reason I would rather avoid it is that it is overly complicated, requires 2 machines and doesn’t work as you would expect. Unfortunately, Sysprep is no real exception to those first and last points.

The real drawback is that you will not probably not be able to get rid of the account you used to install everything. The only machines I have been able to install using only the Administrator account were due to errors that occurred during the install. XP, however, is not supposed to, by design, allow you to remove all accounts. You must have two administrator accounts. To me, this is a severe drawback of this method.

However, you can at least create an “empty” account.

So, then, without further ado, here are the steps:

1. Get everything setup as desired in the extra administrator level account. If you haven’t yet, activate XP. Make sure all antivirus and application software, updates, etc., are installed. This will keep the enduser from having to deal with tons of updates lasting 2 days.

2. Login to the actual Administrator account.

3. Move the contents of your extra administrator account into the Default Users folder. Delete any extra folders.

4. Cleanup mapped drives, event logs, etc., and empty the recycling bin.

5. Now, you need to run Sysprep. There are several options and switches you can play with.

In James Kovac’s Weblog, he wrote an article about “How to Sysprep Windows” using the Setup Manager program. However, I honestly think it is better to just run it from the command line as “sysprep –activated –reseal”. All of the other options seem like fluff.

In fact, even with “-activated”, it will still prompt for the product code at startup! This to me was one of the most aggravating annoyances. I tried putting on a winbom.ini file even, but there didn’t seem to be a way around it. Somehow, HP can circumvent this, but I haven’t figured out yet how. I still recommend the “-activated” switch, though, as it will at least not try to reactivate it, which can lead to problems if the network drivers doesn’t work out of the box (like on some laptops).

Other commandline switches, INI settings, etc., can be found on the Microsoft TechNet site.

Sysprep will shutdown the machine (unless, of course, you tell it otherwise).

6. If you have been testing Clonezilla (you didn’t leave it to chance, right?), boot up into Ubuntu and clean up any test files in the backups directory.

7. Reboot into Clonezilla and image the Windows XP partition.

8. Boot into Windows and see how it will look to the enduser.

Done! Here’s wishing you luck on your deployment!

Windows XP Recovery Partition 4: Install Clonezilla

Continuing on with how to create a Windows XP recovery partition using Ubuntu and Clonezilla, we now come to the meat of it: instaling Clonezilla and modifying the GRUB loader to boot into it.

Again, I’m going to hit the highlights. In addition, I’m going to point you to other documentation rather than repeat all of it here.

1. Before making any changes, be sure to backup all of the GRUB files. I did it by creating an “old” directory and copying them into it:

$sudo mkdir /etc/grub.d/old

$sudo cp /etc/grub.d/* /etc/grub.d/old

$sudo cp /etc/default/grub /etc/grub.d/old

2. Remove the memtest files.

$sudo rm /etc/grub.d/20_memtest86+

3. Now follow the directions for installing the Clonezilla ISO file about 2/3 down the Clonezilla Live hard drive installation page. Be sure to use “sudo” command as appropriate.

NOTE: The GRUB instructions say to name it “Clonezilla live”, but I suggest you call the Clonezilla Live boot something like “Restore Windows XP using Clonezilla Live” if you are doing an install for another enduser.

4. Edit /etc/default/grub with the following changes:

  • Change GRUB_DEFAULT to 2 (note that first entry is ‘0’).
  • Uncomment GRUB_HIDDEN_TIMEOUT.
  • Set GRUB_HIDDEN_TIMEOUT=2.
  • Set GRUB_TIMEOUT=1.

This will allow a user to press a key and stall at the GRUB menu. However, it will only briefly show the menu otherwise. I tried not showing it at all, but [Esc] would not bring up the GRUB menu at all if GRUB_TIMEOUT was set to 0 despite what the documentation seems to say.

5. Run the grub update utility to update the menu with your changes:

$sudo update-grub2

6. Finally, create a directory for your backups:

$sudo mkdir /backups

7. Now test GRUB. When you boot the machine, press [Esc] when you see “GRUB loading.”

8. Boot into Windows and run chkdsk.

9. Test Clonezilla by rebooting into Clonezilla and running a backup of your Windows partition.

Windows XP Recovery Partition 3: Install Ubuntu

Using Clonezilla in order to maintain a recovery partition for Windows XP requires a way to boot it up. Of course, the CD is bootable, but if the idea is to get away from a “rescue disk” and replace it with a rescue partition, then it needs to boot from the hard drive. Not only that, but you also need a way to be able to do general maintenance, including managing your backup files.

As stated in previous articles, you should have at least an 80 GB hard drive, as it will take a minimum of 10 GB to install Ubuntu, Clonezilla and have room for the backup. If you are creating an image preloaded with MS Office or the alternative OpenOffice, then you will probably only have room for one image file.

If you do not make the recovery partition large enough, you will almost surely corrupt it, necessitating doing some steps over.

Prerequisites for this step are that you have followed all the previous instructions and have an Ubuntu CD.

The steps below are mostly self-explanatory. I will try to keep it fairly high level.

1. Boot up, choose language, choose Install Ubuntu.

2. Change appropriate settings.

3. At step 4 of 6, choose Specify partitions manually (advanced). Click on Forward.

4. Click on /dev/sda1 and then Change. On New partition size … subtract 10 GB (or whatever the size of your new partition is going to be). Click on Continue.

5. Click on free space | Add. Mount point should be “/”. Click on OK. Ensure the checkbox under Format is checked for the new partition.

6. Click on Forward. Click on Continue because you are not going to create a swap space (obviously, you would want a swap space if you were going to actually use it for other purposes).

7. Give a generic login. I chose to use “owner” for login and “password” for password. Select Login automatically. Click on Forward. Click on Forward.

8. Review and click on Install.

You will now have 2 generic installations: Windows XP on hda1 (or sda1) and Ubuntu on hda2 (or sda2). Also good is that Ubuntu installs the GRUB loader so you can select between them.

If you haven’t played much with Linux and you feel adventurous, you might want to explore Ubuntu for a while to get use to moving around in it. If you are creating this for someone else, I really advise you to take the time and learn the system.

Windows XP Recovery Partition 2: Install Windows XP

Once you have a system put together or upgraded so that it meets the minimum requirements, the next thing you want to do in order to setup your system with Windows XP and a Windows Recovery Partition is to setup Windows. You will need a valid Windows key, usually located on the machine with a Certificate of Authenticity (COA) sticker. You will also need either a Windows XP installation CD or a manufacturer Recovery CD. It might be a good idea to also put system drivers and utilities on a CD, as some networking components might need to be updated before they will work. Once you have these, you are ready to install your system.

Keep in mind that you are not yet setting it up for your final image. You only want a basic working system at the end of this step.

Before you get started, write down in large legible characters your Windows COA key. Even with glasses on, most of these stickers are very difficult to read! You might even want to get out a magnifying glass to ensure the characters are correct. This is especially true if the key contains Bs and/or 8s or 0s and/or Qs. In addition, some of them are shiny, making ‘6’ look like ‘G’ and even ‘3’ look like ‘J’ when the light hits it at the wrong angle. If you write it down correctly, it sure beats turning your laptop upside down in order to read it halfway through the installation.

Another pre-installation step you might consider is to create an image of the entire drive onto an external USB drive. This is especially true if it has an OEM version of Windows (such as Dell or HP/Compaq), as there may be devices that you cannot identify right away, and reverting back is an easy way to see what is going wrong. Naturally, since we are using Clonezilla to make a recovery partition, there is no reason you cannot use it for this purpose as well.

I will now only highlight certain steps:

1. Once you are ready, put in the Windows/Recovery CD and boot off of it. You will probably have to press a key to boot from the CD. If you wait too long, it will boot from the hard drive.

2. Select Setup Windows XP now by pressing [Enter].

3. Accept the EULA by pressing [F8].

4. If Windows is already on the hard drive, it will ask if you want to repair it. You do not want this option. Choose the selection for a fresh install.

5. Delete all partitions. This is why it is a good idea to image the drive first!

6. Once you have one large unpartitioned space, press [Enter] to create one partition.

7. Format as NTFS. Don’t select Quick Format. If there are any errors on the drive, format will mark them correctly but quick format will not.

8. At Personalize Your Software, keep in mind that this will be on the image. If you are creating this to sell later, make it as general as possible.

9. At Computer Name & Administrator Password, ditto. Leave Administrator password blank. It can be changed later.

10. In the Network Settings screen, I always choose “No” in order to make a member of a workgroup. It is easier to get onto a domain that off of one.

11. After reboot, you are taken to the Welcome to Microsoft Windows screen. You are supposed to be able to skip this sequence of setup windows by pressing [Ctrl]-[Shift]-[F3], but I have yet to see it work! Too bad, too, as it forces you to create another Administrator level account that you cannot get rid of on your image.

12. Do not activate Windows just yet. It could cause you problems if you reactivate with a different configuration.

13. At Who Will Use this Computer? screen, it doesn’t much matter if you are going to create an image to sell to an unknown person, but you will be left with an extra Administrator account. Obviously, if you are setting it up for yourself or for a specific person, then go ahead and create it like the end product will look like.

14. Once Windows is up and running, open Explorer and copy the I386 directory to the root of drive C:.

15. Create directory C:Sysprep.

16. While Explorer is still open, navigate on the installation CD to SupportToolsDeployment.cab and open it up. Copy the entire contents to C:Sysprep.

NOTE: If you want to experiment around, you should also make a copy of it to stash somewhere else, such as C:WindowsSysprep because running the Sysprep procedure removes the entire folder.

17. Click on Start | Run. In the box, type “regedit” and press [Enter]. Navigate to HKLMSOFTWAREMicrosoftWindows NTCurrentVersion and look for the key SourcePath. Change it to “C:I386”.

18. If you have a driver CD, go ahead now and load the drivers and utilities as needed.

You should now have a functioning Windows installation. At this time, make sure the basic functionality is there, but don’t get too hung up on the final look just yet. Something can still go wrong and wipe out all of your hard work. However, if you feel compelled to go ahead and run all of your updates (or, if you must because drivers won’t work otherwise), then at least make a good backup of what you’ve gotten so far first.

Windows XP Recovery Partition 1: Overview of Clonezilla vs MDT

So, why use Clonezilla instead of the Microsoft Deployment Toolkit (MDT)? Well, to be perfectly honest, we are going to use one piece of the MDT called Sysprep. However, the MDT overall is pretty version dependent, confusing and requires 2 computers. That last requirement in particular blew me away.

Why does Microsoft have to make everything so complicated, anyhow? All you really want to do is setup a partition, make an image of it and have a means of toggling between them at boot time. When you break it down that way, it isn’t really that complicated.

Now, if you want, you can use Norton Ghost or Acronis True Image Home and achieve the same thing. Acronis in particular is nice because it comes with a boot manager as well as some handy utilities. Norton Ghost just isn’t the Norton Ghost I remember, costs more and has very restrictive licensing.

However, if you want free, you are only left with a few alternatives. Some of them work on XP but not Vista. Some of them come with pages and pages of instructions that give you a headache (like Microsoft, come to think of it).

Maybe the Clonezilla solution isn’t for you, but it seems to me to be about the easiest of the free alternatives. All that is missing is tying together the documentation into easy steps that can be followed in order to put the system together. No complicated answer files, not a whole bunch of unnecessary options and switches, and you only need the one computer if that’s all you are creating an image for.

NOTE: Before you begin, I highly recommend an external USB hard drive. No matter what solution you settle on, it will be somewhat time consuming. In addition, make one mistake, and you have to start over again unless you have a valid backup to roll back to. Not the end of the world, but it might make the lessons less painful.

Windows XP Recovery Partition: Introduction

OK, I finally decided it was time to write down the steps to creating a recovery partition for Windows XP.  There might be several reasons you would want to do this:

  • You are a seller/reseller of PCs and want a standardized way to recover them remotely.
  • You like to experiment a lot and want a quicker way to recover.
  • Your PC did not come with a recovery partition, and you don’t like keeping track of CDs/DVDs.
  • Your PC came with a recovery partition, but it is so old as to be worthless.

All of these are valid reasons to have recovery partitions, and there may be even more.  However, there are some things to keep in mind:

  • Some do not like recovery partitions because they take up disk space.
  • A recovery partition is not a true backup unless it is regularly updated.
  • If the hard drive fails, you lose the recovery partition as well.
  • Recovery partitions are more visible to endusers.  While that is good in the event of an emergency or desired cleanup, it also means that the more curious minded might delete it or worse.

There are, of course, ways to mitigate most of these.  In particular, a recovery partition should not replace regular backups.  However, if the risks are acceptable, then I hope these instructions might be useful to someone who is looking for alternatives to the paid solutions.

Most of these will assume a certain level of knowledge.  Software changes and can even act differently on different systems.  Some of these came from tediously trying things out, as I don’t have intimate knowledge of all of the software being presented.  There may even be better ways to do some of these tasks.  Therefore, if you choose to follow these directions, you assume all responsibility.  Backup everything before you start so you can at least get back to a known working point.

I will be the first to admit to you that this is not rocket science.  However, it is assumed that you at least have a passing familiarity with your computer system, Microsoft Windows XP installation, using a terminal (commandline) interface on UNIX, doing backups and restores using Clonezilla and computer boot menus.  It is not necessarily required that you be an expert in any of these, but the steps I’ll give in each section will only point out differences or highlight particular items I think need special attention.

It is assumed that you have a computer that is capable of running Windows XP (duh!), has at least an 80 GB hard drive, 1 GB RAM and a CD drive.  If the machine does not meet these minimum specs, I would either upgrade it or drop the idea.

It is also assumed that you are going to blow away all current partitions and create new ones.  Furthermore, the directions will be written from the standpoint of a generic install to put on a machine for resale.  While I will try to remember to point out the “generic” portions of the setup, it is up to you to setup the machine the way you want it.  It is assumed that you have the necessary knowledge to modify the instructions to get the result you want.

So, if you’ve read this far in this gigantic disclaimer, you’ll realize that this is not for the timid.  In fact, I’d recommend you find a spare machine to play around with until you get it down to a process.  However, it’s well worth it even if it’s just for the sanity of knowing you can get back to a known state very quickly.

Anyhow, I’m going to break up the procedure into these articles:

1. Overview of Clonezilla vs MDT

2. Install Windows XP

3. Install Ubuntu

4. Install Clonezilla

5. Package, Wrap and Deliver

So, stay tuned for more details.