Showing posts with label Ubuntu-Debian. Show all posts
Showing posts with label Ubuntu-Debian. Show all posts

Install Xen in Debian Linux

My assumptions here are that you have a free partition named /dev/hda5 which you can use for setting up a LVM partition.

The following values can offcourse be changed suited to your needs:

*

-L at lvcreate to set size for your partitions
*

memory = in /etc/xen/domu1 to set memory size for the domU

The domU uses kernel "/boot/vmlinuz-2.6.11-xenU", because this document was written with Xen 2.0.7 installed. This setup however also works up until the last Xen unstable (3.0) version. The domU kernel line changes into the kernel supplied by the Xen version of your choice.

* install the base system:

apt-get install lvm2
pvcreate /dev/hda5
vgcreate lvmxen /dev/hda5
lvcreate -L1G -n domu1 lvmxen
lvcreate -L256M -n domu1-swap lvmxen
mke2fs /dev/lvmxen/domu1
tune2fs -j /dev/lvmxen/domu1
mkswap /dev/lvmxen/domu1-swap
mount /dev/lvmxen/domu1 /mnt
debootstrap sarge /mnt

# It can be possible that debootsrap spits out an error message
# like: E: Couldn't find these debs: 33024830
# use the following command line for debootstrap if this is the case.
#
# debootstrap --resolve-deps sarge /mnt

mv /mnt/lib/tls /mnt/lib/tls.disabled

*

put in /mnt/etc/network/interfaces:

auto lo
iface lo inet loopback

*

put in /mnt/etc/fstab:

# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda2 none swap sw 0 0

* create ttys

cd /dev
./MAKEDEV tty1 tty2 tty3 tty4 tty5 tty6

* unmount the newly created domU

cd /
umount /mnt

*

create a /etc/xen/domu1 file, for example:

# -*- mode: python; -*-
kernel = "/boot/vmlinuz-2.6.11-xenU"
memory = 128
name = "domu1"
vif = [' bridge=xen-br0' ]
disk = ['phy:/dev/lvmxen/domu1,hda1,w','phy:/dev/lvmxen/domu1-swap,hda2,w']
ip="192.168.2.103"
netmask="255.255.255.0"
gateway="192.168.2.1"
hostname = "domu1"
root = "/dev/hda1 ro"
extra = "4"

*

start the domU with xm create domu1 -c
*

log in as root, run base-config, happy xenning :-)

--

for a xen 3.0.0 source install, the /etc/xen/domu1 file must have the following values changed in /etc/xen/domu1:

* kernel = "/boot/vmlinuz-2.6.12-xen" vif = [' bridge=xenbr0' ]

Playing DVD Movies in Ubuntu

Playing DVDs

In order to play DVDs you must install some additional software. Unfortunately, DVD support cannot be provided by default in Ubuntu due to legal restrictions in some countries.
[Warning]

Read about restricted formats before following the instructions below. There are some legal issues that you should be aware of.

1.

Install the libdvdnav4, libdvdread3 and gstreamer0.10-plugins-ugly packages.
2.

If you would like to play encrypted DVDs, press Applications → Accessories → Terminal and type the following into the screen which appears, followed by the Enter key:

sudo /usr/share/doc/libdvdread3/install-css.sh

3.

Enter your password if prompted. The libdvdcss2 package will be downloaded and installed from a website.
4.

Insert a DVD into your drive. It should open automatically in the Movie Player.

Where have the menus on my DVDs gone?

DVD menus are not currently supported by the default Movie Player. To be able to use the menus on a disc, you must install an alternative movie player such as gxine or VLC.

To make DVDs automatically play in the alternative movie player when inserted, open Places → Home Folder, click Edit → Preferences and then click the Media tab. Select the alternative player from the DVD Video list.
How can I get my videos to play?

Some video formats, such as Flash, QuickTime, and Windows Media Video, are proprietary and so support for them cannot be included in Ubuntu by default. You must install some extra software to allow playback.

In order to play the most common proprietary formats in the Totem movie player or Firefox web browser, install the ubuntu-restricted-extras package (see Restricted Software for more information).
Video files

(e.g. QuickTime, Windows Media)

If you try to play an unsupported video file, you will be asked if you would like to search for a suitable codec. Click Search and, when the Install multimedia codecs window appears, select one of the codecs displayed in the list and click Install.

If you are asked to confirm installation of restricted software, the codec required to play your video may have some legal restrictions which you should be aware of. If you think that the restrictions do not apply to you, press Confirm to continue with the installation.

Once installation is complete, the video should begin to play. If not, try closing and then re-opening the video.
Flash videos

(e.g. Youtube, iPlayer)

When you first try to play a Flash video in the Firefox web browser, a bar will appear at the top of the window saying that additional plugins are required. Press the Install Missing Plugins button and follow the instructions on-screen to install a Flash player.

You will be offered the choice of several players. The Adobe Flash Player is the official plugin, which should offer the best support for videos. Unfortunately, it is proprietary software and so cannot be supported directly by Ubuntu. The Swfdec and Gnash players are not proprietary and so are supported. You may also find them to be more stable (cause fewer problems) than the official player.
Streaming video

(e.g. RealVideo)

The most reliable way of playing RealVideo-format videos is to install the official RealPlayer software. See Installing and configuring RealPlayer for full instructions.

Support for most other types of streaming video can be added by following the instructions for video files or Flash videos. If you are having difficulties getting a video to stream in your web browser, right-click the video and select Open with "Movie Player" if that option is available.
Videos that are otherwise unsupported

If none of the other instructions in this section work with a particular video, try using a different media player. VLC and MPlayer support a wide range of formats; it is recommended that you try one of these.
Installing and configuring RealPlayer

RealPlayer is a proprietary application, and so is not installed in the usual way.

1.

Download a suitable Linux installer from the RealPlayer website and save it in your Home folder.
2.

Open a Terminal (Applications → Accessories → Terminal) and type the following, pressing Enter at the end of each line and typing your password when prompted:

sudo chmod a+x RealPlayer*
sudo ./RealPlayer*

3.

You should see the text Extracting files for Helix installation on the screen if the installer has started properly. When asked a question by the installer, press Enter to accept the default.
4.

When the installer has finished copying files, press Applications → Sound & Video → RealPlayer 11 and follow the instructions on the screen to complete set-up.

Install Ubuntu Intrepid Ibex 8.10 on the Acer Aspire One

Note: There is also a new page, AspireOne110L, targeted at the Aspire One 110L (the version with an 8GB SSD) and Intrepid Ibex, using much of the information below.

Note Kernel 2.6.27-11 breaks the wired ethernet interface. Bug 313866 has been verified: https://bugs.launchpad.net/ubuntu/+bug/313866 Add to the information to help. Revert to an earlier kernel to fix the wired interface for now.

Note Reports have been made that after returning from suspend WiFi quits working as does Gnome-Power Manager. If you are having a problem with either of these, please start a discussion and looks for fixes. [Seems to be fixed by workaround, see below]

Status: Currently installing ( 1.6Ghz, 120GB harddrive )

Install Ubuntu

As the Acer Aspire One doesn't have a CD drive you must install with an USB drive or an external CD-ROM drive.

Shut down your Aspire One and insert the external USB CD-ROM or the USB stick that we just used. Turn it on and tap F12 to bring up the boot menu.

With a CD-ROM, choose the USB CD-ROM option. With the bootable USB stick created, choose the USB HDD option. This will boot you to the USB CD-ROM/LiveUSB stick, and allow you to install Ubuntu. Install it like normal if you have the hard disk Aspire One. If you have the SDD Aspire One, for good performance and to increase the life of the SSD use a non-journaled filesystem like EXT2.

*

Note: If you have already installed with EXT3 then follow this post: http://www.aspireoneuser.com/forum/viewtopic.php?f=5&t=164&st=0&sk=t&sd=a&start=10#p1177 to convert to EXT2.

Installation (file copy) will take a LONG time (hour +). If you are not currently connected to the internet on a wired connection, you may get an error about setting up a mirror. You can safely ignore that error - it's non-fatal.

Fully functional:

* Suspend / Resume [ works out of box ]
* Video (with desktop effects)[ works out of box ]
* Wireless Networking [ ath_pci loads by default instead of ath5k, but the fix is easy (see below)]
* wifi power saving [ works out of box ]
* Wired Networking [ works out of box ]
* Webcam [ works out of box ]
* USB [ works out of box ]
* Silent Fan [ fan works, silent?? needs scripts ]
* Audio [ semi-working (output only), internal mic DOES NOT WORK on 2.6.27*; mic can be fixed by updating alsa; audio output over speakers broken since kernel 2.6.27.7; ]
* Card Reader power saving [ not tested ]

Partial Function:

* wifi kill switch [ working, but no notification ]
* Card Readers, Bios 3109 [ Work out of the box, but write errors after suspend and on SDHC cards]
* Card Readers, Bios 3305 [ Pre 2.6.27.7: Only right card reader works after setpci described above; no SDHC support]
* Card Readers, Bios 3305 [ 2.6.27.7: Both card readers work again after setpci described above; no SDHC support, but at least the insertion of cards is automatically detected.]

Not Functional:

* Hibernate on A110L [ Seems to work for for some if there is a swap partition that is big enough so we can suspend to it. Test carefully before using!. ]

Wireless module

*

There has been some confusion as to which wireless driver provides the best performance and reliability. I have found the following:
o madwifi from kernel (ath_pci) - does not attach to hardware.
o ath5k from intrepid backports (ath5k) - connects to hardware, but experiences disconnects on medium to heavy wireless activity, and can not communicate with some AP's using WPA2 PSK.
o

madwifi-hal from http://snapshots.madwifi-project.org/ (ath_pci) - Everything works.

I recommend using the most recent snapshot of madwifi-hal from http://snapshots.madwifi-project.org/

wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
sudo apt-get install build-essential linux-headers-$(uname -r)
tar -xzf madwifi-hal-0.10.5.6-current.tar.gz
cd madwifi-hal-0.10.5.6*/
make
sudo make install
modprobe ath_pci

*

You may have to append ath_pci to /etc/modules:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

fuse
lp
ath_pci

*

This driver should work under all conditions. I have tested the driver under heavy load (3MB/s sustained for 2 hours, no hangup), tested for correct suspend/resume functionality, and verified it communicates correctly with WEP, WPA, WPA2, against recent Linksys, Dlink, and Cisco hardware.

Now you should create a script to restart the interface on awake from suspend mode, as it will otherwise hang. As root, create /etc/pm/sleep.d/00wireless:

#
# Restart WiFi interface after suspension
#

case "$1" in
resume|thaw)
/sbin/ifconfig wifi0 down
/sbin/ifconfig wifi0 up
;;
*)
;;
esac

exit $?

Don't forget to make it executable:

sudo chmod u+x /etc/pm/sleep.d/00wireless

Wireless LEDs

* the wireless leds need an entry in /proc
* with wireless on/off works, but there is no notification in Gui

"To get your wireless led to blink for you based on traffic, put these lines at the end of /etc/sysctl.conf."

dev.wifi0.ledpin=3
dev.wifi0.softled=1

Then either reboot or do sysctl -p

The led on the front will now do the association blink, as well as blink based on wireless traffic.

Audio

* Output works, Volume Ok. Audio switches from speakers to headphone

Internal microphone not working, http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=8ef355da64ff087b6f26c4c28a14753861e83e4b hopefully fixed this (available in 2.6.28-rc2); probably need to try to get this as a 2.6.27 -stable backport, into 8.10 already (or some ubuntu module backports package).
* Microphone worked for me out of the box on Acer Aspire One 150. I installed Skype and it worked fine!
*

There appears to be a mono/stereo incompatibility, see http://lkml.org/lkml/2008/11/22/155
* Maybe sound stops working after suspending and then resuming if this happens to you, add the following to the end of /etc/modprobe.d/options

# enable sound after suspend on Aspire One LP#249961
options snd-hda-intel model=acer

*

After installation of Intrepid on Aspire One Model NO:ZG5 (chip 82801G, from lspci) audio worked fine, but microphone did not. There were an input device, however gnome-sound-recorder hanged on recording and pacat produced noise, that had no relation to real sounds. Upgrading alsa to 1.0.18a fixed all microphone issues: gnome-sound-recorder started to produce quite a clear record of sounds. External mic has also been tested, results are positive. To upgrade alsa, download alsa-driver-1.0.18a.tar.bz2 (or later, 1.0.18a tested on 19 Jan 2009) from http://alsa-project.org/, unpack the archive, open terminal, cd into a newely-created folder and run the following commands:

