Fix for Windows 7 “random wake from sleep” problem

For the last few months I’ve had Windows 7 RC installed on two home computers, and both of them have exhibited a strange problem: They would randomly wake from sleep .

The computers would often wake up just seconds after being shut down. At other times they would wake up in the middle of the night. To make matters worse one PC, which had recently had its graphics card upgraded, would go into an endless loop of restarting without ever getting to the Windows login screen. I suspected a power problem relating to the new card.

I spent quite some time investigating these wake problems (which I believed were unrelated) but could not diagnose the issue. Eventually I gave up and had to disable sleep on both machines (which pained me greatly!).

Last week I had a second wind and was determined to resolve this problem once and for all. I figured there must be a tool that could tell me what caused the wake up events, and after some research I discovered the Vista/Windows 7 powercfg tool.

To use this tool you simply type powercfg –lastwake at the command prompt

powercfg

In the above screenshot you can see the computer was woken by something on the USB hub (my mouse in this case). But much to my annoyance, when I ran this tool after a phantom wake it reported the type was “Unknown”!

Because I had a suspicion this could be a wake-on-lan (WOL) behaviour I used the WireShark network analysis tool to monitor network traffic for WOL packets. Perhaps a third computer had been infected with malware and was trying to wake other computers to have its wicked way? Unfortunately nothing showed up on the wire.

No further progress was made until I randomly stumbled across a forum posting about a network adaptor setting called “Wake on pattern match“. I checked both my PCs and this setting was enabled. It appears this obscure setting is enabled by default in Windows 7 for Realtek RTL8168B/8111B and RTL8168C(P)/8111C(P) Family Gigabit Ethernet NICs.

What does “Wake on pattern match” actually do?

Leave a comment

How to Fix NTLDR Missing in NTDetect?

What is NTLDR?

NTLDR is short for NT loader – a program loaded from the hard drive boot sector that displays the Microsoft Windows NT startup menu and helps Microsoft Windows NT load. So when it goes missing for some reason, your windows cannot load. I use Windows XP on a Pentium 4 PC. Though it seemed common on a routine google search, it was not so easy to fix and many forums reported that formatting hard drive was the last solution eventually.

You may someday see the dreaded “NTLDR is Missing” error when you start your computer if you use Windows 2000 or XP as your operating system. This error occurs for many reasons, such as having too many files in the root folder of your hard drive… Recent Article published on 12/3/2010 by Jeff Grundy
eHow Computers – How to Fix NTLDR Missing in NTDetect?

How to create a boot disk.
Information on creating your own boot disk for your PC computer in case of emergency or to help run big applications / games.
http://www.computerhope.com/boot.htm

Repair XP
… If XP won’t start it may be due to a damaged boot sector or a missing or corrupt ntldr or ntdetect.com files … To replace damaged ntldr and ntdetect.com you can copy fresh files from the XP CD using the COPY command.
http://www.webtree.ca/windowsxp/repair_xp.htm

Last Longer In The Bed
How You Can Last 10-30 Minutes Longer In Bed Tonight.
Ejaculationtrainer.com

How to create a bootable floppy disk for an NTFS or FAT partition in …
This article contains step-by-step instructions for creating a bootable floppy disk for an NTFS or FAT partition in Windows XP.
http://support.microsoft.com/kb/305595

How to create a bootable floppy disk for an NTFS or FAT partition in …
This article contains step-by-step instructions for creating a bootable floppy disk for an NTFS or FAT partition in Windows XP.
http://support.microsoft.com/kb/305595

Repair XP
… If XP won’t start it may be due to a damaged boot sector or a missing or corrupt ntldr or ntdetect.com files … To replace damaged ntldr and ntdetect.com you can copy fresh files from the XP CD using the COPY command.
http://www.webtree.ca/windowsxp/repair_xp.htm

An NTLDR or NTDETECT.COM Not Found Error
you get an error that NTLDR is not found during bootup a Windows XP installed computer … is missing” error message in Windows 2000 255220 “NTLDR is missing” error message when you upgrade or install Windows 2000 over Windows 95, …
http://support.microsoft.com/kb/555304

NTLDR is missing
Below are the full error messages that may be seen when the computer is booting. NTLDR is Missing Press any key to restart Boot: Couldn’t find NTLDR Please insert another disk NTLDR is missing Press Ctrl Alt Del to Restart
http://www.computerhope.com/issues/ch000465.htm

How to troubleshoot the “NTLDR Is Missing” error message in Windows 2000
… that you can use to troubleshoot the “NTLDR Is Missing” error message that you may receive when you try to start Microsoft Windows 2000.
http://support.microsoft.com/kb/318728

Leave a comment

Creating A Bootable WinPE 2.0 USB Key

Windows Preinstallation Environment (PE) 2.0 is a slimed down version of Windows (hence all the MiniNT references) that used to be the exclusive domain of OEM’s providers. Microsoft has wisely chosen to offer this to the masses as part of the Windows AIK. USB keys can be found just about anywhere these days for next to nothing. Combine the capabilities of WinPE with the portability of a USB key and you just made a very powerful troubleshooting, imaging, and data recovery tool. Here is a quick step by step on how to do just that:

