Difference between revisions of "COMP 3000 2011 report ttian1"

From Soma-notes
Jump to navigation Jump to search
Line 180: Line 180:
| check the version of KDE by choose the about KDE option in the tool bar
| check the version of KDE by choose the about KDE option in the tool bar
|-
|-
| Chromium
| Amark(Audio Player)
| 9.0.597.45~r70550-1
| 2.0.2
| 17.0.948.0<ref>Index of /releases. (No date). Retrieved on November 23, 2011 from http://src.chromium.org/viewvc/chrome/releases/?sortby=date</ref>
(2009-03-05)
| http://dev.chromium.org/Home
| 2.5 Beta1 <ref>Audio Player. Retrieved on November 23, 2011 from http://src.chromium.org/viewvc/chrome/releases/?sortby=date</ref>
| https://launchpad.net/debian/+source/chromium-browser/9.0.597.45~r70550-1
| http://amarok.kde.org/  
| http://amarok.kde.org/en/releases/2.0.2
|-
|-
| Crunchbang-Dropbox64
| Crunchbang-Dropbox64

Revision as of 03:12, 19 December 2011

Part1

Background

The name of the distribution I choose is CRUX. It is a lightweight, i686-optimized Linux distribution. It is delivered by a tar.gz-based package system with BSD-style initscripts(initialization scripts follow the BSD-style)<ref name="BSD-style"> BSD-style initscripts. Retrieved December 12, 2011 from http://crux.nu/Main/Handbook2-7#ntoc50</ref> and also utilizes a ports system to install and upgrade applications.<ref name="About Crux"> About CRUX Linux. Retrieved October 18, 2011 from http://crux.nu/</ref> The ports system is a term refers to a remote repository containing ports and a client program capable of downloading ports from that repository.<ref name="ports-system"> About Ports system. Retrieved December 12, 2011 from http://crux.nu/Main/Handbook2-7#ntoc32</ref> BSD is a definition which stands for Berkeley Software Distribution and it has been considered a branch of UNIX—"BSD UNIX". <ref name="BSD"> Retrieved December 12, 2011 from http://en.wikipedia.org/wiki/Berkeley_Software_Distribution</ref>

VMsetting

Unlike other distributions, the primary goal of CRUX is not to be popular or to put as many features as possible into the system. In fact, CRUX is targeted at experienced Linux users especially. CRUX is first created by Per Liden (found through wikipedia) and the project has grown into a reasonable team whose members are all volunteers sharing a common philosophy. The team provides the core and optional packages for CRUX.

The crux-2.7.iso file is 226 MB. However, after installed, it will become 1.3GB and even more which depends on the ports and packages user want to install.

Installation/Startup

Attention: I follow the handbook and finish all the operations on it, but I can not run the kernel for CRUX. As a result, the basic operation is not feasible and I will use Hannah Montana Linux to do the basic operation section.

Firstly, I run the iso file through VMware and it shows me interface which looks like the scs.lambda machine, in other words a shell with command line. Then I follow the handbook <ref name="handbook">Handbook. Retrieved October 18, 2011 from http://crux.nu/Main/Handbook2-7 </ref> provided by the crux.nu to do the installation.

1. As introduced in the handbook, the first thing I need to do is to partition my hard disk(the virtual one in fact). I login as root and use “fdisk /dev/sda” command to do partition, but I get a bad partition table and I can not mount my partition.

As a result, I try “cfdisk /dev/sda” command and I get a good partition table.

Partition

2. I use “mkfs.ext4 /dev/sda1” command to build my file system. Then I use “mount /dev/sda1 /mnt” to mount my sda1 partition.

3. I use “mkdir /mnt/var” command to make that directory which is for the later installation.

4. I use “mount /dev/sda1 /mnt/var” command to mount the “var” directory.

5. I use “setup” command to go into the CRUX setup windows to start the package installation script.

Setup

After the setup, I can compile the kernel by using following commands:.

6. # Mount --bind /dev /mnt/dev

7. # Mount --bind /tmp /mnt/tmp //Attention: the bind option for Mount command make the first parameter of the arguments inherits the properties of the second parameter.

8. # Mount –t proc proc /mnt/proc

9. # Mount –t sysfs none /mnt/sys

10.# Chroot /mnt /bin/bash

Compile kernel

//Attention: Chroot to change root for current running processes.

11.initiate the password by using command “passwd”.

12.use vim to edit files such as fstab, rc.conf, /rc.d/net and so on.

Then I go to the /usr/src/linux-2.5.35.6 directory to make instal.

