Friday, December 12, 2008

Making a custom Fedora CD

In this lab I've used a tool called 'pungi' to create Fedora custom spin.

The first step is to install pungi, so on the command line issue the command:
#yum install pungi -y

I used this kickstart file for lab:

repo --name=release --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=$basearch

%packages --nobase
bash
kernel
passwd
policycoreutils
chkconfig
authconfig
rootfiles
anaconda-runtime

%end


Once you have the kickstart file, from command line you can issue the command:
#pungi -c NameofKickstart.cfg --nosource --force --ver=F9

This command will create a ISO image form that file. You can burn the image and try it out or you can even use the 'qeum' to test it first.

How to create a slideshow


In this lab I've used the tool called "dvd-slideshow" to create slides.

So the first step is to install it, on a terminal issue the command:
#yum install dvd-slideshow -y

You should have your directory ready with all the pictures. Say your directory is Pics

#dir2slideshow -n "Pics" -t 2 Pics/

There are many more options you can use and modify it, check the man pages for it.
If the above command returned an error like "Creating ac3 audio ERROR during ffmpeg execution!"
then you need to edit the file called /usr/bin/dvd-slideshow, edit line 661 to "ac3=0"

Try the previous command again and it should work. Now it has created a Pics.vob file which can be viewed using mplayer.

Saturday, December 6, 2008

Creating your own Fedora Live CD

There are tools in Fedora repository for building live CD's. 'livecd-tools' is nice tool for generating live CD's on Fedora based systems including derived distributions such as RHEL, CentOS and others.
So first install this utility by issuing the command on terminal as root:
#yum install livecd-tools

After you install that utility, you'll see some kickstart files in /usr/share/livecd-tools dir. For my experiment I tried using one of the kickstart files from here. I choose the minimal kickstart file first. To create a ISO image of this file, issue the command 'livecd-creator --config=/usr/share/livecd-tools/livecd-fedora-minimal.ks'. Now you should have the ISO image for your kickstart file. You can test your live CD using QEUM. For that first install qeum (yum install kvm qeum -y).
Than issue the command #qeum-kvm -m 512 -cdrom YourFileName.iso.
I was not able to successfully create my live CD, I got some missing module error. Next I am gonna use some other kickstart file and try to create live CD based on it.

Wednesday, November 26, 2008

0.3 Release

0.3 release for our projects is coming very soon. After 0.2 I submitted one of my package for review at redhat bugzilla, but because they were creating a packaging guidelines for packages related to JavaScript, my package couldn't be approved. I've to wait till that guideline is finished. I am also planning to package DXR for 0.3, lets see how far it goes...

Saturday, November 22, 2008

Tutorial for creating a mosiac

I've used a program called Metapixel to create a mosaic in this tutorial

First step is to install Metapixel, so on a terminal window, issue this command:-
#yum install metapixel -y

Secondly, create a Directory and dump all your pictures there (lets say "MyPics"). More pictures, better quality. Then create an empty directory (lets say "metapixel_prepared").

Get back to the terminal window and issue this command:
#metapixel-prepare -r --width=50 --height=50 MyPics/ metapixel_prepared/
'metapixel-prepare' command needs to be run before metapixel can be used to prepare source images so that they can be used to create photomosiac. The "-r" tells metapixel to browse through the given repository recursively.

Next thing to be done is to generate the mosaic picture. Place the picture you want to transform into a mosaic (lets say "mypic") and the "metapixel_prepared" directory in the same place, change into that dir and issue this command:
#metapixel --library=metapixel_prepared -s 10 -a 10 --metapixel mypic.jpg mymosaic.jpg

Magnet VS Torrent links

Magnet Links:
Advantages:
1. They do not need a central authority to issue.
2. They has open nature and platform independence, the same magnet link can be used as long as the system has the appropriate application.
3. They are more user based, easy to use. All the system need is an application that support magnet links.
4. Since it is user based, it is so easy to share resources.
5. Most Magnet links application has a search function.

Disadvantages:
1. Slower speed.
2. Less control on speed and on the contend that is being downloaded

Torrent:
Advantages:
1. Faster connection.
2. Easier to search through the web.