Step 1. ) Get USB Key

You probably already have a few and if not you can purchase these just about anywhere, so I won’t tell you where to get one.  You should get a USB 2.0 device of at least 512mb in size, but if you plan on putting a lot into a custom PE install or plan on using it to transfer data too then you are better served getting a larger size (2.0-4.0GB)

Step 2.) Download and Install the Windows Automated Installation Kit (Windows AIK)

This deployment oriented tool set contains Windows PE 2.0.

Step 3.) Format the USB key

Note: This must be done from Windows Vista

Start a command prompt and run the following. This set of commands assumes your USB key is detected as disk 1, you should double check that by doing a list of the disks before cleaning it. If you have multiple hard drives you could end up wiping your second drive using this command. You have been warned.

* Diskpart
* select disk 1
* clean
* create partition primary
* select partition 1
* active
* format fs=fat32
* assign
* exit

Step 4.) Setup Windows PE

* In this step you will create and customize WinPE for your disk. From the machine that you installed the Windows AIK go to the start menu and select “Windows PE Tools Command Prompt” from under the Windows AIK program folder.
* Run Copype.cmd x86 c:\winpe_x86
o you can create an 64-bit version by changing the architecture from x86 to amd64
* Add customizations to WinPE
o copy any tools you want available to the C:\winpe_x86\iso folder such as imaging tools if you want to use this for capturing images (imagex, wimscript.ini)

Step 5 .) Copy Windows PE to USB Key

Insert the USB key into the machine that you have WinPE on and run the following command to copy the contents to the USB Key

xcopy c:\winpe_x86\iso\*.* /s /e /f e:\

change c: to reflect the drive your files on and e: to be your USB key.

There you have it…a quick way to make a handy USB version of WinPE that you can take with you anywhere.  These can be used in almost any modern computer that supports USB booting.

Leave a comment

Using System Restore on Windows 7, Vista or 2008

What does System Restore Do?

Windows makes periodic restore points that saves the registry files. You can recovery a system with one of these restore points. It can often correct a host of problems including:

* Repair a damaged or corrupted Registry
* Remove an application that failed during install/uninstall and screwed up something else
* Inactivation of some viruses, malware, spyware and a few rootkits

You success depends on being able to find a restore point that was made BEFORE the damage or problem was created. It’s quite helpful if you have a good idea when the problems began or when some major event caused the problems.

One of Restore-points failings is it only retains the last 8 restore points, and every install and uninstall uses up another restore point. You may find that the restore points do not go back far enough in time to help solve your problem.

Keep in mind that anything that was installed, updated or changed after the point of the restore point you plan to use will be lost, and these installs and updates will need to be reapplied. Your data should not be affected, although having a good backup of your important data is always wise!

The Simple System Restore

Windows makes it easy to return to the last working checkpoint, what it calls the Last Known Good Configuration. This is used when some event causes Windows to fail to boot up. Often Windows will detect this and on the next boot provide access to the Advanced Boot Options.

If Windows can boot up, then this option will not solve any problems, since the “Last Known Good Configuration” will have already saved the problems you’re encountering.

To get to this screen manually, during the boot up process (and well before you see any Windows logos) press and hold F8 until a menu appears. In some cases the Please select an operating system to start menu appears. If so, select your operating system and press F8 again. The goal is to get to the Advanced Boot Options screen.

Windows 7, Vista and Server 2008:

Advanced Boot Options

Choose Advanced Options for: Microsoft Windows Windows 7
Please select an option:

Safe Mode
Safe Mode with Networking
Safe Mode with Command Prompt

Enable Boot Logging
Enable low-resolution video (640×480)
Last known Good Configuration (advanced)
Directory Services Restore Mode
Debugging Mode
Disable automatic restart on system failure
Disable Driver Signature Enforcement

Start Windows Normally

Description: Start Windows with only the core drivers and services. Use
when you cannot boot after installing a new device or driver.

ENTER=Choose

ESC=Cancel

Use the down arrow key to highlight the option Last Known Good Configuration and press Enter. This will load the checkpoint before the last event. If this fails to correct the problem, then you’ll need to use an older Restore point as described below.

Do NOT use Directory Services Restore Mode – this is for IT professionals and it starts running Windows Domain Controller with Active Directory. It does not run a System Restore.

With some OEM pre-installs of Windows, you may get another choice in the list, Windows Recovery Environment (not shown above). If this option is available, and you select it, you will get a new menu to select the recovery tool. You can select System Restore to choose from the last eight restore points.

System Restore from a running Windows 7, Vista or 2008

Click on Start, type rstrui and press Enter. The System Restore dialog appears:

System Restore Start

Here it shows the next-to-last saved restore point as it’s recommendation. If your problems occurred after this date, it’s a good choice. You can select the option Choose a different restore point to view all the available system restore points. Click on Next.

If you had selected to view a different restore point, the dialog appears:

System Restore select

Here you select from one of the last eight restore points. Select Next. A final confirmation dialog appears:

System Restore Confirm

