List all hardware devices (with details) on Windows

MSINFO32:
c:\Windows\System32\msinfo32.exe

CPUZ:
http://www.cpuid.com/softwares/cpu-z.html

DirectX Diagnostic Tool (dxdiag):
c:\Windows\System32\dxdiag.exe

Device Manager:
C:\WINDOWS\system32\devmgmt.msc /s

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.

To work around this behavior:
1. Click Start, point to All Programs, point to Accessories, and then click Command Prompt.
At a command prompt, type the following command , and then press ENTER:
2. type “set devmgr_show_nonpresent_devices=1”
3. type “start devmgmt.msc”
4. inside device manager Click “View” > “Show hidden devices”

Note that when you close the command prompt window and device manager Window clears the devmgr_show_nonpresent_devices=1 variable.

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

Posted in Uncategorized | Leave a comment

How to configure Windows Firewall to log application name program name ip address and port number of blocked program event access

How to configure Windows Firewall to log application name program name ip address and port number of blocked program event access

Despite what you will read posted by many MVPs or post on variouse forums the you can log the application program name when windows firewall blocks access to a port.

The setting is a little tucked away if you are not familiar with windows auditing or group polices.

1. type “gpedit.msc” in start > run (or the command prompt) to open the group policy mmc snap in editor

2. Browse to the sub folder
Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > Audit Policy

3. right click on “Audit object access” and click properties

4. select the check box next to the word “failure” on the first tab marked “Local Security Settings”

Now when ever windows firewall blocks an application from accessing a certain port you will be able to see the loged even in the windows event log under the security sub folder

To access the event log open

1. Control Panel > Administrative Tools > Computer Management
2. Then under the sub folder “Computer Management (Local)” > Event Viewer > Windows Log > Security

Normally a firewall block event will have something like this:
Keywords = Audit Failure
Event ID = 5152

 

Here is an example of what one of the events will look like. Notice next to “Application”  there is the location of the local application program exe name, note that sometimes the application name is blank and the process id is 0, this just means that the connection blocked was from a remote computer coming inbound. If this is the case the source port will be a remote ip address and not your local ip address. This is normal windows firewall has no idea what program sent the packet because it was from a remote machine.

 