Vim systemfile

Using command:

13.# Cd /usr/src/linux-2.6.35.6

14.# Make menuconfig --------//go into a configure script

15.# Make all After install a lot of files, input “make modules_install” for another installation.

16.# Cp arch/x86/boot/bzImage /boot/vmlinuz

17.#cd System.map /boot

18. The last step is to edit the /etc/lilo.conf to boot the kernel I have just compiled and then run lilo to make the new system bootable.

After performing these steps, the CRUX should be installed successfully.

Though I fail to run the kernel for CRUX, I learn a lot through the installation.

1. Because I use a virtual machine to run Crux, the label of the disk is sda, rather than hda.

2. Sometimes there are more than one way to do the same one thing in Linux, but one or more of them may never work well and meet kinds of problems such as “permission denied”. If so, just use other method and it may work well. For example, the partition in my distribution.

3. Learn quite a lot of commands and much familiar with the shell(bash) than before.

4. The MD5<ref name="de5"> Retrieved December 12, 2011 from http://en.wikipedia.org/wiki/MD5 </ref> is the Message-Digest Algorithm which has been employed in a wide variety of security applications, and is also commonly used to check data integrity. When I download software which provides md5, I should check the md5 before installation to make sure it is safe.

5. Os works on their corresponding CPU, such as x86 and i686.

6. Familiar with command “which” and “whereis”, as the command line does not show the directory.

7. Cat command is very useful to view files and vim is so powerful that I can use it to edit system files. And I think that is very dangerous.

8. Chmod 777 * is dangerous but useful sometimes because it will make files writable, readable and executable to all the groups.

9. Learn about the “mount”, “swapon” command and so on.

Usage Evaluation

From my point of view, as I am a fresh man to Linux, CRUX is really quite targeted to experienced users. Just as the developer says, I do have to do almost everything by myself by using the shell, even compile my own kernel! And the command line is only the “#” symbol, rather than shows almost the full directory in other distribution of Linux such as Ubuntu. So I have to be very familiar with the directory commands and clearly know what I am doing and where I am, or I have to use “cd ..” command to go back to top directory and go into the directory I want a again and that makes me think that the CRUX is not very user friendly. However, as one of the features of CRUX, it really makes the screen “light and clean”. Another feature of CRUX is its ports system, and it makes it much easier to install and update package. CRUX does not contain the gcc C compiler. And it does not install KDE automatically, so the UI looks like the lambda machine we use at laboratory. And I think using Crux is much more difficult than using Ubuntu. At last, I want to say that I choose CRUX because it sounds cool and it is a lightweight distribution of Linux. Though it really takes me a lot of time to do with and be familiar with CRUX, I love this distribution because it forces me to learn much more about Linux from the surface to the kernel.

Part2

Software Packaging

Packaging Format and Utilities

Hannah Montana Linux is a unix-like Linux Operating System based on Kubuntu. The package manager of it is Debian apt(for Advanced Package Tool) which is a higher level tool than dkpg<ref name="dkpg">Debian dkpg Package Tool. Retriever November 14, 2011 from http://en.wikipedia.org/wiki/Dpkg</ref> and the package format is .deb.<ref name=".deb"> .deb format. Retrieved December 12, 2011 from http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics</ref> This package manager works with dkpg to install, remove, update, resolves problems of dependencies and retrieves the requested packages.<ref name="apt">Debian Apt Package Tool. Retriever November 14, 2011 from http://wiki.debian.org/Apt</ref> In addition to apt and dkpg, Hannah Montana Linux also use aptitude as one of utilities for package management.

Listing Installed Packages

As Hannah Montana Linux uses dpkg, apt and aptitude as packager tools, there several ways to get the list of installed packages.

The dpkg Package Manager lists all the packages installed on the system

You can use command “dpkg –l” or just use “aptitude” to go to the package management windows provided by aptitude to view all the installed packages.

Adding and Removing Packages

To add packages, you can use dpkg -i <package name.deb> where your current directory should contain the package. You can use "aptitude" command to install packages in the aptitude windows or use "apt-get install <package>” command to do the installation.

To remove packages, you can use "dpkg -r <package_name>" which will leave the configuration file or "dpkg -pure <package_name>" which will remove the configuration as well. You can use "aptitude" command to remove packages in the aptitude windows or use "apt-get remove <package>” command to do that.

The Aptitude Package Manager can be used to list, installe or remove the packages in the system

Software Catalog