Select Finish. A second confirmation appears:

System Restore Confirm 2

Before continuing, be sure all applications are closed as the Restore will force a reboot. Select Yes to start the restoration. The restoration will begin and the system will reboot when it’s complete.

It may take 10 minutes or more, so be patient and don’t power down the PC while the restoration is occurring. After the reboot it will tell you the restore completed successfully.

If you don’t like the results of the restoration, you can return to System Restore and choose a different restore point or even undo the last restoration.

Recovery Console and System Restore from Windows 7/Vista boot DVD
Vista CD

Ideally, you’ll have a retail version of the Windows 7/Vista DVD. Many PC manufacturers fail to include this DVD when an OEM version of Windows is installed to save a few cents. If you don’t have a Windows installation DVD, you’ll need to get one from your computer manufacturer. If you’re lucky they may have installed a copy of System Restore on the hard disk. If you do not have the bootable DVD, see the section above The Fast and Easy System Restore.

Use the following steps to get to the Recovery Console from the boot DVD:

Insert the DVD and boot from it. You’ll get a black and white screen:

Press any key to boot from CD or DVD….

If this doesn’t appear, it may be the DVD is not a Windows bootable DVD. Assuming you get this message, press a key (spacebar or anything else). If you don’t press any key within about 5 seconds, it will boot from the hard disk.

Continuing to boot from the DVD you’ll see a loading progress screen.

Windows is loading files…

This typically takes 2-3 minutes. When complete the first options screen appears.

Vista Install Start

Change any options if desired, and press Next.

Vista Boot Install Now

To start the Recovery Console, select Repair your computer.

OS selection

Unless you have multiple copies of Windows installed, only one choice will appear. Select your OS, and press Next.

Vista Boot Recovery Options

Here you can pick from a number of useful options.

Startup Repair looks for damaged or missing key system files and will replace them if a problem is discovered.

System Restore replaces the registry with a previously saved one (jump to System Restore).

Windows Complete PC Restore restore the entire computer from a previously saved backup (if it was made). This feature is only available on Business and Ultimate editions of Vista and Professional and Ultimate versions of Windows 7.

Windows Memory Diagnostic Tool to check your system memory for errors.

Command Prompt for advanced users who wish to manually perform an action (jump to Command Prompt).

System Restore

After selecting System Restore from the options menu, the screen appears:

system restore

Press Next.

System Restore Choose

From the list of restore points, select the one you want to restore. You’ll want to pick a date prior to the problem event, such as before an installation that you suspect caused the problem. You do not want to pick the newest restore point, since that has saved the very last problematic registry.

Press Next.

System Restore Confirm

If you have multiple drives, in rare cases there may be restorable information on those other drives. The status will confirm which drives have recovery information. Check any drives that you want to recovery (including the system drive). Press Next.

System Restore Confirm 2

This is the final confirmation. Press Finish to begin restoring the selected restore point.

It may take 10 minutes or more, so be patient and don’t power down or reset the PC while the restoration is occurring. After the reboot and logging on again, Windows will confirm the restore completed successfully.

If you don’t like the results of the restoration, you can return to System Restore and choose a different restore point.

Command Prompt

All commands, directories and filenames are not case sensitive. Don’t forget to include the spaces exactly as shown. Most DOS type commands are available, although the HELP command to list the commands has been removed.

Unlike XP’s recovery command prompt, files and folders marked hidden will not appear. Use the “/h” command line option to see these files and folders. For example to see the hidden files and directories in the C: root, at the prompt type dir c:\ /h

Highlights include:

* Validate and Fix the File System
* Repair the Boot Process
* Edit or View a File
* Exit Command Prompt

Validate and Fix the File System

This runs the check disk program to detect and attempt to repair problems on one partition. For example, to repair the C: drive:

1. At the prompt type chkdsk  c:  /r

Repair the Boot Process

Typically this is used if Windows doesn’t start and you can’t get to the safe mode menu. You might also replace the Master Boot Record (MBR) and boot sector if you suspect a virus infection. There are four options:

New MBR – Insert a new generic MBR without changing the partition table.

* At the prompt, type: bootrec  /FixMbr

New Boot Sector – Insert a new Windows 7/Vista compatible boot sector. It will automatically insert the right type of sector for the file system type (NTFS, FAT32, etc.)

* At the prompt, type: bootrec  /FixBoot

Rebuild BCD – Rebuild the Boot Configuration Data (BCD). The BCD controls which partition boots. This option will let you select which installations to include in the BCD.

* At the prompt, type: bootrec  /RebuildBcd

Find OSes – Scan the system for all OS installations that are compatible with Vista/2008 and will also show those that are currently included in the BCD.

* At the prompt, type: bootrec  /ScanOs

Edit or View a File

1. At the prompt, type Notepad filename

2. Notepad opens to edit the filename provided. You can also open notepad without a filename and either open a file from within Notepad or create a new file and save it.

Exit Command Prompt

1. At the prompt, type Exit

2. The system will close the command prompt dialog and return to the Recovery Options menu.
Notes for 64-bit Environments

