Manual Creation of RSS 2.0 Feeds for Web Sites
by admin on Sep.04, 2010, under Web
This guide demonstrates how to quickly create a basic RSS 2.0 feed for web sites by manually coding it. The benefits for adding RSS to web pages are well-known and many. Although other methods exist for adding RSS to web pages, including various software tools and feed generation and conversion services, many are limited in some manner or require a fee or registration. Also, much information on the web about creating RSS feeds is often confusing or outdated. Because the RSS specification changes over time, usually by adding requirements, many software tools become obsolete unless they are updated regularly. With outdated software and changes to the specification, many videos, tutorials, and articles from even a year or two ago often contain information that if followed, will create invalid RSS feeds or feeds that produce errors when submitted to a RSS validation service. In addition, many online feed generation and conversion services either are no longer in operation or have changed from free to paid services. Because of these issues, it’s often desirable to create your own RSS feed. The good news is that creating your own RSS 2.0 feed isn’t terribly difficult.
The information in this guide was tested to insure that it will work. The method used for this guide is to create RSS 2.0 feeds using an XML file. The only tool needed is a text editor, such as notepad, to create the XML file and for adding a line of code into HTML web page file(s) to notify browsers of the feed’s existence.
______________________________________________________________________________
Requirements for RSS 2.0
A feed file is a specially formatted XML file made up of elements and sub-elements, which are either declarations or tags. RSS requires only a few elements, but has many optional ones, so feed files can range from simple to complex.
Required elements for RSS feeds for the XML document are:
- The XML declaration – This defines the XML version and character encoding (XML version 1.0 and UTF-8 encoding used for this guide).
- RSS declaration – Defines the RSS version (2.0 used for this guide).
- channel – The name of the web site. There must be a least one item (web page file/article) within the channel element.
- item – One for each article or web page file that makes up the web site. Must have at least one item.
- title – Title of the item element.
- link – Link of the item element.
- description – Description of the item element.
- title – Title of the channel element.
- link – Link of the channel element.
- description – Description of the channel element.
- item – One for each article or web page file that makes up the web site. Must have at least one item.
- Closing tags
Optional elements. Through testing, it was discovered that if the following elements are missing in the XML feed file, errors will result when the feed is validated using the W3C Feed Validator:
- atom:link – Identifies the feed’s URL. Used in the channel element. Makes the feed more portable, self-contained, and easier to cache. See workbench.org for more information.
- guid – Globally Unique Identifier. A string that identifies each item element as unique. It has no rules for syntax. Used for each item element.
Nice to have. These elements are not required, but they are useful and almost always included in RSS feeds:
- language -Identifies the language in the document. Often used as a requirement for submission to RSS directories. Used in the channel element.
- image – An image to represent the channel. Used in the channel element. Default size values are 88 for width and 31 for height. Max values are 144 for width and 400 for height.
- url – Required if using the image element. URL of an image in png, gif, or jpeg format.
- title – Required if using the image element. Describes the image. Identical to the channel’s title element. Used for the ALT attribute in HTML rendering.
- link – Required if using the image element. Link for the image. Identical to the channel’s link element.
- width – Optional but recommended. Width of image in pixels. If omitted, image width is assumed to be 88.
- height - Optional but recommended. Height of image in pixels. If omitted, image height is assumed to be 31.
- description - Optional. Description of image used for HTML rendering.
- pubDate – Date the item was published. If a future date is used, an aggregator may not display that item until that date.
W3C advises that because RSS is XML, keep in mind that:
- All elements must have a closing tag
- Elements are case sensitive
- Elements must be properly nested
- Attribute values must always be quoted (not utilized in this guide)
Putting all the above information together, below are the steps to create a working RSS 2.0 XML file that can be customized for a web site.
______________________________________________________________________________
Steps to Create a RSS 2.0 Feed
-
Use a Text Editor to Create the XML Feed File
- Click feedxml to open the editable XML feed file in your browser or right click it and download it to your computer.
- Use a text editor to open the downloaded file or cut and paste the text from the browser page into your text editor.
- Customize the file as required for your web site.
- Save the feed file as feed.xml
-
Add Code for RSS detection to your Web Page(s)
-
To make the RSS feed detectable in web browsers, customize the code below for your web site and paste it between the <head> </head> section of any web page(s) you wish to be detectable and then save the changed file:
<link rel=”alternate” type=”application/rss+xml” href=”http://www.yoursite/feed.xml” title=”Your title”> - Add a RSS feed button to your web page(s) such as those from hongkiat.com. Be sure to link the RSS feed button to the XML feed file. Below is an example using feedicon.png:
<a href=”http://yoursite.com/feed.xml”><img style=”border: 0px solid ; width: 28px; height: 28px;” alt=”feed icon” src=”feedicon.png” />
-
-
Upload the XML feed file, modified HTML web page(s), feed graphic, and the RSS feed button graphic to your server
-
Validate and publish your RSS Feed
- Use W3C to validate your feed either by direct input (cut and paste) or using your feed’s URL (http://yoursite.com/feed.xml). The validation process identifies errors and suggests corrections. Make corrections as needed then upload the corrected feed file again.
- Submit your feed to feed directories to get more traffic. Many are free. A recent listing and review of RSS directories can be found at masternewmedia.org.
-
All Done.
______________________________________________________________________________
References:
Test Bootable USBs with a Virtual Machine
by admin on Aug.18, 2010, under Multiboot USB
This guide shows how to use the open source Virtual Machine (VM) emulator manager, Qemu Manager, to test bootable USB drives in Windows without restarting your computer. Qemu Manager is a free, simple and fast GUI for the Qemu Emulator that makes creation of Virtual Machines a breeze with easy-to-use wizards. It’s performance is very good in comparison to other emulators and it comes in installable and portable versions. Qemu Manager can be downloaded from here. Qemu Manager version 7.0 was used for this guide.
Installation
For the installable version of Qemu Manager, during the install process, make sure to enable KQemu support for faster performance.
Creating a Virtual Machine
After installation, click on the “+” (plus) button to create a new VM (Virtual Machine). The wizard will appear. Fill in a name for the VM and use None for the operating system. Use the defaults for the other options and click next.
For Virtual Machine Settings, select Do not use a Virtual Disk Image. Use the defaults for the other settings. Click next.
For the advanced settings, use the default setting (Qemu Manager). Click Finish. The new VM (BootUSB) will now be visible in the left panel. If not already plugged in, insert your bootable USB drive. To reduce chances of selecting the wrong USB drive, make sure you have only one external drive connected to your computer.
With the new VM (BootUSB in this case) selected in the left panel, click the Drives tab. If the Select Path dialog doesn’t appear, then double-click Hard Disk 0 in the window to make it appear. In the Select Path dialog, click the Use Physical Disk button. After the Use Physical Disk dialog opens, select the Open Disk Management button. Identify your USB drive in the Disk Management window. In most cases, this will be Disk 1.
Close Disk Management and select your USB drive identified in Disk Management in Use Physical Drive. Click OK to close the Use Physical Drive dialog. Your USB will appear in the Select Path dialog, most likely as \\.\PhysicalDrive1 if you have only one hard disk in your PC and one USB drive connected to it. Click OK to close the Select Path dialog.
Caution: Never attach the Primary hard disk (usually Disk 0) to a Virtual Machine and Boot it!
Back at the main Qemu window and with new VM (BootUSB in this case) selected, click the Drives tab if its not displayed. Double-click the Boot Order icon in the right hand column to open the Boot Options dialog. Use the up/down button to move the hard drive to the first position and then click OK to close the dialog. The setup is complete. QEMU Manager is now ready to start booting USBs.
Boot USBs in a VM with Qemu Manager
Using Qemu Manager makes testing bootable USBs fast and easy. To boot a USB drive in the virtual machine, just click the green arrow on the menu. To close the VM, click the red button. To toggle control (mouse, keyboard, etc) between the VM window and the computer, press the keyboard’s Control and Alt buttons. The running application shown in the VM can be manipulated just as if the USB was booted from your computer. See the documentation for further information or just play around with the buttons on the main menu or the secondary menu which appear just above the VM’s window after it’s launched.
Create a Multiboot Multipartition USB with Syslinux and Grub4Dos
by admin on Mar.03, 2010, under Multiboot USB
This guide illustrates how to create a multiboot multipartition USB drive using both SYSLINUX and GRUB4DOS. Because many apps and Linux distros are coded and/or organized in a way intended to operate from dedicated single partition USB drives, they are often notoriously difficult to boot from multiboot USBs. Thus, while many apps and distros state they are bootable from USBs, often this means they are bootable from single-purpose (and single partition) USB drives, often using UNetbootin or other similar utilities. Seldom, if ever, are directions provided for installation to an existing multiboot environment, or how to create a multiboot USB in the first place. To get around this limitation, this guide demonstrates how to setup a USB drive to enable booting several apps and distros from the same partition when possible, or from separate partitions when necessary.
Almost any distro or app can be made to boot from a USB, with some being easier than others. Sometimes it’s as easy as extracting files and folders from a zip file to the USB. However, often it’s not always simple; especially when several apps or distros are installed to a partition already cluttered with multiple ISOs, image files, compressed files, system files, configuration files, and various folders. For the sake of brevity and simplicity, this guide covers selected apps and distros that were tested to work. By following this guide, it should become apparent how to install other apps and distros not mentioned here.
For this guide, Syslinux is used as the primary boot loader. GRUB4DOS is used as a secondary bootloader to chainload partitions (Chainloading is a process where control passes from the boot manager to the boot sector) and to boot ISOs and other apps. In this case, GRUB4DOS is used to pass control (chainload) to Syslinux installed on the other partition’s boot sectors (except for the boot partition, which is directly booted with Syslinux). The advantage of GRUB4DOS is that currently, it’s MUCH easier to chainload partitions and to boot ISOs using GRUB4DOS than with Syslinux, which is really designed to chainload hard drive partitions rather than USB drive partitions. Also, some applications (like ISOs) can boot easily with GRUB (or GRUB4DOS), but not always with Syslinux. Usually, anything that boots with GRUB can also boot with GRUB4DOS, as long as it’s installed to a FAT formatted partition (either FAT16 or FAT32). When GRUB4DOS and Syslinux are used together however, it greatly expands the booting options for USB drives. So essentially, as used here, GRUB4DOS is used to boot ISOs and a few other apps and to control (chainload) Syslinux. Syslinux is used to boot the active partition and to automatically boot applications installed to the dedicated partitions once control is passed from GRUB4DOS. It’s important to note that all the applications installed to the dedicated partitions for this guide are already designed to boot with Syslinux, so all that’s necessary is to copy them to a partition in order to be able to use the default menu options provided by the application developers.
This guide is an extension of an earlier one, Booting DSL (Damn Small Linux) from a Multiboot USB Drive, which demonstrated how to add DSL to a working bootable (either single or multiboot) single partition USB drive with Syslinux. Although creating multiboot USBs can be accomplished in many other ways, after much trial and error, the method here may be one of the easier ways to boot several popular distros and apps from the same partition and/or from multiple partitions for USB drives. This guide assumes the user has some experience with booting external devices, using partitioning tools, creating Live CDs from ISOs, and has a basic knowledge of Linux, Syslinux, and GRUB4DOS.
____________________________________________________________________________________
Operating Systems:
Windows 98/XP/Vista/Win7
Parted Magic LiveCD (PM ver 4.7 used for this guide)
Boot-loader and partitioning utilities to download. Extract to “C:\” or another location of your choice on a Windows computer.
GRUB4DOS (ver 4.4 used for this guide)
Syslinux (ver 3.84 used for this guide, newer versions should also work)
Tested distros and applications used for this guide (download links are provided below in the article body):
DSL (Damn Small Linux) ver 4.4.10-embedded
Parted Magic LiveUSB ver 4.7
AVG Rescue USB ver 90-100429
Clonezilla Live (for USB – zip file) ver 1.2.4-28-486
Puppy Linux ver 4.31
SuperGrubDisk ver 1.30
WinME Non-Windows Based Image File W/ImageApp
Hint: Downloading the above distros and apps to another USB drive, an external HD, or burning them to a CD will ease the task of copying and extracting them to the USB partitions later in this guide.
The configuration files for Syslinux and GRUB4DOS are pre-configured and provided in this guide. Included are:
_____________________________________________________________________________________
Here are the steps to follow to create a multiboot, multipartition USB drive:
About Partitioning and Formatting
First, decide on the number and size of the partitions needed to hold everything to be installed. Although not covered in this guide, it’s a good idea to have at least a couple of extra partitions and some unallocated space for future expansion and for apps that can only boot from dedicated partitions. Note that any storage drive device is limited to a maximum of four primary partitions. To partition a drive with more than four partitions, it’s necessary to create at least one as an extended partition and to create one or more logical ones within that extended partition. More often than not, it’s possible to boot several apps and distros from the same partition (particularly the boot partition), so sometimes it’s desirable to create a large partition to hold several booted apps and some smaller ones just large enough to hold the apps or distros that require their own partitions. For simplicity, this guide uses a 2GB USB drive divided into five approximately equal primary partitions (3 primary, 2 logical) of about 400MB each. The first partition will boot multiple distros and apps, with the other four setup as dedicated partitions (booting a single app or distro).
1. Boot the PC with the Parted Magic LiveCD and use GParted to Partition the USB drive
a. Connect the USB drive and boot the computer using the Parted Magic LiveCD. In Parted Magic, start the GParted Partition utility and set it to display the USB drive.
b. Use GParted to create three 200MB primary partitions and two 200MB logical partitions in an extended partition of 800MB. Be sure to format the partitions with FAT16 or FAT32 (It’s recommended to use either FAT16 or FAT32, but do not use both) and set the boot flag for the first partition. You can also provide identities for the partitions using labels. See the example GParted image below which uses three primary partitions and one extended partition. The partitions are labeled as 1, 2, 3, 5 & 6 (4 is the extended partition holding logical partitions 5 & 6. Partition 4 itself isn’t writable). Make sure no errors are showing for any partition before moving to the next step.
For step 2, Parted Magic can continue to be used; however, the user may find tasks such as copying, moving, and extracting files somewhat easier using a more familiar Linux distro such as Ubuntu, Puppy, etc. Parted Magic is suggested for the preceding steps because it contains an up-to-date version of GParted, while other Linux distros often use older versions. In any case, a non-Windows environment such as Linux must be used to copy the files to all the partitions (except the boot partition) since Windows can only access the bootable partition of USB drives.
2. In Parted Magic or another Linux Distro, install Applications and Distributions
Note: The file ldlinux.sys shown in each of the following screenshots will not exist until steps 3 and 4 are completed.
Partition #2 – DSL (Damn Small Linux)
DSL can be booted two ways: (1) from it’s own partition, or (2) co-existing with other apps and distros on the same partition. This guide will boot DSL from its own partition (first method), using the default DSL syslinux.cfg file that comes with DSL and setup with multiple booting options. The other method, installing DSL to co-exist with other apps and distros in a single boot partition (second method) was covered in a previous article: Booting DSL (Damn Small Linux) from a Multiboot USB Drive.
a. Download DSL Embedded.
b. Extract DSL Embedded to Partition #2 and copy all the files in the main folder to the root of the partition (erase the original folder afterwards). The root of the partition should look like this:
Partition #3 – Parted Magic
a. Download Parted Magic LiveUSB.
b. Extract to partition #3 and place the two folders, pmagic and boot in the root of the partition (erase the original folder(s) afterwords). The root of the partition should look like this:
Note: Parted Magic is in it’s own partition to avoid boot conflicts. Parted Magic, like the other distros and apps installed to dedicated partitions, already comes with a customized syslinux.cfg file. Parted Magic’s syslinux.cfg file is located in the boot folder (DSL’s and AVG’s are in root, Clonzilla’s is in the syslinux folder). During the booting process, SYSLINUX automatically searches for the syslinux.cfg file in the following order:
/boot/syslinux/syslinux.cfg
/syslinux/syslinux.cfg
/syslinux.cfg
Note: The boot order above shows why Parted Magic and many other distros and apps should be placed in their own partitions. Should another syslinux.cfg file be placed in root, it would be ignored and the Parted Magic syslinux.cfg file would always load since “boot/syslinux/syslinux.cfg” is first in the boot order. Of course, there are ways to get around this, but the goal of this guide is to create a multiboot USB quickly and easily without modification to the original file contents and structure so that the default boot options of the installed apps and distros are used.
Partition #5 – AVG Rescue CD
a. Download AVG Rescue (for USB Stick)
b. Extract to Partition #5. The root of the partition should look like this:
Partition #6 – Clonezilla
a. Download Clonezilla Live (for USB – choose the zip file).
b. Extract to Partition #6. The root of the partition should look like this:
Partition #1 – Puppy Linux/SuperGrubDisk/WinME Boot Image/Anything else
a. If you have a working frugal installation of Puppy Linux, copy all of its files to a folder named “puppy” ( min files required for a frugal install of puppy 4.xx are: initrd, pup_xxx.sfs, usbflash, and vmlinuz).
b. Download SuperGrubDisk ISO (ver 1.30) and place the ISO in a folder named “sgd”.
c. Download WinME Non-Windows Based Image File W/ImageApp and extract it to its default folder “winmec”.
d. Try other programs of your own.
Note: Not all ISOs are bootable using GRUB4DOS. Often, identifying bootable ISOs is a trial and error process to determine whether its possible to do so without modifying the ISO image. All the ISOs used in this guide were tested to insure they were bootable without modification.
Click here for the screenshot of Partition #1, or scroll further down this page
3. In Parted Magic, install Syslinux to the Boot Sectors of the Partitions
Note: another excellent tool to perform steps 3 and 4 is Bootice V0.7.8, which operates in Windows and can access multiple partitions. It can analyze partitions, format the USB drive, install and restore MBRs and PBRs, and more. Bootice is fairly easy to use; however, its use is not covered in this guide.
In Parted Magic, open a LXTerminal window and type the following commands to install Syslinux to all partition boot sectors except for the boot partition (partition #1). Be sure to substitute your USB device in place of sdb(x). Press ENTER after each of the following commands:
syslinux /dev/sdb2
syslinux /dev/sdb3
syslinux /dev/sdb5
syslinux /dev/sdb6
Exit Parted Magic and boot the computer to Windows for the next steps.
The above commands install Syslinux to the partition boot sectors for the 2nd to 6th partitions (4th excluded), and places the file ldlinux.sys into each partition’s root directory. However, these commands don’t make the device itself bootable because only the first partition contains the boot flag. Parted Magic is highly suggested for this step since it usually contains an up-to-date version of Syslinux.
Note: you will not see a response each time the above commands are executed unless there is an error.
4. In Windows, install Syslinux and the MBR to the Boot Partition #1 (use Windows for the remainder of Steps)
a. Exit Parted Magic and reboot the computer to Windows. Open My Computer to identify the Windows USB drive letter assignment.
Note that for hard drives, Windows can access multiple partitions, but for USB drives, Windows can only access a single bootable partition.
b. Open a CMD window using Start, Run, enter “CMD” and then hit OK. In the CMD window, navigate to the win32 folder of the extracted Syslinux folder. For example, if you extracted Syslinux to C:\syslinux-3.84, then type “C:\syslinux-3.84\win32″ and enter the following command: “syslinux.exe -sfma x:“ Be sure to substitute “x” with the letter assignment of your USB drive identified in My Computer.
This is an explanation of the above syslinux.exe command from the Syslinux Wiki:
-s Safe, slow, stupid: uses simpler code that boots better.
-f Force installing.
-m MBR: install a bootable MBR sector to the beginning of the drive.
-a Active: marks the partition used active (=bootable)
(Note: Setting the boot flag was done already in GParted, but it won’t hurt to do it again).
The above command installs a bootable MBR to the first partition of the USB drive, making Syslinux the boot manager for the USB device.
5. Copy GRUB4DOS to Root of Partition #1
Because Syslinux is the primary bootloader for all the partitions, only two files are needed to boot GRUB4DOS: (1) “grub.exe” and (2) “menu.lst”.
a. From the extracted GRUB4DOS folder, copy and paste “grub.exe” to Partition #1 .
6. Create and Configure the syslinux.cfg file and menu.lst Files to the Root of Partition #1
a. Save the following two files as syslinux.cfg and menu.lst (either open in your browser by clicking them to cut and paste or right click the links and save):
syslinuxcfg (be sure to save as syslinux.cfg)
menulst (be sure to save as menu.lst)
The syslinux.cfg file is used to set the configurable defaults for Syslinux. The menu.lst file sets the configurable defaults for GRUB4DOS. Note that the “l” in menu.lst is a small “L” and not the number “1″. Both files can be edited using a simple text editor.
7. Add Additional Files to Root of Partition #1
Copy the following files from the syslinux extracted folder to the root of Partition #1:
- vesamenu.c32 from “\com32\menu” (optional – used only if you want to use a fancier menu in the future)
- reboot.c32 from “\com32\modules” (required - adds an option to reboot the computer)
- menu.c32 from “com32\menu” (required – displays the basic Syslinux menu)
- memdisk from “\memdisk” (required - kernel to boot floppy images, disk images and some ISOs)
Optional:
Save the following two files and save them to the root of Partition #1 (either open in your browser by clicking them to cut and paste or right click the links and save):
submenulst (save as submenu.lst) Provides an extra menu for GRUB4DOS to boot other apps and distros if needed
help (save as help.txt) Provides a user-defined help menu when F1 is pressed while the Syslinux menu is displayed
Partition #1 should now look like this:
If you followed the above instructions, you should have a working multiboot, multipartition USB. The Syslinux boot screen should be similar to the screenshots below when you boot the USB drive. If you receive boot errors when booting to or selecting from the Syslinux menu, try installing Syslinux to the partition boot sectors again (step 3) and reinstalling the Syslinux/MBR to the boot partition (step 4). Also, use GParted to view the partitions for any errors. Errors in GParted will display as a yellow triangular symbol for the partition.
Automate Zipping Tasks using the Command-line Interface
by admin on Feb.06, 2010, under Windows
This guide demonstrates how to automate repetitive compression tasks using the CLI (command-line interface) using batch files with two popular free archiving tools, IZArc (freeware) and 7-Zip (open-source). Batch files are used because they are fairly easy to create, popular, and can operate on several versions of Windows and DOS. Although only batch files (*.bat) are covered in this guide, other scripting languages can also be used.
You may be thinking, “why would anyone want to automate a compression task in the first place”? Previously, I had a similar attitude until I had a need to compress, copy, rename, and move files from the same folder regularly, so I sought out a way to automate this process to save time and reduce errors.
This guide covers the use of two free archiving utilities, IZArc and 7-Zip. These two utilities were chosen because they are free, work well, and have a CLI built-in or available as a separate add-on. Using either of these utilities to automate your archiving needs is fairly easy to do, costs nothing, and will save time. Although this guide is designed to enable the user to accomplish this task quickly and easily, it is assumed that the reader is familiar with creating and using batch files and has some experience with using compression utilities.
Step 1. Download one of the following (32 bit versions were used for this guide)
- Get the 7-Zip Command-line Version from the 7-Zip download page
- Get the IZArc utility and the IZArc Command-line Add-On from the IZArc download page
The versions used for this guide were: 7-Zip Command Line Version 4.65, IZArc Version 4.1, and IZArc Command line Add-On Version 1.1.
Note: This guide uses the Command Line Version of 7-Zip (7za.exe), which supports only 7z, cab, zip, gzip, bzip2, Z and the tar formats. The full version of 7-Zip (installable and portable versions) also contains a command line version (7z.exe), which is full-featured and explained in the 7-Zip help files.
Step 2. Install the utility and set the environment variable
For 7-Zip:
Extract the 7-Zip file to a location of your choice, for example C:\7zip. For convenience and to make the 7-Zip commands available to the batch file, manually set the Windows Environment Variable Path for the chosen location, e.g., C:\7zip. To set the Windows Environment Variable Path, right click My Computer\Properties\Advanced Tab\Environment Variables. In the System Variables Area, select path, then click the Edit button. Add “;C:\7zip” (or your folder location) to the end of the line (don’t include the quotes and don’t forget the semicolon at the start). Hit OK twice.
For IZArc:
First, install the IZArc utility and then install the IZArc Command-line Add-on to their default locations (C:\Program Files\IZArc) by double clicking them. The IZArc Command-line Add-on will install the Command-line executables izarcc and izarce to the IZArc directory in C:\Program Files\IZArc. The Windows Environment Variable Path is not set automatically during the installation, so it must be done manually. To set the Windows Environment Variable Path, right click My Computer\Properties\Advanced Tab\Environment Variables. In the System Variables Area, select path, then click the Edit button. Add “;C:\Program Files\IZArc” to the end of the line (don’t include the quotes and don’t forget the semicolon at the start). Hit OK twice.
Step 3. Test the installation
Open a CMD window by hitting the Start button, enter cmd and press OK. A command-line window will open. Type one of the following into the command prompt window:
For 7-Zip:
Type “7za” and then press “Enter”. If installed correctly, you should see the usage commands for 7-zip as shown below on the top left thumbnail (click the picture to enlarge):
For IZArc:
Type “izarcc” and then press “Enter”. If installed correctly, you should see the usage commands for IZArc as shown below on the top right thumbnail (click the pictures to enlarge and view content):
- 7Zip Command Screen
- IZArc Command Screen
- 7zip-bat file
- Izarc-bat file
Note: For IZArc, the command-line executables are izarcc for the compression function and izarce for the extraction function. If you didn’t get one of the screens shown above, then check that the Windows Environment Variable Paths are present and correct for the 7-Zip or IZArc installation.
Step 4. Create the batch file
There are many ways to create batch files, from the simple to the complex. For the sake of simplicity and to focus on quickly demonstrating the use of these two compression utilities, this guide uses examples with basic commands to compress files from a folder using the zip format, moving the zip archive to another folder, and then deleting the original files. The thumbnails show the batch files for 7-Zip (bottom left) and IZArc (bottom right). Click to enlarge them to see the contents. The folder “testzip” contains the files to zip and “testmove” is the folder where the archive is to be moved.
Depending on which utility you wish to use, click one of the following to open the batch file text in a new window where you can cut and paste it to your text editor: testizarc.txt (IZArc) or test7zip.txt (7-Zip). Note: if you use either one of these batch files be sure to change the extension to .bat, create the “testzip” and “testmove” folders on your C: drive, and copy some files you want to zip to the “testzip” folder.
An explanation of the 7za command-line in the 7-Zip batch file (test7zip.txt):
- “7za” = this starts the 7-Zip command-line executable.
- “a” = adds files to the archive.
- “-tzip” = sets the type of archive; in this case, it’s a zip file.
- “C:\testmove\xxxx_%TODAY%.zip” = the name of the archive to create.["testmove" is the folder the archive is to be created in. "xxxx" is the name to give the archive. "%TODAY%" is today's date and time variable that's added to the zip archive name to insure that a separate archive is created each time the batch file is executed. The parentheses are optional unless there are spaces in the file path. Finally, ".zip" is the type of archive to be created.]
- “C:\testzip\*.*” = the files to be archived. In this case, it’s all the files in the folder “testzip” (this doesn’t include any subfolders).
- “-mx5″ = a switch to set the compression method. In this case, it’s zip mode, compression level 5 (default level).
An explanation of the IZArc command-line in the IZArc batch file (testizarc.txt):
- “izarcc” = starts the izarcc compression executable.
- “-a” = adds files to the archive.
- “-cx” = sets the compression level to maximum.
- “C:\testmove\xxxx_%TODAY%.zip” = the name of the archive to create.["testmove" is the folder the archive is to be created in. "xxxx" is the name to give the archive. "%TODAY%" is today's date and time variable that's added to the zip archive name to insure that a separate archive is created each time the batch file is executed. The parentheses are optional unless there are spaces in the file path. Finally, ".zip" is the type of archive to be created.]
- “C:\testzip\*.*” = the files to be archived. In this case, it’s all the files in the folder ” testzip” (this doesn’t include any subfolders).
Currently, the IZArc help file for the IZArc program, IZArc.chm, contains little or no information for the izarcc (compress) or izarce (extract) command-line functions; however, the command-line Add-on utility does include a text manual (manual.txt) that explains the commands and includes some examples for their use.
Summary
It’s fairly easy to automate archiving tasks using a simple batch file with either of the two free utilities covered in this guide. For basic needs, IZArc or the 7-Zip command-line version (7za.exe) should suffice. For more complex requirements, the full version of 7-Zip (7z.exe) provides a sophisticated set of options, giving users precise control for performing complicated archiving tasks from the command-line.
For more information and examples for using the 7-Zip command-line, also see the following:
Dot Net Perl’s article, 7-Zip Command-line examples
Codejacked’s article, ZIP Up Files from the Command Line
Recovering from an Accidental Partial Format of an External USB Drive
by admin on Dec.19, 2009, under Linux, Uncategorized, Windows
If you ever accidentally formatted an external drive on a PC with several plugged-in USB devices, you probably remember seeing them listed in the formatting tool’s selection box. The (C:) and (D:) drives may be listed, which are usually the boot drive and the backup drive. If an (E:) is displayed, it’s probably the optical drive. However, distinguishing between the other drives or devices may not be as apparent, especially when information beyond the drive letter assignment isn’t shown. This is particularly true for drives or other USB devices that don’t have identifying information on them. Under these conditions, it’s easy to become careless or impatient and select the wrong drive, especially if its’ letter assignment appears to be correct. If you are unlucky, you may notice a flashing light on the device confirming that the wrong drive is being formatted.
I did this recently when in a hurry and chose the wrong drive letter. Instead of formatting the flash drive, the external 250GB backup drive was formatting. Panicking, I immediately realized the error and stopped the formatting process, but it was too late. When I checked the hard drive, it couldn’t be accessed. The drive letter was still visible in Windows, but no files or folders were displayed and nothing could be written to or read from the drive.
Fearful of losing the data, I tried several file recovery tools with no success until using TestDisk. TestDisk is a free (open source) data recovery tool available from CGSecurity. With TestDisk, I was able to successfully restore the drive’s partition and it worked normally.
Luckily, all of the data was still intact. That’s because during a high-level format (quick format), only the external drive’s partition table information or boot sector are erased . According to Windows Help Central, even a full format can be recovered pretty easily as long as the original files are not overwritten with new data. That’s because the spaces containing file information on the disk drive are not really wiped clean, but instead, the areas where files are stored are marked as available for new data. As long as new data isn’t written to the drive, chances are good that the data is 100% recoverable using simple freeware data recovery tools. Anyway, if you hosed the partition table or MBR (Master Boot Record) during the format process, the drive isn’t likely to be writable anyway.
TestDisk is a utility that can be used to restore corrupted and missing MBRs, partition tables, and data. It’s a very useful and sophisticated tool in the hands of experienced users. Unfortunately, because data recovery can be a complex issue, inexperienced users may find it “user unfriendly”. However, documentation for the program is thorough and one can find many examples, technical notes, and step by step instructions in the documentation section on TestDisk’s Wiki. Also, the TestDisk Step by Step guide contains plenty of screen-shots which greatly helps in the data recovery process. The following screenshots show what to expect after starting TestDisk (note: the screens below show the results for a working hard drive that doesn’t have any problems).

Above is the first screen. For most cases, select the default option – Create a new log file.

Next, select your media device with the problem. In the screen above, the main hard drive is selected.

Select Intel if using a Windows machine.

In most cases “analyse” should then be selected.

The Analyses displays the partitions for the drive selected. Hit Enter to perform a Quick Search if TestDisk doesn’t display any error information.

Select “Yes” for most situations.

TestDisk displays the structure analysis results and displays the partitions. Use the arrow keys to select a partition to analyze, then hit enter.
If TestDisk didn’t find anything, it will ask if you want to perform a deeper search. From here, depending on the issue, it can get a little more complex, but the Wiki’s Step by Step instructions explain the procedure well enough so that even novices shouldn’t have a problem.
—————————————————————————————————————————————————————————
Other Data Recovery Utilities
If the drive is still accessible or only a few files are missing, you may want to try one of the easier-to-use file recovery programs listed below before trying TestDisk. Some that I’ve successfully used in the past to recover lost data are:
Summary
If the above tools don’t work for whatever reason, use TestDisk to try to recover the partition and/or MBR, but follow the directions carefully. Although fairly simple, it’s still possible to mess things up so thoroughly that the only way to recover the data would be to send the drive to a very expensive professional data recovery service.
Remember, if you accidentally format or erase files from your external USB drive, don’t panic. Get to work on recovering your data because chances are that it can be accomplished more easily than you think.
Booting DSL (Damn Small Linux) from a Multi-boot USB Drive
by admin on Dec.18, 2009, under Multiboot USB
If you are having trouble getting DSL (Damn Small Linux) to boot on a multiboot USB with Syslinux, then this guide may help. After experiencing the same problem and seeing other online complaints about it, I decided to create this guide.
This tutorial describes how to get DSL (Damn Small Linux) to boot from the boot partition of a working multiple boot USB flash drive that uses Syslinux as the boot loader.
Although many related guides on the web describe how to create multiboot USB drives, many are lacking when it comes to DSL because: (1) a different boot loader such as GRUB is used (2) the instructions are for creating dedicated boot USBs using a single app or Linux distro, or (3) they don’t provide enough details specific to DSL.
Rather than create a comprehensive how-to for multiboot flash drives, this guide limits itself to this particular distro, since other guides, including Create a Mulitboot Multipartion USB …, from this site provide instructions for successfully creating multiboot USBs with other Linux distros and applications.
This tutorial applies if the following conditions are met:
1. You can successfully boot at least one other distro or application on the USB drive with Syslinux (Ver 3.81 was used for this guide)
2. You want to add DSL to create a multiboot USB drive or you are unable to boot DSL on a USB drive with at least one other distro or application that currently boots with Syslinux
OK. Now for the instructions:
Download the Embedded Distribution of DSL:
Why use the embedded version? It’s provided in a zip file, so there is no need to extract and manipulate files from an ISO. The embedded version also comes with QEMU, which allows DSL to run within Windows and in Linux. So even if you can’t boot DSL from Syslinux, you can check the integrity of the DSL installation using QEMU by clicking dsl-base.bat in the DSL folder (see next step). The downside of running DSL with QEMU is that it will be extremely slow, about 5-6 times slower, than when it’s running natively. The DSL embedded version used for this guide was version 4.4.10. You can get the embedded version of DSL from here. The direct download link for the embedded version of DSL used for this guide is dsl-4.4.10-embedded.zip.
Create a Folder for DSL Embedded in the Root of the USB Drive’s Boot Partition and Unzip DSL Embedded to that Folder:
Pick any name you like. In my case, I made a folder named “DSLEmbedded” on my USB’s root. The reason for a separate folder is to avoid conflicting files that may already exist on the root for other distros or applications such as syslinux.cfg, knoppix folders, boot.msg, readme.txt and others. In fact, it’s preferable to put every distro in its own folder when you can, but that’s not always possible without complex folder organization schemes and/or file coding mods. Because of this, some distros should be in the root by themselves and are thus best installed to their own partition since they often have complex boot menus, they’re coded to work from root, and/or they have multiple files and folders (making upgrading more complex when installed to a single partition). However, DSL in a separate folder can coexist with many other distros using syslinux as the boot-loader – you just need to edit the root’s syslinux.cfg file and experiment to see what can coexist with the least amount of work and conflict. Currently, I have DSL co-existing in the same partition with SuperGrubDisk, two versions of Puppy Linux, and several Windows apps in ISO format, all booting from the same syslinux menu and almost all of them in separate folders.
Note: When you unzip DSL embedded, it will place all its files in a folder named “dsl-4.4.10-embedded” by default. Take everything out of this default folder and put it in your folder (see screen-shot of my folder to the left). The reason for this is to refer to a basic folder name in the Syslinux.cfg file, preferably one that without dashes, periods, or spaces.
Below are some thumbnail screen-shots showing the organization of the main partition, the Puppy400 folder, and the syslinux.cfg file. As with all of the screen-shots in this guide, click to enlarge them. Although outside of the scope of this guide, you can see Grub4Dos (grub.exe and menu.lst) are used to boot ISOs and other apps in multiple partitions which also have Syslinux installed in the boot sector
For the Syslinux.cfg file, either click the link in this sentence to open in your browser or right click the link to save it.
Edit the Current syslinux.cfg in the Root drive to Create a Menu Entry for DSL and Save It:
This guide assumes a syslinux.cfg file already exits in the root and is used to boot at least one other distro or application.
Important: Pay particular attention to use of “/” in file paths! Below is a copy of my entry:
MENU LABEL Boot Damn Small Linux (DSL)
KERNEL /DSLEmbedded/linux24
APPEND ramdisk_size=100000 lang=us apm=power-off vga=normal initrd=/DSLEmbedded/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix knoppix_dir=/DSLEmbedded/KNOPPIX
Note: (1) Unless you used the same name, use the name of your folder in place of “DSLEmbedded” everywhere in the menu label above. (2) Depending on your needs and/or your system, you may want to change the DSL cheat codes in the APPEND line. See the DSL Cheat Codes Wiki for more information.
That’s all there is to it. Reboot your PC or laptop and you should now be able to boot DSL from the Syslinux boot menu!
_________________________________________________________________________________
If Nothing is Working:
If DSL still doesn’t boot, on another bootable USB drive (with Syslinux as the bootloader), try installing Embedded DSL by itself to the root and not in a separate folder (move everything out of the folder and place it in root). In other words, and this is important – what was in the default folder (e.g., dsl-4.4.10-embedded or DSLEmbedded) should now be in the root of the partition. DSL should now boot with the default syslinux.cfg file. If that works, you are getting close; it’s just a matter of getting the file paths correct for the DSL folder you are going to use. Next, place DSL in a folder and move the syslinux.cfg file to root and then edit it using the instructions above to get it to boot. If successful, you can then duplicate those changes to the syslinux.cfg on the other USB drive. Also, you could just use the 2nd USB drive and add other apps and distros to it. Add one app or distro at a time then test to see if both boot, then add another distro and test again.
Because there are unlimited combination’s of distros and apps possible, differences in hardware, many multi-booting techniques and other factors, there is no way around some experimentation/trial and error testing to determine what works and what doesn’t.
If you are having trouble making a working multi-boot USB with Syslinux or just want to learn how, below are links to get started. If you still can’t get DSL to boot after that, then come back and recheck the suggestions again. Usually, most problems are minor such as using incorrect file paths or file names in the syslinux.cfg file.
Good luck and have fun.
Additional help is available at the following:
Guide for Multi-booting from a USB Drive
Damn Small Linux Wiki: Install to USB from Windows (Method II)
Comments welcome.


























