Disk identification by UUID in Fedora.

2010-05-19 2 min read GNOME Linux

Yesterday I managed to delete my complete /usr directory and thus had to re-install my OS but I learned something new yesterday which I didn’t know earlier or actually never bothered to find out.br /br /All the partitions are mounted by udev using the UUID or label now. Finding the label of setting the label is easy but that was not the case with UUID (at least till you dont know how to do it). So finally I set my foot to search it. Heres some of the things that I found:br /br /bblkid/b – Gives you a list like below for all your partitions:br //dev/sda6: UUID=”8D8A-6CF1” TYPE=”vfat” LABEL=”Backup” br /So this is sufficient to modify your fstab to refer to the UUID or label instead of the drive. So whats the change in fstab. If the earlier entry looks likebr //dev/sdb6nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /media/Bkup3nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; vfatnbsp;nbsp;nbsp; uid=500,nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 0 0br /then you can change this to :br /UUID=”8D8A-6CF1”nbsp;nbsp; /media/Bkup3nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; vfatnbsp;nbsp;nbsp; uid=500,nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 0 0br /What is the benifit:br /———————br /When you re-format your Hard Disk there is a likely possibility that the dev name could well change and thus completely changing the mount points for all your fstab entries. This is really a pain if you have 10 or more partitions like the way I have. So if you use label or UUID then they never change and your mount points remain the same.br /br /Effective use: Use autofs package to automatically mount all your partitions. Autofs mounts the package at /media/LABEL, so before you hit to start your autofs label all your disks.br /br /Other ways to find the disk labels and UUID’s:br /ls /dev/disk/by-uuid –gt; simplest way. :)br /br /Will get back to this later with more details.br /br /

Continue reading

How to write a Linux virus – well or a trojan.

2010-05-18 2 min read Fedora Linux

<a href="http://www.geekzone.co.nz/foobar/6229" target="_blank">How to write a Linux virus

and the folloup thereof

<a href="http://www.geekzone.co.nz/foobar/6236" target="_blank">Follow up: How to write a Linux virus

Thats quite a lot of discussion and an interesting one too. I too liked the point that the authour is trying to make, that is Linux too is not completely safe. I would rather like to put it as not &#8221;Fool Proof&#8221;.

But no one is fool. Its just the matter of time when you do something foolish. People do keep thinking about various things and keep working. That being the case, it is not too difficult that someone would actually run the program. But the caveat is that the program/virus/trojan would still show up at some places. So you need to do few more things for this to work. If you are keen on doing this, then you need to atleast add these:

Continue reading

Contd:: Evaluation of Distro\’s

2010-05-17 4 min read Linux

<a href="www.foresightlinux.org/" target="_blank">Foresight

Foresight is a desktop operating system featuring an intuitive user interface and a showcase of the latest desktop software, giving users convenient and enjoyable access to their music, photos, videos, documents, and Internet resources.

<a href="http://amit-agarwal.co.in/wordpress/wp-content/uploads/2008/11/1.jpg"><img class="size-medium wp-image-270" title="Foresight" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/1-300x225.jpg" alt="Foresight" width="300" height="225" />

I liked their logo. Quite simple and intutive.

<a href="http://amit-agarwal.co.in/wordpress/wp-content/uploads/2008/11/2.jpg"><img class="size-medium wp-image-271" title="Foresight Foreground" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/2-300x225.jpg" alt="Foresight Foreground" width="300" height="225" />

Logo goes quite well with the Foreground image. Both are same in color and hence it gives you a feeling of theme and not just ramdomly selected foreground.

Continue reading

SendEmail using perl script in Windows or Linux using any SMTP account.

2010-05-16 1 min read Linux

Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/email" rel="tag">email, <a class="performancingtags" href="http://technorati.com/tag/sendEmail" rel="tag">sendEmail, <a class="performancingtags" href="http://technorati.com/tag/Perl" rel="tag">Perl

There is a very nice little utility or rather SMTP client program called sendmail (<a href="http://caspian.dotconf.net/menu/Software/SendEmail/">Link — http://caspian.dotconf.net/menu/Software/SendEmail/).

This can be used in Windows or Linux or any other OS with perl installed and few other perl modules installed. Its quite easy to use and comes in quite handy to send emails.

In later posts we will see how we can use this in various ways : sending mail from your browser, from your editor or even from the command line or shell script.

Continue reading

Downloading all related videos from youtube with youtube-dl

2010-05-16 2 min read Fedora Learning Linux Uncategorized

How many time did you want to see all the videos (related) to the one you were watching on youtube but decided otherwise as the downloaded was not fast enough. Or has it happened to you that you wanted to <a class="zem_slink freebase/en/uploading_and_downloading" title="Uploading and downloading" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uploading_and_downloading">download all the related videos, in either case you can use the youtube-dl utility I blogged about some times back. First you need to get all the <a class="zem_slink freebase/en/uniform_resource_locator" title="Uniform Resource Locator" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL&#8217;s in a <a class="zem_slink freebase/en/text_file" title="Text file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Text_file">text file, and the simplest way to do this is :

Continue reading
Older posts Newer posts