These instructions address all 32-bit Windows 7, Vista and Server 2008 environments. If you are using 64-bit edition, operations are normally the same.

A Better Recovery Alternative

If you installed Avanquest’s SystemSuite or Fix-It Utilities, both products include Recovery Commander, which is installed and activated by default.

Recovery Commander provides an easier-to-use more advanced recovery process than Windows System Restore, dealing with a far wider range of problems. Key features include:

* Automatic periodic saves of critical system information
* Recovery from failures such as:
o Corrupt or damaged registry
o Damaged boot record
o Missing system files
o BOOT.INI and BCD (Vista) configuration errors
o Works with all Windows file systems (including NTFS)
* Fixes Windows when it can’t start
* Automatically creates checkpoints for new program installations

The recovery process is very easy. It can be run from within Windows, or by booting from the SystemSuite or Fix-It installation CD. Below is the first screen from the boot CD to select Recovery Commander as well as other rescue features.

Recovery Commander Start

Recovery Commander also provides the option to make an undo checkpoint before doing a restoration, so it is easy to try different checkpoints without risk.

Leave a comment

Install Windows XP on SATA without a Floppy (F6)

SATA hard drives have become more and more appreciated tending to substitute the IDE drives due to the increasing speed they offer. Motherboard manufacturers started to implement the new standard years ago, when the technology was young and expensive. Now, as the SATA HDD prices have lowered to a level where anybody can afford to choose a SATA enabled HDD instead of an IDE one, a great migration has been observed among the common computer users.

They choose to install Windows and applications on SATA drives because they provide more speed which determines the system to run smoother. Thus, for those owning older mainboards with SATA support an extra step is required while attempting to install Windows XP. Windows XP does not provide drivers for all the SATA controllers, therefore, during the installation procedure, the user must insert a floppy with the drivers that came in the package along with the motherboard.

Not a big deal, not much effort, but the funny thing is that a great number of people passed on their floppy drives. Under these circumstances, no floppy means the impossibility to install Windows XP on SATA (on some mainboards). The result? The installation guide simply won’t detect the SATA HDD.

People that were happy they got rid of the old removable drive have now motives to worry. Some may reconsider buying new floppy drives for their computers. Even if I wrote in a precedent article about the utility of the floppy drive, I do not encourage spending your money buying back an obsolete piece of hardware. I will present you a method to avoid this inconvenient by doing a software trick.

Let’s take it slow. Where is the problem? We have a driver problem strictly because the SATA driver we need does not come embedded in the Windows XP installation package. What if we add the driver by ourselves before installing Windows?

What ingredients are involved in this operation? The original Windows XP Installation CD, a freeware application named NLite and a blank CD. Moreover, we need the drivers for the SATA controller provided by the manufacturer. In case you did not find any floppy inside the motherboard package or you cannot locate them on the mainboard
installation CD, you can consult the manufacturer’s website to download the latest versions. To do the trick I have been talking about, it is assumed that you already have a Windows installed on an IDE drive. In case you don’t, pay a visit to a friend and ask him to let you use his computer. It won’t take too much time, I guarantee.

So, download the drivers and unzip them (in case they come archived) in a desired location. Then download and install the Nlite application. When you start the Nlite application, you will be asked to provide the location for the Windows installation package. Insert the genuine Windows Installation CD into the CD drive and, inside the application, select the CD drive letter.

To insert the SATA drivers within the installation package, you need to have it saved on the HDD. Hence, when the warning window appears click OK and select the destination folder for the files to be saved. Make sure that the destination partition / HDD has enough space to store the contents of the installation CD.

I tested a Windows XP Home Edition and it seems that it required about 566 MB. Immediately after you have chosen the destination folder, the application will start copying the Windows installation files. When finished, it will display some version information regarding the newly copied Windows Installation Package.

Now, click next twice until you get to a screen where you get options sorted in 4 categories: Integrate, Remove, Setup, Create. We are interested in the integration procedure, therefore select the Drivers button and click next. From the next menu window, click Insert and select multiple drive folder option from the drop down menu. This option permits you to browse to the location where the downloaded drivers are found.

Select the containing directory and click next. You will get a list with the available drivers (in case there are more than one) or simply one driver. Select it (them) and click next. Now the application will ask for the permission to start the integration procedure. Choose Yes and wait for the drivers to be inserted into the installation package.
Review image    Review image    Review image    Review image    Review image

Review image    Review image    Review image    Review image

With problematic driver being included in the installation package you can install Windows XP on your SATA HDD…but…the installation package is on the HDD. You need a bootable CD in order to start an installation. Don’t worry, once the installation package has been adorned with additional user selected drivers it can be transformed into a bootable disk image and later burned on a CD. To encapsulate the installation into a ISO image use the same Nlite application.

Open it, make sure the HDD installation folder is selected and click next. Select “Last session” preset and click next again. Now from the options menu choose Bootable ISO and click next. In the following window, make sure that the mode is set to “Create Image” and click Make ISO. A destination folder is required where the resulting ISO image will be saved. Once the image saving process finished you have the freedom to burn it on a blank CD with whatever you favorite CD burner software may be.