Disadvantages:
1. Trackers are needed when downloading a contend. If the tracker is down and there are no existing connection, the download may never be finished.
2. Most torrent client do not have search function. Torrents ususally would be find from the internet.
3. If a torrent was stored on web for long time, the tracker may be expeired already. It is almost impossible to find existing seed or leechers.

Saturday, November 15, 2008

Virtual Machines

For the last weeks lab, based on virtual machines, I used virt manager, a GUI for installing. I never used virtual machines before, but when I used it, I think its easy and very useful. On my Fedora system I installed ubuntu and it works fine. Next thing I am gonna do is I am gonna install OS-X on by Fedora.

Tuesday, November 11, 2008

My v0.2 release

The version 0.2 for my MDRK project is released now. For version 0.2 I've build glimpse on mock and verified that it works. I've packaged Ext JS and build it on mock and verified that it works. I've tried building Ext JS on koji but did not work that well. There are some issues which will be taken care of. After building Ext JS on koji, I can submit my package in fedora repository (Its a long process though). I've also created my repository on Liberia for the packages having licensing issues, and so cannot go to fedora repo. You can download some of the packages from the link below.

http://zenit.senecac.on.ca/wiki/index.php/Creating_an_MDRK_spin

Saturday, November 8, 2008

Kickstart file on HTTP server

This lab was to understand how to perform automatic installations using kickstart file. Kickstart file, once created can be placed on cdroms, floppy drives, USB drives etc. or even on NFS servers and can be used from there. For my lab, I decided to upload my kickstart file on HTTP server and use it from there. It's actually easy. Boot your system from the boot media you have i.e CDROM. At the boot prompt issue the command linux ks=http:/// (in my case: linux ks=http://matrix.senecac.on.ca/~mdvyas/MDRK/ks.cfg) and wait for it to install. Easy isn't it ? I also burnt it into a DVD. In my DVD I had isolinux.cfg configured to point my kickstart file to HTTP server. So next time I dont even have to issue that command, just put in the DVD and it'll do everything by itself.

Friday, November 7, 2008

SPR720 Package Review Lab

I really like the idea of this lab. In this lab we had to review a package from bugzilla and find an error in it and comment on it. Actually Prof. Chris wanted us to go through the Fedora Package Review Guidelines, but how, so he asked us to go through the packages on bugzilla, review one package, find an error, and comment on it and show what you've commented. Now unless you go through the Fedora Package Review Guidelines very well, you wont be able to get the error in it. In fact I looked more than 20 packages but didnt find any error. Then I went through the guidelines well and was able to find some small errors. Anyways, heres the link to what I've commented

https://bugzilla.redhat.com/show_bug.cgi?id=469474#c4

Thanks to Chris Tyler

Sunday, November 2, 2008

Arcade Project

Finally we've got something to work on, not quite yet, but most likely by this tuesday .i.e. Tue Nov 04, 2008. Yes I'm talkin about our arcade machine. After looking so many machines, we've decided to buy this one now. I wish this was a bit more nicer and cleaner, but it is (far) better than ones we saw earlier, and of course we can always make it look nicer. This box is in a working condition, the ones we saw earlier were not even in a working condition and even the prices were high. Once we get the machine, we can start working on it.













PS:
There are some talks going on to name this machine JailFreezer(In contras with our Freedom Toaster), cause everyone will stick to the machne to play games, anyways just kidding ;-)

LPT730 Assignment

Here's a small effort made by me and milton to create the game of BlackJack using JavaScript, XHTML and CSS. It is not the world best BlackJack game made ever, but without much knowledge of JavaScript XHTML and CSS, making this game in less than three hours was not too bad. This game was part of our LPT730 assignment. Here's the link to try the game, I hope you like it...


http://matrix.senecac.on.ca/~mdvyas/BlackJack/blackJack.html

Any comments and/or suggestions are always welcome :-)

Friday, October 3, 2008

My Project