By using command “aptitude”, you can view the information of the packages of Hannah Montana Linux. It shows that there are 20653 new packages, 933 installed packages, 5280 not installed packages, 2605 virtual packages and 13044 tasks. By clicking the options, you can enter the sub-directories to view those packages which are new, installed or virtual packages for utilities such as admin, base, devel, doc, editors, kde and so on.

Major package versions

The table below lists the version numbers and upstream sources of various major software packages included in Hannah Montana Linux

Package Version Latest Official Release Official Source fork Command
Linux Kernel is 2.6.28-13-generic #44 Ununtu

(2009-07-02 )

3.1.1<ref>The Linux Kernel Archives. Retrieved November 14, 2011 from http://www.kernel.org/</ref>

(2011-11-11)

http://www.kernel.org/ https://launchpad.net/ubuntu/+source/linux/2.6.28-13.44/+build/ uname -a
libc GNU libc 2.9

(2009-05-17)

2.14<ref>GNU C Library. (Oct 17,2011). Retrieved on November 14, 2011 from http://en.wikipedia.org/wiki/GNU_C_Library</ref>

(Oct 17,2011)

http://www.gnu.org/s/libc/ http://ftp.gnu.org/gnu/libc/ Command /lib/libc.so.6 --version
X.org X server X server 1.6.0

(2009-2-25)

X server 1.11.2 <ref>X server. Retrieved on November 14, 2011 from http://www.x.org/wiki/Releases?action=show&redirect=XorgReleases</ref>

(2011-11-04)

http://www.x.org/wiki https://launchpad.net/ubuntu/+source/xorg-server/2:1.6.0-0ubuntu14 X –version
Bash (Shell) 3.2.48(1)

(2008-11-18)

4.2 <ref>Bash. Retrieved November 14, 2011 from http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29</ref>

(2011-Oct-25)

http://www.gnu.org/software/bash/ http://ftp.gnu.org/gnu/bash/ bash –version
Gcc(the GNU Compiler Collection) 4.3.3

(2009-01-24)

4.6.2 <ref>Gcc. Retrieved on November 14, 2011 from http://gcc.gnu.org/</ref>

(2011-08-26)

http://gcc.gnu.org/ http://gcc.gnu.org/gcc-4.3/ gcc –version
DPKG 1.14.24 ubuntu1

(2008-12-29 )

1.16.1.2(test) <ref> DPKG Retrieved December 16, 2011 from http://packages.debian.org/wheezy/dpkg</ref>

(2011-12-16)

http://packages.debian.org/wheezy/dpkg None available dpkg –version
KDE 4.2.2

(2009-04-02)

4.7.1<ref>KDE. Retrieved on November 14, 2011 from http://busybox.net/</ref>

(2011-09-07)

http://www.kde.org/ http://www.kde.org/info/4.2.2.php check the version of KDE by choose the about KDE option in the tool bar
Amark(Audio Player) 2.0.2

(2009-03-05)

2.5 Beta1 <ref>Audio Player. Retrieved on November 23, 2011 from http://src.chromium.org/viewvc/chrome/releases/?sortby=date</ref> http://amarok.kde.org/ http://amarok.kde.org/en/releases/2.0.2
Crunchbang-Dropbox64 1.0.10-1 1.2.48<ref>Dropbox (service). (2011, Nov. 22). Retrieved November 23, 2011 from http://en.wikipedia.org/wiki/Dropbox_%28service%29</ref> http://www.dropbox.com/ None available
Openbox 3.4.11.1-1 3.5.0<ref>Openbox. (2011, Oct. 25). Retrieved on November 6, 2011 from http://en.wikipedia.org/wiki/Openbox</ref> http://openbox.org/ http://packages.debian.org/squeeze/openbox
Xfce4 4.6.2 4.8.0<ref name=xfce>Xfce 4.8 Released. (2011, Jan. 16). Retrieved on November 6, 2011 from http://www.xfce.org/about/news/?post=1295136000</ref> http://www.xfce.org/ Not a fork
Conky 1.8.0-1+squeeze1 1.8.1<ref>Conky. (No date). Retrieved on November 6, 2011 from http://conky.sourceforge.net/</ref> http://conky.sourceforge.net/ http://packages.debian.org/squeeze/conky
Thunar 1.0.2-1+b1 1.2.3<ref>Thunar. (2011, Jan. 16). Retrieved on November 6, 2011 from http://en.wikipedia.org/wiki/Thunar</ref> http://thunar.xfce.org/ http://packages.debian.org/squeeze/thunar