The new CD will be the twin copy of the Windows Installation CD but with one difference, it includes the SATA driver.

Leave a comment

GRUB tips and tricks – Spicing up a great utility for more IT fun

The GRand Unified Boot loader, or GRUB, has all but replaced the default boot loader on many GNU/Linux distributions. It includes some conveniences over LILO, the LInux LOader. One advantage is not having to remember to run /sbin/lilo every time you make a configuration change. It also can function as a boot loader for removable media such as floppies, CD-R/W and USB flash memory keys. It is short-sighted to view GRUB only as a boot loader to be installed on a hard drive of a GNU/Linux system. Combined with a few other utilities, GRUB can be a powerful and good-looking tool for your home, organization or workplace.
Introduction

First, what exactly is GRUB? GRUB is a boot loader, which means it passes control of the boot process from the Power-On Self Test (POST) to the kernel of your GNU/Linux distribution. GRUB works in a modular, layered fashion so that any unneeded modules are not loaded. Not only does this reduce execution time, but it saves valuable resources when running from removable media. GRUB optionally loads its configuration file at run/boot time, so you don’t have to type in commands manually each time. However, the command-line option is still available in case there is an error in your configuration file. So why use GRUB when there are other options out there? The beauty of free software is that you have choices. Alternatives to GRUB include LILO, syslinux and isolinux. The benefit of GRUB is that it will work in many different types of boot devices, but you only need to learn one set of menu commands. In addition, GRUB can work on other forms of bootable storage, such as CD-R/W, USB flash memory keys, floppy disks, and even via a TFTP server with PXE ROM booting.

I got the inspiration for this article after trying DSLinux (or DSL), which is a fully graphical Linux distribution weighing in around 50 MB. After seeing an advertisement on their website for a USB flash memory drive with DSL installed, I figured I could probably learn how to set DSL up myself on my Lexar 256 MB JumpDrive. The DSL documentation pointed towards installing via syslinux and reconfiguring the cylinder/head/sector information of my JumpDrive, but I didn’t have any luck trying to get my USB flash memory key to boot successfully. Finally, I tried using GRUB and I was up and running with DSL in no time!

First, I recommend creating a directory structure to organize your boot-related files, and keep them separate from any other files you’d like to keep on the USB flash memory key. You could create two partitions, but I couldn’t get both partitions to load correctly when I inserted the key back into Windows. On my USB flash memory key, I created a root folder named boot to hold all the data necessary for USB booting (see figure 2). Under the boot folder, I created a directory named grub for GRUB-related files, images which are initial ramdisk (initrd), floppy, or disk images, and finally kernels to hold all the kernels. You may want to organize your boot folder differently, but make sure that you change the corresponding paths and directory names in GRUB’s menu.lst file. The menu.lst file that I use can be found in Sidebar 1.

Sidebar 1: Contents of menu.lst

default=0

timeout=10

root=(hd0,0)

splashimage=/boot/grub/debsplash.xpm.gz

title DSL 1.2 (2.4.26) 1024×768 (save to RAM)

kernel /boot/kernels/dsl-linux24 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 toram nomce noapic quiet knoppix_dir=images knoppix_name=dsl

initrd=/boot/images/dsl-minirt24.gz

title Debian Sarge Installer

kernel /boot/kernels/di-vmlinuz initrd=/boot/images/di-initrd.gz ramdisk_size=10240 root=/dev/rd/0 devfs=mount,dall rw

initrd /boot/images/di-initrd.gz

title HP nx5000 F0.d BIOS Upgrade

kernel /boot/kernels/memdisk

initrd /boot/images/hpnx5000f0d.img

title Memtest86+ (1.60)

kernel /boot/kernels/memdisk

initrd /boot/images/memtestp.bin

Next, you’ll need to copy some of GRUB’s stage files, including stage1, stage2, and fat_stage1_5, and put them into the boot/grub directory on the USB flash memory key. These will allow GRUB to boot into GNU/Linux and other operating systems. After the files are copied over, it’s time to install GRUB to the Master Boot Record (MBR) of the USB flash memory key.

Luckily, it’s the same process as installing to a hard drive:

# grub
grub> find /boot/grub/stage1
(hd0,1)
(hd2,0)

On my system, hd0 is /dev/hda and hd2 happens to be /dev/sda. Just to make sure, we can use a bash-like tab completion to look through a filesystem:

grub> find (hd2,0)/boot/im<TAB>
grub> find (hd2,0)/boot/images/

Since the /boot directory on /dev/hda doesn’t have an images directory, I know that (hd2) is the hard drive that I want to install GRUB on:

grub> root (hd2,0)
Filesystem is type fat, partition type 0xb
grub> setup (hd2)
Checking if “/boot/grub/stage1” exists… yes
Checking if “/boot/grub/stage2” exists… yes
Checking if “/boot/grub/fat_stage1_5” exists… yes
Running “embed /boot/grub/fat_stage1_5 (hd2)”…  15 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd2) (hd2)1+15 p (hd2,0)/boot/grub/stage2
/boot/grub/menu.lst”… succeeded
Done.
grub> quit

