COMP 3000 2011 report ttian1: Difference between revisions
(92 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Part1= | =Part1= | ||
==Background== | ==Background== | ||
The name of the distribution I choose is [http://crux.nu/ CRUX]. It is a lightweight, i686-optimized Linux distribution. | The name of the distribution I choose is [http://crux.nu/ CRUX]. It is a lightweight, i686-optimized Linux distribution. CRUX is delivered by a tar.gz-based package system with [http://crux.nu/Main/Handbook2-7#ntoc50 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 [http://crux.nu/Main/Handbook2-7#ntoc32 ports system] to install and upgrade applications.<ref name="About Crux"> About CRUX Linux. Retrieved October 18, 2011 from http://crux.nu/</ref> [http://en.wikipedia.org/wiki/Berkeley_Software_Distribution 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> and 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> | ||
[[File:VM.jpg|thumb|right|VMsetting]] | [[File:VM.jpg|thumb|right|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. | 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, so it is not derived from any other distribution. 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 | 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 the user wants to install. | ||
==Installation/Startup== | ==Installation/Startup & Basic Operation== | ||
Attention: | Attention: My installation section and basic operation section are together. | ||
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 [http://crux.nu/Main/Handbook2-7 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. | 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 [http://crux.nu/Main/Handbook2-7 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. | ||
=== Commands to install CRUX === | |||
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 fail to mount my partition. | |||
As a result, I try “'''cfdisk /dev/sda'''” command and I get a good partition table. | |||
As a result, I try | |||
[[File:Partition_the_disk.jpg|thumb|right|Partition]] | [[File:Partition_the_disk.jpg|thumb|right|Partition]] | ||
2. I use | 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. | Then I use “mount /dev/sda1 /mnt” to mount my sda1 partition to /mnt, so I can access my sda1 partition from /mnt. | ||
3. I use | 3. I use “'''mkdir /mnt/var'''” command to make /mnt/var directory which is for the later installation. | ||
4. I use | 4. I use “'''mount /dev/sda1 /mnt/var'''” command to mount /dev/sda1 to /mnt/var directory, so I can access my sda1 partition from /mnt/var. | ||
5. I use | 5. I use “'''setup'''” command to go into the CRUX setup windows to start the package installation script. | ||
[[File:setup.jpg|thumb|right|Setup]] | [[File:setup.jpg|thumb|right|Setup]] | ||
After the setup, I can compile the kernel by using following commands:. | After the setup, I can compile the kernel by using following commands:. | ||
6. # Mount --bind /dev /mnt/dev | 6. I use "'''# Mount --bind /dev /mnt/dev'''" command, so /dev is remounted to /mnt/dev, in other words, /dev and /mnt/dev are bound together. | ||
7. # Mount --bind /tmp /mnt/tmp | 7. I use "'''# Mount --bind /tmp /mnt/tmp'''" command, so /tmp is remounted to /mnt/tmp, in other words, /tmp and /mnt/tmp are bound together. | ||
//Attention: the bind option for Mount command make the first parameter of the arguments inherits the properties of the second parameter. | //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 | 8. I use "'''# Mount –t proc proc /mnt/proc'''" command, so I can mount proc to /mnt/proc with vfstype proc. | ||
9. # Mount –t sysfs none /mnt/sys | 9. I use "'''# Mount –t sysfs none /mnt/sys'''" command, so I can mount none to /mnt/sys with vfstype sysfs. | ||
10.# Chroot /mnt /bin/bash | 10.I use "'''# Chroot /mnt /bin/bash'''" command, so I can change root of current processes to the directory /mnt and run command /bin/bash. | ||
[[File:Make_kernel.jpg|thumb|right|Compile kernel]] | [[File:Make_kernel.jpg|thumb|right|Compile kernel]] | ||
11.I use passwd command to initiate the password by using command. | |||
11.initiate the password by using command | |||
12.use vim to edit files such as fstab, rc.conf, /rc.d/net and so on. | 12.I use "'''vim'''" to edit files such as fstab, rc.conf, /rc.d/net and so on to set the environment of the kernel. | ||
Then I go to the /usr/src/linux-2.5.35.6 directory to make instal. | Then I go to the /usr/src/linux-2.5.35.6 directory to make instal the kernel. | ||
[[File:Vim_fstab.jpg|thumb|right|Vim systemfile]] | [[File:Vim_fstab.jpg|thumb|right|Vim systemfile]] | ||
13.# Cd /usr/src/linux-2.6.35.6 | 13.I use "'''# Cd /usr/src/linux-2.6.35.6'''" command to go to the /usr/src/linux-2.6.35.6 directory. | ||
14.I use "'''# Make menuconfig'''" command to go into the configuration whindows to do further configurations for the kernel. | |||
15.I use "'''# Make all'''" command to install files. | |||
16.I use “'''make modules_install'''” for another installation. | |||
17.I use "'''# Cp arch/x86/boot/bzImage /boot/vmlinuz'''" to copy arch/x86/boot/bzImage to /boot/vmlinuz. | |||
19.I use "#'''Cp System.map /boot'''" command to copy System.map to /boot. | |||
20.The last step is to edit the /etc/lilo.conf by using "'''vim /etc/lilo.conf'''" to boot the kernel which I have just compiled and then run lilo to make the new system bootable. | |||
After performing these steps, the CRUX should be installed successfully. | After performing these steps, the CRUX should be installed successfully. | ||
=== What I learn through the installation === | |||
Though I fail to run the kernel for CRUX, I learn a lot through the installation. | Though I fail to run the kernel for CRUX, I learn a lot through the installation. | ||
MD5[http://en.wikipedia.org/wiki/MD5 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. After I have downed the CRUX ISO image (crux-2.7.iso), the first thing I should do is to examine its checksum using md5sum, so I can know whether the file is modified or changed by others. If the MD5 matches, the file is the exactly one I want and safe to run. | |||
When a command can not work in the terminal and the reason is difficult to find, there may be some other way to achieve the purpose of using that command. For example, after I failed to use fdisk /dev/sda command to partition my hard disk several times, I use cfdisk /dev/sda command whose function is similar to fdisk /dev/sda and finally get a good partition table. | |||
Because I use '''which''' and '''whereis''' commands to find the locations of files several times, I have found that there are some differences between them. '''Which''' command use the name of the executable file as its argument and it locates that executable file by using the PATH variable, whereas '''whereis''' command uses the name of the file or directory as its argument(we can also regard the name as a key word) and returns all the files whose names contain the key word of the argument. As a conclusion, '''which''' command is used to locate an executable file and '''whereis''' command is used to locate all the files which are related to its argument. As a result, it is better to use '''which''' command rather than '''whereis''' to find an executable file , because '''which''' returns the exact path but '''whereis''' returns many results including the exact path which makes it harder to find the result the user want. For example, when I use "'''which bash'''" command, I get /bin/bash. However, when I use "'''whereis bash'''", I get both /bin/bash and /usr/man/man1/bash.1.gz. | |||
When I am trying to build up the kernel, I use "'''Chmod 777 *'''" to change the permissions of all the files in the current directory so they are writable, readable and executable to all the groups. Though '''Chmod 777 *''' command helps me to avoid some problems such as permissions denied easily, I find it dangerous because when files are made writable, readable and executable to all the groups, anyone can read, execute and edit them and protected files may be modified, which means that a hacker can attack my computer easily. | |||
==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 have to do almost everything by myself by using the shell, even compile my own kernel! The command line is only the “'''#'''” symbol, rather than showing the directory in other distribution of Linux such as Ubuntu. As a result, 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 to go to a again which makes me feel that CRUX is not 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 which makes it much easier to install and update packages.CRUX does not install KDE automatically, so the UI looks like the lambda machine we use at laboratory. CRUX does not contain the gcc C compiler. As a conclusion, I think using Crux is much more difficult than using other distributions such as 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= | |||
== Background == | |||
The name of my distribution is Hannah Montana Linux which is developed by Hannah Montana fans. Hannah Montana Linux is a is a free operating system based on Kubuntu with a Hannah Montana theme. It is fast, stable and powerful. | |||
It includes a Hannah Montana themed boot screen, [http://en.wikipedia.org/wiki/KDE_Display_Manager KDM](KDE Display Manager), icon set, color scheme, wallpapers an so on. | |||
The Package Manager of Hannah Montana Linux is Debian apt and its [http://en.wikipedia.org/wiki/Graphical_user_interface GUI](Graphical user interface) is [http://en.wikipedia.org/wiki/KDE_Software_Compilation KDE 4.2] with Hannah Montana themes.<ref>About Hannah Montana Linux. Retrieved December 12, 2011 from http://hannahmontana.sourceforge.net/Site/About.html</ref> KDE 4.2 is the KDE 4.2 platform <ref>KDE platfrom. Retrieved December 15,2011 from http://en.wikipedia.org/wiki/KDE_Software_Compilation</ref>developed by [http://en.wikipedia.org/wiki/KDE KDE] which is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems.<ref>KDE community. Retrieved December 15, 2011 from http://en.wikipedia.org/wiki/KDE</ref> | |||
Unlike other distributions, as Hannah Montana Linux just a stripped down version of Kubuntu with a Hannah Montana-inspired desktop theme that could theoretically make the operating system slightly more attractive to children. | |||
The hannah_montana_linux_x86_basic_edition.iso file is 691 MB. However, after installed, it will become 3.10GB | |||
== Software Packaging == | == Software Packaging == | ||
=== Packaging Format and Utilities === | === Packaging Format and Utilities === | ||
Line 118: | Line 118: | ||
|- | |- | ||
| Linux Kernel | | Linux Kernel | ||
| | | 2.6.28-13-generic #44 Ununtu | ||
(2009-07-02 ) | (2009-07-02 ) | ||
| 3.1.1<ref>The Linux Kernel Archives. Retrieved November 14, 2011 from http://www.kernel.org/</ref> | | 3.1.1<ref>The Linux Kernel Archives. Retrieved November 14, 2011 from http://www.kernel.org/</ref> | ||
(2011-11-11) | (2011-11-11) | ||
| http://www.kernel.org/ | | http://www.kernel.org/ | ||
| https://launchpad.net/ubuntu/+source/linux/2.6.28-13.44/+build/ | | https://launchpad.net/ubuntu/+source/linux/2.6.28-13.44/+build/1055416 | ||
| uname -a | | uname -a | ||
|- | |- | ||
| | | Glibc | ||
| GNU libc 2.9 | | GNU libc 2.9 | ||
(2009-05-17) | (2009-05-17) | ||
Line 168: | Line 168: | ||
(2011-12-16) | (2011-12-16) | ||
| http://packages.debian.org/wheezy/dpkg | | http://packages.debian.org/wheezy/dpkg | ||
| | | https://launchpad.net/debian/+source/dpkg/1.14.24 | ||
| dpkg –version | | dpkg –version | ||
|- | |- | ||
| | | KDE | ||
| | | 4.2.2 | ||
| | (2009-04-02) | ||
| http:// | | 4.7.1<ref>KDE. Retrieved on November 14, 2011 from http://busybox.net/</ref> | ||
| http:// | (2011-09-07) | ||
| http://www.kde.org/ | |||
| http://www.kde.org/info/4.2.2.php | |||
| the About KDE option in the tool bar | |||
|- | |- | ||
| | | Amarok(Audio Player) | ||
| | | 2.0.2 | ||
| | (2009-03-05) | ||
| http:// | | 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 | |||
| the About Amarok option in the tool bar | |||
|- | |- | ||
| | | QT | ||
| | | 4.5.0 | ||
| | (2009-05-11) | ||
| http:// | | 4.7.4 <ref>QT. Retrieved November 14, 2011 from http://en.wikipedia.org/wiki/Qt_(framework)</ref> | ||
| | (2011-09-01) | ||
| http://qt.nokia.com/ | |||
| http://qt.nokia.com/products/changes/changes-4.5.0/ | |||
| conqueror -v | |||
|- | |- | ||
| | | GZIP | ||
| 3. | | 1.3.12 | ||
| | (2007-04-13) | ||
| http:// | | 1.4 <ref>GZIP. (2011, Oct. 25). Retrieved on November 14, 2011 from http://ftp.gnu.org/gnu/gzip/</ref> | ||
| http:// | (2010-01-20) | ||
| http://ftp.gnu.org/gnu/gzip/ | |||
| http://ftp.gnu.org/gnu/gzip/ | |||
| gzip --version | |||
|- | |- | ||
|} | |} | ||
<br> | <br> | ||
=== Comparison of Packages to their Latest Stable Release === | === Comparison of Packages to their Latest Stable Release === | ||
Hannah Montana Linux is based on Kubuntu. | |||
The following table will discuss some of the differences between these packages and their upstream counterparts, as well as the services they provide. | The following table will discuss some of the differences between these packages and their upstream counterparts, as well as the services they provide. | ||
Line 228: | Line 219: | ||
|- | |- | ||
| Linux Kernel | | Linux Kernel | ||
| While a list of the individual modifications done to version 2.6. | | The [http://en.wikipedia.org/wiki/Linux_kernel Linux kernel] is an operating system kernel used by the Linux family of Unix-like operating systems. | ||
While a list of the individual modifications done to version 2.6.28-13.44_i386 would be too long to list, all of the changes are listed in the change log inside the [https://launchpad.net/ubuntu/+source/linux/2.6.28-13.44 diff file].For example, it adds missing mvsas (Marvel SAS 6440) module configuration and support for G41 chipset. It is developed for Ubuntu Jaunty i386. | |||
|- | |- | ||
| | | Glibc | ||
| | | The GNU C library([http://en.wikipedia.org/wiki/GNU_C_Library Glibc]) is used as the C library in the GNU system and most systems with the Linux kernel. | ||
According to the change log in the [http://www.oschina.net/code/explore/glibc-2.9/ChangeLog diff file], there are quite a lot of modifications for 2.9 release. The [http://www.cygwin.com/ml/libc-alpha/2008-11/msg00008.html user-visible change] for this release includes new Linux interfaces, new fixed-size conversion macros and so on. | |||
|- | |- | ||
| X.org | | X.org | ||
| | | [http://en.wikipedia.org/wiki/X.Org_Server Xorg] refers to the X server release packages stewarded by the X.Org Foundation, which is hosted by freedesktop.org, and grants public access to the standard X Window releases for the efforts of the free and open source software community. There are no huge changes since 1.5.99.903.[http://lists.freedesktop.org/archives/xorg-announce/2009-February/000784.html diff file]. Some typos and bugs are fixed. Xorg provides the basis for GUIs. | ||
|- | |- | ||
| Bash | | Bash | ||
| | |[http://en.wikipedia.org/wiki/Bash_(Unix_shell) Bash] is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh). | ||
No huge changes are made to bash-3.2.48 compared to bash-3.2-beta. According to the change log in the [http://ftp.gnu.org/gnu/bash/bash-3.2.48.tar.gz source package], several bugs are fixed. For example a bug in the printf builtin that caused the %q format specifier to ignore empty string arguments.c is fixed. | |||
|- | |- | ||
| | | GCC | ||
| | |The GNU Compiler Collection ([http://en.wikipedia.org/wiki/GNU_Compiler_Collection GCC]) is a compiler system produced by the GNU Project supporting various programming languages. | ||
After reading the change log in the [http://gcc.gnu.org/gcc-4.3/changes.html diff file], I have found that some architectures and ports are declared obsolete, some options such as -fforce-mem are removed as well. | |||
|- | |- | ||
| | | DPKG | ||
| | | [http://en.wikipedia.org/wiki/Dpkg Dpkg] is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages. | ||
According to the change log in the [https://launchpad.net/debian/+source/dpkg/1.14.24 diff file], there are few changes made to DPKG 1.14.24. It fixes mostly the parsing of objdump output (by dpkg-shlibdeps) in a special case where the symbol name is separated only with a single space, dpkg-shlibdeps behaviour when Build-Depends-Package is used in the symbols file and dpkg-source to correctly extract a source package even when called from a non-writable directory when a target directory has been specified on the command line. | |||
|- | |- | ||
| | | KDE | ||
| | | [http://en.wikipedia.org/wiki/KDE KDE] offers a full suite of user workspace applications which allow interactions with these operating systems in a modern, graphical user interface. | ||
The most user-visible improvements made to KDE 4.2.2 according to the Enhancements section in the [http://www.kde.org/announcements/announce-4.2.2.php announcements]. The first improvement is that KRunner's threaded search for results is now more robust and a possible deadlock condition has been fixed. The second one is that Synching email of cached IMAP accounts is now faster and a number of displaying changes makes reading emails smoother experiences. The third one is that Text rendering has been optimized, support for CSS selectors has further been improved as well. In addition to that, there are lots of modifications in the change log in the [http://www.kde.org/announcements/changelogs/changelog4_2_1to4_2_2.php diff file] as well. | |||
|- | |- | ||
| | | Amarok | ||
| | | Amarok is a powerful music player for Linux and Unix, MacOS X and Windows with an intuitive interface. | ||
After reading the [http://amarok.kde.org/en/releases/2.0.2 announcement], I have found that there are major changes which are made to Amarok 2.0.2. The first change is that it will show a statusbar message when loving a lastfm track. The second one is that an error message will be showed when Wikipedia information cannot be retrieved. Of course, bugs are fixed. | |||
|- | |- | ||
| | | QT | ||
| | | [http://en.wikipedia.org/wiki/Qt_(framework) QT] is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) and also used for developing non-GUI programs such as command-line tools and consoles for servers. | ||
According to the change log in the [http://qt.nokia.com/products/changes/changes-4.5.0/ diff file], there are many new features added to the QT 4.5.0, such as the ability to set the text margin size. Some functions such as QGraphicsView are optimized, bugs are fixed as well. | |||
|- | |- | ||
| | | GZIP | ||
| | | [http://en.wikipedia.org/wiki/Gzip Gzip] is any of several software applications used for file compression and decompression. | ||
After reading the change log in the [http://ftp.gnu.org/gnu/gzip/gzip-1.3.13.tar.gz source package], I have found that there are many tiny changes are made to gzip-1.3.13, including names changed such as README-cvs, files added such as stdlib_h.m4 and removed such as getdelim.c. | |||
|} | |} | ||
<br> | <br> | ||
== Initialization == | |||
When the computer is powered on, firstly the BIOS performs integrity checks on memory and seeks instructions on the MBR on the floppy drive or hard drive.Then the MBR points to the boot loader [http://en.wikipedia.org/wiki/GNU_GRUB GRUB](short for GRand Unified Bootloader) as Hannah Montana Linux is based off of Kubuntu. After the kernel is built up, because Ubuntu 6.10 (Edgy Eft) and later contain [http://en.wikipedia.org/wiki/Upstart Upstart] as a replacement for the traditional init-process,<ref> Kunbuntu init process. Retrieved December 10, 2011 from http://en.wikipedia.org/wiki/Runlevel</ref> Hannah Montana Linux use upstart to initialize the system, where upstart is an event-based replacement for the traditional init daemon — the method by which several Unix-like computer operating systems perform tasks when the computer is started. <ref> Upstart. Retrieved December 10, 2011 from http://en.wikipedia.org/wiki/Upstart </ref> | |||
The upstart use the /etc/event.d directory(Hannah Montana Linux use /event.d to replace inittab file) to store the information of those events which upstart will run, in other words, upstart use /etc/event.d as the guide to determine the sequence to run scripts and match the paths of scripts. In the /etc/event.d directory, there is a rc-default file which is similar to the inittab and it contains the information about the default run-level. Upstart comes with a set of default jobs which it installs into /etc/init. These are based on the sysvinit configuration of Debian-based systems, including running the /etc/init.d/rc script which contains a number of start/stop scripts for various services and tasks on your system. | |||
When running upstart, firstly, the kernel runs init. Secondly, init goes to the /etc/event.d directory, finds the rc-default file and determines the run-level. Thirdly, it runs /etc/event.d/rc#(# stands for 0,1,2,3,4,5,6). Then rc# runs /etc/init.d/rc and # is passed to /etc/init.d/rc as a parameter. After that, init goes to /etc/rc#.d directory to start or stop processes and tasks according to their priorities. <ref> How upstart work. Retrieved December 12, 2011 from http://upstart.ubuntu.com/getting-started.html </ref><ref> More about upsart Retrieved December 12, 2011 from http://www.xxlinux.com/linux/article/development/kernel/20081128/14566.html </ref> | |||
[[File:init.jpg|thumb|right| Initialization]] | |||
Finally, the init program runs six terminals and bring users to the login GUI windows, and the initialization is done.<ref> How to init. Retriever December 12, 2011 from http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html</ref> | |||
By viewing the /etc/rc#.d directory(# stands for 0,1,2,3,4,5,6), I have found the scripts corresponding to System log deamon, Kernel log deamon, System kernel message dbus, Hardware abstraction layer hald and Bluetooth are S10sysklgd, S11klogd, S12dbus, S24hal and S25bluetooth. | |||
As the prefix S means start and the number following S determines the order to run the scripts, these five programs runs with the order log deamon, Kernel log deamon, System kernel message dbus, Hardware abstraction layer hald and Bluetooth just as the picture. | |||
= Reference = | = Reference = | ||
<references /> | <references /> |
Latest revision as of 18:52, 21 December 2011
Part1
Background
The name of the distribution I choose is CRUX. It is a lightweight, i686-optimized Linux distribution. CRUX 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> 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> and 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>
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, so it is not derived from any other distribution. 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 the user wants to install.
Installation/Startup & Basic Operation
Attention: My installation section and basic operation section are together.
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.
Commands to install CRUX
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 fail to mount my partition.
As a result, I try “cfdisk /dev/sda” command and I get a good partition table.
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 to /mnt, so I can access my sda1 partition from /mnt.
3. I use “mkdir /mnt/var” command to make /mnt/var directory which is for the later installation.
4. I use “mount /dev/sda1 /mnt/var” command to mount /dev/sda1 to /mnt/var directory, so I can access my sda1 partition from /mnt/var.
5. I use “setup” command to go into the CRUX setup windows to start the package installation script.
After the setup, I can compile the kernel by using following commands:.
6. I use "# Mount --bind /dev /mnt/dev" command, so /dev is remounted to /mnt/dev, in other words, /dev and /mnt/dev are bound together.
7. I use "# Mount --bind /tmp /mnt/tmp" command, so /tmp is remounted to /mnt/tmp, in other words, /tmp and /mnt/tmp are bound together. //Attention: the bind option for Mount command make the first parameter of the arguments inherits the properties of the second parameter.
8. I use "# Mount –t proc proc /mnt/proc" command, so I can mount proc to /mnt/proc with vfstype proc.
9. I use "# Mount –t sysfs none /mnt/sys" command, so I can mount none to /mnt/sys with vfstype sysfs.
10.I use "# Chroot /mnt /bin/bash" command, so I can change root of current processes to the directory /mnt and run command /bin/bash.
11.I use passwd command to initiate the password by using command.
12.I use "vim" to edit files such as fstab, rc.conf, /rc.d/net and so on to set the environment of the kernel.
Then I go to the /usr/src/linux-2.5.35.6 directory to make instal the kernel.
13.I use "# Cd /usr/src/linux-2.6.35.6" command to go to the /usr/src/linux-2.6.35.6 directory.
14.I use "# Make menuconfig" command to go into the configuration whindows to do further configurations for the kernel.
15.I use "# Make all" command to install files.
16.I use “make modules_install” for another installation.
17.I use "# Cp arch/x86/boot/bzImage /boot/vmlinuz" to copy arch/x86/boot/bzImage to /boot/vmlinuz.
19.I use "#Cp System.map /boot" command to copy System.map to /boot.
20.The last step is to edit the /etc/lilo.conf by using "vim /etc/lilo.conf" to boot the kernel which I have just compiled and then run lilo to make the new system bootable.
After performing these steps, the CRUX should be installed successfully.
What I learn through the installation
Though I fail to run the kernel for CRUX, I learn a lot through the installation.
MD5MD5<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. After I have downed the CRUX ISO image (crux-2.7.iso), the first thing I should do is to examine its checksum using md5sum, so I can know whether the file is modified or changed by others. If the MD5 matches, the file is the exactly one I want and safe to run.
When a command can not work in the terminal and the reason is difficult to find, there may be some other way to achieve the purpose of using that command. For example, after I failed to use fdisk /dev/sda command to partition my hard disk several times, I use cfdisk /dev/sda command whose function is similar to fdisk /dev/sda and finally get a good partition table.
Because I use which and whereis commands to find the locations of files several times, I have found that there are some differences between them. Which command use the name of the executable file as its argument and it locates that executable file by using the PATH variable, whereas whereis command uses the name of the file or directory as its argument(we can also regard the name as a key word) and returns all the files whose names contain the key word of the argument. As a conclusion, which command is used to locate an executable file and whereis command is used to locate all the files which are related to its argument. As a result, it is better to use which command rather than whereis to find an executable file , because which returns the exact path but whereis returns many results including the exact path which makes it harder to find the result the user want. For example, when I use "which bash" command, I get /bin/bash. However, when I use "whereis bash", I get both /bin/bash and /usr/man/man1/bash.1.gz.
When I am trying to build up the kernel, I use "Chmod 777 *" to change the permissions of all the files in the current directory so they are writable, readable and executable to all the groups. Though Chmod 777 * command helps me to avoid some problems such as permissions denied easily, I find it dangerous because when files are made writable, readable and executable to all the groups, anyone can read, execute and edit them and protected files may be modified, which means that a hacker can attack my computer easily.
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 have to do almost everything by myself by using the shell, even compile my own kernel! The command line is only the “#” symbol, rather than showing the directory in other distribution of Linux such as Ubuntu. As a result, 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 to go to a again which makes me feel that CRUX is not 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 which makes it much easier to install and update packages.CRUX does not install KDE automatically, so the UI looks like the lambda machine we use at laboratory. CRUX does not contain the gcc C compiler. As a conclusion, I think using Crux is much more difficult than using other distributions such as 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
Background
The name of my distribution is Hannah Montana Linux which is developed by Hannah Montana fans. Hannah Montana Linux is a is a free operating system based on Kubuntu with a Hannah Montana theme. It is fast, stable and powerful.
It includes a Hannah Montana themed boot screen, KDM(KDE Display Manager), icon set, color scheme, wallpapers an so on. The Package Manager of Hannah Montana Linux is Debian apt and its GUI(Graphical user interface) is KDE 4.2 with Hannah Montana themes.<ref>About Hannah Montana Linux. Retrieved December 12, 2011 from http://hannahmontana.sourceforge.net/Site/About.html</ref> KDE 4.2 is the KDE 4.2 platform <ref>KDE platfrom. Retrieved December 15,2011 from http://en.wikipedia.org/wiki/KDE_Software_Compilation</ref>developed by KDE which is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems.<ref>KDE community. Retrieved December 15, 2011 from http://en.wikipedia.org/wiki/KDE</ref>
Unlike other distributions, as Hannah Montana Linux just a stripped down version of Kubuntu with a Hannah Montana-inspired desktop theme that could theoretically make the operating system slightly more attractive to children.
The hannah_montana_linux_x86_basic_edition.iso file is 691 MB. However, after installed, it will become 3.10GB
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.
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.
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 | 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/1055416 | uname -a |
Glibc | 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 | https://launchpad.net/debian/+source/dpkg/1.14.24 | 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 | the About KDE option in the tool bar |
Amarok(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 | the About Amarok option in the tool bar |
QT | 4.5.0
(2009-05-11) |
4.7.4 <ref>QT. Retrieved November 14, 2011 from http://en.wikipedia.org/wiki/Qt_(framework)</ref>
(2011-09-01) |
http://qt.nokia.com/ | http://qt.nokia.com/products/changes/changes-4.5.0/ | conqueror -v |
GZIP | 1.3.12
(2007-04-13) |
1.4 <ref>GZIP. (2011, Oct. 25). Retrieved on November 14, 2011 from http://ftp.gnu.org/gnu/gzip/</ref>
(2010-01-20) |
http://ftp.gnu.org/gnu/gzip/ | http://ftp.gnu.org/gnu/gzip/ | gzip --version |
Comparison of Packages to their Latest Stable Release
Hannah Montana Linux is based on Kubuntu.
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 | The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems.
While a list of the individual modifications done to version 2.6.28-13.44_i386 would be too long to list, all of the changes are listed in the change log inside the diff file.For example, it adds missing mvsas (Marvel SAS 6440) module configuration and support for G41 chipset. It is developed for Ubuntu Jaunty i386. |
Glibc | The GNU C library(Glibc) is used as the C library in the GNU system and most systems with the Linux kernel.
According to the change log in the diff file, there are quite a lot of modifications for 2.9 release. The user-visible change for this release includes new Linux interfaces, new fixed-size conversion macros and so on. |
X.org | Xorg refers to the X server release packages stewarded by the X.Org Foundation, which is hosted by freedesktop.org, and grants public access to the standard X Window releases for the efforts of the free and open source software community. There are no huge changes since 1.5.99.903.diff file. Some typos and bugs are fixed. Xorg provides the basis for GUIs. |
Bash | Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh).
No huge changes are made to bash-3.2.48 compared to bash-3.2-beta. According to the change log in the source package, several bugs are fixed. For example a bug in the printf builtin that caused the %q format specifier to ignore empty string arguments.c is fixed. |
GCC | The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages.
After reading the change log in the diff file, I have found that some architectures and ports are declared obsolete, some options such as -fforce-mem are removed as well. |
DPKG | Dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages.
According to the change log in the diff file, there are few changes made to DPKG 1.14.24. It fixes mostly the parsing of objdump output (by dpkg-shlibdeps) in a special case where the symbol name is separated only with a single space, dpkg-shlibdeps behaviour when Build-Depends-Package is used in the symbols file and dpkg-source to correctly extract a source package even when called from a non-writable directory when a target directory has been specified on the command line. |
KDE | KDE offers a full suite of user workspace applications which allow interactions with these operating systems in a modern, graphical user interface.
The most user-visible improvements made to KDE 4.2.2 according to the Enhancements section in the announcements. The first improvement is that KRunner's threaded search for results is now more robust and a possible deadlock condition has been fixed. The second one is that Synching email of cached IMAP accounts is now faster and a number of displaying changes makes reading emails smoother experiences. The third one is that Text rendering has been optimized, support for CSS selectors has further been improved as well. In addition to that, there are lots of modifications in the change log in the diff file as well. |
Amarok | Amarok is a powerful music player for Linux and Unix, MacOS X and Windows with an intuitive interface.
After reading the announcement, I have found that there are major changes which are made to Amarok 2.0.2. The first change is that it will show a statusbar message when loving a lastfm track. The second one is that an error message will be showed when Wikipedia information cannot be retrieved. Of course, bugs are fixed. |
QT | QT is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) and also used for developing non-GUI programs such as command-line tools and consoles for servers.
According to the change log in the diff file, there are many new features added to the QT 4.5.0, such as the ability to set the text margin size. Some functions such as QGraphicsView are optimized, bugs are fixed as well. |
GZIP | Gzip is any of several software applications used for file compression and decompression.
After reading the change log in the source package, I have found that there are many tiny changes are made to gzip-1.3.13, including names changed such as README-cvs, files added such as stdlib_h.m4 and removed such as getdelim.c. |
Initialization
When the computer is powered on, firstly the BIOS performs integrity checks on memory and seeks instructions on the MBR on the floppy drive or hard drive.Then the MBR points to the boot loader GRUB(short for GRand Unified Bootloader) as Hannah Montana Linux is based off of Kubuntu. After the kernel is built up, because Ubuntu 6.10 (Edgy Eft) and later contain Upstart as a replacement for the traditional init-process,<ref> Kunbuntu init process. Retrieved December 10, 2011 from http://en.wikipedia.org/wiki/Runlevel</ref> Hannah Montana Linux use upstart to initialize the system, where upstart is an event-based replacement for the traditional init daemon — the method by which several Unix-like computer operating systems perform tasks when the computer is started. <ref> Upstart. Retrieved December 10, 2011 from http://en.wikipedia.org/wiki/Upstart </ref>
The upstart use the /etc/event.d directory(Hannah Montana Linux use /event.d to replace inittab file) to store the information of those events which upstart will run, in other words, upstart use /etc/event.d as the guide to determine the sequence to run scripts and match the paths of scripts. In the /etc/event.d directory, there is a rc-default file which is similar to the inittab and it contains the information about the default run-level. Upstart comes with a set of default jobs which it installs into /etc/init. These are based on the sysvinit configuration of Debian-based systems, including running the /etc/init.d/rc script which contains a number of start/stop scripts for various services and tasks on your system.
When running upstart, firstly, the kernel runs init. Secondly, init goes to the /etc/event.d directory, finds the rc-default file and determines the run-level. Thirdly, it runs /etc/event.d/rc#(# stands for 0,1,2,3,4,5,6). Then rc# runs /etc/init.d/rc and # is passed to /etc/init.d/rc as a parameter. After that, init goes to /etc/rc#.d directory to start or stop processes and tasks according to their priorities. <ref> How upstart work. Retrieved December 12, 2011 from http://upstart.ubuntu.com/getting-started.html </ref><ref> More about upsart Retrieved December 12, 2011 from http://www.xxlinux.com/linux/article/development/kernel/20081128/14566.html </ref>
Finally, the init program runs six terminals and bring users to the login GUI windows, and the initialization is done.<ref> How to init. Retriever December 12, 2011 from http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html</ref> By viewing the /etc/rc#.d directory(# stands for 0,1,2,3,4,5,6), I have found the scripts corresponding to System log deamon, Kernel log deamon, System kernel message dbus, Hardware abstraction layer hald and Bluetooth are S10sysklgd, S11klogd, S12dbus, S24hal and S25bluetooth. As the prefix S means start and the number following S determines the order to run the scripts, these five programs runs with the order log deamon, Kernel log deamon, System kernel message dbus, Hardware abstraction layer hald and Bluetooth just as the picture.
Reference
<references />