sudo apt-get install build-essential linux-headers-$(uname -r)
./configure --with-cards=all
make
sudo make install

These commands will build new alsa drivers and copy them to a proper location. After rebooting, adjust microphone volume, that is set to zero by default and test microphone with gnome-sound-recorder.

Add the following to the end of /etc/modprobe.d/options after installing alsa this way:

options snd-hda-intel model=acer-aspire

Not simply "model=acer"!

External Video

* external video connector works with external monitor

Set Correct Font Size

(copied from Debian Acer Aspire One Help) When running under X, the native/optimum resolution is 1024x600 (standard widescreen ratio). The default X11 configuration will give you fonts that are too large for this resolution - You can add the following line to the "Monitor" section of your "/etc/X11/xorg.conf" file:

*

DisplaySize 195 113

And add the line:

* Option "NoDDC"

to the "Device" section.

That sets the resolution to the correct 96 DPI.

Note: This worked fine for me in kubuntu as the fonts were big. ubuntu seems to have better font sizes.

Setup fan controll as described above

rc.local may not be executable so
sudo chmod a+x /etc/rc.local
comment out the line /usr/sbin/set-usb-persist 0951 1606 on

Install NetBook Remix

*

1: Disable Visual effects
o

System-Preferences->appearance->:VisualEffects=none

2: Set WorkSpaces to 1x1
o

( right click workspaces --> preferences )
3: add the Repo for netbook-remix

System-->administration->SoftwareSources
Add source:
deb http://ppa.launchpad.net/netbook-remix-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/netbook-remix-team/ubuntu intrepid main

Or In a terminal type:
sudo gedit /etc/apt/sources.list

This will bring up your source list. then add these two lines to the end of your source list:
deb http://ppa.launchpad.net/netbook-remix-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/netbook-remix-team/ubuntu intrepid main
In a terminal type:
sudo apt-get update
To update your source lists.

1. Install the Netbook remix packages

In a terminal type:
sudo apt-get install go-home-applet human-netbook-theme maximus netbook-launcher window-picker-applet

You also need to set maximus and ume-launcher startup programs
System->preferences->Sessions
add /usr/bin/netbook-launcher
add /usr/bin/maximus

logout/login, or restart if that doesn't work

Note: VLC does not play well with maximus. If you are going to use VLC I suggest you disable maximus

1. Maximize your work area

To maximize your workspace area, you might want to remove the bottom pane, by right clicking the bottom panel and selecting the "Delete this Panel" option.

logout/login, or restart if that doesn't work

1. Configure the Top Panel

To get the most from your top panel you will want to add functions to your top panel. Right click the top panel and select the "Add to the Panel" option.Some suggestions include: GoHomeApplet, WindowPickerApplet, NotificationArea, and VolumeControl.

Install Ubuntu Hardy Heron (8.04.1) on the Acer Aspire One

Fully functional:

* Suspend / Resume
* Video (with desktop effects)
* Wireless Networking
* Wired Networking
* Webcam
* USB
* Silent FanSIG
* Card Readers

Partial Function:

* Audio - there is sound, issues detailed below

Not Functional:

* Hibernate on A110L
* Card Reader power saving
* wifi power saving
* wifi kill switch

Step 1: Install Ubuntu

As the Acer Aspire One doesn't have a CD drive you must install with an USB drive or an external CD-ROM drive.

(NOTE: It is also possible to install directly from network, which makes USB devices unneeded. You will still need a network cable and another computer. See: Installation/Netboot or Netinstall via Windows)

Shut down your Aspire One and insert the external USB CD-ROM or the USB stick that we just used. Turn it on and tap F12 to bring up the boot menu.

With a CD-ROM, choose the USB CD-ROM option. With the bootable USB stick created, choose the USB HDD option. This will boot you to the USB CD-ROM/LiveUSB stick, and allow you to install Ubuntu. Install it like normal if you have the hard disk Aspire One. If you have the SDD Aspire One, for good performance and to increase the life of the SSD use a non-journaled filesystem like EXT2.

*

Note: If you have already installed with EXT3 then follow this post: http://www.aspireoneuser.com/forum/viewtopic.php?f=5&t=164&st=0&sk=t&sd=a&start=10#p1177 to convert to EXT2. Installation (file copy) will take a LONG time (hour +). If you are not currently connected to the internet on a wired connection, you may get an error about setting up a mirror. You can safely ignore that error - it's non-fatal.

Step 2: Tweak / Fix

So now we should have an installed Ubuntu system. At this point, if you have not already done, so connect your Aspire One to the internet using a wired connection. First and immediate task is to update, since the wireless driver needs to be reinstalled after every kernel update. Open a terminal (Applications -> Accessories -> Terminal). Perform the updates:

sudo apt-get update
sudo apt-get upgrade

WIRELESS:

There are two different ways of configuring the wifi hardware, using either madwifi drivers, or wrapping Windows drivers with ndiswrapper. If you have troubles with one method, try the other.

madwifi

Now we need to disable the hardware drivers that Ubuntu tries to use before the ones we make will function. So go to System -> Administration -> Hardware Drivers and uncheck everything. It should prompt us to reboot, so lets do it now.

We need to grab the wireless driver, and the things we need to build it, from a terminal:

mkdir source
cd source
wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
tar -xzvf madwifi-hal-0.10.5.6-current.tar.gz
cd madwifi-hal-0.10.5.6-r3879-20081204
sudo apt-get install build-essential linux-headers-$(uname -r)

And we build and install:

make
sudo make install
sudo modprobe ath_pci

In order to have the wireless work after reboot, add the following line to /etc/modules ("sudo gedit /etc/modules") to automatically load the module when booting:

ath_pci

You should now have working wireless. However you may want to do the following to prevent problems (the symbol mismatch) when the module is loaded:

Add ath_hal to the DISABLED_MODULES= stanza in /etc/default/linux-restricted-modules-common

(i.e. 'DISABLED_MODULES="ath_hal"')

Every time there is a kernel update you will need to perform the following steps to make the wireless work. Go to the directory (madwifi-hal-0.10.5.6-r3835-20080801) and run:

make clean
make
sudo make install

ndiswrapper

If the above madwifi instructions didn't work for you, using ndiswrapper is an alternative that is known to work, but uses Windows drivers.

Download drivers for your wireless card from: http://download2.dvd-driver.cz/atheros/drivers/ar5008/xp32-6.0.3.85.zip

Unzip those drivers.

Install ndiswrapper, and launch the installer:

sudo aptitude install ndisgtk
sudo ndisgtk

Find the net5416.inf file, and install it.

If you have tried madwifi, unload it with:

madwifi-unload

Restart your AA1, and everything should work.

WIRELESS LED:

To get your awesome wireless led to blink for you based on traffic, put these lines in /etc/rc.local, just above the string exit 0 (below doesn't work).

* Note: The 2.6.27 kernel does not appear to have these options anymore (earlier kernels do).

sysctl -w dev.wifi0.ledpin=3
sysctl -w dev.wifi0.softled=1

The led on the front will now do the association blink, as well as blink based on wireless traffic.

rc.local may not be executable so

sudo chmod a+x /etc/rc.local

The wifi kill switch uses these keycodes (also to use in rc.local):

/usr/bin/setkeycodes e055 159
/usr/bin/setkeycodes e056 158

WEBCAM

Install luvcview - USB Video Class grabber

apt-get install luvcview

You may confirm it is recognized

dmesg |grep -i "uvc"

And this is the repply

[ 29.601485] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:62c0)
[ 29.617301] usbcore: registered new interface driver uvcvideo

Say hello to yourself with this command ;)

luvcview -f yuv

CARD READER:

Note: there are problems with the card readers: DO NOT SUSPEND your Aspire One with an SD Card inserted. I lost all my data on it!

If you want the card readers to be hot-pluggable, you'll need to work through the following modified instructions from http://wiki.debian.org/DebianAcerOne.

Create a file /etc/modprobe.d/aspireone with the following content:

####################################################################
# Module options for the Acer AspireOne
#
# Enable USB card reader
options pciehp pciehp_force=1
install sdhci for i in 2381 2382 2383 2384; do /usr/bin/setpci -d 197b:$i AE=47; done; /sbin/modprobe --ignore-install sdhci

Add the following line to the end of you existing /etc/modules file:

pciehp

You need to reboot to the get the files /etc/modules and /etc/modprobe.d/aspireone read properly. Inserting a SD card should then result in HAL finding the card and placing icon on the desktop automagically.

Note there are still a few problems with this setup:

* If you first insert a card in the left card reader, both card readers will be hot pluggable. However, if you first insert a card in the right card reader, the left card reader will not be available until reboot.
*

MemorySticks wouldn't work for me in the right multi-card reader. I think this is a kernel module limitation.

A script to poll the card reader for power events (AC unplugged, etc.) is included on the recovery DVD shipped with the machine within the "hdc1._.tar.bz2" archive as /usr/sbin/jmb38x_d3e.sh. This script runs once every 5 minutes and adjusts the power level depending on the system power state.

The script is also available from the petaramesh site. Download it, make it executable and copy it to /usr/local/sbin with:

wget http://petaramesh.org/public/arc/projects/AcerOne_Ubuntu/jmb38x_d3e.sh
sudo chmod 754 jmb38x_d3e.sh
sudo mv jmb38x_d3e.sh /usr/local/sbin/

To use the script add a line like:

/usr/local/sbin/jmb38x_d3e.sh &>/var/log/jmb38x_d3e.log &

to rc.local before exit 0. Next time you reboot this script will be running (or you can execute it in a terminal now as root).

The script generates lots of harmless warning messages, so we send the output messages to a log file.

The card readers are identified as /dev/mmcblk0 and /dev/mmcblk1. Partitions on them are labeled, for example /dev/mmcblk0p1.

USB MOUNT:

(Do this step only if you get an error inserting a USB stick)

If you insert a memory key, you may notice an error and that it cannot be mounted. This is due to the CD-ROM entry in the fstab. Since we don't have an optical drive on the One we will comment that out. From a terminal again:

sudo gedit /etc/fstab

You should see a line that looks like:

/dev/sdb /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

add a hash in front:

#/dev/sdb /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

Reboot, and automount should work.

NOISE (FAN CONTROL)

Aspire One by default commonly doesn't manage Fan speed correctly, resulting in a very noisy AA0.

Note: On A150X with a 160gb hd and 6 cell battery the perl script returns 0ºC every time, because the thermal control is not working. This causes the fan to shutdown. It could DAMAGE your system severely. Please check that the script is returning the correct values manually before applying the daemon.

Solution:

* Ensure you have dmidecode installed, so acerfand can detect which bios version you have. It's probably installed by default already. If not, execute:

sudo aptitude install dmidecode

*

Download the acer_ec.pl script (Direct download).
*

Download the acerfand daemon script (Direct download). (New version (2008-12-20) adding support for BIOS 3309 which is also now selected as default so should work with new bioses until the registers actually change again.)
* (You can check whether the scripts shows a reasonable cpu temperature (in hex) as follows:)

perl acer_ec.pl ?= 58

* Execute these lines in a terminal in the directory you downloaded the above scripts:

chmod a+x acerfand
sudo cp acer_ec.pl acerfand /usr/local/bin/

* To run it straight away:

sudo acerfand

* Note, you need the correct bios for this to work correctly. To see if the acerfand script is working, you can check the system log after you have run the *sudo acerfand* command:

#sudo tail -f /var/log/syslog
Oct 9 02:04:36 lilput acerfand: acerfand 0.03 starting
Oct 9 02:04:36 lilput acerfand: Detected bios version v0.3301
Oct 9 02:04:36 lilput acerfand: Unsupported bios version v0.3301 found. Aborting.

*

There is information about updating your bios here: http://macles.blogspot.com/2008/08/acer-aspire-one-bios-v3304.html

* To run it at boot:

sudo gedit /etc/rc.local

Insert the following line above the exit 0 at the bottom:

/usr/local/bin/acerfand

The fan is not completely disabled. When the FANAUTO temperature is reached (70ºC), fan works again. According to Intel, the Atom chip could work until 99ºC.

Optional: Above instructions will work fine, but if you want to define another temperature:

* Create an /etc/acerfand.conf file. The file is just a shell script that sets up to three values. eg:

INTERVAL=5
FANOFF=60
FANAUTO=70

Those are the default values, if the /etc/acerfand.conf file isn't found.

INTERVAL is the polling interval in seconds

FANOFF is the temperature (in Celsius Degrees) at or below which to turn the fan off, if it's currently on auto

FANAUTO is the temperature (in Celsius Degrees) at or above which to turn the fan to auto, if it's currently off

More information from the original source, AspireOne Wiki.

OPTIMIZING SSD PERFORMANCE:

*

Note: (Skip this step if you have the hard disk Acer Aspire One)

The performance of the SSD drive can be significantly improved by a few tweaks described in an article by Jason Perlow (But ignore Tweak #1, which does not apply.). The most important of these are described here.

Change the file system mount options on SSDs to “noatime”

Edit /etc/fstab (sudo gedit /etc/fstab) and change the the option “relatime” to “noatime”. The line for the root partition should then be something like:

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d / ext2 noatime,errors=remount-ro 0 1

Use the “noop” I/O scheduler

Edit /boot/grub/menu.lst using your favorite editor, and add "elevator=noop" as an option. The default kernel configuration, found in the last part of the file should be something like:

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d ro quiet splash elevator=noop
initrd /boot/initrd.img-2.6.24-19-generic
quiet

In order for the changes to remain when updating the kernel, also in menu.lst, find the line

# defoptions=quiet splash

and add "elevator=noop" as an option:

# defoptions=elevator=noop quiet splash

REDUCING SSD WEAR:

*

Note: (Skip this step if you have the hard disk Acer Aspire One)

Frequent writes to the SSD will cause failure eventually. We can reduce the number of writes to the SSD by moving our logs to a temporary filesystem in RAM that gets destroyed at ever reboot. Now this means your logs will not be persistent across reboots making debugging difficult in some cases. This step is optional of course, so if you need the logs for an extended period of time do not follow these steps.

Open your fstab again, and add the following lines:

sudo gedit /etc/fstab
tmpfs /var/log tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0

There is currently a bug in sysklogd where it cannot handle booting with an empty /var/log directory (bug #290127). This can be fixed by modifying /etc/init.d/sysklogd:

Find this function:

fix_log_ownership()
for l in `syslogd-listfiles -a`
do
chown ${USER}:adm $l
done
}

..and replace it with this:

fix_log_ownership()
{
for l in `syslogd-listfiles -a --news`
do
# Create directory for logfile if required
ldir=$(echo ${l} | sed 's/[^\/]*$//g')
if [ ! -e $ldir ] ; then
mkdir -p $ldir
fi
# Touch logfile and chown
touch $l && chown ${USER}:adm $l
done
}

Warning: this will cause some packages to fail mysteriously when they cannot access the log directories that were installed with the packages and then disappeared at reboot.

To rebuild the rest of the directory structure inside /var/log on each reboot, add these lines to /etc/rc.local above the 'exit 0' line:

for dir in apparmor apt cups dist-upgrade fsck gdm installer samba unattended-upgrades ; do
if [ ! -e /var/log/$dir ] ; then
mkdir /var/log/$dir
fi
done

Note: discovered ATA 40-wire cable misdetection after resume (currently 2.6.27), causing hdparm down from 40MB/s to 25MB/s: filed http://bugzilla.kernel.org/show_bug.cgi?id=11879 for this issue -AndiM

DISABLE SCROLLKEEPER:

(Skip this step if you have the hard disk Acer Aspire One)

ScrollKeeper is a cataloging system for documentation on open systems. Hardly anyone ever uses it and on the AAO's slow SSD it takes ages every time you install anything. Disable it and your installs will fly! Finally add a diversion to stop dpkg from overwriting your changes.

sudo mv /usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-update.real
sudo ln -s /bin/true /usr/bin/scrollkeeper-update
sudo find /var/lib/scrollkeeper/ -name \*.xml -type f -exec rm -f '{}' \;
sudo dpkg-divert --local --divert /usr/bin/scrollkeeper-update.real --add /usr/bin/scrollkeeper-update

VIDEO AND 3D PERFORMANCE: (Optional)

Out of the box, the graphic card Intel GMA 950, is well detected, however you can tweak /etc/X11/xorg.conf to achieve better graphic card performance:

Section "Device"
(...)
Option "MonitorLayout" "LVDS,VGA"
Option "Clone" "true"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
VideoRam 229376
Option "CacheLines" "1980"
EndSection

The Option Clone is especially usefull, if you want to capture video or photos. Without it you will get a black screen on applications like cheese.

Also add this to your /etc/profile:

export INTEL_BATCH=1

Note: 'export INTEL_BATCH=1' appears to causes graphics faults (artifacts) within 'ume-launcher' (even with Compiz fully disabled).

Reboot and you will have a more responsive system, with better 3D FPS, and improved video performance.

AUDIO:

Out of the box there are various issues with the sound. These range from headphone detection not functioning correctly, to the internal MIC not working. There are solutions to these problems. Currently, however, there is no known way to get everything working at once. All of the steps begin the same way, rebuilding ALSA:

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa
sudo alsa force-unload
sudo depmod -ae
sudo modprobe snd-hda-intel

Add the following line to the end of /etc/modules in order to ensure that the module is loaded during bootup:

snd-hda-intel

Now we need to make a choice. To have the internal MIC non-functional (external works), but sound working after suspend and resume, we edit /etc/modprobe.d/alsa-base (sudo gedit /etc/modprobe.d/alsa-base) and add the following line to the bottom:

options snd-hda-intel model=toshiba

Reboot for that to take effect.

To have the internal MIC function correctly, but no sound after suspending and resuming the computer add or change the following to the /etc/modprobe.d/alsa-base as before:

options snd-hda-intel model=auto

Again, reboot for this to take effect.

For some unknown reason some people don't hear any sound with either option. If you experience this problem you might want to use the option in /etc/modprobe.d/alsa-base as before to the following to resolve this problem:

options snd-hda-intel model=acer

For A150L, model=basic seems to work fine with alsa 1.018rc3 (internal mic and sound work after suspend; plugging headphone in does turn the speakers off)

options snd-hda-intel model=basic

According to the ArchWiki alsa version 1.018 and up contains a new dedicated audio model option for the Acer aspire one that can be used instead:

options snd-hda-intel model=acer-aspire

If you experience crackling sound after rebooting, insert the following line in /etc/modprobe.d/blacklist:

blacklist snd_pcsp

Optional: The default sound level is low. Open a terminal and type alsamixer to adjust volume.

Alsa needs to be version 1.0.17.

Alternative Method for upgrading ALSA and settings

There is a script available at http://ubuntuforums.org/showthread.php?t=962695 This will currently upgrade ALSA to 1.0.17 or 1.0.18final (IBEX comes with version 1.0.17 by default) Tweak the configuration as suggested above

options snd-hda-intel model=acer

Why do it this way? because it works it fetches the required tools and source builds and installs it all in one step leaving you with just the configuration steps needed specifically for the Aspire One. Why not do it this way? It can overwrite system settings and files without giving you any choice in the matter. See the link for details and this is not recommended practice. Your Aspire One, your choice.

Note The script at the beginning of the thread given by the Link appears to be broken, on page 2 is another version for 1.0.18 by the same author which may work, however also on that page is a link for a script which will install 1.0.18r3 http://ubuntuforums.org/showpost.php?p=6090951&postcount=16 That does work fine.
Retaining Mixer Settings

There is an issue with retaining the audio settings in Hardy You configure the mixer so sound input is internal mic, on reboot it is reset to mic. The desktop applet doesn't have a save settings option. so use it to configure your audio then open a terminal and type

sudo alsactl store

however on reboot you will find your settings are gone again

sudo alsactl restore

will retrieve your settings. (this section is incomplete and needs details for restoring the alsa settings automatically on boot) http://ubuntuforums.org/showthread.php?t=962695 is currently at version 1.15 and can be downloaded here

http://ubuntuforums.org/attachment.php?attachmentid=96599&d=1229445232 there are a couple of options how to use the script with intrepid running with the options -di should work, for older kernel versions 2.6.24.x there is a compilation error but snapshots work so sudo ./AlsaUpgrade-1.0.x-rev-1.15.sh -d sudo ./AlsaUpgrade-1.0.x-rev-1.15.sh -snap (2.6.24.x kernels e.g hardy) sudo ./AlsaUpgrade-1.0.x-rev-1.15.sh -i

using model=acer-aspire seems to give good results and use of the above script ensures mixer settings are restored after a reboot.

Screen Tweaks

TWEAKS TO MAKE BETTER USE OF THE ASPIRE ONE'S SMALL SCREEN:

There are various methods that will help you make better use of the Aspire One's small screen. One of the most important is being able to move windows that are too large to fit on the screen at once. To move a hidden part of the window into view, click and drag with the left mouse button on any part of the window while holding down the ALT key. However, you won't be able to drag windows so the top of the window is above the top of the screen. To fix that, enter the following in a terminal window:

gconftool-2 --set /apps/compiz/plugins/move/allscreens/options/constrain_y --type bool 0

Since the Aspire One's screen has almost twice as much resolution horizontally as vertically, having panels on both the top and bottom is not ideal. You may want to remove the top or bottom panels, make them smaller, or move them so that they are vertical, on the left and right side, instead of horizontal on top and bottom.

TOUCHPAD TWEAKS:

The AAO touchpad is quite easy to bump whilst typing. The best fix is to disable all scroll and tap commands for 1 second after each keystroke.

Go to Preferences and select "Sessions". Click the add button and add an entry:

Name: Syndaemon
Command: syndaemon -d -t -i 1
Comment: Disable trackpad while typing

The '1' can be changed to any decimal number, and defines the amount of time to lock the trackpad after each keystroke. See the Syndaemon man page for full details.
Start/Resume

HIBERNATE:

In some set-ups, using hibernate has been reported to cause file corruption.

TWEAK FOR BOOTUP SPEED (Optional):

To decrease boot time, activate concurrency bootup: sudo gedit /etc/init.d/rc and replace the line:

* CONCURRENCY=none

with

* CONCURRENCY=shell

TWEAKS FOR POWERSAVING (Optional):

Add the following to the /etc/rc.local file:

# Economize the SSD
sysctl -w vm.swappiness=1 # Strongly discourage swapping
sysctl -w vm.vfs_cache_pressure=50 # Don't shrink the inode cache aggressively

# As in the rc.last.ctrl of Linpus
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_max > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 20 > /proc/sys/vm/dirty_ratio
echo 10 > /proc/sys/vm/dirty_background_ratio

echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
echo 10 > /sys/module/snd_hda_intel/parameters/power_save
echo 5 > /proc/sys/vm/laptop_mode

#Decrease power usage of USB while idle
[ -w /sys/bus/usb/devices/1-5/power/level ] && echo auto > /sys/bus/usb/devices/1-5/power/level
[ -w /sys/bus/usb/devices/5-5/power/level ] && echo auto > /sys/bus/usb/devices/5-5/power/level

NETBOOK REMIX (Optional):

UPDATE: An Ubuntu Netbook Remix (UNR) installer image with the LPIA kernel is now available. Such image can be installed as-is on an Aspire One and most of the steps described are not necessary. Of particular interest, wifi, suspend/resume, webcam and fan control (once BIOS has been upgraded) work out-of-the-box. Card readers have the same issues.

WARNING ABOUT UNR: The UNR installer image currently wants to format your entire hard disk. If you want to dual boot XP Home and Ubuntu your best bet is to use GPARTD from a live linux such as systemrescuecd to resize the windows partition and create partitions for your Ubuntu install. Recommended one main partition labeled / and formatted and a 1-2 gb swap partition.

To install Ubuntu Netbook remix -

In Intrepid, the netbook remix packages are already in the universe repository. For Hardy, you'll need to add the netbook remix PPA to your sources.list.

* Insert the following into /etc/apt/sources.list (not required for Intrepid):

deb http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main
deb-src http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main

* then execute

In Hardy:

sudo apt-get update
sudo apt-get install go-home-applet human-netbook-theme maximus ume-launcher window-picker-applet

In Intrepid (ume-launcher has been renamed to netbook-launcher):

sudo apt-get install go-home-applet human-netbook-theme maximus netbook-launcher window-picker-applet

*

Add maximus as startup program (system > preferences > sessions > startup programs)
*

Change the desktop theme to Human-Netbook (system > preferences > appearance > theme)
* Delete the bottom panel
* Reconfigure the top panel to contain the following items -
o Go Home Applet
o Window Picker Applet
o Notification Area
o Mixer Applet
o Clock
* There is a bug in the ume-launcher after resuming from suspend. To work around this place the following in /etc/pm/sleep.d/01UMELauncher -

#
# Copyright 2008 Matteo Collina
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.

export DISPLAY=:0.0

TMPFILE=/tmp/.launcher/resume-event

case "$1" in
suspend|hibernate)
rm -rf $TMPFILE
echo "Removed resume-notify file"
;;
resume|thaw)
touch $TMPFILE
echo "Created resume-notify file"
;;
esac