– System
– Provider
[ Name]  Microsoft-Windows-Security-Auditing
[ Guid]  {#######-####-####-####-##############}
EventID 5152
Version 0
Level 0
Task 12809
Opcode 0
Keywords 0x8010000000000000
EventRecordID 38693
Correlation
– Execution
[ ProcessID]  4
[ ThreadID]  3632

Channel Security
Computer workstation01
Security

– EventData
ProcessId 1284
Application \device\harddiskvolume2\windows\system32\svchost.exe
Direction %%14593
SourceAddress 192.168.3.24
SourcePort 5614
DestAddress 113.19.1.42
DestPort 80
Protocol 6
FilterRTID 108535
LayerName %%14611
LayerRTID 48

 

 

Keywords:
Windows Firewall log application name
Windows Firewall log program name
Windows Firewall Outbound Program Names
How to configure Windows Firewall to log name program name
How to configure Windows Firewall to log application name
How to configure Windows Firewall to log exe name

Posted in Uncategorized | Leave a comment

How to 100% remove an anti virus / malware / security product

How to 100% remove an anti virus product

do forget to check for left over drivers from you antivirus product, they are nearly always digital signed and you can see the auther by right clicking and going properties

using a tool like autoruns (http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from sysinternals will also allow you to see if anything got left behind this tool shows you everything that is run automaticly by windows when you start your computer or login

List of anti-malware product removal tools

Anti-malware / Anti-Virus products often are not removed completely or properly when using “Programs and Features” (or “Add/Remove Programs”).  It is possible that various services and/or drivers will still be active or installed, and will cause conflicts when another anti-malware product is installed.  Therefore, you may have to use the manufacturer’s cleanup or removal tool to insure proper removal before you install Microsoft Security Essentials (MSE), or any other anti-malware product.

This document contains links to such tools.  If your anti-malware product(s) are not listed, visit the support page of the manufacture to look for such a tool.  Be advised that the link(s) provided below may change periodically.  We will try to keep them current.

This list is not a complete or comprehensive list of all anti-malware removal products.  The ones provided are frequently encountered on this forum.  There are additional removal tools, and other lists:

If you are looking for a list of anti-malware manufacturers/products other than Microsoft to provide protection for your PC, this link will help:

If you need help installing MSE, refer to this checklist:

If you need help with Windows Defender on Windows 8, refer to this document:

DISCLAIMER:

The tools provided by the links below are used at your risk.  They are for informational use, and there is no assurance of accuracy or correctness.  Read the instructions carefully on those manufacturer pages, as uninstalling may remove license/registration files or keys.  If you intend to reinstall any of these products, you may need this information.

NOTE:  Links with an *asterisk are direct downloads.

Alwil Avast:

http://www.avast.com/uninstall-utility

*http://files.avast.com/files/eng/aswclear.exe

AppRemover (which can scan for and remove multiple anti-malware products):

http://www.appremover.com

*http://www.appremover.com/get/appremover.exe

AVG:

http://www.avg.com/us-en/utilities

*AVG Remover (32bit) 2013

*AVG Remover (64bit) 2013

Avira:

http://www.avira.com/en/support-download-avira-registrycleaner

*http://dlpro.antivir.com/package/regcleaner/win32/en/avira_registry_cleaner_en.exe

BitDefender:

http://www.bitdefender.com/support/How-to-uninstall-BitDefender-333.html

*http://www.bitdefender.com/uninstall

BullGuard:

Uninstalling BullGuard

*http://www.bullguard.com/media/278521/bg-uninstall.zip

Computer Associates:

Use http://www.appremover.com

ESET NOD32:

http://kb.eset.com/esetkb/index?page=content&id=SOLN2289

*http://download.eset.com/special/ESETUninstaller.exe

F-PROT:

Uninstalling version 6 of F-PROT Antivirus for Windows

*Uninstaller for FPAV Windows 6.x

F-Secure:

ftp://ftp.f-secure.com/support/tools/uitool

*ftp://ftp.f-secure.com/support/tools/uitool/UninstallationTool.exe

Kaspersky:

http://support.kaspersky.com/1464

*http://support.kaspersky.com/downloads/utils/kavremover.exe

Malwarebytes:

Use mbam-clean.exe to completely remove Malwarebytes Anti-Malware

*http://www.malwarebytes.org/mbam-clean.exe

*http://downloads.malwarebytes.org/file/mbam_clean

McAfee:

http://service.mcafee.com/FAQDocument.aspx?id=TS101331

*http://download.mcafee.com/products/licensed/cust_support_patches/MCPR.exe

Microsoft Security Essentials:

Uninstalling MSE

http://support.microsoft.com/kb/2435760

Microsoft Windows Live OneCare:

http://support.microsoft.com/kb/930159 (select method #2)

*OneCareCleanUp.exe

Norton:

Download and run the Norton Removal Tool to uninstall your Norton product

*Norton AntiVirus, Norton Internet Security, or Norton 360

(ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe)

Using the “SymNRT” utility (Norton Removal Tool)
Panda:

How can I uninstall Panda antivirus from my computer?

*http://www.pandasecurity.com/resources/sop/UNINSTALLER.exe

ParetoLogic:

http://techsupport.paretologic.com/plsupport/consumer/kbdetail.asp?kbid=495

http://techsupport.paretologic.com/plsupport/consumer/kbdetail.asp?kbid=571

http://techsupport.paretologic.com/plsupport/consumer/kbdetail.asp?kbid=135

PC Tools ThreatFire:

http://www.pctools.com/forum/showthread.php?62437-Uninstall-tool

*http://www.threatfire.com/files/RemoveThreatFire(3.0).zip

Prevx:

http://info.prevx.com/removaltool.asp

*Prevx 3.0 Removal Tool

Sophos:

Use http://www.appremover.com

SUPERAntiSpyware:

How do I uninstall SUPERAntiSpyware?

*SUPERAntiSpyware Uninstaller Assistant (32-Bit)

*SUPERAntiSpyware Uninstaller Assistant (64-Bit)

Symantec:

Methods for uninstalling Symantec Endpoint Protection

How to obtain the Cleanwipe utility

Manual uninstall documents for Symantec Endpoint Protection

Trend Micro:

How to uninstall my Trend Micro program using the Trend Micro Diagnostic Toolkit

*Windows Vista or Windows 7 (32-bit)

*Windows Vista or Windows 7 (64-bit)

Verizon:

How do Irun the Verizon Internet Security Suite Uninstall Tool (RPSUU.exe)?

*http://dl01.radialpoint.net/Radialpoint/Uninstall/UserCommunity-Uu-RpsUU.exe

webroot:

What should I do when I have trouble installing or uninstalling my Webroot security software?

*http://download.webroot.com/CleanWDF.exe

Zone Alarm:

Complete full uninstall of ZoneAlarm

*http://download.zonealarm.com/bin/free/support/download/clean.exe

 

Source:
http://answers.microsoft.com/en-us/protect/forum/mse-protect_start/list-of-anti-malware-product-removal-tools/407bf6da-c05d-4546-8788-0aa4c25a1f91
http://experts.windows.com/w/experts_wiki/156.aspx
http://www.raymond.cc/blog/comprehensive-list-of-uninstallers-or-removal-tools-for-antivirus-software
amir_sn
Arnaud1987
Bronko5000
Corrine
dreamsburnred
Edwin333
Jeff_C
Kit Y
Kosh Vorlon
PA Bear MS MVP
SpiritX MS MVP
Stephen Boots

Posted in Uncategorized | Leave a comment

Bash Keyboard shortcuts (most will work with cygwin)

Bash Keyboard shortcuts, most will work with cygwin to

The following shortcuts work when using default (Emacs) key bindings. Vi-bindings can be enabled by running set -o vi.[23]

Note: For shortcuts involving ⎇ Alt, you may be able to use ⎋ Esc instead.

Note: Sometimes, you must use ⎋ Esc instead of ⎇ Alt, because the ⎇ Alt shortcut conflicts with another shortcut. For example, in Trisquel 5.0 (a distribution of Linux), pressing ⎇ Alt+f will not move the cursor forward one word, but will activate “File” in the menu of the terminal window.

See also: Readline
  • Tab ↹ : Autocompletes from the cursor position.
  • ⎈ Ctrl+a : Moves the cursor to the line start (equivalent to the key Home).
  • ⎈ Ctrl+b : Moves the cursor back one character (equivalent to the key ).
  • ⎈ Ctrl+c : Sends the signal SIGINT to the current task, which aborts and closes it.
  • ⎈ Ctrl+d
    • Sends an EOF marker, which (unless disabled by an option) closes the current shell (equivalent to the command exit). (Only if there is no text on the current line)
    • If there is text on the current line, deletes the current character (then equivalent to the key Delete).
  • ⎈ Ctrl+e : (end) moves the cursor to the line end (equivalent to the key End).
  • ⎈ Ctrl+f : Moves the cursor forward one character (equivalent to the key ).
  • ⎈ Ctrl+g : Abort the research and restore the original line.
  • ⎈ Ctrl+h : Deletes the previous character (same as backspace).
  • ⎈ Ctrl+i : Equivalent to the tab key.
  • ⎈ Ctrl+j : Equivalent to the enter key.
  • ⎈ Ctrl+k : Clears the line content after the cursor and copies it into the clipboard.
  • ⎈ Ctrl+l : Clears the screen content (equivalent to the command clear).
  • ⎈ Ctrl+n : (next) recalls the next command (equivalent to the key ).
  • ⎈ Ctrl+o : Executes the found command from history, and fetch the next line relative to the current line from the history for editing.
  • ⎈ Ctrl+p : (previous) recalls the prior command (equivalent to the key ).
  • ⎈ Ctrl+r : (research) recalls the last command including the specified character(s). A second ⎈ Ctrl+r recalls the next anterior command which corresponds to the research
  • ⎈ Ctrl+s : Go back to the next more recent command of the research (beware to not execute it from a terminal because this command also launches its XOFF). If you changed that XOFF setting, use ⎈ Ctrl+q to return.
  • ⎈ Ctrl+t : Transpose the previous two characters.
  • ⎈ Ctrl+u : Clears the line content before the cursor and copies it into the clipboard.
  • ⎈ Ctrl+v : If the next input is also a control sequence, type it literally (e. g. * ⎈ Ctrl+v ⎈ Ctrl+h types “^H”, a literal backspace.)
  • ⎈ Ctrl+w : Clears the word before the cursor and copies it into the clipboard.
  • ⎈ Ctrl+x ⎈ Ctrl+e : Edits the current line in the $EDITOR program, or vi if undefined.
  • ⎈ Ctrl+x ⎈ Ctrl+r : Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.
  • ⎈ Ctrl+x ⎈ Ctrl+u : Incremental undo, separately remembered for each line.
  • ⎈ Ctrl+x ⎈ Ctrl+v : Display version information about the current instance of bash.
  • ⎈ Ctrl+x ⎈ Ctrl+x : Alternates the cursor with its old position. (C-x, because x has a crossing shape).
  • ⎈ Ctrl+y : (yank) adds the clipboard content from the cursor position.
  • ⎈ Ctrl+z : Sends the signal SIGTSTP to the current task, which suspends it. To execute it in background one can enter bg. To bring it back from background or suspension fg ['process name or job id'] (foreground) can be issued.
  • ⎈ Ctrl+_ : Incremental undo, separately remembered for each line.
  • ⎇ Alt+b : (backward) moves the cursor backward one word.
  • ⎇ Alt+c : Capitalizes the character under the cursor and moves to the end of the word.
  • ⎇ Alt+d : Cuts the word after the cursor.
  • ⎇ Alt+f : (forward) moves the cursor forward one word.
  • ⎇ Alt+l : Lowers the case of every character from the cursor’s position to the end of the current word.
  • ⎇ Alt+r : Cancels the changes and puts back the line as it was in the history.
  • ⎇ Alt+u : Capitalizes every character from the cursor’s position to the end of the current word.
  • ⎇ Alt+. : Insert the last argument to the previous command (the last word of the previous history entry).

Source: https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29

Posted in Uncategorized | Leave a comment

Tibia 9.8.1.0 (10-Feb-2013) Memory offsets locations

Tibia 9.8.1.0 (10-Feb-2013) Memory offsets locations

I found most of them using Cheat Engine (http://cheatengine.org/), i might post a tutorial on how to do this later.

I found most of them using Cheat Engine (http://cheatengine.org/)

Off-Train: 3B6Ee4
Max Mana: 3B6EF4 (XOR)
Exp: 3B6F00
Level: 3B6F2C (3B6F00+44)
Soul: 3B6F30 (3B6F00+48)
Magic Lv: 3B6F34 (3B6F00+52)
% to next Magic Lv: 3B6F3C (3B6F00+60)
Target: 3B6F40 (current target id)
Mana: 3B6F44 (3B6F00+68)

Fist Skill (%): 3B6F4C (3B6F00+76)
Club Skill (%): 3B6F50 (3B6F00+80)
Sword Skill (%): 3B6F54 (3B6F00+84)
Axe Skill (%): 3B6F58 (3B6F00+88)
Dist Skill (%): 3B6F5C (3B6F00+92)
Shield Skill (%): 3B6F60 (3B6F00+96)
Fish Skill (%): 3B6F64 (3B6F00+100)

Stamina (minutes): 3B6F78 (3B6F00+120)

Chase Monster: 3BE690
Stance Flag:   3C0AC0
Connected:     3C0CF8 (0 = loged-out, 9=logginin, 6=dont-know, 10=loged-in)

CharListPtr:     549CE8 (???)
CharList Index:    549D34

HP: 54C000 (XOR)
Cap: 583E94
HP: 583E9C (XOR)
XPos: 583EA8
YPos: 583EAC
ZPos: 583EB0

Fist Skill (lvl): 583E78 (583E70+8)
Club Skill (lvl): 583E7C (583E70+12)
Sword Skill (lvl): 583E80 (583E70+16)
Axe Skill (lvl): 583E84 (583E70+20)
Distance Skill (lvl): 583E88 (583E70+24)
Shield Skill (lvl): 583E8C (583E70+28)
Fish Skill (lvl): 583E90 (583E70+32)

Outfit: 54C1C8 (54C000+456)
Hair Color: 54C1CC (54C000+460)
Shirt Color: 54C1D0 (54C000+464)
Pants Color: 54C1D4 (54C000+468)
Shoe Color: 54C1D8 (54C000+472)
Outfit Deco: 54C1DC (54C000+476)
Mount: 54C1E0 (54C000+480)

Life Bar (%): 54C1F4 (54C000+500)
Walk Speed: 54C1F8 (54C000+504)

Battle List:
maxCreatures: = 0x5B5; // 0xFA;
creatureDataSize: = 0xB0;
battleListStartL: = 0x549CF8; //0x54C848;
battleListEndL: = battleListStartL + (maxCreatures * creatureData);

//These offsets are from the start of a BattleList item not the base address.
ID = x + 0
Name = x + 4
pos.ZPos = x + 36
pos.YPos = x + 40
pos.XPos = x + 44
WalkDir1 = x + 56
YMove = x + 68
XMove = x + 72
TileWalkSpeed = x + 76
IsWalking = x + 80
WalkDir2 = x + 84
HP = x + 140

Couldn’t have done it with out the help of the guys at:
http://tpforums.org
http://www.blackdtools.com/forum/
http://forum.cheatengine.org/

Posted in Uncategorized | Leave a comment

Deployment Image Servicing and Management (DISM.exe)

Deployment Image Servicing and Management (DISM.exe)

DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth

/CheckHealth
/ScanHealth
/RestoreHealth

DISM.exe replaces CheckSUR in windows 8, by making it a built in tool that is integrated into the OS. Unlike CheckSUR which was a separate download, and which had a different download for each version of windows. DISM Inbox Corruption Repair can repair both payload files and manifests (CheckSUR only did manifests)

What is “Inbox Corruption Repair”? Check This?

DISM.exe can be used on a window image or on the current live installed OS just add the “/Online” argument

Deployment Image Servicing and Management (DISM.exe) is a new command line tool that you can use to service a Windows image or prepare a Windows PE image. The DISM tool replaces the Package Manager (pkgmgr.exe), PEimg, and Intlcfg tools used with Windows Vista. DISM consolidates the functionality found in those three tools, as well as delivers new functionality to improve the experience of offline servicing.
Tips RSS Feed
Subscribe to the TechNet Magazine Tips RSS feed.
DISM can be used to service Windows Vista with Service Pack 1 (SP1) and Windows Server 2008. When used with Windows 7 and Windows Server 2008 R2, you get the added functionality.
You can use DISM to:

Add, remove, and enumerate packages and drivers.
Enable or disable Windows features.
Apply changes based on the offline servicing section of an unattend.xml answer file.
Configure international settings.
Upgrade a Windows image to a different edition.
Prepare a Windows PE image.
Take advantage of better logging.
Service down-level operating systems like Windows Vista with SP1 and Windows Server 2008.
Service all platforms (32-bit, 64-bit, and Itanium).
Service a 32-bit image from a 64-bit host and service a 64-bit image from a 32-bit host.
Make use of old Package Manager scripts.

System Update and Readiness Tool (KB9478121), commonly called CheckSUR

What does the System Update Readiness Tool do?

The System Update Readiness Tool verifies the integrity of the following resources:

  • Files that are located in the following directories:
    • %SYSTEMROOT%\Servicing\Packages
    • %SYSTEMROOT%\WinSxS\Manifests
  • Registry data that is located under the following registry subkeys:
    • HKEY_LOCAL_MACHINE\Components
    • HKEY_LOCAL_MACHINE\Schema
    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing

When the System Update Readiness Tool detects incorrect manifests, files, or registry data, it may replace the incorrect data with a corrected version.

Windows Update installation errors that the System Update Readiness Tool may fix

The following table lists the Windows Update installation errors that may be fixed by the System Update Readiness Tool. However, the tool may be unable to fix every instance of these errors.

Code Error Description
0x80070002 ERROR_FILE_NOT_FOUND The system cannot find the file specified.
0x8007000D ERROR_INVALID_DATA The data is invalid.
0x800F081F CBS_E_SOURCE_MISSING The source for the package or file not found.
0x80073712 ERROR_SXS_COMPONENT_STORE_CORRUPT The component store is in an inconsistent state.
0x800736CC ERROR_SXS_FILE_HASH_MISMATCH A component’s file does not match the verification information present in the component manifest.
0x800705B9 ERROR_XML_PARSE_ERROR Unable to parse the requested XML data.
0x80070246 ERROR_ILLEGAL_CHARACTER An invalid character was encountered.
0x8007370D ERROR_SXS_IDENTITY_PARSE_ERROR An identity string is malformed.
0x8007370B ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME The name of an attribute in an identity is not within the valid range.
0x8007370A ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE The value of an attribute in an identity is not within the valid range.
0x80070057 ERROR_INVALID_PARAMETER The parameter is incorrect.
0x800B0100 TRUST_E_NOSIGNATURE No signature was present in the subject.
0x80092003 CRYPT_E_FILE_ERROR An error occurred while Windows Update reads or writes to a file.
0x800B0101 CERT_E_EXPIRED A required certificate is not within its validity period when verifying against the current system clock or the time stamp in the signed file.
0x8007371B ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE One or more required members of the transaction are not present.
0x80070490 ERROR_NOT_FOUND Windows could not search for new updates.

Logging

The System Update Readiness Tool creates a log file that captures any issues that the tool found or fixed. The log file is located here:

  • %SYSTEMROOT%\Logs\CBS\CheckSUR.log
  • %SYSTEMROOT%\Logs\CBS\CheckSUR.persist.log

References:

support.microsoft.com/kb/947821 KB9478121

http://blogs.technet.com/b/joscon/archive/2012/09/26/fixing-component-store-corruption-in-windows-8-and-windows-server-2012.aspx

http://blogs.technet.com/b/joscon/archive/2010/05/26/using-checksur-and-update-packages-to-fix-corruption.aspx

http://technet.microsoft.com/en-us/magazine/dd490958.aspx

http://blogs.technet.com/b/joscon/archive/2012/09/26/fixing-component-store-corruption-in-windows-8-and-windows-server-2012.aspx

http://blogs.technet.com/b/joscon/archive/2010/05/26/using-checksur-and-update-packages-to-fix-corruption.aspx

Posted in Uncategorized | Leave a comment

Custom Bash Prompt

Custom Bash Prompt:

user save: ~/.bash_profile

export PS1=”[\\u@\\H \\W \\@]\\$”

export = is used to set/change an enviroment variable
$PS1 = enviroment varible for the bash prompt (the text before the curson on the terminal)

\e[ Start color scheme
0;31 sets the color (red), 0 is the shade/effect (light 0/dark 1/underline/bgfill) the 31 means red
\e[m Stop color scheme

“\e[0;31m[\u@\h \W]\$ \e[m ”
“[user@host etc]$ ”

List of Color code
Color    Code
Black    0;30
Blue    0;34
Green    0;32
Cyan    0;36
Red    0;31
Purple    0;35
Brown    0;33
Blue    0;34
Green    0;32
Cyan    0;36
Red    0;31
Purple    0;35
Brown    0;33

Source:
man bash (search “/^PROMPTING”)
https://wiki.archlinux.org/index.php/Color_Bash_Prompt
http://wiki.bash-hackers.org/scripting/terminalcodes

Posted in Uncategorized | Leave a comment

BSD Software management (Installing/Removing/Finding Packages and Ports)

BSD Software management (Installing/Removing/Finding Packages and Ports)

How to find packages and package information:
whereis gdm = finds where an exe is located in the file system
simple echo(1) statement to find where a port exists in the ports tree. For example:
# echo /usr/ports/*/*lsof*
/usr/ports/sysutils/lsof
Ports Collection’s built-in search mechanism. (need to be in the /usr/ports directory)
# cd /usr/ports
# make search name=lsof
pkg_info = utility that lists and describes the various packages installed
pkg_info -L foopackage-1.0.0 | less
pkg_info | grep -i foopackage
pkg_version -v = utility that summarizes the versions of all installed packages

pkg_add -r firefox = adds binary firefox from remote source
pkg_delete xchat/* = remove all packages whoses names start with xchat

How to use ports:
/user/ports/ = for sourcecode installs
make install clean
# cd /usr/ports/devel/subversion
# make install clean
Download a compressed snapshot of the Ports Collection into /var/db/portsnap.
# portsnap fetch
When running Portsnap for the first time, extract the snapshot into /usr/ports:
# portsnap extract
After the first use of Portsnap has been completed as shown above, /usr/ports can be updated with:
# portsnap update

portsnap fetch extract
portsnap fetch update

Now the installed applications can be compared to the versions in the ports collection.
# portmaster -L –index-only| egrep ‘(ew|ort) version|total install’

/usr/ports/UPDATING

get an updated copy of /usr/ports/updating:
pkg_updating -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/UPDATING

a utility for displaying UPDATING entries of software packages:
/usr/sbin/pkg_updating -d `/bin/date -v-1w +%Y%m%d`

Updating Ports or Packages

pkg_version -v (First, list outdated ports that have a newer version available in the Ports Collection with the pkg_version(1) command:)
check “/usr/ports/UPDATING”
pkgdb -F (Scan the list of installed ports, and fix all the inconsistencies it reports. It is a good idea to do this regularly, before every upgrade.)
portupgrade –use-packages -av
portmaster -a (designed make use of the tools found in the “base” system (it does not depend upon other ports) and uses the information in /var/db/pkg/)

portmaster -Pa

To use packages instead of ports for installation, provide -P or –use-packages flag.
With this option portupgrade searches the local directories listed in PKG_PATH, or fetches packages from remote site if it is not found locally. If packages can not be found locally or fetched remotely, portupgrade will use ports. To avoid using ports, specify -PP.

replace the installed port with a port from a different origin
portmaster -o new_port_dir old_port_dir
portmaster -o /usr/ports/graphics/freeglut /usr/ports/graphics/libglut
rebuild the port, and all ports that depend on it
portmaster -r freeglut

portupgrade -a = upgrade all installed ports to the latest version
pkgdb -F = Scan installed ports and fix all the inconsistencies it reports. It is a good idea to do this regularly, before every upgrade
make install clean
cd /usr/ports/ports-mgmt/portupgrade
# make install clean
Portmaster = is another utility for upgrading installed ports. Portmaster was designed make use of the tools found in the “base” system (it does not depend upon other ports
portmaster -L = list all the installed ports by category, and search for updates
portmaster -a = All the installed ports can be upgraded using this simple command
make install clean
# cd /usr/ports/ports-mgmt/portmaster
# make install clean

Clean up after compiling and installing software
portsclean -C
portsclean -D
portsclean -DD

Delete ports or packages

Ports are being removed exactly the same as the packages (discussed in the Packages section), using the pkg_delete(1) command:
# pkg_delete lsof-4.57

pkg_delete package_name

pkg_deinstall -f package_name

install, upgrade and act on all those packages required by the given packages as well
portupgrade -R package_name

Extra info:

pkg_version: corrupted record (pkgdep line without argument), ignoring
portmaster –check-depends
portmaster -Da

textproc/p5-XML-SAX-Expat
textproc/p5-XML-SAX-Writer

contains system-wide settings that will apply to every build using make
/etc/make.conf

i think all installed packages, or maybe all packages, i need to check this
/var/db/pkg

Sources:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html

http://www.wonkity.com/~wblock/docs/html/portupgrade.html

Posted in Uncategorized | Leave a comment

BSD common device names /dev/

BSD common device names /dev/

BSD Disk Device Codes

Code Meaning
ad ATAPI (IDE) disk
da SCSI direct access disk
acd ATAPI (IDE) CDROM
cd SCSI CDROM
fd Floppy disk

Sources:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disk-organization.html

Posted in Uncategorized | Leave a comment

How to enable a high resolution console on FreeBSD-9.0

How to enable a high resolution console on FreeBSD-9.0, we need to set a few flags and recompile the kernel

cd /usr/src/sys/i386/conf
cp GENERIC VESAKERN
vi VESAKERN

add the following lines:

options      VESA            # Build VESA module into kernel
options      SC_PIXEL_MODE   # Allows syscons to act on pixels rather than text

Build & Install New Kernel

cd /usr/src
make buildkernel KERNCONF=VESAKERN
make installkernel KERNCONF=VESAKERN

Reboot system now

Find and temp set a resolution your card supports
vidcontrol -i mode
vidcontrol MODE_280

Once you find a setting that you like, we can add it to /etc/rc.conf.
allscreens_flags=”MODE_280″

This will tell all terminal screens to use the desired resolution. Go ahead and reboot to try it. You will not see the large screen resolution until rc.conf is processed. This is different to Linux where the bootloader passes the resolution providing for a full boot-sequence in high-resolution. On my system, it jumps to high-resolution just before loading the Linux ABI support.

Using csup to get the freeBSD source, if you dont already have it

csup(1)
Use the base system’s already-installed csup(1) to get the source.
Create a supfile:
vi /root/9rel-supfile

Add the follow to the new 9rel-supfile file:
*default host=CHANGE_THIS.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_9_0
*default delete use-rel-suffix
*default compress
src-all

Change that first line to a near mirror (sysutils/fastest_cvsup can help to find the faster ones for your site, although it’s not always accurate).

Different tags can be used to get different releases of freebsd, for example 9.0-RELEASE or 9-STABLE. See CVS Tags.

Then run csup(1) on the supfile:
# csup 9rel-supfile

Here’s how to identify the fastest CVSup mirror using fastest_cvsup:

To install the port: cd /usr/ports/sysutils/fastest_cvsup/ && make install clean
To add the package: pkg_add -r fastest_cvsup

% su
# cd /usr/ports/sysutils/fastest_cvsup
# make install clean
# rehash
# exit
% fastest_cvsup -Q -r -c all

Sources:
http://www.freebsdwiki.net/index.php/High_Resolution_Console
http://forums.freebsd.org/showthread.php?t=29172
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html
http://www.freshports.org/sysutils/fastest_cvsup
http://linux-bsd-sharing.blogspot.co.uk/2009/03/tip-identify-fastest-cvsup-mirror-on.html

Posted in Uncategorized | Leave a comment