Thursday, November 17, 2011

iPXE (formerly known as gPXE) is an open source network boot firmware. The most obvious reason of using iPXE is the ability to download image from HTTP and Boot ISCSI target but not limited to that. For illustration purpose, this topic focus on chain load usage of iPXE image.

Prevent infinite iPXE boot

You will notice that booting undionly.kpxe basically just boot iPXE firmware. The iPXE will keep obtain iPXE image from DHCP server and boot itself infinitely. To instruct iPXE to do other work once iPXE has been loaded, make changes to dhcpd.conf:

The above changes will first boot iPXE image (undionly.kpxe), followed by booting a iPXE script from http service.

The iPXE script (boot.ipxe) can be as simple as:

# cat boot.ipxe#!ipxe
login

Here is an output screen of boot.ipxe:

Speeding iPXE boot

iPXE booting will wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay by adding an option in dhcpd.conf:

Sunday, November 13, 2011

A host-based printer like HP-LaserJet 1020 needs to download a firmware every time when boot up or else it won’t print. These printers works fine when connect to Windows that has drivers install. For Linux, foo2zjs may help upload the firmware to printer by USB hotplug daemon.

It is very hard to make host-based printers work with networked print server appliance as the printer won’t work without firmware. Most print server appliance don’t have firmware ready or it won’t upload the firmware to printer.

Some print server like D-Link DPR 1061 claims to work with host based printer but it is a different story. A software (PS-Link or PS-Wizard) is required to deploy on workstations in network to act as USB redirector to send firmware to printer. This isn’t a favor solution as it increase deployment effort on workstation.

This topic use TP-Link 1043ND wireless router as hardware device to act as printer server alternative to those branded printer server in market. The TP-Link 1043ND is patched with Gargoyle WRT (backed by OpenWrt). A small printer daemon p910nd is installed in the device to serve as printer server for network.

Print Server Device: TP-Link 1043ND

In this article, A gigabit wireless router: TP-Link 1043ND is used as example. The router has 4 LAN + 1 WAN ports and a USB port mainly for flash drive. We will make the USB port work with USB host based printer.

Printer: HP Laser Jet 1020

HP laser jet 1020 is a USB host based printer that is not friendly to many network print server in the market.

Product ID: “3f0/2b17/100” is the printer ID for my HP Laser Jet 1020. Change it to suitable ID for the printer you attempt to connect. You may attempt to grep the printer ID by patching the script file to output printer id to a log file.

Test Printer Firmware

Plug printer USB cable to device and check log file:

root@Gargoyle:~# cat /var/log/hp

The log file consist some information that is useful for troubleshooting

Power off both printer and device

Power on both printer and device

Check log file again to make sure firmware may send to printer properly

Friday, November 11, 2011

This article showing how to install Conexant USB modem on Linux machine. The Conexant USB module has a RJ11 socket at one end for phone line connection and USB connector on another end to plug into USB port:

Reference

Pyrit is a cryptography tool that may decrypt WPA/WPA2 capture handshake in 802.11 wireless traffic (WIFI) using brute force approach. The original Pyrit performs calculation using CPU cores. This article introduces how to compile Pyrit to facilitate NVIDIA GPUs that may boost performance for 10x to 20x or even more depends on GPU cores and models.

BackTrack Linux is an operating system based on the Ubuntu GNU/Linux distribution aimed at digital forensics and penetration testing use.[8] It is named after backtracking, a search algorithm. For more information and download a copy of backtrack, visit http://www.backtrack-linux.org/

Boot BackTrack via USB Flash Drive

The USB flash drive should have enough space to fit the BackTrack Linux ISO file

After the files has been copied to hard drive, Winnt32.exe will exit and back to WINPE

Type "Exit" to restart PC

Windows XP installation will continue as usual

Unattended Windows XP installation

Prepare unattend answer file:

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="0"
UnattendedInstall="Yes"[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
Setting OemPreInstall=Yes is necessary if you create an $OEM$
directory under \i386 to copy files to the target PC and/or are using a cmdlines.txt
file. If you aren't copying files to the target PC or using a cmdlines.txt file,then set it to NoOemPreinstall=YesTargetPath=\WINDOWSThe 2 lines below are used to convert the file system to NTFSand then extend the boot/system partition an extra 4GB.FileSystem=ConvertNTFSExtendOEMPartition=4000[GuiUnattended]AdminPassword="happyday"EncryptedAdminPassword=NOOEMSkipRegional=1TimeZone=35OemSkipWelcome=1The following 2 lines tell setup to login 1 time automatically afterthe installation has finished. Setup will only use the local Administratoraccount to loginAutoLogon=YesAutoLogonCount=1[UserData]You could add a ComputerName= line in this section. However,if you are installing multiple PCs, and since each PC needs aunique computer name, leaving out this line causes Setup to promptyou for a computer name. Alternatively, you could use a UDF file to provideunique user information.ProductID=xxxxx-xxxxx-xxxxx-xxxxx-xxxxxFullName="Jane Doe"OrgName="Widgets"[Display]BitsPerPel=32Xresolution=1024YResolution=768Vrefresh=75[Components]This section is where you tell XP to not install certain components.The line below tells XP not to install MSN Explorer.msnexplr=off[TapiLocation]CountryCode=1Dialing=ToneAreaCode=305[RegionalSettings]LanguageGroup=1Language=00000409[Branding]BrandIEUsingUnattended=Yes[URL]Home_Page=www.svrops.com[Proxy]Proxy_Enable=0Use_Same_Proxy=1[Identification]This section joins your PC to the domain indicated, creates a computeraccount and uses the username and password indicated to create the account.JoinDomain=MYDOMAIN.comCreateComputerAccountInDomain=YesDomainAdmin=msmithDomainAdminPassword=password[Networking]This section and the ones to follow were generated by Setup Manager.They describe what networking protocols and components to install.InstallDefaultComponents=No[NetAdapters]Adapter1=params.Adapter1[params.Adapter1]INFID=*[NetClients]MS_MSClient=params.MS_MSClient[NetServices]MS_SERVER=params.MS_SERVER[NetProtocols]MS_TCPIP=params.MS_TCPIP[params.MS_TCPIP]DNS=YesUseDomainNameDevolution=NoEnableLMHosts=YesAdapterSections=params.MS_TCPIP.Adapter1[params.MS_TCPIP.Adapter1]SpecificTo=Adapter1DHCP=YesWINS=NoNetBIOSOptions=0

Troubleshoot: "setup cannot load the keyboard layout file kbdus.dll"

If you encounter errors during the installation (e.g.: "setup cannot load the keyboard layout file kbdus.dll"), please make sure the installation partition is not hidden if you have hide it unintentionally.
To check if the partition is hidden: