Category Archives: Tips

Building DVD Images Of Ubuntu Repositories

Many of the user’s/first time tester’s of Linux (Ubuntu) are having difficulties in installing a softwares that are not pre-shipped with the distribution CDs. Most of the home user’s don’t have an unlimited bandwidth broadband connection to download all those softwares through Synaptic or other package managers. This is a HOWTO for the unlimited bandwidth internet users who can help those who are not having an Internet connection, by downloading the complete Ubuntu repositories and make DVD images of the repositories. You can distribute them to others so that they can use the DVDs as a repository and they don’t have to depend Internet to install softwares. This method is taken from Howtoforge.

Ubuntu doesn’t offer DVDs ready to download with its main, universe, multiverse and/or restricted repositories. With the contents of this howto you can do it yourself.

Having the Ubuntu or Debian repositories on DVD can be useful for those users who don’t have access to the Internet where they have their Ubuntu installed but have access somewhere else to download the repository and build and burn the DVDs.

Building a local mirror

We have to install debmirror:

sudo apt-get install debmirror

Now we get the Ubuntu repositories in a local directory. In the example below we get main, universe and multiverse sections of the repository in the i386 architecture.

debmirror --nosource -m --passive --host=archive.ubuntulinux.org --root=ubuntu/ --method=ftp --progress --dist=dapper --section=main,multiverse,universe --arch=i386 ubuntu/ --ignore-release-gpg

You could change the options below as you prefer:

  • –host – the URL of the repository.
  • –dist – the distro of your OS (dapper, edgy, sarge, … ).
  • –section – the section you want to mirror locally.
  • –arch – the architecture of your box.

Separating the archive into DVD-sized directories

The repositories we got are too big (about 30Gb) to burn them to a DVD so we have to separate them into volumes.

The tool debpartial will do it for us.

sudo apt-get install debpartial

We make the directory where the volumes will reside.

mkdir ubuntu-dvd

and we make it to construct the package descriptors to every volume.

debpartial --nosource --dirprefix=ubuntu --section=main,universe,multiverse --dist=dapper --size=DVD ubuntu/ ubuntu-dvd/

Now we have to put the packages into the directories debpartial has just created. The script debcopy which also comes with the debpartial package will do it. The script needs ruby.

sudo apt-get install ruby

If everything is ok…

ruby debcopy ubuntu/ ubuntu-dvd/ubuntu0
ruby debcopy ubuntu/ ubuntu-dvd/ubuntu1
ruby debcopy ubuntu/ ubuntu-dvd/ubuntu2

Where ubuntu/ is the directory with the complete repository created with debmirror and ubuntu-dvd/* are the directories ready to host the new DVD-ready repository.
If we want to make soft links from the complete repository instead of copying the packages we can call debcopy with the option -l:

ruby debcopy -l ubuntu/ ubuntu-dvd/ubuntu0
ruby debcopy -l ubuntu/ ubuntu-dvd/ubuntu1
ruby debcopy -l ubuntu/ ubuntu-dvd/ubuntu2

Now every directory (ubuntu0, ubuntu1 and ubuntu2) fits on one DVD.

Making iso images

To get the directories ubuntu0, ubuntu1, ubuntu2 into an iso image ready to burn we can use mkisofs:

mkisofs -f -J -r -o ubuntu-dvd-0.iso ubuntu-dvd/ubuntu0
mkisofs -f -J -r -o ubuntu-dvd-1.iso ubuntu-dvd/ubuntu1
mkisofs -f -J -r -o ubuntu-dvd-2.iso ubuntu-dvd/ubuntu2

Now you can burn the iso images or mount them. Add them to the /etc/apt/source.list with the command:

sudo apt-cdrom add

Now we can verify the new repositories…

sudo apt-get update
sudo apt-get upgrade

… and, if I explain in the right way, you should have your box upgraded.

About the script ‘debcopy’

I heard about someone who can not find the script debcopy, above described.
In that case, download it from here

Advertisements

2 Comments

Filed under Articles, Linux, Tips, Ubuntu

Making Photo Slideshow DVD’s under Linux

As there are no simpler graphical tools available under Linux for this purpose, I’m explaining the method to create a slideshow video DVD of images/photos using a commandline tool called dvd-slideshow. Don’t be scared. It’s not that hard 🙂

It can be installed via Synaptic under Ubuntu OR you can fetch the latest from here.

Preparing your slideshow

Before generating a slideshow, you need to produce an input file which specifies which pictures to use, how long each picture stays on the screen and which transition effect is applied.

The simplest way to do it is to put all of your pictures in one directory and run dir2slideshow. This will create the input file for the next step. Although there are many configuration options, this command should give you acceptable defaults:

dir2slideshow -n 'test slideshow' -t 5 -c 1 slideshow_pictures

This asks to take all the (JPEG or PNG) pictures from slideshow_pictures, show them for 5 seconds and then crossfade to the next picture for 1 second. It generates a test_slideshow.txt input file. Pretty standard defaults, but the link above gives you a description of all the options available.

An interesting switch is -p if you want to generate a PAL slideshow instead of default NTSC.

You have then a file describing your slideshow’s characteristics. Its syntax is fairly straightforward; you can hand-edit it if needed.

Generating the slideshow

Once you are happy with your input file, generating the slideshow is something as simple as typing:

dvd-slideshow -n 'test slideshow' -f test_slideshow.txt

If you add the switch:

-a audiotrack.ogg

it will add an audio track to the slideshow. The result will be 2 files: test_slideshow.xml and test_slideshow.vob. You can try playing your slideshow with mplayer:

mplayer test_slideshow.vob

If you are happy with it, you can move to defining the menu. The thing which this tool amazes me is that it took only 22 minutes to render 580 photos to a DVD video with 10 mp3 sound tracks. In Windows media player, making a video of 100 images with audio backgrounds will surely take more than half an hour 🙂

Making DVD menus

You can use the tool “DVD Styler” for this purpose. (Availabe in Synaptic)

4 Comments

Filed under Applications, Linux, Multimedia, Tips, Ubuntu

Encrypt Emails within Firefox

FireGPG is a Firefox extension under MPL which brings an interface to encrypt, decrypt, sign or verify the signature of text in any web page using GnuPG. FireGPG adds some features to the Gmail1 interface, to let you use GPG’s features directly in your webmail. More webmails will probably be supported in the future. FireGPG is able to detect PGP blocks in any page (for example a public key), and lets you easily manage these different blocks.

FireGPG isn’t a key manager. You must install the GnuPG software!

On GNU/Linux and Mac OS, it’s GnuPG. You can install it with your favourite package manager (like Synaptic, YaST, Yum, etc.) or from its official website.

If you are using Microsoft Windows, you have to download WinPT and GPG, and install it at the default location.

Install FireGPG

Leave a comment

Filed under Applications, Linux, Tips

Building RPM Kernel Packages

Extract and customize the kernel

1. Log in as root, extract the kernel sources:

tar jxf linux-.tar.bz2 -C /usr/src

2. Customize the kernel with make menuconfig, make xconfig, etc… Create two copies of the .config file and save them in /usr/src/linux<version>-:

.config: this copy has to provide the configuration for the single processor kernel
.config_smp: this copy has to provide the configuration the dual processor (SMP) kernel

3. Copy the linux<version>-.tar.bz2 you downloaded in /usr/src/redhat/SOURCES/

4. Copy my_kernel.spec in /usr/src/redhat/SPECS/

5. Customize the fields Version, Release, description and kernel24 definition in my_kernel.spec. Please note that:

Version has to be the kernel version (e.g. “2.4.33”)
Release should be customized (e.g. “xeon_1.0”). Release will be used for the “EXTRAVERSION” variable in the main kernel Makefile, so you should get at the end that the output of “uname -r” is exactly Version-Release (in this case “2.4.33-xeon_1.0” and “2.4.33-xeon_1.0smp” for the SMP version).
Set kernel24 1 if you are compiling a 2.4 kernel, 0 if it is a 2.6 kernel.

Rebuild the kernel

To recompile the kernel:

rpm -ba /usr/src/redhat/SPECS/my_kernel.spec

or:

rpmbuild -ba /usr/src/redhat/SPECS/my_kernel.spec

You should get two binary packages (kernel-* and kernel-smp-*) in: /usr/src/redhat/RPMS/i386/

Leave a comment

Filed under Configuration, Linux, Tips

Must have Firefox Extensions

  1. Adblock Plus
  2. Autofill forms
  3. Datafox
  4. Download Statusbar
  5. Fix-ml
  6. Flash Video Resources Downloader
  7. FlashGot
  8. NoScript
  9. ShowIP
  10. ShowMyIP

Leave a comment

Filed under Applications, Configuration, Linux, Tips, Ubuntu

Speed Up your Linux

  • Prelinking

1. Activate Ubuntu universe sources. This can be done in Synaptic, or by editing the /etc/apt/sources.list file.
2. Use apt-get or synaptic to install prelink.
3. Now run:

sudo gedit /etc/default/prelink

4. Near the top of the file find PRELINKING=unknown and change unknown to yes.
5. Now you should start your first prelink, don’t worry it will be faster the next time, MUCH faster. Only the changes since your last prelink will be processed. To start the first prelink, run:

sudo /etc/cron.daily/prelink
  • Disabling Unwanted Services

Look Here to find unwanted services

  • Avahi

You just have to edit /etc/defaults/avahi and set that =1 to =0. If all goes well, it won’t run next boot.

  • Concurrency

If you’re using a dualcore machine, use concurrency mechanism. Edit /etc/init.d/rc and change CONCURRENCY=None to CONCURRENCY=shell

  • Boot Profiling

(1) At the bootup menu (GRUB), select your default kernel. You may need to press ESC to see this menu.

(2) Press e for edit.

(3) Choose the first line (it should start with “kernel”). Press e again.

(4) Move to the end of the line, then add the word profile. Press enter.

(5) Press b to boot.

(6) Let the system boot to the login screen, and wait for all disk activity to stop. Remember, during this one bootup, you’ve told Ubuntu to keep track of all disk activity going on, in order to build that list. Don’t be surprised if it’s significantly slower than your ordinary bootups — that’s why it’s not activated by default, remember?

(7) Reboot your system, and enjoy the results.

Leave a comment

Filed under Configuration, Linux, Tips, Ubuntu

How to load Web site faster in Mozilla Firefox

  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
  • Address Bar -> about:config

Filter: ->

network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true

* Restart Mozilla Firefox

Leave a comment

Filed under Applications, Linux, Tips, Ubuntu, Uncategorized