exit $?

* Make the above file executable -

sudo chmod +x /etc/pm/sleep.d/01UMELauncher

You should also disable desktop effects as these cause issues with netbook remix.

Maximizing screen real estate in Firefox:

To take your screen saving netbook remix to the next level, you can do the following to maximise screen real estate in everyone's most used app - Firefox -

* Install the following addons
o Stop or Reload Button
o Personal Menu
o

AutoHideStatusBar (https://addons.mozilla.org/en-US/firefox/addon/1530)
* Install the following theme -
o Classic Compact
* Configure Personal Menu to include all the standard menus except History and Bookmarks (they get their own buttons)
* Disable the menu toolbar. You can always get it back by pressing Alt
*

Use the top-bar icon tabs instead of firefox tabs. (options are in edit > preferences > tabs )

Drastically speed up Firefox

Make firefox store its cache in the /tmp directory --- which when we we have moved it to a tmpfs according to this wiki is *fast*.

* Firefox 3.x uses a sqlite db that creates many write accesses, so this can reduce it:
1. In Firefox go to (type as url) "about:config", right click, add new string „browser.cache.disk.parent_directory“ with value "/tmp/firefox"
2. In Firefox change options/security/ and disable phishing if you dare. - Your firefox will run even faster then but won't warn you about phishing any more so take care!

Alternatively, to speed up Firefox further, enter "about:config" (without the quotes) as an url in Firefox, then change the following settings:

// disable disk and offline cache
set browser.cache.disk.enabled: false
set browser.cache.disk.capacity: 0
set browser.cache.offline.enable: false
set browser.cache.offline.capacity: 0
// just as a precaution
add browser.cache.disk.parent_directory: /tmp
// apparently safebrowsing slows things down - disable at your own risk!
set browser.safebrowsing.malware.enabled: false
set browser.safebrowsing.enabled: false
set network.prefetch-next: false
// don't show suggestions in the search bar
browser.search.suggest.enabled: false
// don't spellcheck as I type
layout.spellcheckDefault: 0

Flash 10 RC or upper (Optional, recommended for 512M of RAM):

Ubuntu Hardy installs flash version 9.0.115, this version needs a lot of memory to work and makes 'AspireOne' slower than it is. A good option is to download the latest Flash player plugin 10, which delivers improved performance and less memory requirements. This package is the flashplugin-nonfree, which is available on hardy-backports repository, or by download in the following link:

http://packages.ubuntu.com/hardy-backports/flashplugin-nonfree

Verifying Flash player 10 installed correctly

Once you've installed Flash 10, verify that it installed correctly by visiting here. In the version information box, verify it says version "10,0,12,36" or newer installed.

If version 9 is still installed in Firefox then you will need to do it manually by following these directions.

Uninstalling the Flash 9 plugin from Firefox

Open a terminal window (Applications>Accessories>Terminal) and type:

cd ~/.mozilla
rm flashplayer.xpt libflashplayer.so
exit

Installing the Flash 10 RC plugin into Firefox

Visit the Adobe website and select from "Select version to download..." drop down menu the "tar.gz for Linux" option. Save the file to your Desktop.

Close all open Firefox windows before proceeding.

Open a terminal window (Applications>Accessories>Terminal) and type:

cd Desktop
tar -zxvf install_flash_player_10_linux.tar.gz
cd install_flash_player_10_linux
./flashplayer-installer

Press ENTER to install. Answer y to proceed. Answer n to not perform another installation.

Open the Firefox browser and type about:plugins in the address bar and hit ENTER.

You should see:

Filename libflashplayer.so
Shockwaveflash 10.0 b218

Or a newer version listed.

Under MIME Type the following should be listed:

application/x-shockwave-flash Shockwave Flash
application/futuresplash Futuresplash player

Upgrade from Hardy Heron (8.04.1) to Intrepid Ibex (8.10)

(Originally written by khaeru. Last updated 24 November 2008: Made the wlan work again.

Use:

$ update-manager -d

after following the first section of this guide. Following the above notes and some trial and error, the following configuration files work.

Note that shell commands preceded by "#" should be run as root (i.e. using sudo); commands preceded by "$ " should be run as a normal user.

/boot/grub/menu.lst

Changing the default options:

...

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=elevator=noop quiet splash

...

Rather than editing the boot lines directly and risking an unbootable system, run the following to automagically update all boot lines:

# update-grub

/etc/modules

add the following line:

ath5k

Seems not to be necessary for all, this line, but does never harm; snd_hda_intel driver is loaded automatically.

Since the ath5k driver is not installed by default (see below)

* Enable the backports repositories in /etc/apt/sources.list (remove the # signs in front of them)
* Install "linux-backports-modules-intrepid" e.G. using synaptics

/etc/modprobe.d/aspireone

Rather than modify the other files in this directory, create a new file just for Aspire One settings. It will be processed along with the rest on boot.

####################################################################
# Module options for the Acer AspireOne
#
# Enable USB card reader
options pciehp pciehp_force=1

Notes

*

ath_hal and ath_pci don't need to be blacklisted if they are disabled if they are disabled using system/administration/hardware drivers

*

2008-10-20 00:19:20
*

pciehp added per jsgoncalves
*

This file may no longer be needed as of 19 October 2008 -- khaeru 2008-10-20 00:19:20
o See above note about ath_hal and ath_pci
o

options snd-hda-intel model=toshiba is no longer necessary; sound works
+

recording does not work in a default install as of 26 October 2008 (attempting recording produces nothing but fuzz in output file, no matter alsa volume levels) (dsm-iv-tr)
o

options usbcore autosuspend=1 has been the default in Ubuntu for some time (https://bugs.launchpad.net/ubuntu/+source/powertop/+bug/136549)

/etc/sysctl.d/60-aspireone.conf

The file /etc/sysctl.d/README states, "End-users can use 60-*.conf and above," so we do this instead of fiddling with sysctl.conf itself or calling "sysctl -w" from rc.local:

###################################################################
# Settings for the Acer Aspire One
#
# No swapping whatsoever
vm.swappiness = 0
# As suggested by PowerTOP
vm.dirty_writeback_centisecs = 1500
# Suggested by https://help.ubuntu.com/community/AspireOne
vm.vfs_cache_pressure = 0
vm.dirty_ratio = 20
vm.dirty_background_ratio = 10
vm.laptop_mode = 5

Note: Swappiness may be set to zero for an Aspire One with 1.5 GiB of RAM and no swap partition. You may wish to use another value (e.g. 10 as suggested above).

/etc/rc.local

Here we include only settings that cannot be placed in the above files.

#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# https://help.ubuntu.com/community/AspireOne
# Wireless disable/enable key
/usr/bin/setkeycodes e055 159
/usr/bin/setkeycodes e056 158
# Decrease power usage of USB while idle
[ -x /sys/bus/usb/devices/1-5/power/level ] && echo auto > /sys/bus/usb/devices/1-5/power/level
[ -x /sys/bus/usb/devices/5-5/power/level ] && echo auto > /sys/bus/usb/devices/5-5/power/level
# Disable Wake-On-LAN feature of Ethernet port
ethtool -s eth0 wol d
# As in the rc.last.ctrl of Linpus
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
# Fan control
/usr/local/bin/acerfand

exit 0

Notes

*

As noted elsewhere, the wireless kill switch on the front of the case works, but there is no visual notification. Search around the Network Manager project and notice references to "rfkill" and "KillSwitch", neither of which is implement in NM yet.
* The wireless LEDs don't work; the "dev.wifi0" settings aren't included because they only generate errors.
* ethtool is not installed by default in Intrepid (as of RC1). This will cause rc.local to fail unless it is installed.

/etc/init.d/rc

To improve boot speed, as noted above.

...
CONCURRENCY=shell # https://help.ubuntu.com/community/AspireOne
...

/etc/profile

In Intrepid, the following no longer causes the artifacts mentioned above for Hardy.

...
umask 022

# https://help.ubuntu.com/community/AspireOne
export INTEL_BATCH=1

/etc/X11/xorg.conf

As noted above.

...

Section "Device"
Identifier "Configured Video Device"
# https://help.ubuntu.com/community/AspireOne
Option "MonitorLayout" "LVDS,VGA"
Option "Clone" "True"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
VideoRam 229376
Option "CacheLines" "1980"
EndSection

...

References

Debian Linux and Windows Shared Printing mini-HOWTO

-----------------------------------------------------------------------------

Table of Contents
1. Introduction
2. Getting Started
2.1. Linux Printing Components
2.2. Required Packages
2.3. CUPS Local Printer Configuration
2.4. Linux Printing Basics


3. Printing To Windows PCs
3.1. Connecting To Windows
3.2. CUPS Configuration


4. Sharing Printers With Windows PCs
4.1. Sharing Basics
4.2. Samba Configuration
4.3. CUPS Configuration


5. Troubleshooting
5.1. Failing To Connect To Windows Printers
5.2. Other Failures


6. License

1. Introduction

Debian GNU/Linux ([http://www.debian.org] http://www.debian.org) is the
premier volunteer-supported Linux distribution. Unfortunately, setting up
printers in Debian can be difficult. Also, simple step-by-step instructions
for sharing printers between Windows and Linux using the latest tools are
hard to find. This HOWTO was written to address both problems.

This HOWTO will demonstrate how to use command-line tools to configure your
Debian system for printing. It will explain how to send documents from Linux
to Windows printers and how to share Linux printers with Windows PCs. Some
troubleshooting examples are also given.

The primary url for this document is [http://excess.org/docs/
linux_windows_printing.html] http://excess.org/docs/
linux_windows_printing.html. The source Docbook/XML and EPS files for this
document may be downloaded from [http://excess.org/docs/src/] http://
excess.org/docs/src/. Please forward bug reports, corrections and suggestions
regarding this document to ian at excess dot org.
-----------------------------------------------------------------------------

2. Getting Started

2.1. Linux Printing Components

The main components we will be using include:

* CUPS

The Common UNIX Printing System ([http://www.cups.org] http://
www.cups.org) is a print spooler and a set of support programs for using
and administering printers.

* Samba

Samba ([http://www.samba.org] http://www.samba.org) is software that
allows non-Windows computers to act like Windows computers on a network
by implementing Windows file and printer sharing protocols.

* Printer Drivers

LinuxPrinting.org ([http://www.linuxprinting.org] http://
www.linuxprinting.org) offers the largest number of printer drivers and
maintains a database of printers supported under Linux. You must download
a printer driver for each model of printer you want to use in Linux. A
printer driver consists of a PPD file and a filter program, or only a PPD
file for PostScript printers.


-----------------------------------------------------------------------------
2.2. Required Packages

All of the required programs and libraries are part of the standard Debian
archive. You may download and install these packages with the usual Debian
packaging tools. The following is a list of packages you need:

cupsys
CUPS server

cupsys-bsd
CUPS BSD commands

cupsys-client
CUPS client programs

foomatic-bin
LinuxPrinting.org printer support programs

samba
Samba SMB/CIFS server for UNIX

smbclient
Samba SMB/CIFS client for UNIX

gs-esp
ESP Ghostscript ([http://www.cups.org/ghostscript.php] http://
www.cups.org/ghostscript.php)

Not available as a Debian GNU/Linux 3.0 (a.k.a. woody) package, use "gs"
instead.

a2ps
GNU A2PS ([http://www.gnu.org/software/a2ps/] http://www.gnu.org/
software/a2ps/)


The following commands will install these packages. You will have to become
root or use sudo to execute these commands:


apt-get update
apt-get install cupsys cupsys-bsd cupsys-client foomatic-bin samba smbclient gs-esp a2ps

Additional packages may be required for specific printers. For example, the
hpijs package must be installed for many HP InkJet, DeskJet and LaserJet
printers to function properly. The PPD files for these printers are
identified by the string hpijs in their filenames.
-----------------------------------------------------------------------------

2.3. CUPS Local Printer Configuration

The lpadmin command is used to configure printers. The following is an
example of setting up a laser printer with CUPS. You will have to become root
or use sudo to execute these commands:
/usr/sbin/lpadmin -p Laser -v parallel:/dev/lp0 -P /root/laser.ppd
/usr/bin/enable Laser
/usr/sbin/accept Laser
/usr/sbin/lpadmin -d Laser

Please note that bash has a builtin command called enable, so bash users
must use the full path (/usr/bin/enable) to enable printers.

The first command creates a new printer called "Laser" that is connected to
the first parallel port and is using the PPD file /root/laser.ppd. "Laser" is
then enabled and told to accept jobs with the enable and accept commands. The
last command sets "Laser" as the default printer.

If your printer is connected to a USB port or if you do not know the correct
device-uri for your printer try running /usr/sbin/lpinfo -v to get a list of
available printer devices.

Make sure your printer's page size and other options are set correctly by
running /usr/bin/lpoptions -l. More detailed information about printer
configuration is available in the CUPS documentation.
-----------------------------------------------------------------------------

2.4. Linux Printing Basics

Figure 1. Printing Locally

[printing_basics]

Documents are spooled by using either lpr or lp followed by the file name.
You may view the printer queue and check the printer status with the command
lpstat -o or lpstat -p. To cancel a print job use either cancel or lprm
followed by the job id.

The CUPS spooler daemon is called cupsd. It converts documents to
PostScript, then converts them to a format native to the printer Figure 1.
Printers that do not understand PostScript use a rasterized, or bitmap,
format for documents. Rasterized formats can be much larger than the original
PostScript, and will take longer to send to the printer.

Filters are programs used to convert documents from one format to another.
The CUPS spooler will do its best to find a suitable filter for the documents
you send. If no filter suitable for converting your document is installed you
will receive an error similar to lpr: unable to print file:
client-error-document-format-not-supported.

Many applications do not include filters for their documents formats.
Documents created with these applications can only be printed from within the
application itself, unless the document is exported to PostScript or another
standard format.
-----------------------------------------------------------------------------

3. Printing To Windows PCs

3.1. Connecting To Windows

Figure 2. Network Printing

[to_windows]

SMB and CIFS are the Windows file and printer sharing protocols. We use
Samba to speak to the Windows PCs using these protocols. Before configuring
CUPS we should make sure we can connect to the Windows PC with smbclient, the
Samba SMB/CIFS client Figure 2.

The following is an example of creating a connection to a Windows PC:
/usr/bin/smbclient -L rice -U fred

added interface ip=10.6.7.234 bcast=10.6.7.255 nmask=255.255.255.0
Got a positive name query response from 10.6.7.8 ( 10.6.7.8 )
Password: (not shown)

Sharename Type Comment
PRINTER$ Disk
INKJET Printer
STUFF Disk
IPC$ IPC Remote Inter Process Communication

The command shown asks for a list of shares on a Windows PC named "rice",
with the user id "fred". The result shows a printer named "INKJET".

If Windows naming service is unavailable you will need to specify the IP
address of the Windows PC with the -I switch as in:
/usr/bin/smbclient -I 10.6.7.8 -L rice -N

For more information see the Samba documentation about smbclient usage.
-----------------------------------------------------------------------------

3.2. CUPS Configuration

Once you have found a Windows printer you may configure CUPS. First verify
that your installation of CUPS has the smb backend with the following
command:
ls -l /usr/lib/cups/backend/smb

If this file does not exist create it by issuing the following:
ln -s `which smbspool` /usr/lib/cups/backend/smb

The following is an example of setting up the printer shown above. You will
have to become root or use sudo to execute these commands:
/usr/sbin/lpadmin -p RicePrinter -v smb://fred:mypass@rice/INKJET -P /root/inkjet.ppd
/usr/bin/enable RicePrinter
/usr/sbin/accept RicePrinter
/usr/sbin/lpadmin -d RicePrinter

As mentioned above, bash has a builtin command called enable, so bash users
must use the full path (/usr/bin/enable) to enable printers.

The "lpadmin" command sets up a the shared Windows printer by giving the
username, password, netbios name and printer name as a single parameter. See
Section 2.3 for a further explanation of the commands above.

Your printer is now ready to test. Send a file to the printer with the lp
command followed by a filename, or by printing a document from within an
application.
-----------------------------------------------------------------------------

4. Sharing Printers With Windows PCs

4.1. Sharing Basics

Figure 3. Printer Sharing

[from_windows]

Samba uses nmbd and smbd daemons to share files and printers with Windows
PCs. nmbd acts as a Windows naming service, broadcasting your computer's name
to Windows PCs on the LAN. smbd accepts file and printer requests from
Windows PCs Figure 3.

You will need to download and install Windows printer drivers for each Linux
printer you are sharing. Windows printer drivers can be found by searching
the web site of your printer manufacturer.
-----------------------------------------------------------------------------

4.2. Samba Configuration

If you are allowing anonymous access to your printer you will need to create
a user account for remote print jobs:
/usr/sbin/adduser --system --disabled-password smbprint

This command adds a user called "smbprint" to your system. Make sure there
is enough disk space in /home/smbprint, the "smbprint" user's home directory,
to spool files. Check that the "smbprint" user does not have permission on
your system to read or modify sensitive files and directories. If you have
configured CUPS to restrict printing to certain users on your system, you
must allow the "smbprint" user to access printers you want to share.

The Samba configuration file is /etc/samba/smb.conf. The following is an
example configuration file set up to use CUPS with the "smbprint" user:
[global]
printcap name = cups
printing = cups
security = share
[printers]
browseable = yes
printable = yes
public = yes
create mode = 0700
guest only = yes
use client driver = yes
guest account = smbprint
path = /home/smbprint

Please note that this configuration will allow printing by anyone that can
make a network connection to your computer and is not recommended for
computers on untrusted networks, such as computers with direct Internet
connections. If you need to implement access control, set security = user or
security = domain and read the Samba man pages for further information.

Once you have added the above settings to your Samba configuration file you
must restart Samba with the command:
/etc/init.d/samba restart
-----------------------------------------------------------------------------

4.3. CUPS Configuration

Windows printer drivers format their output for the printer before sending
it across the network. You must configure CUPS to accept the pre-formatted
output by uncommenting the following line from /etc/cups/mime.convs:
application/octet-stream application/vnd.cups-raw 0 -

Also uncomment the following line from /etc/cups/mime.types:
application/octet-stream

Now CUPS must be told to allow connections from other machines on the
network. Add these lines to /etc/cups/cupsd.conf:

AuthType None
Order Deny,Allow
Deny From None
Allow From All

As in the Samba configuration, this configuration allows any computer to
connect to your printers and is not recommended for computers on untrusted
networks. For information about tightening access control to your printers,
see the cupsd.conf man page and the CUPS documentation.

Finally, restart cups with the following command:
/etc/init.d/cupsys restart

Your Linux printers should now be shared to Windows PCs on the LAN. Follow
the usual steps for adding a network printer to your Windows PCs, and
remember to print a test page.
-----------------------------------------------------------------------------

5. Troubleshooting

5.1. Failing To Connect To Windows Printers

When smbspool, the smbclient utility CUPS uses, fails to connect properly it
emits error messages that are humorous but not very helpful. One such message
is Unable to connect to SAMBA host: Success. Another sign of connection
failures is when documents seem to get stuck on the queue when printing to
Windows printers.

View the most recent entries in the CUPS log with the following command:
/usr/bin/tail /var/log/cups/error_log

If you see a message similar to cli_connect() failed... then smbspool could
not find the Windows PC you are trying to connect to. Check the spelling of
the Windows PC's host name. Check that the Windows PC is turned on and that
its network connection is functioning properly. Make sure you can connect to
it using smbclient as shown in Section 3.1.

If you see a message similar to SMB tree connect failed: ERRSRV -
ERRinvnetname then smbclient connected to the Windows PC but could not
connect to the printer you requested. Check the spelling of the shared
printer using smbclient as shown in Section 3.1.
-----------------------------------------------------------------------------

5.2. Other Failures

Other failures include being unable to print to a local printer and having
your print jobs disappear from the queue without being printed. You may also
see vague error messages such as Child process 2384 exited with status 32.

Increase CUPS' logging level to "debug" to see more messages about what
happened before the print job failed.

1. Open the main CUPS configuration file /etc/cups/cupsd.conf in a text
editor.

2. Change the line that reads "LogLevel warn" to "LogLevel debug".

3. Save the configuration file and exit the text editor.

4. Restart the CUPS server with the command:
/etc/init.d/cupsys restart


You can follow the CUPS log with the following command:
/usr/bin/tail -f /var/log/cups/error_log

You should see a line that reads Scheduler shutting down due to SIGTERM.
This indicates that the CUPS server was stopped successfully.

Send your print job again and watch for useful debug messages that appear.
One example of a useful debug message is GNU Ghostscript 7.05: Can't start
ijs server 'hpijs'. In this case the solution is to install the "hpijs"
package.

If you cannot determine the cause of the failure, do an Internet search for
key terms in error messages you see; it is likely that someone has solved
your problem before. You may also try upgrading the packages listed in
Section 2.2 to their latest versions.
-----------------------------------------------------------------------------

Debian Jigdo mini-HOWTO

2. Why jigdo?

2.1. How Does One Get A Debian ISO Image Set?

If you want a set of Debian CDs there are many ways of getting them. One way
is to buy them from [http://www.debian.org/CD/vendors/] vendors who sell
Debian CDs. This definitely has merit since some of the vendors donate money
back to the Debian project. Your donations help make sure that Debian is
around for a long time.

Another way of getting a set of Debian CDs is to burn your own set. This
first entails obtaining an ISO image and then burning that ISO image to a
blank CD. Before jigdo, there were two ways of creating Debian CDs:

1. Downloading the entire ISO

2. Using the pseudo-image kit (PIK)


This document is about the newer and better way of obtaining Debian ISO
images, using a tool called jigdo. In fact, the PIK is now officially dead
and all further references to it have been removed from this document. The
canonical method of getting Debian ISO images is with jigdo.
-----------------------------------------------------------------------------

2.2. Why Not Download The Whole ISO Image?

There are mirrors which offer http and ftp downloads of Debian ISOs. The
problem is that there are very few mirror sites, and their bandwidth can't
support everyone who wants Debian ISOs. For example, fsn.hu has reportedly
saturated the connection of its provider. The outgoing traffic reaches a few
terabytes per month!

In addition, Debian testing and unstable get updated often. Your ISOs may
become outdated the same day you download them unless you find some sneaky
way of updating them like mounting the ISO on a loopback device and using
rsync (which is what the PIK did). So if you want up-to-date ISO images, you
must download a new set of ISO images every day. Clearly, this is not the way
you want to obtain Debian ISOs!

Even if you want to download the stable ISO images, they still get updated
every few months. Downloading the ISO images will give you up-to-date images
for a few months, but every time a new revision of Debian stable is released,
you'll need to go through the painful process of downloading the entire ISO
set from scratch. This is not a good use of your time and the mirror's
resources.
-----------------------------------------------------------------------------

2.3. What Is Jigdo?

Jigdo (which stands for "Jigsaw Download") was written by [mailto:
atterer@debian.org] Richard Atterer and is released under the GNU GPL. It's a
tool that allows efficient downloading and updating of an ISO image. Any ISO
image. Jigdo is not Debian specific, however Debian has chosen it to be the
official method of downloading ISO images.

A common misconception is that jigdo creates ISO images; it doesn't. Let's
discuss the overall process of how jigdo allows you to obtain an ISO image.
Let Adam (a Debian release manager) be the person offering the ISO image. Let
Betty (a Debian user) be the person who wants to download the ISO image.

1. Adam first creates an ISO image suitable for burning a CD. He might use a
utility like mkisofs or debian-cd to create the ISO image. He also
creates two small files associated with his newly created image: a .jigdo
file and a .template file. He makes these two files available for
download to anyone who wants to obtain his ISO image.

2. Betty then downloads the .jigdo and .template files. She uses jigdo-lite
along with these two files to download Adam's ISO image.

3. When Debian gets updated, Adam creates a new version of the ISO and
generates new .jigdo and .template files.

4. When Betty wants to update her CDs, she downloads the new .jigdo and
.template files and uses them with jigdo-light to update her copy of the
ISO images. The important thing here is that she only downloads the
differences between her old ISO and Adam's new ISO. She does not have to
re-download the parts that are unchanged.


Jigdo comes with two utilities: jigdo-file (used by Adam) which creates the
.jigdo and .template files, and jigdo-lite (used by Betty) which uses these
two files to download or update the ISO. If all you want to do is obtain/
update Debian ISOs, you'll only use jigdo-lite. You can forget that
jigdo-file even exists. :-)

Jigdo addresses all the problems with the other methods of obtaining Debian
ISO images:

* It's much faster than downloading the entire ISO image.

* Unlike downloading the entire ISO image, it can take an outdated CD (or a
loop mounted outdated ISO image), download only the files that have
changed since the CD (or ISO image) was created and create a new updated
ISO. Very similar to how you use cvs to update source code.

* jigdo-lite uses wget which, by default, uses http to transfer files.
Unlike rsync, http is never blocked by firewalls (except the ones behind
which you shouldn't be using jigdo to begin with).

* Jigdo is very kind to the bandwidth of the servers offering the Debian
images. The Debian mirrors can handle a bigger load of people using jigdo
to download Debian images than with other methods of getting them.


Clearly, jigdo is the best method of obtaining Debian ISO images.
-----------------------------------------------------------------------------

3. How Jigdo Works (optional)

You don't need to know this material to download Debian ISOs, but it may help
demystify how jigdo works. If you're not interested in the details, simply
fast forward to Section 4, "How Do I Use Jigdo".
-----------------------------------------------------------------------------

3.1. Preparing The ISO For Download

A CD image is a filesystem called iso9660, but for this discussion, we can
safely talk about a CD image as being a big file called an "ISO image" (about
650MB) that contains files at various offsets. For instance, if a CD contains
a 567 byte file named README, the ISO image might contain the README file's
contents between offsets 20480000 and 20480567. You can visualize a CD image
as:
+-----------------------------------------------------------------------------+
| -------------------------------------------------------- |
| ISO Image: |xxxx| file-0 |xx| file-1 |xxx| file-2 |x| file-3 |xxxx| |
| -------------------------------------------------------- |
| |
+-----------------------------------------------------------------------------+

The "x" areas of the image contain things like directory information, zero
padding, disk name, boot block, etc.

jigdo-file takes two things as input: the complete CD image (so the ISO
already needs to have been made) and a set of files which may or may not be
in the image. Here's a visualization of jigdo-file's input:
+--------------------------------------------------------------------------------------+
| -------------------------------------------------------- |
| ISO Image: |xxxx| file-0 |xx| file-1 |xxx| file-2 |x| file-3 |xxxx| |
| -------------------------------------------------------- |
| |
| ---------- ---------- ---------- ---------- |
| Loose Files: | file-0 | | file-1 | | file-3 | | file-4 | |
| ---------- ---------- ---------- ---------- |
| |
+--------------------------------------------------------------------------------------+

Through magic, jigdo-file finds out which of the loose files are contained in
the ISO image and their offsets within the ISO file. It outputs two files: a
".template" file and a ".jigdo" file.
-----------------------------------------------------------------------------

3.2. The .template File

Given an input of an ISO image and a set of files which may or may not be in
the ISO image, jigdo-file outputs a .template file for that ISO image. Here's
what the .template file looks like:
+-----------------------------------------------------------------------------+
| -------------------------------------------------------- |
| .template: |xxxx| md5-0 |xx| md5-1 |xxx|cccccccc|x| md5-3 |xxxx| |
| -------------------------------------------------------- |
| |
+-----------------------------------------------------------------------------+

jigdo-file found that the files file-0, file-1 and file-3 were contained in
the ISO image. It removed the contents of the these files and replaced them
with each file's md5 checksum (the md5-0, md5-1, etc).

The "x" data (directory information, zero padding, etc) within the ISO image
is compressed and written to the .template file. Finally, any files within
the ISO image that weren't supplied as loose files (like file-2) are also
compressed and written to the .template file. This is shown as "c" data in
the .template file visualization.

Loose files which were supplied to jigdo-file that aren't found in the ISO
image (like file-4) are ignored.
-----------------------------------------------------------------------------

3.3. The .jigdo File

Given an input of an ISO image and a set of loose files which may or may not
be in the ISO image, jigdo-file outputs a .jigdo file for that ISO image. The
Debian .jigdo files are gzipped, so you need to use zcat or zless to view
them. Here's what a .jigdo file looks like when you gunzip it:
+---------------------------------------------------------------------------+
| md5-0=http://somemirror.org/file-0 |
| md5-1=http://somemirror.org/file-1 |
| md5-2=http://somemirror.org/file-2 |
| md5-3=http://somemirror.org/file-3 |
| |
+---------------------------------------------------------------------------+

The .jigdo file simply provides a mapping between the md5sum of a file within
the ISO image and the download URL of that file. There are some other things
within the .jigdo file, and if you look through it, you'll see the .jigdo
file has the same format as a ".ini" file. It should be self explanatory, but
if you want the nitty-gritty details, see the jigdo documentation.

The format shown above is not quite what you'd see in a typical .jigdo file,
but it's very similar. If you look at the [Servers] section at the bottom of
the .jigdo file, you'll see exactly what the difference is between what I
showed above and an actual .jigdo file.
-----------------------------------------------------------------------------

3.4. Downloading The Image

Once you use jigdo-file to generate a .jigdo and .template file for an ISO
image, anyone can use jigdo-lite to download that image. jigdo-lite downloads
all the files of a Debian ISO using wget, assembles them and forms a copy of
the original ISO image on the fly.
-----------------------------------------------------------------------------

4. Downloading Your First Image (In 5 Easy Steps)

We'll assume that you're starting from scratch and don't have any Debian ISOs
on hand. Once you burn your set of ISOs, you can use jigdo-lite later to
update them. We'll cover updating your ISOs in the next section.
-----------------------------------------------------------------------------

4.1. Install Jigdo

First install the jigdo-file package:
+---------------------------------------------------------------------------+
| # apt-get install jigdo-file |
| |
+---------------------------------------------------------------------------+

Jigdo is under aggressive development. Bug fixes and enhancements are
constant, so if you're using stable or testing, download jigdo-file from
unstable at [http://packages.debian.org/unstable/utils/jigdo-file.html] http:
//packages.debian.org/unstable/utils/jigdo-file.html. As of 28 Nov 2005 it's
at version 0.7.2-2.
-----------------------------------------------------------------------------

4.2. Download The .template And .jigdo Files

For each ISO image you want to download, you'll need both the .jigdo and
.template file for that image. Both files follow the same naming convention:
+---------------------------------------------------------------------------+
| distro-arch-n.jigdo |
| distro-arch-n.template |
| |
+---------------------------------------------------------------------------+

where distro is the name of the distro (like "sarge"), arch is the
architecture (like "i386") and n is the disk number (like "1").

For example, sarge has 8 images, so you need to download 8 .jigdo files and 8
.template files. They can be downloaded from [http://www.debian.org/CD/
jigdo-cd/] http://www.debian.org/CD/jigdo-cd/. The first .jigdo and .template
file are named sarge-i386-1.jigdo and sarge-i386-1.template respectively.
-----------------------------------------------------------------------------

4.3. Run jigdo-lite

Run jigdo-lite and give it the .jigdo file of the image you want to download.
Using Sarge as an example:
+---------------------------------------------------------------------------+
| lucifer$ ls |
| sarge-i386-1.jigdo sarge-i386-1.template |
| lucifer$ jigdo-lite sarge-i386-1.jigdo |
| |
| Jigsaw Download "lite" |
| Copyright 2001-2003 by Richard Atterer |
| Getting mirror information from /etc/apt/sources.list |
| |
| ----------------------------------------------------------------- |
| Images offered by `sarge-i386-1.jigdo': |
| 1: 'Debian GNU/Linux testing "Sarge" |
| - Official Snapshot i386 Binary-1 CD' (sarge-i386-1.iso) |
| |
| Further information about `sarge-i386-1.iso': |
| Generated on Fri, 7 Feb 2003 20:31:28 -0700 |
| |
| ----------------------------------------------------------------- |
| If you already have a previous version of the CD you are |
| downloading, jigdo can re-use files on the old CD that are also |
| present in the new image, and you do not need to download them |
| again. Mount the old CD ROM and enter the path it is mounted under |
| (e.g. `/mnt/cdrom'). |
| Alternatively, just press enter if you want to start downloading |
| the remaining files. |
| Files to scan: |
| |
+---------------------------------------------------------------------------+

If you suspended jigdo-lite with control+z (don't do this; I'll tell you what
you'd see) and looked at the output of ls, you'd find a new file in the
directory named sarge-i386-1.jigdo.unpacked. It turns out that .jigdo files
are gzip'ed. This file is simply a gunzip'ed version of the .jigdo file.

Right now, jigdo-lite is telling us that if we have an outdated version of
first CD of sarge, we should give the pathname to the CD. This is how you
update your ISO images (or complete your incomplete downloads). Since we're
assuming that you're starting from scratch and have no Debian ISOs yet, we
have nothing to scan. We'll cover this in Section 5, so just press ENTER.

See also Section 7.2, "More About Scan Sources".
-----------------------------------------------------------------------------

4.4. Specify A Mirror

You'll see:
+---------------------------------------------------------------------------+
| ----------------------------------------------------------------- |
| The jigdo file refers to files stored on Debian mirrors. Please |
| choose a Debian mirror as follows: Either enter a complete URL |
| pointing to a mirror (in the form |
| `ftp://ftp.debian.org/debian/'), or enter any regular expression |
| for searching through the list of mirrors: Try a two-letter |
| country code such as `de', or a country name like `United |
| States', or a server name like `sunsite'. |
| Debian mirror [http://linux.csua.berkeley.edu/debian/]: |
| |
+---------------------------------------------------------------------------+

By default, jigdo-lite pulls the mirror from your /etc/apt/sources.list. If
you want to use a different mirror, you would specify a different mirror
here. If this is the mirror you want to use, press ENTER. Jigdo-lite will
then write a .jigdo-lite file in your home directory.

Next, if the .jigdo file you're using references a package which needs to be
downloaded from a Non-US server, jigdo-lite will prompt you for a Debian
Non-US mirror. The message displayed (and your response) will be very similar
to the mirror dialog in the previous paragraph.
+------------------------------------------------------------------------------+
| ----------------------------------------------------------------- |
| The jigdo file also refers to the Non-US section of the Debian |
| archive. Please repeat the mirror selection for Non-US. Do not |
| simply copy the URL you entered above; this does not work because |
| the path on the servers differs! |
| Debian non-US mirror [http://linux.csua.berkeley.edu/debian-non-US//]: |
| |
+------------------------------------------------------------------------------+

Jigdo-lite will write your choice to ~/.jigdo-lite. However, if the image
you're about to download doesn't contain Non-US software you won't see this
dialog.

If you want to change the default mirrors you use with jigdo at any time in
the future, you can modify these two lines in ~/.jigdo-lite:
+---------------------------------------------------------------------------+
| debianMirror='http://some-mirror-to-use/debian/' |
| nonusMirror='http://some-other-mirror/debian-non-US/' |
| |
+---------------------------------------------------------------------------+
-----------------------------------------------------------------------------

4.5. Downloading Of The ISO

After you specify the mirror(s), jigdo-lite will begin downloading files to
assemble the ISO image:
+------------------------------------------------------------------------------------------+
| Not downloading .template file - `sarge-i386-1.template' already present |
| |
| ----------------------------------------------------------------- |
| Merging parts from `file:' URIs, if any... |
| Found 0 of the 826 files required by the template |
| Will not create image or temporary file - try again with different input files |
| --09:35:12-- http://mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb |
| => `sarge-i386-1.iso.tmpdir/mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb |
| Resolving linux.csua.berkeley.edu... done. |
| Connecting to linux.csua.berkeley.edu[128.32.112.231]:80... connected. |
| HTTP request sent, awaiting response... 200 OK |
| Length: 1,911,624 [application/x-debian-package] |
| |
| 19% [======> ] 378,304 149.87K/s ETA 00:09 |
| |
+------------------------------------------------------------------------------------------+

There'll be a lot of messages flying across your screen; if this is confusing
to you, see Section 6.13. While jigdo-lite is downloading the packages,
switch to another console (or open another xterm) and do an ls in the
directory you're running jigdo-lite in. Now there should be 6 files in the
directory:

* sarge-i386-1.iso.list

* sarge-i386-1.iso.tmp

* jigdo-file-cache.db

* sarge-i386-1.iso.tmpdir/

* sarge-i386-1.jigdo

* sarge-i386-1.jigdo.unpacked

* sarge-i386-1.template


The sarge-i386-1.iso.tmpdir/ directory contains all the Debian packages that
jigdo-lite downloads. Every so often, the directory gets flushed and the
files get written to sarge-i386-1.iso.tmp, which is an temporarily incomplete
version of the ISO image you want. Note that sarge-i386-1.iso.tmp won't
appear until the first time sarge-i386-1.iso.tmpdir/ gets flushed.

jigdo-file-cache.db is a Berekeley DB file containing md5sums of any files
read in when you specify a directory at the Files to scan: prompt. It's
described in Section 7.3.

At this point, go play some Quake III because this will take some time (you
may want to play on a different machine because jigdo is very disk intensive
when it flushes files to the .iso.tmp file). At some point, the download will
finish and you'll be staring at:
+------------------------------------------------------------------------------------+
| FINISHED --13:32:58-- |
| Downloaded: 7,469,872 bytes in 9 files |
| Found 9 of the 9 files required by the template |
| Successfully created `sarge-i386-3.raw' |
| |
| ----------------------------------------------------------------- |
| Finished! |
| The fact that you got this far is a strong indication that `sarge-i386-3.raw' |
| was generated correctly. I will perform an additional, final check, |
| which you can interrupt safely with Ctrl-C if you do not want to wait. |
| |
| OK: Checksums match, image is good! |
| |
+------------------------------------------------------------------------------------+
-----------------------------------------------------------------------------

5. Updating Your Image

Presumably, you've read the last section, followed the instructions, burned
your newly created ISO files onto CD and are feeling warm and fuzzy. Sooner
or later, some packages will get updated and now you want to donate your old
CDs to some newbie at your local LUG's installfest and burn yourself a set of
updated CDs. Since you're well on the way to becoming a jigdo-guru, we won't
go into as much painful detail as we did in the last section.

The first step is to download the .jigdo and .template files, again, for the
images you want to update. You may wonder why you need to download them a
second time. The reason is because the updated image you want to download has
changed. Files may have been added or deleted, but even if not, any updated
packages or files will have a different checksum from the checksum listed in
the .jigdo and .template files you used when you first downloaded the images.

At this point, you're either holding an outdated Debian CD in your hand or
you have the CD's outdated ISO image on your hard drive. Let's go through the
steps of getting an updated ISO file. If you have a CD, put it in your CD
drive and mount it:
+---------------------------------------------------------------------------+
| $ mount /cdrom |
| |
+---------------------------------------------------------------------------+

On the other hand, if you have an ISO file you'd like to update, mount it as
a loop device (you may need to be root to do this). Using Woody as an
example:
+---------------------------------------------------------------------------+
| # mount -o loop woody-i386-1.iso /mnt |
| |
+---------------------------------------------------------------------------+

Now run jigdo-lite with the .jigdo file as an argument.
+---------------------------------------------------------------------------+
| $ jigdo-lite woody-i386-1.jigdo |
| |
| ----------------------------------------------------------------- |
| Jigsaw Download "lite" |
| Copyright 2001-2002 by Richard Atterer |
| Loading settings from `/home/p/.jigdo-lite' |
| |
| ----------------------------------------------------------------- |
| Images offered by `woody-i386-1.jigdo': |
| 1: Debian GNU/Linux 3.0 r0 Woody |
| - Official i386 Binary-1 CD (debian-30r0-i386-binary-1.iso) |
| |
| Further information about `debian-30r0-i386-binary-1.iso': |
| Generated on Thu, 18 Jul 2002 14:34:12 +0100 |
| |
| ----------------------------------------------------------------- |
| If you already have a previous version of the CD you are |
| downloading, jigdo can re-use files on the old CD that are also |
| present on the new image, and you do not need to download them |
| again. You found the secret message; you're a very careful |
| reader. Mount the old CD ROM and enter the path it is mounted |
| under (e.g. `/mnt/cdrom'). Alternatively, just press enter if you |
| want to start the download of any remaining files. |
| |
| You can also enter a single digit from the list below to |
| select the respective entry for scanning: |
| 1: /mnt |
| Files to scan: |
| |
+---------------------------------------------------------------------------+

jigdo-lite is asking us to give it the location of your mounted CD (if you're
updating a CD) or your loop mounted ISO file (if you're using the ISO file).
I'm using an ISO file loop mounted on /mnt, so I'll enter /mnt. If you're
updating a CD, enter the mount directory of your CD, which is most likely /
cdrom. In either case, jigdo-lite will scan the directory of your mounted
media, determine which files need updating and re-use the files which don't
need updating. See also Section 7.2, "More About Scan Sources".

You may see something like:
+--------------------------------------------------------------------------------------+
| Files to scan: /mnt/other |
| |
| Not downloading .template file - `woody-i386-1.template' already present |
| jigdo-file: Output file `debian-30r0-i386-binary-1.iso' already exists - delete |
| it or use --force |
| jigdo-file failed with code 3 - aborting. |
| |
+--------------------------------------------------------------------------------------+

What happened? Actually, I wanted to show you this because you'll bump into
it sooner or later. I'm updating an ISO file, but the outdated image file is
in the same directory I'm working in. Jigdo-lite wants to generate a file
called woody-i386-1.iso but there's already a file by that name in the
current directory (the outdated image). Jigdo-lite doesn't want to destroy
that file, so it bails and lets me know that I can either delete that file or
use --force to overwrite the file. You could also rename or move the file
too, but I guess jigdo-lite assumes we already know this. :-)

Don't be timid about moving or renaming the image file just because it's loop
mounted. The filesystem uses inodes under the hood, and even if you move or
rename the file, the inode stays the same. You won't hurt the filesystem
mounted under /mnt. As for deleting the ISO file, that won't hurt the mounted
filesystem either. A file's inode gets deallocated only when the inode's
reference count drops to zero. Mounting the ISO image bumps the reference
count up, so the file really gets deleted only after you rm the file and
umount the loop device. All you people who are updating the CD don't have to
worry about any of this. :-)

I'll rename the ISO file to woody-i386-1.iso.old and run jigdo-lite again.
Let's try again:
+--------------------------------------------------------------------------------------+
| $ jigdo-lite woody-i386-1.jigdo |
| |
| ----------------------------------------------------------------- |
| Jigsaw Download "lite" |
| Copyright 2001-2002 by Richard Atterer |
| Loading settings from `/home/p/.jigdo-lite' |
| |
| ----------------------------------------------------------------- |
| Images offered by `woody-i386-1.jigdo': |
| 1: Debian GNU/Linux 3.0 r0 Woody - Official i386 Binary-1 CD |
| (debian-30r0-i386-binary-1.iso) |
| |
| Further information about `debian-30r0-i386-binary-1.iso': |
| Generated on Thu, 18 Jul 2002 14:34:12 +0100 |
| |
| ----------------------------------------------------------------- |
| If you already have a previous version of the image you are |
| downloading, jigdo can re-use files on the old image that are also |
| present on the new image, and you do not need to download them |
| again. Mount the old CD ROM and enter the path it is mounted under |
| (e.g. `/mnt/cdrom'). Alternatively, just press enter if you want |
| to start the download of any remaining files. |
| You can also enter a single digit from the list below to |
| select the respective entry for scanning: |
| 1: /mnt |
| Files to scan: /mnt |
| Not downloading .template file - `woody-i386-1.template' already present |
| ... |
| Found 1200 of the 1224 files required by the template |
| ... |
+--------------------------------------------------------------------------------------+

jigdo-lite remembers that I wanted to scan /mnt and tells me I can either
type 1 to scan that directory or type the directory in again. Since I'm a
perverse person, I type the name of the directory again.

The ellipsis represent some text that changes rapidly. The first ellipsis is
a dynamic list of what files jigdo-lite is scanning. The second ellipses
denotes progress in writing woody-i386-1.iso.tmp. Once jigdo-lite finishes
scanning the files and writing the temporary ISO file, it prints:
+---------------------------------------------------------------------------+
| Copied input files to temporary file `woody-i386-1.iso.tmp' |
| - repeat command and supply more files to continue |
| |
| ----------------------------------------------------------------- |
| If you already have a previous version of the image you are |
| downloading, jigdo can re-use files on the old image that are also |
| present on the new image, and you do not need to download them |
| again. Mount the old CD ROM and enter the path it is mounted under |
| (e.g. `/mnt/cdrom'). Alternatively, just press enter if you want |
| to start the download of any remaining files. |
| You can also enter a single digit from the list below to |
| select the respective entry for scanning: |
| 1: /mnt |
| Files to scan: |
| |
+---------------------------------------------------------------------------+

Since you normally don't have another source of files to scan other than your
loop mounted ISO file (or your CD), press ENTER. Jigdo-lite will then ask you
about which mirrors you want to use, just like it did when you downloaded
your ISO for the first time. You've already answered these questions before,
but if you truly don't remember, you might want to re-read Section 4.4.

At this point, you'll see jigdo-lite working its magic. Now wasn't that easy?
-----------------------------------------------------------------------------

6. Frequently Asked Questions

Questions prepended with a date indicate a time sensitive question (a
question that relates to a temporary situation). If you see one of these
questions and know that the temporary situation has changed, please [mailto:
p@dirac.orgZZZ] contact me and let me know so I can remove the question from
the mini-HOWTO.
-----------------------------------------------------------------------------

6.1. Why does jidgo ask twice for scanning for existing files? Is it enough
to say yes once ?

It keeps asking this as long as you enter a path to scan. The idea is that
you may want to scan several old CDs, so you can insert one after the other
into the drive and keep supplying the path "D:\" (or whatever). See also
Section 7.2, "More About Scan Sources".
-----------------------------------------------------------------------------

6.2. Jigdo Has Problems Downloading Certain Filenames.

When downloading Debian images under Windows, jigdo-lite may appear to have
trouble downloading one or more of the following files:
+---------------------------------------------------------------------------+
| libbusiness-onlinepayment-bankofamerica-perl_xxx_all.deb |
| libbusiness-onlinepayment-authorizenet-perl_xxx_all.deb |
| libbusiness-onlinepayment-payconnect-perl_xxx_all.deb |
| libmasonx-request-withapachesession-perl_xxx_all.deb |
| libtemplate-plugin-calendar-simple-perl_xxx_all.deb |
| |
+---------------------------------------------------------------------------+

Move the jigdo download directory up by as many directories as possible,
closer to the drives's root directory.

The NTFS filesystem has a 255 character limit on a file's pathname. When
jigdo-lite downloads files from the internet, it makes a copy of the server
directory structure in its download directory. With their very long names,
the above Debian packages may exceed the allowed path length, which leads to
error messages like "Cannot write to `[very long pathname]' (No such file or
directory)".

Some people may now wonder: Why does jigdo-lite use wget's
"--force-directories" switch, which creates these problematic directory
hierarchies?

Early versions of jigdo-lite did not use it, but then some folks requested
that jigdo-lite always use the "--continue" switch to avoid half-downloaded
.deb files being ignored and deleted when you interrupt and restart
jigdo-lite.

Unfortunately, it turned out that this led to problems: The Debian servers
contained several identically named files (e.g. "root.bin") in different
directories, and if you interrupted jigdo-lite at roughly the right time
during the download, the chances were high that the resumed download would
append data to the wrong half-downloaded file, corrupting it and making the
entire jigdo download fail.
-----------------------------------------------------------------------------

6.3. How do I make jigdo use my proxy?

Edit ~/.jigdo-lite (or jigdo-lite-settings.txt for the Microsoft Windows
version) into a text editor and find the line that starts with "wgetOpts".
The following switches can be added to that line:
+---------------------------------------------------------------------------+
| -e ftp_proxy=http://LOCAL-PROXY:PORT/ |
| -e http_proxy=http://LOCAL-PROXY:PORT/ |
| --proxy-user=USER |
| --proxy-passwd=PASSWORD |
| |
+---------------------------------------------------------------------------+

Of course, substitute the correct values for your proxy server. The last two
options are only necessary if your proxy uses password authentication. The
switches need to be added to the end of the wgetOpts line before the final '
character. All options must be on one line.

Alternatively, under Linux you can also set up the ftp_proxy and http_proxy
environment variables, for example in the file /etc/environment or ~/.bashrc.
-----------------------------------------------------------------------------

6.4. Jigdo-lite fails with an error - have I downloaded all those MBs in
vain?

If jigdo-file aborts after downloading a considerable chunk of the ISO
contents, you'll have a large ".iso.tmp" file. There are several things to
try to salvage your download:

* Restart the download by pressing RETURN. Maybe some of the files could
not be downloaded because of timeouts or other transient errors. Try to
download the missing files again.

* Try a different mirror. Some Debian mirrors are slightly out of sync --
maybe a different mirror still holds files that were deleted from the one
you specified, or it has already been updated with files that are not yet
present on your mirror. This has happened quite a few times with me.

* Retrieve the missing parts of the image using [http://rsync.samba.org]
rsync. First, you need to find out the correct rsync URL of the image you
are downloading: Choose a server that offers rsync access to the [http://
www.debian.org/CD/mirroring/rsync-mirrors] stable or [http://
www.debian.org/CD/http-ftp/#testing] testing images, then determine the
correct path and filename. Directory listings can be obtained with
commands like rsync rsync://cdimage.debian.org/debian-cd/.

Next, remove the ".tmp" extension from jigdo-lite's temporary file by
renaming it, and pass both the remote URL and the local filename to
rsync: rsync rsync://server.org/path/binary-i386-1.iso binary-i386-1.iso
You may want to use rsync's --verbose and --progress switches to get
status messages, and --block-size=8192 to increase its speed.

* Under Linux, you can loop-mount the .tmp file to access the packages that
were already downloaded, and reuse them for generating an image from a
newer .jigdo file. To do this, first issue the following commands as root
in the directory with the broken download: mkdir mnt; mount -t iso9660 -o
loop *.tmp mnt. Next, start a new download in a different directory, and
enter the path of the mnt directory at the "Files to scan" prompt.

Under Microsoft Windows you can do the same thing by loop mounting the
temporary ISO image using "virtual drive" software. [http://
www.daemon-tools.cc] Daemon tools and Nero Image Drive are both very
popular. See also [http://tinyurl.com/c39zr] http://tinyurl.com/c39zr for
more options.


-----------------------------------------------------------------------------
6.5. [11 Aug 2002]: Why aren't the translations of this HOWTO on LDP?

I've been having trouble getting the translations of this HOWTO submitted to
the non-English LDP editors.

The German LDP editor, Marco Budde refuses to accept
the German translation because it was written in Docbook and not Linuxdoc,
even though Docbook is the preferred SGML language for the LDP. It's a shame
that we have people within the open source community who would sabotage our
community from the inside.

The Portuguese LDP editor, Alfredo Carvalho , has completely
ignored my submission of the Portuguese translation.

If you care about having LDP documents in these languages, I urge you to
write to these editors and ask them to please be more responsible about
accepting translated documents. For the time being, you can download these
translations from my personal website, [http://www.dirac.org/linux/debian/
jigdo] http://www.dirac.org/linux/debian/jigdo.

Shame on you, Marco Budde .

Shame on you, Alfredo Carvalho .
-----------------------------------------------------------------------------

6.6. What do I do if my jigdo download gets interrupted?

If your download gets interrupted, all you need to do is restart jigdo-lite
and hit ENTER at all the question prompts. Jigdo-lite will pick up where it
left off.
-----------------------------------------------------------------------------

6.7. My jigdo download won't complete because the .jigdo file is broken. When
I download a new, fixed .jigdo file, do I need to download all the data over
again?

You may find that the .jigdo file you downloaded is broken. It's uncommon,
but it does happen from time to time with moving targets like Debian testing
or unstable.

If you find that .jigdo is broken, you'll need to download a new .jigdo file
(when a fixed one becomes available), but you won't need to download all the
ISO data again.

You can use the same loop mounting trick we use when updating an ISO image.
The difference is that there's no finished .iso file to start with, but the
.iso.tmp file is an ISO image too and can be used to finish the download
without having to re-download all the data that was downloaded before the
broken .jigdo file caused jigdo-lite to halt. Simply loop mount the .iso.tmp
file on /mnt and when you re-run jigdo-lite with the fixed .jigdo file, tell
jigdo-lite to scan /mnt. Don't forget to rename or move the .iso.tmp file so
it doesn't interfere with jigdo-lite which will want to create a new .iso.tmp
file.
-----------------------------------------------------------------------------

6.8. Can I use jigdo to download images for DVD?

Absolutely; the process is identical to downloading CD images. The only thing
you need to do differently is to download the .jigdo and .template files for
DVDs instead of CDs. You can find the DVD .jigdo and .template files at
[http://www.debian.org/CD/jigdo-cd/] http://www.debian.org/CD/jigdo-cd/.

On Linux, you need kernel 2.4 or later to create DVD-sized files.

Under MS Windows, you need to use jigdo-win-0.7.1a (released 21 July 2004) or
later to create DVD-sized images. This is because of a bug in the large file
support of Mingw32, the compiler used to create the MS Windows executables.
The bug got fixed on this date, and jigdo-win-0.7.1a was released.
-----------------------------------------------------------------------------

6.9. Can I burn the .iso.tmp file to CD?

Thanks to Gordon Huff and David Anselmi, we now know the answer is "yes you
can". But more importantly, Gordon gave a good reason why you'd want to do
this in the first place. Paraphrasing Gordon:


My friend's Win98 has a *nice* cable connection. I arrive in the morning,
start jigdo (more than one, actually) and then we go to the store, tie
back the kiwi plant, put up the Christmas lights and Christmas tree, trim
the tree, order and split a pizza and fire up the satellite dish.

I leave my friends place with several iso.tmp's on CDRWs. When I get
home, I use the iso's that didn't finish to update my jigdo setup at home
which is a dial-up.

-----------------------------------------------------------------------------
6.10. Jigdo-lite is broken! It downloads packages and deletes them. I know it
doesn't write them to the iso.tmp file because the file size doesn't change!

Jigdo works just fine -- the .iso.tmp file is created at the beginning with
its final size, but filled with zero bytes. Later, parts of it are
overwritten with the downloaded data.

You can tell that jigdo is making progress by looking at the messages "Found
X of the Y files required by the template" that are printed from time to
time. The first value "X" should increase. When X equals Y, the download is
finished.
-----------------------------------------------------------------------------

6.11. I'm having trouble getting jigdo-easy to work.

See Section 7.1.
-----------------------------------------------------------------------------

6.12. For image updates, I want jigdo-lite to scan 14 loop-mounted images in
one go. How can I do this?

When updating CD images, it's tiresome to keep loop-mounting and unmounting
images. However, by default the Linux kernel only supports eight loop
devices, and jigdo-lite's menu of previously entered paths only has five
entries.

To scan many loop-mounted images, you must first tell the Linux kernel to
support more than the default eight devices. This is done by giving the
"max_loop" parameter to the module when loading it, e.g. with "modprobe loop
max_loop=16" on the command line or by adding the line "options loop max_loop
=16" to /etc/modules.conf. In Debian, you must put this line into a file
named e.g. /etc/modutils/local-loop and then run update-modules because
direct changes to /etc/modules.conf will be overwritten.

Having mounted the individual images, you can pass the parent directory of
their mount points to jigdo-lite for scanning. For example, if the images are
mounted under /mnt/myloopmounts/image1/ etc., pass "/mnt/myloopmounts" as the
path to scan. If passing the parent directory is inconvenient, you can also
create a directory and fill it with symlinks to the mount points.
-----------------------------------------------------------------------------

6.13. Jigdo-lite is too verbose. How can I supress some or all of its
messages?

Jigdo-lite uses wget, and wget's output can be quite verbose. If this is
unsettling, you can make wget more quiet by adding --non-verbose to the
wgetOpts switch in your ~/.jigdo-lite file. If you want wget to print no
messages at all, use --quiet in the wgetOpts switch.
-----------------------------------------------------------------------------

6.14. Can I use jigdo on platforms other than Linux?

Certainly. If you're interested in Potato or Woody under Microsoft Windows,
old SunOS, HP-UX and IRIX you can use jigdo-easy. See Section 7.1 and Section
7.4.

If you want to download Potato, Woody, Sarge or Sid under Microsoft Windows,
jigdo-lite has been ported to that platform and can be downloaded from the
main jigdo site (Section 7.4).
-----------------------------------------------------------------------------

6.15. On MS Windows, why do I get a "No such file or directory" error
message?

You might find that under MS Windows, jigdo-lite will download some files but
then fail to read their contents, which will produce a "No such file or
directory" error message.

It seems that this occurs if the length of the filenames that jigdo processes
exceeds a certain limit. The solution is to move the half-finished download
up in the directory hierarchy, closer to the top-level directory of the
drive.
-----------------------------------------------------------------------------

6.16. On MS Windows, why won't my image grow larger than 2GB?

You're using an old version of jigdo. Please upgrade to jigdo-win-0.7.1a or
newer. See Section 6.8.
-----------------------------------------------------------------------------

6.17. On MS Windows, jigdo-lite.bat fails with an error message saying "sh"
was not found.

This means that the PATH command in the .bat file failed. For some reason,
this is the case if you unpacked jigdo on a Windows network share using a
path like "\\SomeServer\Files\jigdo". Solution: Use "Map network drive" (in
the explorer "tools" menu) to assign a drive letter like "Z:", then
double-click on the .bat file inside "Z:\jigdo". Alternatively, a workaround
is to move everything in the jigdo-bin subdirectory up to where the .bat file
is.
-----------------------------------------------------------------------------

6.18. Can I run multiple instances of jigdo-lite to download images in
parallel?

Absolutely. However, to avoid filename clashing, you should run each
jigdo-lite instance in its own separate directory. You can start as many
instances as you want, go to bed, and when you wake up, all the ISO images
will be waiting for you on your hard drive. Be aware that jigdo-lite is
bandwidth and CPU intensive, so you won't want to use your computer with
multiple instances running in tandem.
-----------------------------------------------------------------------------

6.19. Is there a GUI interface available?

A GTK+ interface to jigdo is being worked on. Both Linux and Microsoft
Windows GUI clients are planned. Unfortunately, it's been 80% done for over
1.5 years, so don't hold your breath for its release.
-----------------------------------------------------------------------------

7. Errata

7.1. jigdo-easy

Jigdo-easy, by Anne Bezemer, is a fork of jigdo-lite which is portable to a
wider range of systems, including Microsoft Windows, old SunOS, HP-UX and
IRIX). It's also easier to use than jigdo-lite but because of changes made to
Jigdo, will only work with Potato and Woody. Jigdo-easy will not be able to
download Sarge and Sid. See Section 7.4 and Section 6.14.
-----------------------------------------------------------------------------

7.2. More About Scan Sources

By now you know that when jigdo-lite asks for files to scan, you can use 3
sources:

* A mounted copy of an outdated CD or DVD that you wish to update.

* A loop-mounted copy of an outdated ISO image file on your hard drive.

* A loop-mounted copy of the temporary .iso.tmp file, when a previous
jigdo-lite run aborted.


As Jens Seidel points out, there is another, rather crafty, source you should
use for a scanning source: your apt cache. Apt uses the directory /var/cache/
apt/archives for cache. There will be many Debian packages sitting in this
directory, and they can be used for a scan source for jigdo-lite! So when
you're asked for a directory to scan, by all means, use this directory too.

If you're editing the ~/.jigdo-lite file by hand, be aware that multiple scan
directories are space separated, for example:
+---------------------------------------------------------------------------+
| scanMenu='/var/cache/apt/archives/ /cdrom/' |
| |
+---------------------------------------------------------------------------+
-----------------------------------------------------------------------------

7.3. jigdo-file-cache.db

The cache contains the md5sums of files read when you supply a directory at
the Files to scan: prompt. If you have jigdo-file scan the same directory a
second time, the scan will be very fast.

This could be useful in the following case: rev0 gets updated to rev1. With
the rev1 CD images, some packages may have been pushed from CD n to CD n+1,
or vice versa. If you had a particularly slow link (e.g. modem), you'd try to
avoid downloading these packages again. For this reason, when downloading the
new version of CD n, you'd let jigdo-lite scan the three CDs n-1, n and n+1
(or even all 8 CDs if you want to be 100% sure).

If you have jigdo-lite scan the same CDs over and over again while updating
each of the 8 CD images, the cache will prevent all the data on the CDs from
being read multiple times.

The cache is much more important when generating jigdo files, because you
don't want jigdo-file to read in your whole 50GB Debian mirror for every
generated jigdo file.
-----------------------------------------------------------------------------