Great! Now we have GRUB in the USB flash memory key’s MBR. Now, we have to put some files on the memory key to boot into and create a menu.lst file!

GRUB with disk images

One cool trick is to use GRUB and memdisk to boot floppy disk images. Using the memdisk kernel from the syslinux package, you can load disk images and execute them in a non-emulated environment. How might this be useful? Let’s say you have an organization with several different models of desktops and laptops. You could create a CD-R/W or a bootable USB flash memory key with all of the different BIOS upgrades or hardware tests. Rather than carry around a book of floppies, you can simply copy the floppy image and boot from the CD-R/W or USB flash memory key. Using this method, you can also add Memtest86+’s floppy image to your bootable CD-R/W or USB flash memory key and have it at your disposal. Here is an example of a menu.lst snippit using memdisk to boot into Memtest86+:

title MemTest86+ Ver 1.60
kernel /boot/kernels/memdisk
initrd /boot/images/memtestp.bin

There is nothing special about the filenames. The only important thing is that the path and name referenced matches with the actual files. Check out Sidebar 1 for more examples of disk images.

Leave a comment

Stick tricks – USB memory magic

If, like a growing number of people, you’re in possession of a rarely-used USB memory stick, here’s four simple but incredibly useful tips that’ll not only give it a whole new lease of life but can also simplify your world.

Trick 1: Speed up Windows Vista

If Windows Vista is running like a slug with a tranquiliser habit, pull out your USB memory stick and make use of Vista’s ReadyBoost feature. Doing so is as easy as plugging a ReadyBoost compatible USB memory stick into a spare USB port and then selecting “Speed up my system” when the AutoPlay menu pops up.

In non geek-speak, ReadyBoost turns your USB memory stick into a memory cache for frequently accessed data. Because a USB memory stick stores data in electronic memory, it can retrieve and send information many times faster a slower mechanical hard disk drive, significantly speeding up access to your documents and other data.

Trick 2: Ditch your Laptop

Lugging around a laptop can literally be a pain in the back, especially when you can create a bootable operating system complete with all your favourite applications and documents on a USB memory stick that’s as light as a feather. If Windows is a must have, try MojoPac which will allow you to run Windows, complete with all your favourite apps and documents directly from your USB memory stick.

A basic freebie version of MojoPac can be found here whilst Penguin fans (or those with small USB memory sticks and older PCs) can opt for Damn Small Linux which takes up a mere 50Mb of space and will run on ancient, low spec PCs. Best of all Damn Small Linux won’t cost you a red cent.

Trick 3: Create a PC Rescue Kit

If, like me, you’ve become the tame tech support person for friends, family, and other relatives, then having a USB memory stick on hand preloaded up with a bunch of nifty PC repair tools makes a whole lot of sense.

As one of the winners of a competition to come up with the best selection of applications able fit on a tiny 32Mb USB memory stick, the PC Repair Kit crams a huge amount of incredibly useful, and free apps for file recovery, anti-virus, anti-spyware, system information, system maintenance and so on. Getting your mits on the PC Repair System is as easy as downloading the PCRepairSystem.zip file from here and unzipping its contents onto a spare USB memory stick.

Trick 4: Keep Files Synced Stick

With a multitude of irreplaceable and constantly changing documents scattered across a motley selection of work and home PCs, keeping vital data at hand no matter where I am used to be bit of a challenge, until I started using SyncBackSE which provides a near idiot proof one-click means of keeping home and work files synchronised. A basic version of SyncBack is a doddle to install and can be had for free from here.

Choosing a USB Memory Stick

USB memory keys are pretty simple gadgets, typically consisting of a simple circuit board and memory chip. It’s this chip that sets USB memory sticks apart from the run of the mill memory in your PC, which develops amnesia once you kill the power. The static memory used in a USB memory stick, on the other hand, doesn’t need any power to remember the information it’s storing (data stored on a flash drive can last up to ten years).

In a nutshell, this means USB memory sticks need no batteries and have no moving parts, making them significantly more reliable and robust compared to older storage technologies such as diskette (like anyone still uses those) and DVD-ROM media.

When shopping for a USB memory stick, the first thing to check out is its transfer rate. This refers to the speed that the USB memory stick can achieve when reading or writing data to and from a PC. As a rule of thumb, a basic USB memory stick should be able to transfer data at an average of about 10MBps to a PC speed and around 3MBps from your PC.

Higher end models should typically be able to read data at an average of 16MBps and write it at an average of around 32MBps. Most good USB memory stick brands should also indicate if they’re fast enough to be ReadyBoost-compatible.

Last but by no means least, check out the design of any USB memory key you’re buying. If attaching your USB memory key to a key-ring is a priority, make sure it’s solidly built so it wont be easily lost. Equally important, check to ensure that whichever USB memory key you choose will fit into the USB ports on your PC, and that it won’t obscure access to neighbouring ports.

USB Stick Pick – Lexar JumpDrive Secure II Plus

