8
Feb/10
0

Reset The Windows Update Catalog

  1. Insert the Windows Vista installation disc in the disc drive, and then restart the computer.
  2. When you are prompted to restart from the disc, press any key.
  3. When you are prompted, configure the Language to install, Time and currency format , and Keyboard or input method options that you want, and then click Next .
  4. On the Install Windows page, click Repair your computer .
  5. On the System Recovery Options page, click the version of the Windows Vista operating system that you want to repair, and then click Next
  6. On the System Recovery Options page, click Command Prompt .
  7. Type cd C:\windows\winsxs , and then press ENTER.
  8. Type ren pending.xml pending.old , and then press ENTER.
  9. In Registry Editor, locate and then delete the following registry subkey:
  10. HLKM\Offline Components\AdvancedInstallersNeedResolving
    HKLM\Offline Components\PendingXmlIdentifier
    HKLM\Offline Components\NextQueueEntryIndex
  11. At the command prompt, type exit to exit Registry Editor. Press ENTER.
  12. Click Restart

Reference: http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/13dec2a0-2694-4b11-9b0c-9b8fbe6162ee

5
Jan/10
0

Reset HP Integrated Lights Out Board to Factory Defaults

Issue:

Cause:
Someone failed to record the configuration.

Solution:
If an operating system supported by HP Proliant Essentials is installed along with a recent Proliant Support Pack, you may reset the Integrated Lights Out board to its factory defaults. Use the HP Lights-Out Online Configuration utility.

C:\Program Files\HP\hponcfg\hponcfg.exe /reset
7
Dec/09
0

Honor Guest IDE/SATA Flush Requests

Issue:
VirtualBox ignores IDE/SATA disk flush requests.

Cause:
This is by design. To improve performance VirtualBox ignores these requests. This can create an issue with filesystems that do not have fsck-like tools (ZFS is an example) create a situation where the on disk information is inconsistent due to data held in RAM.

Solution:
To enable flushing for IDE disks, issue the following command:

VBoxManage setextradata VMNAME
      "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0

The value [x] that selects the disk is 0 for the master device on the first channel, 1 for the slave device on the first channel, 2 for the master device on the second channel or 3 for the master device on the second channel.

To enable flushing for SATA disks, issue the following command:

VBoxManage setextradata VMNAME
      "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0

The value [x] that selects the disk can be a value between 0 and 29.

Reference: http://www.virtualbox.org/manual/UserManual.html#id2499944

4
Dec/09
0

Replace Pipes with Tabs in a Delimited File

Issue:
It is often necessary to replace delimiters in a file with a form the receiving party expects. sed is my favorite method of meeting the need.

Solution:
Replace double pipes with tabs

sed 's/||/           /g' file.in > file.out

Note: If you find the tab key simply does not work, try CTRL+V+I from your terminal.
Reference: http://forums.devshed.com/unix-help-35/replacing-tabs-with-spaces-372623.html

Caveats:
Special consideration (and a regex) will be required for data where delimiters are present in the data itself. Consider your use case and apply appropriately.

25
Nov/09
0

Remove a Range of Unwanted ZFS Snapshots from the Command Line

Remove a range of unwanted snapshots, from the command line, if necessary.
In the following example, all automatic snapshots in the bash shell are removed.

for s in $(zfs list -H -o name -t snapshot | grep @zfs-auto-snap); do zfs destroy $s; done

One could add a secondary pipe and grep statement to filter on individual file systems.

Reference: How to Manage the Automatic ZFS Snapshot Service

9
Oct/09
0

Disable X in OpenSolaris

From the shell

pfexec svcadm disable gdm
7
Oct/09
0

Create a pidof command to find PID numbers easily

Most UNIX environments include the pidof command which is put to use whenever one needs to quickly determine, by name, the pid of a running program. Apple’s Mac OS X lacks the pidof command, however, one may approximate its function with the following shell script:

#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}";

Save the script as /bin/pidof and be sure to set its executable bit:

chmod a+x /bin/pidof
Tagged as: ,
6
Oct/09
0

Strip empty (null) lines from a file

sed meets the need; the recipe follows:

sed '/^$/d' filename
1
Oct/09
0

Disable Spotlight in Mac OS X 10.6 Snow Leopard

On occasion I need to process large volumes of text locally. Spotlight dutifully attempts to index this data, bringing my system to a crawl.

Proactively disabling Spotlight is a sure way to avoid such issues and here is how to do it:

Disabling Spotlight in Snow Leopard is pretty easy, launch the Terminal and type the following command:

sudo mdutil -a -i off

This tells the Spotlight manager to disable all indexing on all volumes, the command will require your administrative password to execute.

Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to:

sudo mdutil -a -i on

Now Spotlight indexing will be back on and work as usual.

NOTE: mds and mdsworker will persist in the process table; this is normal.

1
Oct/09
0

Device Manager does not display devices that are not connected to the Windows XP-based computer

Issue:
Device Manager displays only non-Plug and Play devices, drivers, and printers when you click Show hidden devices on the View menu. Devices that you install that are not connected to the computer (such as a Universal Serial Bus [USB] device or “ghosted” devices) are not displayed in Device Manager, even when you click Show hidden devices.

Workaround:

  1. Click Start, point to Run, and type cmd.
  2. Click Ok
  3. At the command prompt, type the following command and then press ENTER:
    set devmgr_show_nonpresent_devices=1
  4. Type the following command at the command prompt and then press ENTER:
    start devmgmt.msc
  5. Troubleshoot the devices and drivers in Device Manager. NOTE: Click Show hidden devices on the View menu in Device Managers before you can see devices that are not connected to the computer.

Note that when you close the command prompt window, Window clears the devmgr_show_nonpresent_devices=1 variable that you set in step 2 and prevents ghosted devices from being displayed when you click Show hidden devices.

If you are a developer or power user and you want to be able to view devices that are not connected to your computer, set this environment variable globally:

  1. Right-click My Computer.
  2. Click Properties.
  3. Click the Advanced tab.
  4. Click on the Environment Variables tab.
  5. Set the variables in the System Variables box.

NOTE: Use this method only for troubleshooting or development purposes, or to prevent users from accidentally uninstalling a required device that is not connected to the computer (such as a USB device or docking station that is not connected to a laptop computer).

Reference: http://support.microsoft.com/kb/315539