Comparison of Packages to their Latest Stable Release

Packages at the the same version as in Debian

Most of the packages included in CrunchBang are the same versions included in Debian Squeeze, with very few that have been modified for or created for CrunchBang. This makes sense in the context of CrunchBang; it is a distribution about customizing the look and feel, not customizing the functionality, and is developed by one person. Of the packages listed above, most versions are forks made by the Debian team: the Linux Kernel<ref>“linux-2.6” 2.6.32-38 source package in Debian. (No date). Retrieved November 7, 2011 from https://launchpad.net/debian/+source/linux-2.6/2.6.32-38</ref>, Libc<ref>“eglibc” 2.11.2-10 source package in Debian. (No date). Retrieved November 5, 2011 from https://launchpad.net/debian/+source/eglibc/2.11.2-10</ref>, X.org<ref>“xorg” 1:7.5+8 source package in Debian. (No date). Retrieved on November 5, 2011 from https://launchpad.net/debian/+source/xorg/1:7.5+8</ref>, GTK+<ref>“gtk+2.0” 2.20.1-2 source package in Debian. (No date). Retrieved on November 5, 2011 from https://launchpad.net/debian/+source/gtk+2.0/2.20.1-2</ref>, Qt<ref>Accepted qt4-x11 4:4.6.3-4+squeeze1 (source all amd64). (2011, May 21). Retrieved on November 5, 2011 from http://lists.debian.org/debian-changes/2011/05/msg00018.html</ref>, Bash<ref>“bash” 4.1-3 source package in Debian. (No date). Retrieved November 5, 2011 from https://launchpad.net/debian/+source/bash/4.1-3</ref>, Dash<ref>“dash” 0.5.5.1-7.4 source package in Debian. (No date). Retrieved on November 5, 2011 from https://launchpad.net/debian/+source/dash/0.5.5.1-7.4</ref>, coreutils<ref>“coreutils” source package in Squeeze (No date). Retrieved November 5, 2011 from https://launchpad.net/debian/squeeze/+source/coreutils</ref>, Busybox<ref>“busybox” 1:1.17.1-8 source package in Debian (No date). Retrieved on November 5, 2011 from https://launchpad.net/debian/+source/busybox/1:1.17.1-8</ref>, Chromium<ref>“chromium-browser” 9.0.597.45~r70550-1 source package in Debian. (No date). Retrieved November 5, 2011 from https://launchpad.net/debian/+source/chromium-browser/9.0.597.45~r70550-1</ref>, Openbox<ref>“openbox” 3.4.11.1-1 source package in Debian. (No date). Retrieved on November 6, 2011 https://launchpad.net/debian/+source/openbox/3.4.11.1-1</ref>, Conky<ref>“conky” 1.8.0-1+squeeze1 source package in Debian. (No date). Retrieved on November 6, 2011 https://launchpad.net/debian/+source/conky/1.8.0-1+squeeze1</ref> and Thunar<ref>“thunar” 1.0.2-1 source package in Debian. (No date). Retrieved November 6, 2011 from https://launchpad.net/debian/+source/thunar/1.0.2-1/</ref>. These are all the latest stable releases of the Debian forks. They were included as CrunchBang Statler is based on Debian Squeeze and there was no need for further modification of these packages. Debian included these versions since the Debian team modified/maintained them to ensure stability.

With the exception of Thunar, Conky, Chromium and Openbox, all of these packages come installed by default on Debian. They are included in CrunchBang because the functionality they supplied to Debian (kernel, graphical libraries, window system, shells, etc.) was a necessary part of creating a unified desktop environment. In addition, the features CrunchBang needed from them did not differ from the features Debian needed from them. This is in contrast to a package like GNOME (GNU Network Object Model Environment), which is included as part of Debian's standard installation, but replaced in favor of Openbox and xfce in Crunchbang, as these are central to the purpose of CrunchBang.

The following table will discuss some of the differences between these packages and their upstream counterparts, as well as the services they provide.