Available in 16Gb, 8Gb, 4Gb, 2Gb and 1Gb capacities, the JumpDrive mightn’t be the cheapest USB memory stick in town, but it does offer some pretty nifty features that most of its cheaper counterparts are hard pressed to match.

Most notable is its built-in capacity meter which consists of a small e-ink fuel gauge on the side of the USB stick. Sporting 10 bars, it gives you an at a glance fuel gauge like view as to just how much (or how little) capacity you’ve got left. Whilst I wasn’t able to obtain data transfer specs for the JumpDrive, it was fast enough to be used with ReadyBoost and managed to transfer large files at a fairly zippy clip.

Design-wise, Lexar have sensibly chosen to avoid bling, Instead opting for a matt black, no-nonsense finish that blends in well with most PCs. A blue Lexar logo flashes to indicate drive activity, but thankfully doesn’t stay lit to distract you from valuable system-time.

While its sensible design means it won’t set the world on fire, it also means it will easily fit all but the most exotic USB ports with little to no fuss whatsoever and won’t obstruct neighbouring ports.

The JumpDrive also comes bundled with the Secure II Plus application which gives both password and encryption protection for keeping data private. The Secure II Plus software lets you create password-protected Encrypted Vaults that will automatically scramble any data saved onto them using 256-bit AES encryption which can also be password locked.

The Secure II Plus app works on Macs and Windows-powered PCs and also provides a File Shredder function which can securely nuke files so they can’t be recovered.

Leave a comment

Install Windows 7 on a USB Stick/Flash drive

Installing W7 on a virtual machine I’m sure is not as fun as having it installed on a physical machine. The problem is, I no longer have enough space to squeeze W7 into my laptop’s hard drive. So I thought of having it installed via an external USB hard drive (Maxtor 40GB) but doing so unfortunately is not possible; the W7 installation wizard tells me that it does not support such a hardware configuration. Frustrated, I searched the Internet to see if it was possible; there were instead lots of “How To’s” on installing W7 from a USB stick especially on Netbooks where presence of an optical drive is absent. Well, I eventually end up installing W7 on a 16GB Transcend USB flash drive instead. Now, I’ll be sharing how I did it. I will divided this tutorial into three phases; Phase I is about how to prepare your USB flash drive while Phase II tackles staging the virtual machine and installing W7 then Phase III walks you through tweaking the W7-VM to become W7-on-stick. Here’s a list on what you need to achieve our goal:

1. A PC with a working USB 2.0 port/s.
2. A 16GB USB stick/flash drive or larger (the actual install size is a little over 8GB).
3. VMware Workstation 6.5.x
4. A pre-installed Windows Vista as guest OS in VMware Workstation.
5. A copy of the Windows 7 installation (DVD or ISO).
6. An administrative user account.
7. Tons of PATIENCE.

PHASE I – Preparing the USB Stick/Flash Drive

1. Plug in the USB stick into your PC’s USB port.
2. Fire up your VMware Workstation. If you don’t have it yet, download at least an evaluation version from VMware. You need to register before you can actually download the software. You’d probably ask why VMware Workstation and not Microsoft Virtual PC? Well, I tried this trick on VPC 2007 but it didn’t work but I guess with Hyper-V, it might. Sorry, I currently don’t have a 64 bit PC to install Hyper-V.
3. Turn on your Vista guest OS.
The Removable Devices message box would popup.
4. Just click OK to close it and login to vista when the login screen is presented.
5. VMware can load your USB stick within the guest OS. To do this, click the VM menu then hover your mouse pointer to Removable Devices and hover your mouse pointer to your USB stick from the list of devices then finally select Connect (disconnect from host) from the sub-sub menu. Click here to view image.
6. Click OK when a message box will popup.
7. You will know when the USB stick is loaded because Vista will present you the Autoplay dialog box. Just click Close.
8. Click the Start menu then type comp in the Start Search field then click Computer Management when it gets listed.
9. Click Continue when prompted by the UAC.
10. In the Computer Management snap-in, click Disk Management.
Notice that your USB stick is identified as Disk 1 with its corresponding drive letter assignment or higher if you have more than one currently plugged in. Take note of this. Click here to view image.
11. Close Computer Management.
12. Click Start -> All Programs -> Accessories -> then right-click your mouse on Command Prrompt and select Runas Administrator from the context menu then deal with the UAC dialog box when it pops up.
The Command Prompt should launch thereafter.
13. It’s geek time folks so in the Command Prompt, type diskpart and hit the Enter then type list disk and hit Enter again.
Notice that the USB stick will be listed as Disk 1 or higher.
14. Now do the following commands exactly as sequenced:
– select disk 1 <<< selects the USB stick
– clean
– create partition primary
– select partition 1 <<< you can do list partition to check the partition number if you wish
– active <<< marks the new primary partition active
– format fs=ntfs override <<< tested your patience will be but patient you must…he he he
– exit
After you exited diskpart, don’t close the Command Prompt. Just have it on the background.
Remember that you have to hit Enter everytime you finished typing a command.
15. Load the W7 install DVD into your PC’s optical drive or map the W7 ISO you downloaded from Microsoft to VMware Workstation.
– VM menu -> Removable Devices -> CD/DVD (IDE) -> Settings -> Use ISO image file -> Browse then locate the W7 ISO and click Open then OK.
– VM menu -> Removable Devices -> CD/DVD (IDE) -> Connect
16. Close the Autoplay dialog when it pops up.
17. Back in the Command Prompt, change drive to your CD/DVD drive then change directory to BOOT.
– type D: then hit Enter.
– In drive D:, type cd boot then press Enter.
18. Type bootsect /nt60 X: /force then hit Enter. This is going to make the USB stick compatible with BOOTMGR bootcode. X: is the drive letter assignment of the USB stick.