As I've taken the MDRK (Mozilla Developers Resource Kit) project, I was trying to build the rpm for glimpse today. After some efforts I was able to build my rpm package for glimpse. First of all I downloaded it, extracted it, configured, installed and bingo its works ! Easy....
Just until I came to the second part. When I started to build as an rpm, initially everything works
fine, till the build process. I was having some hard time when it came to the install part of it. It would exit showing some wired error. I tried to make some changes in the .spec file and see if it works, but no luck. I googled it, again edit it, run it but not much improvement. This process kept going for a while, and now I was about to bang my head on the keyboard and I saw chris tyler passing by so I asked for his help, and he helped me very well. Now I know what the problem was. It was unusual problem with Makefile. It was not installing glimpse because Makefile didn't had the proper information of the DESTDIR, so it was not able to create directories in right place. So after creating the patch for makefile and adding few lines in .spec file, it finally worked. Thanks to chris for his help.. So now I've build the rpm which takes me to the 0.1 release of my project. I learned a lot new things today. I've also packaged an antivirus and a utility called Net Activity Viewer for one of my lab SPR720. I'll proceed with packaging extjs probably, not sure though.

Tuesday, September 30, 2008

Phishing

Phishing is an immense thing in computer security. Wikipedia defines Phishing as a process of attempting to acquire sensitive information such as usernames, passwords and credit card details, by masquerading as a trustworthy entity in an electronic communication. Popular websites such as online shopping websites, financial websites and social websites. How the process works is that e-mails or instant messages are sent to ones e-mail account asking to enter confidential information into the required fields they provide. Once the information is entered into the fields, it gathers the confidential information that one has entered and uses it for invasive and illegal activites. Please note that there are several types of phishing however, this is the most common method of luring people to provide information.

There are various methods to prevent or stop phishing from happening. Users could make sure that the internet browsers they are using do have anti-phishing measures. There is an approach which involves switching to a DNS service that filters out phishing domains. There are various bank websites that allow you to select a personal image and use this image any time they ask for a password or any other confidential information. Users can elimate phishing e-mails by having spam filters in the e-mail providers. If a user gets a pop up message prompting personal information to be entered, nothing should be entered. Some people also send e-mails asking users to contact a phone number updating personal information. This is also a part of phishing. It is very hard to avoide phishing totally however, it can be watched accurately. It is necessary to use and update all anti-virus software and anti-spy software, as well as firewall. Some phishing e-mails can harm a users computer and track their activities. It is obvious that even if users to everything they can to avoide phishing from occuring, something is bound to get through when leaste expected. For this reason before entering any data into a website, be sure it is leginimate and accurate.

One wishes that we could avoide websites for our banking and other needs however, the truth is it is very convenient and that’s what phishers take advantage of. The best think to do is just be smart.

Wednesday, September 10, 2008

Linux Power Tools (LPT730)

Software patents are good or bad ? The answer ultimately is not as simple as yes or no. Patents arose as a legal mechanism designed to protect 'intellectual capital'. In other words patents means to protect the ideas of inventors from being used by others without permission or compensation. Software patents could be defined as patent intended to prevent others from using some programming technique.

As a general nature, anybody who comes up with an innovative idea, which is commercially valuable and useful, will protect his/her idea from getting stolen.
The inventor will like to have all the reward and credit for his invention. In theory, patents provide a valuable protection system for inventors pursuing development of their invention as well as a reward system for commercially valuable ideas. Lets consider an example, in 1998, Sergey Brin and Larry Page filled a patent which was granted in 2001. At that time, search engines giants like yahoo, altavista and webcrawler were already well established - at least compared to an academic start-up. Google is today the worlds most popular search engine. But what would have happened if there idea could have been stolen. Thus if software patents can be used to protect inventors and inventors pursuing development of a clever idea, then its a good thing.

Modern-day patents, however, are not always of such a noble nature. A good example of it is the patent life, which is of 20 years. 20 years is a long time to sit on an idea. And also the way in which softwares are patented is not very consistent, considering amazon for its one click technology.

Finally, I would say that software patents are not evil, but there is a need to reform the system.

Network Administration (NAD710)

Que 1 > What is the kernel version of Linux on matrix ?
Ans 1 >> The kernel version of linux on matrix is #1 SMP Tue Feb 12 09:16:51 EST 2008

Que 2 > What is the IP address and MAC address on the linux machine on matrix ?
Ans 2 >> IP address --> 192.168.1.54
MAC address --> 00:02:B3:21:EE:4C

Que 3 > What is the network mask on matrix ?
Ans 3 >> The network mask on matrix is 255.255.255.0.