Package Purpose and Differences from Upstream Source
Linux Kernel While a list of the individual modifications done to version 2.6.32-38 would be too long to list (the diff file alone is almost 15MB), most of the changes listed in the change log inside the diff file are just driver updates. The Linux Kernel provides the core operating system functionality, notably a scheduler, resource management and drivers.
Libc After reading through the changed log in the diff file, I have found that the Debian fork consists almost entirely of bugfixes and translations, and the developers give their releases amusing names (@!%$&! you, I use Debian, Perl Sucks, Smash Everything with a _Huge Steamroller_!). The sheer quantity of the changes was quite significant, with the diff file itself coming in just under 120,000 lines. Libc provides the functionality for the C programming language defined in the ANSI C standard.
X.org The changes to xorg in 7.5+8 (over 7.5) were fairly small, consisting of small typo and bug fixes, removing obsolete dependencies and adding support for new architectures. This is available from the changelog within the source package. Xorg provides the basis for GUIs.
GTK+ There were few changes to GTK+ 2.20.1-2 over 2.20.1, consisting entirely of bug fixes. Most of the fixes were not even made by the Debian team; they were cherry picked from an upstream source. This information is available from the diff file. GTK+ is a toolkit that contains widgets used to make GUIs.
Qt 4 The changes to Qt 4.6.3-4+squeeze1 over 4.6.3 are fairly minor. As reported in the changelog of the source, the fork is quite small and consists mostly of patches cherry picked from the upstream source and bug fixes, and includes a fairly major fix to decrease the failure rate of creating new processes in Qt. Similar to GTK+, Qt provides widgets for creating GUIs, as well as a framework for C++.
Bash Very few changes were made to Bash 4.1-3 compared to 4.1. According to the diff file, it is composed entirely of incorporating five upstream patches, changes to the readme, small fixes of .bashrc and a crash fix. Bash is a Unix shell, which interprets and executes command-line arguments.
Dash Dash 0.5.5.1-7.4 contains numerous changes over 0.5.5.1. According to the diff file, the changes are mostly bug fixes, translations and removing or adding dependencies. Dash is a Unix shell, like Bash, but smaller and with fewer features.
Coreutils Coreutils 8.5-1 includes very little on top of 8.5. It provides a workaround for a bug in fstat and stops a test from running due to a bug in gcc. This was taken from the diff file. Coreutils provides many basic Unix tools, such as ls, dir, cp and rm.
Busybox Busybox 1.17.1-8 incorporates many changes on top of 1.17.1. According to the changelog in the source there are updates to the configuration re-application of previous patches and many bug fixes and improvements. Busybox provides small versions of common Unix utilities, such as ls, ps, pwd and mkdir.
Chromium Though the table above states Chromium's "stable" release, all releases of Chromium are considered experimental; stable releases are released as Chrome. Chrome used to be included in CrunchBang and I believe they switched to Chromium since it's open source and therefore easier to customize, which fits in with the goals of the distribution. Chromium 9.0.597.45~r70550-1 had no changes added to it specifically over 9.0.597.45. Instead, its purpose was to incorporate changes made by the Debian maintainers to previous versions of Chromium. This was taken from the change log in the source code. Chromium is a web browser.
Openbox Openbox comes installed on CrunchBang since it provides a large part of CrunchBang's ability to be customized. Openbox 3.4.11.1-1 changes very little over 3.4.11.1. According to the changelog in the source the updates related mostly to packaging and installation, and removing files that were no longer necessary. Openbox is a window manager and replaced GNOME in CrunchBang.
Conky Conky is included in CrunchBang because it contributes to the ability to customize the look and usage of the system. Oddly enough, the package included in CrunchBang is maintained by Debian, but does not show up in Debian's package list by default. Conky 1.8.0-1+squeeze made numerous improvements over Conky 1.8.0. According to the change log in the source the changes included crash and bug fixes, and support for a whole bunch of new configuration options and standard variables inside Conky scripts. Interestingly, this version of Conky bases itself off of an Ubuntu version, which itself bases itself off of the official Conky release. Conky is a system monitor which can be used to display the system status, such as CPU usage, RAM usage and internal temperature.
Thunar Thunar was included in CrunchBang since it is a highly configurable file manager that was designed for the Xfce Desktop Environment, but also works well with other desktop managers, such as Openbox<ref>How To Set Thunar As The Default #!Crunchbang Filemanager. (2009, Nov. 11). Retrieved November 6, 2011 from http://crunchbanglinux.org/wiki/howto/set_thunar_as_default_filemanager</ref>. Thunar is listed by Debian's package manager, but not installed, while it comes installed by default on CrunchBang. According to the changelog in the diff file Thunar 1.0.2-1 contains very little in the way of changes over 1.0.2. Essentially, this version just removed a patch applied in a previous fork of Thunar since it was originally taken from an upstream source and 1.0.2 already incorporates the change. It also added a dependency. Thunar is a file manager that is designed for usage with xfce, but works well with Openbox. It replaces Nautilus which is used in Debian.


Reference

<references />