Now that the USB stick is ready, let’s dive into the next phase…

PHASE II – Setting up the W7 Virtual Machine and Installing W7

1. If you have 2GB or more RAM on your PC, you don’t have to do this procedure; shutdown the Vista VM to give way to W7.
2. Click the File menu -> New -> Virtual Machine.
3. Tick Custom (advanced) then click Next when the New Virtual Machine Wizard pops up.
4. Workstation 6.5 is pre-selected for Hardware Compatibility so just click Next.
I haven’t tried this on an earlier version, sorry. It might work but you will have to try it yourself and perhaps share your experience.
5. Tick the last option, I will install the operating system later then click Next.
6. Choose Vista as guest OS from the list under Microsoft then click Next.
7. Type Windows 7 in the Virtual machine name field then click Browse.
8. In the Browse for Folder dialog, create a new folder on drive C: named Windows_7 and click OK then click Next.
9. If you have a dual core CPU, choose Two for Number of processors then click Next. Choose One if using a single core CPU.
10. The RAM is pre-set to 512MB so click Next. Otherwise, assign a larger RAM if you have the hardware for it.
11. Tick Do not use Network connection then click Next.
12. LSI logic is pre-selected for SCSI Adapter so click Next.
13. Select the last option Use a physical disk (for advanced users) then click Next.
14. In the Device list, choose PhysicalDrive1 then click Next. PhysicalDrive0 is used by the host OS. If you use this, you’ll mess up the host OS.
15. Click Browse and locate your Windows 7 folder then click Save and click Next.
16. Uncheck Power on this virtual machine after creation and click Finish.
17. We’re not done yet. Under the Commands window, click Edit virtual machine settings.
18. Select Hard Disk (SCSI) then click the Advanced button located in the lower right corner of the Virtual Machine Settings window.

19. Tick Independent. Persistent is pre-selected so click OK.

20. Select CD/DVD (IDE) then choose how the optical drive is connected, Use physical drive or Use ISO image file (in my case, I used an ISO image).
21. Remove both the Floppy drive, USB Controller, and Sound Card then click OK.
22. Before you continue, make sure that the USB drive where you wanted to install W7 is attached to VMware Workstation. Otherwise, this trick ain’t gonna work. Click Power on this virtual machine to start installing W7. Just go through the installation routine as you would on a physical machine.
REMEMBER to:
– Press F2 when you start the virtual machine to change the boot sequence to boot from the CD/DVDROM.
– Format the USB stick within the W7 installation.
– Be patient. The installation is not as fast as it is on real hard drive.

That’s it, you now installed W7 into your USB stick but we have to do something before we can shed tears of joy Wink

PHASE III – Tweaking W7-VM to become W7-on-stick

After the installation, you will be logged into the Desktop for the first time. This will also take time so again be… Yep, that’s right.

1. First, change the resolution to 800×600. Just right-click the Desktop then select Screen Resolution from the context menu.
I don’t have a huge Desktop workspace thus the resolution change.
2. Click Start (it’s the Windows orb) then type command in the Search programs and files text field.
3. Right-click Command Prompt then select Run as Administrator from the context menu and click Yes when the UAC dialog pops up.
4. In the Command Prompt, type cd \WINDOWS\inf and hit Enter. Add this tag:

[*.AddService]
StartType = 0
LoadOrderGroup = boot bus extender

On each of these files
– usb.inf
– usbport.inf
– usbstor.inf

You can use Notepad to edit these files. In Notepad, press CTRL+End to navigate to the last portion of the file then insert or add the above-mentioned tag.
5. When you’re done, fire up the Registry Editor by typing regedit in the Search programs and files text field then hit Enter.
6. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
7. On each of these services:
– usbccgp
– usbehci
– usbhub
– usbuhci
– usbohci
edit keys
Start = 0
Group = boot bus extender
– USBSTOR (for this service, you create a new key string value named Group and do the same as the other services )
8. When you’re done, exit the Registry Editor.
9. Change your user picture unless you want to be represented as a flower.
10. Shutdown W7 then close VMware and shutdown your PC.
11. To be sure that you won’t mess up the host OS, either disable the physical disk/s in BIOS or remove your PC’s the hard drive. You don’t have to do this if you wish but I don’t take chances so I did it.
12. Turn on your PC then alter the BIOS settings to boot first on the USB drive.
13. Save the settings and exit the BIOS.

Momentarily, you will see the fruit of your labor coming to life.

Welcome to the future of USB computing…

Leave a comment