Que 4 > What are the network addresses of the linux machine ?
Ans 4 >> (1) 192.168.1.0
(2) 169.254.0.0
(3) 127.0.0.0

Que 5 > What is the IP address of the gateway for the linux machine on matrix ?
Ans 5 >> The IP address of the gateway for the linux machine on matrix is 192.168.1.254

Que 6 > What is the command to display all the currently loaded kernel modules ?
Ans 6 >> /sbin/modinfo

Que 7 > Where is the file for the kernel module called "e100" ?
Ans 7 >> /lib/modules/2.6.18.8-0.5-default/kernel/drivers/net/mii.ko

Que 8 > What is the MAC address for the network device that has the IP address 192.168.1.254 ?
Ans 8 >> 00:0E:0C:7F:84:6F

Que 9 > How do you display all the physically network addresses known by a linux machine ?
Ans 9 >> command = /sbin/arp -n

Que 10 > What is the MAC address of the network device on the linux machine on matrix ?
Ans 10 >> 00:02:B3:21:EE:4C

Shell Programming (SPR720)

SPR720 - Lab02

# Program to run through each readable file and ask if user wants to print mail or ignore
#!/bin/bash

echo "PRESS APPROPRIATE KEY"
#echo "P for printing, M for mailing and I to ignore"

for FILE in /home/*
do
if [ -r "$FILE" -a -f "$FILE" ]
then
echo "Accessing >> $FILE"

echo -n "P for printing, M for mailing and I to ignore : "
read YN
if [ "$YN" = "M" -o "$YN" = "m" ]
then
echo "Sending mail to mdvyas@senecac.on.ca"
mail -s "$FILE" mdvyas@senecac.on.ca: < "$FILE"
sleep 1

elif [ "$YN" = "P" -o "$YN" = "p" ]
then
echo "Printing $FILE"
lpr $FILE

elif [ "$YN" = "I" -o "$YN" = "i" ]
then
echo "IGNORE"

else
echo "Please Wait . . . "
sleep 1
exit
fi
fi
done










1)
/bin >> 105
/usr/bin/ >> 1926
/sbin/ >> 252
/usr/sbin/ >> 394


2)

1>look command displays line beginning with a given string. The utility displays any lines in file which contains a given string. It performs a binary search.
Options:-
-f > Ignore case of alphanumeric characters
-t > Specify a termination character

2> tree -- Tree command lists contents of directories in a tree like format.

3> lustering -- userinfo is a graphical tool to allow user to conveniently change their finger information.

4> xkill -- xkill forces a utility to close. It is generally used with resourse identifier you want to abort, if the id is not given it displays a special cursor to kill the process. This command is very useful when you want to kill a process which is not responding.

5> yes -- yes command outputs a string repetedly untill it is killed. it repetedly outputs 'y' on screen

6> shred -- shred command is used to overwrite the file to hide it and also optionally delete it. It overwrite the file repeatedly to make it harder to recover data.

7> host -- host command is used to convert names to IP addresses and vice versa. When no options are given it prints a short summary of its comand line.

8> sum -- checks sum and counts the blocks in the file

9> talk -- talk command enables one user to talk to another user. it is a visual communication program which copies lines from your terminal to that of another user.

10> top -- top command displays information of list of tasks running on hte system.

11> uptime -- uptime command gives you the information of how long the system has been running.
It tells you the current time, how long have the system been running, how many users have been currently logged in, and the system load average

12> wall -- send a message to everybodys terminal. everybody logged in with their mesg' permission 'yes'

13> arp -- arp stands for address resolution protocol. arp manipulates the system arp cache

14> id -- id command is used to print the user identity

15> lp -- lp command is used to send the file to the printer and print it.

16> quota -- the quota command displays the disk usage and the limits for a user

17> last -- the last command shows the listing of the last logged on users

18> whereis -- locates that where and in which directory the command is. It locates the binary , source, and manual page files for a command

19> logname -- prints the user logname

20> finger -- finger command is used to look up for the users information

21> hunspell -- hunspell is a spellchecker, it is most commonly used as "hunspell "

22> halt -- halt command is used to either reboot or power off the pc

23> cancle -- cancle command is used to cancle all the jobs that are running, eg cancle all the print jobs

24> xclock -- xclock command brings the disply of analog clock

25> free -- free command display the amount of free and used memory in the system