Move Partitions Around on Vista Without Destroying It
Resizing partitions in Vista can lead to a meltdown—you may not be able to boot. Here’s how to resize and still boot up, problem-free.
One of the cool things about Vista is its ability to resize partitions using diskmgmt.msc. This trick works great for those times when you need to shrink or grow a partition. Unfortunately, if you need to move things around as I did this weekend, you won’t be able to use the built-in tool.
I needed to delete a partition I wasn’t using and also give more space to my Vista partition. So I turned to the trusty Gparted (gparted.sourceforge.net), a free alternative to tools like Partition Magic. (Partition Magic doesn’t work in Vista, by the way.) It performed the partitioning flawlessly, but Vista refused to boot after that. I was prepared for that, thanks to the Gparted Vista HOWTO (gparted.free.fr/screenshots/VISTA/Howto_move_VISTA.html), and had my Vista boot DVD ready to perform the post-Gparted operation:
-
Boot up the installation DVD
-
Choose the repair option
-
Let the installation DVD repair the disk automatically when prompted to do so.
This process let Vista boot, but there was still a problem . . . one that I remember from messing up drive letter assignments in previous versions of Windows: Vista booted up and took me to the login screen, but wouldn’t show my desktop. (In theory, the HOWTO should have worked perfectly, but I have a dual-boot Vista/XP system, and things got confused.)
So I had to do one more set of tasks:
-
Log in
-
Hit Ctrl-Alt-Del to get Task Manager to appear (the desktop will not appear normally when the drive letter is messed up)
-
Use Task Manager to run Regedit and make my way to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices and fix the drive letter assignments.
The drive letter assignments can be tricky, because you probably need to do something like rename \DosDevices\C: to \DosDevices\D: and vice versa, but you can’t have duplicate names, so you’ll need to change one of them to something temporary, like:
-
\DosDevices\C: to \DosDevices\X:
-
\DosDevices\D: to \DosDevices\C:
-
\DosDevices\X: to \DosDevices\D:
Once I did that, I rebooted, and all was right with the world!
Tahnk You for this post to Brian Jepson
Tags: DosDevices, how to, partition, vistaHack Windows Vista Multiboot Systems with VistaBootPRO
You don’t need to wrestle with BCDEDIT if you want to change how Windows Vista boots, especially on a multiboot system. Use the free VistaBootPRO instead.
As you’ve seen [Hack #10] hacking the way that Windows Vista boots is pretty tough if your only tool is the command-line interface.
There’s a much better solution than going mano a mano with BCDEDIT. Use the free VistaBootPro (www.vistabootpro.org), which offers a simple, graphical way to hack multiboot systems. Think of VistaBootPRO as a front-end to BCDEDIT. When you make changes using VistaBootPRO, you’re actually editing your BCD store, as if you were using BCDEDIT.
Note: Before using VistaBootPro, it’s a good idea to get a basic understanding of what the BCD store [Hack #10] is and does.
The first thing you should do after installing VistaBootPRO is to back up your existing BCD store. That way, if anything goes amiss when you use the program, you can easily revert to your previous store. To back up your BCD store, click the Backup/Restore Center in VistaBootPRO. A screen like the one shown in Figure 1-22 appears. Click the Save button to save a copy of your store with the file name VPB_Backup.bcd to the root folder. You can also browse to a different folder and save it there. To restore to the BCD store you’ve saved, click the Restore button, click Search, and browse to VPB_Backup.bcd, and then follow the directions for restoring to it.
Note: You can also use the command line to save your BCD store to a removable drive or disk, for more safety. Create a folder for the BCD store: for example, D:\BCD Backup. Next, launch an administrator’s command prompt, and type bcdedit /export “D:\BCD Backup\Bcd Backup”. That will back up the store. To restore it, type this command: bcdedit /import “D:\BCD Backup\Bcd Backup”. For more details, see “The Secrets of Windows Vista’s BCDEDIT” [Hack #10].
Using VistaBootPRO is quite straightforward. To see your BCD store information, click View Settings. For a basic overview of your BCD store, and how your system is set to boot, select Overview, as shown in Figure 1-23. It describes, in plain English, how your system is set to boot, and shows you the basic settings in the BCD store [Hack #10]. Select Detailed to see more BCD settings, and select All for a comprehensive list.
Figure 1-22. Before using VistaBootPRO to change your boot settings, back up your BCD store
Figure 1-23. An overview of the BCD store, and how Windows Vista boots
Click “Manage OS Entries” to get to the most important part of VistaBootPRO. Here’s where you can change the order of the boot menu that appears when your PC starts, set one of the operating systems to be the default, rename any of your operating system list entries, and change the amount of time the menu displays before you boot into your default operating system. As you can see in Figure 1-24, the use of this screen is quite straightforward. Make your changes and click Apply, and the next time you restart your PC, your new boot settings take effect.
The Advanced Settings button contains mainly esoteric options, but it’s the place to go if you want to debug the boot process, enable or disable the boot GUI mode, allow or disallow the use of unsigned drivers in the 64-bit version of Windows Vista, along with similar options.
The final button, Bootloader, will let you uninstall the Windows Vista bootloader, in case you have a dual-boot system, and want to revert to the boot loader of the previous version of Windows.
See Also
-
“The Secrets of Windows Vista’s BCDEDIT” [Hack #10]
-
For another good tool for multiboot and editing BCD, get the free EasyBCD (neosmart.net/dl.php?id=1)
Figure 1-24. Configuring the most important multiboot options
Customize Windows XP Multiboot Startup Options
Edit or create a startup menu that lets you choose which operating system to boot into in multiboot systems, or create a menu that lets you choose different startup options for your single operating system if you have only XP installed.
If you’ve installed another operating system (in addition to XP) on your system, your PC starts up with a multiboot menu, which allows you to choose the operating system you want to run. The menu stays live for 30 seconds, and a screen countdown tells you how long you have to make a choice from the menu. After the 30 seconds elapse, it boots into your default operating system, which is generally the last operating system you installed.
You can customize that multiboot menu and how your PC starts by editing the boot.ini file, a hidden system file, to control a variety of startup options, including how long to display the menu, which operating system should be the default, whether to use the XP splash screen when XP starts, and similar features. And as you’ll see later in this hack, you can also use the file to create a startup menu that will allow you to choose from different versions of your operating system—for example, one that you’ll use for tracking down startup problems, and another for starting in Safe Mode.
The boot.ini file is a plain-text file found in your root C:\ folder. You might not be able to see it because it’s a system file, and if you can see it, you might not be able to edit it because it’s a read-only file. To make it visible, launch Windows Explorer, choose ViewTools
Folder Options
View, and select the Show Hidden Files and Folders radio button. To make it a file you can edit, right-click it in Windows Explorer, choose Properties, uncheck the Read-Only box, and click OK. For a quicker way, right-click My Computer, choose Advanced-
Startup and Recovery Settings, and then click Edit to edit the boot.ini file. That way, you don’t need to remember to set the permissions back the way you found them.
Editing Files
To edit the file, open it with a text editor such as Notepad. Following is a typical boot.ini file for a PC that has two operating systems installed on it—Windows XP Home Edition and Windows 2000 Professional:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect
As you can see, there are two sections in the file: [boot loader] and [operating systems]. To customize your menu and startup options, edit the entries in each section. Before editing boot.ini, make a copy of it and save it under a different name (such as boot.ini.old) so that you can revert to that if you cause problems when you edit the file.
Following are details about how to edit the entries in each section:
[boot loader]
This section controls how the boot process works; it specifies the default operating system and how long a user has to make a selection from a boot menu, if a boot menu has been enabled. The timeout value specifies, in seconds, how long to display the menu and wait for a selection before loading the default operating system. If you want a delay of 15 seconds, for example, enter 15 for the value. Use a value of 0 if you want the default operating system to boot immediately. If you want the menu to be displayed indefinitely and stay onscreen until a selection is made, use a value of -1. The default value specifies which entry in the [operating systems] section is the default operating system. (The default value is used even if there is only one operating system in the [operating systems] section.) To change the default operating system, edit the setting: in the preceding example, to default=multi(0)disk(0)rdisk(0)partition(2)\WINNT.
So, in this example, if you change the menu settings so that the screen appears for ten seconds before loading the default operating system, and the default operating system is Windows 2000 Professional, the section reads:
[boot loader] timeout=10 default=multi(0)disk(0)rdisk(0)partition(2)\WINNT [operating systems]
This section specifies which operating systems are present on the computer, and detailed options for each one. XP uses the Advanced RISC Computing (ARC) path to specify the location of the boot partition. In the preceding example, the ARC path is:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
The first parameter, which identifies the disk controller, should be 0. The second parameter, the disk parameter, should also be 0. The rdisk parameter specifies the disk number on the controller that has the boot partition. The numbers start at 0. So, if you have two or more hard disks installed and the second hard disk has the boot partition, the setting is rdisk(1). The partition parameter identifies the partition number of the boot partition. Partitions start with the number 1. The final section, which in the example is \WINDOWS, specifies the path to the folder where the operating system is installed.
To the right of the ARC path in the example is =”Microsoft Windows XP Home Edition” /fastdetect. The words within quotes are what will appear on the boot menu next to the entry. To customize the text on the menu, you can change these words to whatever you wish—for example, “My Favorite Operating System.” The /fastdetect switch disables the detection of serial and parallel devices, which allows for faster booting. The detection of these devices isn’t normally required in XP, because the functions are performed by plug-and-play drivers, so it’s generally a good idea to use the /fastdetect switch. The /fastdetect switch is only one of many switches that you can use in the boot.ini file to customize how the operating system loads. Table 1-2 lists others you can use (see www.microsoft.com/technet/sysinternals/information/bootini.mspx for more details).
When you’ve finished editing the boot.ini file, save it. The next time you start your computer, its settings will go into effect.
In this example, if we want the menu to appear for 45 seconds, the default operating system to be Windows 2000, and the XP splash screen to be turned off when we choose to load XP, the boot.ini file should look like this:
[boot loader] timeout=45 default=multi(0)disk(0)rdisk(0)partition(2)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home" /fastdetect /noguiboot multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect
Create a Startup Menu Even If You Have Only One Operating System
Even if you have only one operating system, you can create a boot menu that will let you choose to load your operating system with different parameters. For example, for menu choices, you might have your normal operating system, a mode that lets you trace any startup problems, and Safe Mode. To give yourself the option of operating systems with different parameters, create separate entries for each new operating system choice. For example, for the version of the operating system that traces potential startup problems, you could create this entry:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home" /fastdetect /bootlog /sos
This entry creates a startup log and displays information about the drivers and other operating system information as it loads.
For the version of the operating system that loads in Safe Mode but still allows networking, you could create this entry:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home" /fastdetect /safeboot:network
Figure 1-21. The System Configuration Utility
The boot.ini file would look like this, assuming that you want the menu to display for 30 seconds and you want normal XP startup to be the default:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home" /fastdetect /bootlog /sos multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home" /fastdetect /safeboot:networkTags: Customize, multiboot, option, startup, windows xp, Xp
The Secrets of Windows Vista’s BCDEDIT
affled by Windows Vista’s BCDEDIT command-line tool for customizing multiboot startups? Who isn’t? Here’s an easy guide to its basics.
If you’re only looking to customize the basics of your Windows Vista multiboot system, there’s no need to download and install VistaBootPRO [Hack #12]. You can, instead, directly hack the BCD store using BCDEDIT.
Before you get started, you need a little introduction to the BCD store, and how BCDEDIT lets you edit it. The BCD is made up of a series of objects, each of which is a boot environment application, such as a boot manager. Each object, in turn, is made up of a series of elements. And each element has an attribute that tells how it will be used.
For example, the Windows Boot Manager in the BCD handles the initial startup of the PC, and displays a multiboot menu. One of the elements in the Windows Boot Manager is timeout, which determines how long to display the multiboot menu before loading the default operating system. The timeout element’s option is a number, such as 30, which determines how long (in seconds) to display the screen.
There’s one more thing you need to know about the BCD. When you use BCDEDIT to edit the BCD, you often need to use a GUID (Globally Unique Identifier) of an object of some kind. For example, a partition on a PC has its own GUID, which looks something like this: {b37c75ca-dd09-11d8-9a7e-1030581395c7}.
Note: BCDEDIT wasn’t designed for users, and instead was designed for system administrators who need to set up multiple Windows Vista systems. BCDEDIT and the BCD store are used not only for handling multiboot systems, but also for managing all aspect of Windows startup. System administrators can write scripts using BCDEDIT to automate complex tasks for multiple machines.
That GUID for the partition is unique. But there are also GUIDs that are predefined, and are exactly the same from PC to PC. For example, the Windows Legacy OS Loader, used to load Windows XP and Windows 2000, always has the GUID {466f5a88-0af2-4f76-9038-095b170dc21c}. To make it somewhat easier to use BCD, aliases represent these universal, predefined GUIDs. So instead of using {466f5a88-0af2-4f76-9038-095b170dc21c}, you can use the alias {ntldr}.
With that background behind us, it’s time to actually use BCDEDIT. It’s a command-line tool, and you need to run it as an administrator. Type cmd at the Search box on the Start menu, right-click the cmd icon that appears at the top of the Start menu, and select Run as administrator.
Before doing any editing, it’s a good idea to back up the BCD store, so that you can late restore it, if you do any kind of damage. Create a folder for the BCD store on another drive or a removable disk. In our example, we’ll say that you’re going to back it up to your D: drive. So create a folder called \BCD Backup on your D: drive. Once you’ve done that, type this command and press Enter to back up the BCD store to it:
bcdedit /export "D:\BCD Backup\Bcd Backup"
If you later need to restore the BCD store, type this command:
bcdedit /import "D:\BCD Backup\Bcd Backup"
Next, take a look at how your multiboot system is set up. At the command line, type bcdedit and press Enter. You’ll see a listing like this:
Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=C:
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {current}
resumeobject {657290bb-767a-11db-b48e-f34163468438}
displayorder {ntldr}
{current}
toolsdisplayorder {memdiag}
timeout 30
Windows Legacy OS Loader
------------------------
identifier {ntldr}
device partition=C:
path \ntldr
description Earlier Version of Windows
Windows Boot Loader
-------------------
identifier {current}
device partition=J:
path \Windows\system32\winload.exe
description Microsoft Windows Vista
locale en-US
inherit {bootloadersettings}
osdevice partition=J:
systemroot \Windows
resumeobject {657290bb-767a-11db-b48e-f34163468438}
nx OptIn
We’re not going to edit most of this. We’re going to change only the basics, because a full explanation of how to use BCDEDIT is well beyond the scope of this book. And besides, there are much easier ways to work with the BCD store [Hack #12].
Note all the listings with curly braces { } around them. These are GUIDs. Most are aliases, such as {ntldr}.
The first main listing is Windows Boot Manager, which handles the initial startup. The elements underneath it detail its path, the language it’s in, and so on. It’s mainly self-explanatory. The next listing, Windows Legacy OS Loader, is the loader used to load Windows XP or Windows 2000. The final listing, Windows Boot Loader, is used to load Windows Vista.
So what does this entire listing tell us? The multiboot window will be displayed for 30 seconds, as you can see in the timeout listing of 30 under Windows Boot Manager. Windows Vista is the default operating system that loads after 30 seconds if no action is taken. You can tell that because the default listing in Windows Boot Manager is {current}—and as you can see, the identifier directly under Windows Boot Loader is {current} and its description is Microsoft Windows Vista.
On the multiboot menu that appears when the PC starts, the first listing will be for the previous version of Windows, and the text will read Earlier Version of Windows. The second listing will be for Windows Vista, and the text will read Microsoft Windows Vista.
You can tell that because the displayorder under Windows Boot Manager is {ntldr} first, and {current} second. And if you look in the description of Windows Legacy OS Loader, you’ll see Earlier Version of Windows, and in the description of Windows Boot Loader, you’ll see Microsoft Windows Vista.
To make changes with BCDEDIT, you use a variety of switches. For details, type bcdedit /?, and you’ll get a list of switches, and how to use them. You need to use the switches in concert with GUIDs and attributes. For example, if you wanted to change the boot menu so that instead of displaying Earlier Version of Windows, it displayed Windows XP, you’d issue this command and press Enter.
bcdedit /set {ntldr} description "Windows XP"
Similarly, if you wanted to change the menu so that it displayed Windows Vista Ultimate instead of Microsoft Windows Vista, you’d issue this command and press Enter:
bcdedit /set {current} description "Windows Vista Ultimate"
To change the amount of time the menu appears before booting into the default operating system to 20 seconds, type this command and press Enter:
bcdedit /timeout 15
To have your PC boot into Windows XP instead of Windows Vista as the default operating system, type this command and press Enter:
bcdedit /default {ntldr}
To change the display order of the multiboot menu, so that the Windows Vista entry appears first, and the Windows XP entry appears second, type this command and press Enter:
bcdedit /displayorder {current} {ntldr}
After you make your changes, they’ll take effect the next time you reboot.
Tags: bcdedit, secret, vista, windows, windows vistaUpgrade Your Flash BIOS
Resolve system-level bugs and overcome feature limitations by upgrading your BIOS.
Sometimes a vendor learns of problems or limitations only after a product gets to market and is used in a lot of different situations. Nearly every system board and PC system on the market undergoes at least one significant revision of the BIOS after the product has been released for sale.
Most of us think nothing of seeking out the latest patches and updates for our application software and hardware drivers in hopes of solving a problem, gaining a feature, or boosting performance, but rarely do we think of updating the software and internal drivers that make our system board tick—the system BIOS.
I highly recommend visiting the web site of the manufacturer of your PC system or system board, or even ESupport.com’s web site, to learn what the latest revision of BIOS is for your PC and the issues the revision addresses. You may find one or more clues that can help you solve problems or gain new or proper functionality of your system for a few minutes of browsing and downloading time.
Note: Do not bother visiting the BIOS makers’ web sites looking for BIOS updates. AMI and Award/Phoenix supply only the tools and services for system board and PC makers to create their own BIOS code specific to each individual system board. You wouldn’t think of calling Microsoft, makers of the Visual Studio program development tools, about support or upgrades for software made by Adobe, Intuit, Symantec, or other software makers who use the Visual Studio tools. Nor would you call Sears about problems with your house built with a Craftsman hammer. And so it is with the BIOS companies. A good resource for identifying your system board is the www.motherboards.org web site.
In most cases, except getting a BIOS upgrade from ESupport.com, getting a BIOS update and the software program to load the update into your PC are free from every system board and PC maker’s web site. Because many of the devices you add to a system after the initial purchase are too new to be known to or supported by system board vendors, BIOS upgrades are issued to fix anything from an all-out serious bug that prevents some aspect of the system board from working to enhancing the detection or size of certain types of disk drives, or adding extra support for plug-and-play or power management functions. These items should be spelled out in a readme or BIOS revision description file associated with the particular BIOS version that you download.
Warning: Updating the system BIOS involves overwriting the BIOS code currently stored on the system board and replacing it with new code. This process has the potential to render your system board useless if there is an error or interruption while the update is occurring. If the BIOS file you download is incomplete or corrupt in any way, you will not be able to properly load the BIOS into the system board.Part of the overall BIOS upgrade process may include backing up the current BIOS onto disk. If your system does not behave correctly after the upgrade, you can flash it with a new, good BIOS file or use the original backed-up BIOS file to go back to a known good state. Depending on your motherboard’s capabilities, you may or may not be able to recover from a flashing accident. Intel provides a downloadable recovery BIOS, which can recover certain Intel motherboards after a failed BIOS upgrade. You can locate your recovery BIOS by visiting downloadfinder.intel.com, navigating to your motherboard, and selecting the recovery BIOS, if one is available.
A typical BIOS file can be as large as 4 MB, depending on features. They can be downloaded or used via a bootable CD containing the BIOS file and update program.
Note: Some BIOS upgrade programs are available for use under Windows; this approach, although convenient and more user-friendly, has the risk of failing due to a crash, conflict, or other instability within Windows. I recommend using a DOS-based BIOS upgrade program if it is available. A good bet is to use a USB flash DOS-bootable pen drive. For details, see www.bootdisk.com/pendrive.htm.
Some BIOS update programs create their own bootable diskettes and execute the upgrade process automatically so you need supply only the diskette. Once you have downloaded the BIOS file (usually a .BIN file extension type) and BIOS update program to your hard drive, follow the instructions provided with the upgrade (most users will start at the following Step 8 after launching a Windows-based BIOS updater) or all of the following steps to update your system’s BIOS.
Note: Be sure that your computer is plugged into a UPS (Uninterruptible Power Supply) or (if it’s a notebook) has a full battery charge. All it takes is a power outage during a BIOS upgrade to render your motherboard useless.
-
If you need to install your BIOS upgrade from a DOS environment, prepare a formatted DOS boot diskette (otherwise, run the Windows-based upgrade program and skip to Step 8). Any version of DOS should do, but making a DOS 6.22, Windows 95, 98, or Me startup diskette would be most common. You can also make an MS-DOS startup disk using the format program in Windows XP (run format from the Command Prompt) or Windows Vista (run format from an Administrator Command Prompt [Hack #36]), or downloading boot diskette images from www.bootdisk.com.
-
If in Windows, go to the A: drive.
Note: Don’t forget to check the web site of your video card, disk drive, printer, and USB-connected product vendors for any BIOS or firmware updates for these devices.
— Jim Aspinwall, from PC Hacks (O’Reilly)
HACKING MULTIBOOT SYSTEMS
One of Windows’ more useful features is its ability to boot multiple operating systems. You may want to use multiple operating systems on your PC for a variety of reasons—your virtual private network (VPN) from work may work only with Windows XP, for example, but you run Windows Vista.Maybe you need to test software on different systems. Perhaps you’re a cross-platform developer, working in Linux as well as Windows.
Or, on the other hand, you might like to boot into multiple operating systems simply because you can. After all, there’s often great pleasure to be had in simply doing something for its own sake.
The keys to multibooting are Windows’ boot loaders and boot managers. After you create a multiboot system, when you start up your PC, one of these programs takes over, and displays a menu of choices of installed operating systems. Scroll to the one you want, select it, and you’re ready to go.
In this section of the book, you’ll learn how to hack multiboot systems. You’ll see how you can set up and run a dual-boot Windows XP-Linux PC, and a dual-boot Windows XP-Windows Vista PC, as well as how to hack startup options for multiboot systems.
There are similarities in how you customize Windows XP and Windows Vista multiboot systems—you can use the Msconfig.exe utility and the Startup and Recovery tab of the System Properties dialog box (Windows Vista’s version is shown in Figure 1-20) to edit multiboot as well as basic startup options for both, for example.
Note: To get to the Startup and Recovery tab in Windows XP, right-click My Computer, select Properties, select the Advanced tab, and click the Settings button in the Startup and Recovery section. In Windows Vista, right-click Computer, select Properties, click Advanced System Settings, and on the Advanced tab, click the Settings button in the Startup and Recovery section.
But the similarities are skin-deep. As you’ll see in [Hack #10] Windows Vista has introduced an entirely new startup and boot system, the Boot Configuration Data (BCD) store. The BCD store controls how Windows Vista starts, including multiboot configurations. In Windows XP, all this information was contained in a text file called boot.ini, which was far easier to edit than BCD. Msconfig.exe and the Startup and Recovery tab let you edit the basics of BCD. But to do more than that, you’ll have to wrestle with BCDEDIT, a command-line tool that is one of the most complex and confounding you’ll ever come across. Suffice it to say that even grown men and women have been known to weep just thinking of touching it. Fortunately, there are some alternatives.
Figure 1-20. Editing boot options in Windows Vista
Why did Microsoft make such a major change to the way Windows handles bootup? It wanted to develop a common way to handle devices not just with the traditional BIOS, but that use a new firmware model called the Extensible Firmware Interface (EFI). The boot.ini method couldn’t work on EFI. A BCD store, however, can be used on both systems. BCDEDIT can handle EFI as well as BIOS-based PCs.
Note: On a computer with a traditional BIOS, the BCD store is found in the \Boot\Bcd directory of the active partition. On an EFI-based system, it is found in the EFI system partition. Tags: BIOS, efi, flash, partition, ssytem
Hack an Unhackable BIOS
You may be able to find a BIOS upgrade to work around that unhackable, squeaky clean OEM BIOS.
If you want to do hardware and BIOS hacking, you may run into problems because your BIOS may not support a variety of hacks. A “dumbed-down” BIOS setup gives you few options to choose from, while a truly hackable BIOS gives you parameters aplenty.
Note: If you’re willing to spend a lot of time hacking you may want to replace your existing BIOS with a Linux-based one, LinuxBIOS. For details, see linuxbios.org/Documentation.
Most no-name, “white-box,” do-it-yourself PC system boards come littered with hackable bits through switches, jumpers, or the BIOS. These boards are the subject of the majority of hacks, over-clocking, modifications, BIOS upgrades and just plain “geeking out” on what a PC can be made to do. You’ll get hours of enjoyment fiddling with every bit and parameter you can find, and perhaps encounter hours or days of frustration if one of your hacks causes you to lose data or massive quantities of that soft furry stuff atop your head.
If you’ve got an OEM system—one with a recognizable and sustained brand name such as Compaq, Dell, Gateway, HP, IBM, NEC, Sony, or Toshiba, chances are good that you will not find any parameters worth hacking on—you’ve got a dumbed-down BIOS.
The unhackable BIOS exists for one very simple reason: the manufacturer wants this PC to work for the broadest, simplest set of PC users. In other words, it does not want to have to bear the cost of support calls related to hacked BIOS settings: completely understandable for a family PC, but very frustrating if you’re a real techie and wish to experiment.
All hope may not be lost. Many vendors use the same or a similar version of system boards that you can get off the shelf or by mail order. For instance, I have an HP Pavilion system that uses an Asus A7V-M and, by coincidence, an individually boxed Asus A7V that I bought to build into my own case. The HP Pavilion A7V-M board uses a dumbed-down Award BIOS, and the boxed board uses a fully hackable Award BIOS. The dumbed-down BIOS in the HP does not allow me to change CPU or memory timing, which are critical to the overclocking hacks in Chapter 12.
BIOS upgrades can afford you the benefit of new hacking capabilities, provide fixes to known bugs, or provide support for newer features and hardware such as larger hard drives. Furthermore, these upgrades may come with bootable CD-ROM support that may not be included in the original BIOS.
If the P.O.S.T. display for your system board does not show either the AMI, Award, MR BIOS, or Phoenix brand name (see Figure 1-16) when it boots up, you’re probably stuck—no hacking allowed. If you do see the brand name of the BIOS, you may be in luck, as you may be able to take advantage of this hack by getting an upgraded BIOS from ESupport.com at www.esupport.com.
ESupport.com provides a small program they call the BIOS Agent that can sniff out details of your present BIOS. They also have a list of tips to help you identify your BIOS if their program cannot do it. The best way to identify your Award BIOS is from the absolute version number that appears at the bottom of your screen at boot time, as shown in Figure 1-17. You can press the Pause/Break key on most PCs to stop the system from booting up so you can copy down this information. From that information, their sales department can tell you if they can provide an upgraded BIOS, and perhaps what additional features you might get with it.
| QUICK HACK BOOT INTO A DIFFERENT VERSION OF WINDOWS QUICKLY |
|
If you run multiple versions of Windows on your PC—for example, Windows XP and Windows 98—you know how annoying it is to go through the reboot routine when you want to boot into a different operating system than the one you’re currently using. Restart (www.gabrieleponti.com/software/index.html#restart) comes to the rescue. It appears as a green icon in your system tray. Click it to see all your available operating systems, choose the one you want to boot into, and the program reboots your PC into the operating system that you chose. It works with Windows 95, 98, Me, NT, 2000, XP and 2003 Server, but not yet with Windows Vista. |
The unfortunate part of getting a new BIOS from ESupport.com is that you cannot merely download the BIOS code and upload it into your PC as you can with BIOS updates from the motherboard maker. An ESupport.com BIOS upgrade will come to you in the mail already installed on a memory chip, which reduces the chances of someone making an unauthorized copy of their work. If your system board’s BIOS memory chip is soldered onto the board, as shown in Figure 1-18, or is not mounted in a chip socket, as shown in Figure 1-19, you will likely not be able to purchase a BIOS upgrade from ESupport.com.
Figure 1-16. A typical Award BIOS boot screen. The true version number of the BIOS is shown in the lower-left corner.
Figure 1-17. The true version number of the BIOS
Figure 1-18. This Phoenix BIOS chip is a Flash ROM that cannot be removed from the board. It can only be updated electronically.
Figure 1-19. A replaceable/upgradeable socket-mounted Award BIOS chip. Note the CMOS memory battery and CMOS reset jumper above chip.
Note: You may notice two sets of numbers referring to the version of Award or Phoenix BIOS running your system. The number at the top of the screen, like 4.51, 6.0PG, or similar, is a gross representation of the base BIOS code set used to create the specific BIOS version you have. You need to locate and note the longer multicharacter number that indicates the specific version for your system board. For the Award BIOS, this number is almost always displayed in the lower-left corner of the screen. For the Phoenix BIOS, this number typically appears near the top of the screen with other system board manufacturer’s information. Tags: BIOS, hack, vista, windows, Xp
BIOS Hacks for Faster Bootup
Some of the stuff your computer does at boot time is of no use. Disable those features to boot faster.
The system BIOS does a lot of work in the P.O.S.T. (Power On Self Test) phase before it gets your system to the point where it reads boot-up information from a disk drive to load an operating system. Some of the things that happen in P.O.S.T. have nothing to do with system performance, other than impeding the process of getting to the operating system to run your applications. Intel, AMD, AMI, Award/Phoenix, and the PC manufacturers were aware of this waste of time, evaluated the events involved, and in many cases took steps to reduce the number of items and the amount of time the startup process takes. To that end, there are a handful of changes you can make in order to boot up faster.
Disable Extended Tests
Many systems offer the option of allowing an in-depth test of system memory and components (an extended test) or zipping through the system and getting to bootup as quickly as possible. With RAM as reliable and economical as it is (and having so much of it) and having plug-and-play operating systems like Windows—and, to some extent, current versions of Linux—the Quick Test mode is more than adequate, and preferred for faster boot times. This parameter is shown in Figure 1-14, and specifies the depth, and thus the time involved, for testing system RAM and finding and checking the basic components of the system—COM and LPT ports and such.
Configure Drive Detection
Most BIOSes provide the capability to automatically search for, identify, and configure different types of drives across multiple IDE and Serial ATA connections. This parameter setting usually shows up as AUTO in the IDE configuration choices. If you leave the parameter for all four possible IDE or Serial ATA devices set to AUTO, your BIOS will waste a lot of time searching for nonexistent devices. For faster boot times set the parameter to NONE, as shown in Figure 1-15, for any unused interfaces and connections that have nothing attached to them.
Figure 1-14. Settings for the fastest P.O.S.T.
Figure 1-15. Set any unused IDE devices to NONE to speed boot time
This parameter, if it exists in your setup program, instructs the BIOS to search upper DOS memory (between 640 KB and 1 MB) for the existence of additional BIOS extension code. Such code exists on SCSI host adapters and on network cards that provide the ability to boot from a network server. Most PC users never encounter a SCSI interface, and neither do systems configured to boot over a LAN through a network card, so there don’t set this parameter to anything but No, Off, or Disabled—and save yourself a couple more seconds at boot time.
Tags: BIOS, bootup, faster boot, hack, vista, windows, windows 2008, XpSpeed Up Startup by Halting Startup Programs and Services
Increase your PC’s performance and speed up startup times by shutting off applications and services that you don’t need.
One of the best ways to speed up your PC without having to spend money on extra RAM is to stop unnecessary programs and services from running whenever you start your PC. When too many programs and services run automatically every time you start up your system, startup itself takes a long time—and too many programs and services running simultaneously can bog down your CPU and hog your memory.
Some programs, such as antivirus software, should run automatically at startup and always run on your computer. But many other programs, such as instant messenger software, serve no purpose by being run at startup. And while you need a variety of background services running on your PC for Windows to function, there are many unnecessary services that run on startup. For example, on many Windows XP systems, the Wireless Zero Configuration Service runs to automatically configure a wifi (802.11) network card, even though no such card is present in the system. (Windows Vista does away with the Wireless Zero Configuration Service entirely.)
Eliminating Programs that Run at Startup
The task of stopping programs from running at startup is particularly daunting because there is no single place you can go to stop them all. Some run because they’re put in the Startup folder, others because they’re part of logon scripts, still others because of Registry settings, and so on. But with a little bit of perseverance, you should be able to stop them from running.
Cleaning Out the Startup Folder
Start by cleaning out your Startup folder. In Windows XP, it is in C:\Documents and Settings\<User Name>\Start Menu\Programs\Startup, where <User Name> is your Windows logon name. In Windows Vista, find it in C:\Users\<User Name>\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup where <User Name> is, again, your Windows logon name. Delete the shortcuts of any programs you don’t want to run on startup. As with any shortcuts, when you delete them, you’re deleting only the shortcut, not the program itself. (You can also clear out the startup items in Windows XP by going to StartPrograms
Startup and deleting items you want to remove. In Windows Vista, go to Start
All Programs
Startup.)
Note: To stop Windows from loading any programs in the Startup folder, hold down the Shift key during bootup. No programs in the Startup folder will run, but the items will still remain there so that they will start up as they would normally the next time you boot.
Next, clean out any tasks that have been automatically scheduled to run. In Windows XP, you’ll find them in your Scheduled Tasks folder. Go to C:\WINDOWS\Tasks, and delete the shortcuts of any programs that you don’t want to run.
In Windows Vista, you’ll have to run the Task Scheduler, and delete tasks from there. Go to the Control PanelSystem and Maintenance
Schedule Tasks. The Task Scheduler appears. Click “Task Scheduler Library” to display the tasks that have been scheduled, as shown in Figure 1-10. Look for any tasks that you don’t want to run. In particular, look at the Triggers column and see whether any tasks are listed “At system startup.” Such tasks start every time you run your PC. To see details about the task, including what it does, the executable file, how often it is scheduled, and so on, double-click it and look through the various tabs.
Figure 1-10. Look for any tasks that are scheduled to run at startup in Windows Vista’s Task Scheduler, and delete them if they’re unnecessary
When you’ve identified a task you don’t want to run on startup, highlight it, click Delete, and click OK when you’re prompted.
Using the System Configuration Utility
Taking the previous steps will stop the obvious programs from running at startup, but it won’t kill them all. The best tool for disabling hidden programs that run on startup is the Startup tab in the System Configuration Utility, shown in Figure 1-11. To run it in either Windows XP or Windows Vista, type msconfig at the Search box in the Start menu, in a command prompt or in the Run box and press Enter. (If that doesn’t work, first do a search for msconfig.exe, and then when you find the file, double-click it.)
To stop a program from running at startup, go to the Startup tab in this utility and uncheck the box next to the program. It can sometimes be difficult to understand what programs are listed on the Startup tab. Some, such as America Online, are clearly labeled. But often, you’ll see a phrase or collection of letters, such as fs20. That’s the name of the running file—in this case, fs20.exe, which is Free Surfer Companion, a pop-up killer, cache manager, and surfing utility.
To get more information about a listing, expand the width of the Command column near the top of the Startup tab. Expand it enough and you’ll see the startup command that the program issues, including its location, such as C:\Program Files\Free Surfer\fs20.exe. The directory location should be another hint to help you know the name of the program.
When stopping programs from running at startup, it’s best to stop them one at a time rather than in groups. You want to make sure that you’re not causing any system problems by stopping them. So, stop one and restart your PC. If it runs fine, stop another and restart. Continue doing this until you’ve cleared all the programs you don’t want to run automatically.
Figure 1-11. The Startup tab of the System Configuration Utility
Each time you uncheck a box and restart your PC, you’ll get a warning stating that you’ve used the System Configuration Utility to disable a program from starting automatically. If you don’t want to see that warning, disable it by checking the box in the dialog box itself.
After you’ve used the System Configuration Utility to identify programs that run upon startup, you might want to try disabling them from within the programs themselves. Run each program that starts automatically, and see if you can find a setting that allows you to prevent it from running on startup. For example, to get rid of Apple QuickTime’s startup item, right-click the QuickTime icon in the notification area, select QuickTime Preferences, go to the Advanced tab, and uncheck the box labeled “Install QuickTime icon in system tray.”
Using the Registry to Halt Programs Running on Startup
Even the System Configuration Utility won’t necessarily let you identify and kill all programs that run on startup. You might also need to hack the Registry to disable them. To do so, Launch the Registry Editor by typing regedit at the Start Search box or a command prompt (see Chapter 13 for details) and go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. The right pane will contain a list of some of the programs that run automatically at startup. The Data field tells you the path and name of the executable so that you can determine what each program is. Right-click any program you don’t want to run, and choose Delete. That will kill any programs that run and are specific to your account. To kill programs that run for every user of the system, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and follow the same instructions for deleting other programs that you don’t want to run at startup.
Shutting Off Services that Run at Startup
Constantly running in the background of Windows are services—processes that help the operating system run, or that provide support to applications. Many of these services launch automatically at startup. Although you need many of them, many aren’t required and can slow down your system when they run in the background.
You can prevent services from running at startup by using the System Configuration Utility, similar to how you halt programs from running at startup, but using the Services tab instead of the Startup tab. When you go to that tab, you’ll see a very long list of services, most of which Windows requires to run. A good way to weed out unnecessary services is to see which services weren’t created by Microsoft, which aren’t required by Windows, and which have been installed by a third party. You can then decide which to stop and which to run. To see non-Microsoft services, click “Hide all Microsoft services.” You’ll see a list like the one shown Figure 1-12.
The System Configuration Utility is useful, but it doesn’t necessarily list every service that launches on startup. A bigger problem is that turning off services is more of a shot in the dark than disabling programs. When you disable a program, you can get a sense of what the program does. But when you turn off a service through the System Configuration Utility, there’s often no way to know what it does (or did).
A better way of turning off services at startup is via the Services Computer Management Console, shown in Figure 1-13. Run it by typing services.msc at the command prompt or Search box. The Services Computer Management Console includes a description of all services so that you can know ahead of time whether a particular service is one you want to turn off. It also lets you pause the service so that you can test out your machine with the service off to see whether it’s needed.
After you run the console, click the Extended tab. This view shows you a description of each service in the left pane when you highlight the service. The Startup Type column shows you which services launch upon startup—any services with “Automatic” in that column. Click the top of that column to sort together all the services that automatically launch on startup. Then highlight each service and read the descriptions.
When you find a service that you want to turn off, right-click it and choose Properties. In the Properties dialog box that appears, choose Manual from the “Startup type” drop-down list. The service won’t start automatically from now on (unless another service requires it in order to start), but you can start it manually via the console. If you want the service disabled so that it can’t be run, choose Disabled. (If you disable a service that a critical Windows service depends on, that service won’t be able to start either, which could cause problems.)
To test the effects of turning off the service, turn off any services you don’t want to run by clicking “Stop the service” in the left pane, or by right-clicking the service and choosing Stop. Note that some services can’t be stopped while the system is running. You’ll have to set them to “manual” and reboot to see the effect of turning them off.
Table 1-1 lists some common services you might want to halt from running at startup. Note that some run on Windows XP, some on Windows Vista, and some on both.
Figure 1-12. A list of all non-Microsoft services running on a Windows Vista PC
Figure 1-13. The Services Computer Management Console
HACKING YOUR BIOS
Your system’s BIOS (Basic Input/Output System) is firmware stored in a chip on your PC that handles basic system startup—in essence, it gets your computer’s hardware ready so that the operating system can load on it. What’s important to understand about the BIOS is that it runs before Windows runs, and handles the basic tasks of recognizing and configuring your hardware.
Tags: halt, programs, services, speed, startup, vista, windows, XpBypass the Windows Vista Logon Screen on Multiaccount PCs
Having to type in your logon information on a system with two or more user accounts can be a pain. This hack shows you how to tell Windows Vista to log on to your primary account immediately.
When you have more than one user account on a Windows Vista PC, every time you restart your PC, you’ll be presented with a welcome screen listing all the accounts on the machine, forcing you to click one and type in your logon information.
But what if, like many people, you use one primary account nearly all the time, and use others only on occasion—and you’d like to bypass the screen listing all the user accounts and be logged in automatically? You’re apparently out of luck; Windows Vista can’t seem to do it.
Figure 1-8. The User Accounts screen lists all your user accounts, and lets you customize them
Note: Remember, if you use auto logon, anyone can user your PC without your password, so only use this hack if you’re sure that no one will log on and do harm to your system. This is particularly relevant if you use an administrator account to auto logon, because that account can do many things to a Windows Vista system that a normal account can’t do.
Actually, though, it can, as you’ll see in this simple hack. Follow it, and you’ll automatically log in to your primary account, and then be able to switch to any other account when you wish:
-
At the Search box or a command prompt, type control userpasswords2. The User Accounts screen, shown in Figure 1-8, appears.
-
The Automatically Log On dialog box appears, as seen in Figure 1-9. Type in the password for the account that you want to log on automatically. If the account shown isn’t the one that you want to log on automatically, type in the username and password for the account that you want to use. Click OK.
-
From now on, you’ll automatically log in using that account. When you’re logged in, if you want to switch to another account, use Fast User Switching by clicking the Start button, then clicking the arrow in the lower righthand corner of the Start menu, and selecting “Switch User.” You’ll come to a screen listing all users on your PC, where you can log in as any other user.
Auto Logons for Domain-Connected PCs
If you’re on a company network and part of a domain, the “Users must enter a user name and password to use this computer” choice won’t appear on the User Accounts screen, because domain users always have to enter a username and password to log on to their computer. So this hack won’t work for them.
However, there is a way for even domain users to automatically log on, by using any of several command-line utilities. Good ones include Autologon for Windows (www.microsoft.com/technet/sysinternals/utilities/Autologon.mspx), and autologon.exe (shellrevealed.com/files/folders/code/entry4411.aspx).
See Also
-
“Unlock the Super-Secret Administrator Account” [Hack #109]
Figure 1-9. Telling Windows Vista which account should automatically log on
Run Windows Vista Without Activation for 120 Days
Don’t like to be forced to activate Windows Vista after 30 days? With this simple hack, you can extend that period to a full 120.
When you install Windows Vista, you’re asked whether you want to “activate” the operating system right away. When Windows Vista activates, it contacts Microsoft servers over the Internet, and registers itself with Microsoft. At that point, Windows is tied to your specific hardware configuration, such as your motherboard, hard drive, and other pieces of hardware. If you make major changes to your hardware, such as installing a new motherboard, you’ll have to reactivate Windows.
Note: If you don’t like the idea of having your PC contact Microsoft servers over the Internet, you can instead call Microsoft to have Windows activated.
You don’t have to activate Windows Vista when you install it. You can do it any time in the next 30 days. But if you don’t do it after 30 days, you’ll get a warning, and after that, Windows won’t function fully. Many people don’t like the activation process because it ties Windows to their hardware configuration, and they like putting off activation. Also, if someone knows they’re going to do a major overhaul of their hardware in a few months, they’d also like to put off activation, because they’ll then only have to activate Windows again.
There’s a simple command-line tool that will allow you to extend your activation so that you can use Windows for a full 120 days with activating it. The Windows Software Licensing Management Tool is the Visual Basic script slmgr.vbs, found in C:\Windows\system32.
To run it, start a command prompt as an administrator by typing cmd in the Search box and right-clicking the icon that appears at the top of the Start menu and selecting “Run as administrator.”
At the command prompt, type this command and press Enter:
slmgr -rearm
You’ll see the message, “Command completed successfully. Please restart the system for the changes to take effect.” Reboot, and your activation period will be extended for 30 additional days. You’ll be able to do this three times, which means you’ll be able to run Vista without activation for 120 days.
Warning: After you type in your commands, nothing will seem to happen for a while, perhaps a minute or more. Don’t worry; nothing’s wrong. slmgr.vbs take a while to go about doing its business.
After you reboot, you can check whether your time was extended using slmgr.vbs to report on the state of your system’s activation. Type this command and press Enter:
slmgr -xpr
A screen appears telling you how long you have to wait until you have to activate Windows.
Note: Several people have reported that you can put off activation for a year or more, using a Registry hack. On a PC that has yet to have Windows activated, open the Registry Editor, and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL. Look for the key named SkipRearm and change the value from 00000000 to 00000001. Exit the Registry, then use the slmgr command as described earlier to push out the activation deadline 30 days. You may now be able to keep doing this indefinitely. There’s a chance that Microsoft will close this hack off, by the way, and it may be short-lived.
You can use the slmgr.vbs command to perform other tasks related to your Windows license and activation. For example, type this command:
slmgr -dli
and you’ll be shown information about your Windows Vista license, as in Figure 1-7. Table 1-1 lists other switches you can use in concert with slmgr and what each does.

