Tuesday, July 29, 2008

Working with DVD/CD Images in Linux

PowerIso is a cool utility to decompress/Change format of .daa .iso images. I tried it on 2.4GB file and it worked cool for me

PowerISO Download site (http://www.poweriso.com/download.htm)

Installation Command
 tar -xvf poweriso.tar.gz
 sudo cp poweriso /usr/bin
 sudo chmod 755 /usr/bin/poweriso

Simple convertion command (.daa to .iso)
  poweriso convert input.daa -o out.iso -ot iso

Mounting ISO Images to folder
 sudo mkdir /mnt/test
 sudo mount -o loop -t iso9660 out.iso /mnt/test

Friday, July 18, 2008

Creating USB Minix Key

Finally i succeded in creating USB Key containg Minix3.
Steps are simple

  1. Download the USB Key image from Minix Download Section
  2. Next determine the USB device.
     lshw -class storage
     df -k

  3. Use fdisk to format USB Key in Linux Primary format.
     sudo fdisk /dev/sdb

  4. Use "dd" to make a raw copy of the Image downloaded.
     sudo dd if=usb_image-3.1.2a of=/dev/sdb bs=1024

  5. Next Reboot your computer and select "USB Device" to boot from.



Last step is kinda luck, depends if your BIOS allows booting from USB Device. If Not all other step goes in vain :).

Thursday, July 17, 2008

Networking (Host Interface) in xVM

All those who use Sun Virtual Machine (xVM) to run guest OS over Ubuntu (esp XP) and trying very hard to achieve proper network setup, then you are at the right place. I will show you how to give your guest OS proper native network setup.
Sun VM supports 4 kinda Network Adapter

  1. Not Attached (behaves as network cable is un-pulgged).

  2. NAT (Good if you want to sruf web and download coontents, not much communication with host OS).

  3. Host Interface (Provides almost real network adapter kinda support).

  4. Internal Network (Some kinda secure and fast stuff as per document).



We will use Host Interface to achieve our network structure.

Software requirement:

  • Bridge Utility
    apt-get install bridge-util

  • Uml Utility
    apt-get install uml-utilities 



Next provide the access right to the tap0 device

sudo chmod 0660 /dev/net/tun
sudo chgrp vboxusers /dev/net/tun


Next create the tap0 device
sudo tunctl -t tap0 -u  


Now create scripts files to control Starting/Stopping the tap0 interface

StartTap0.sh
 
#!/bin/sh
gksu brctl addbr br0
gksu ifconfig eth0 0.0.0.0
gksu brctl addif br0 eth0
gksu ifconfig $2 0.0.0.0
gksu brctl addif br0 $2
gksu dhclient br0



StopTap0.sh
 
#!/bin/sh
gksu brctl delif br0 $2
gksu ifconfig eth0 down
gksu ifconfig $2 down
gksu ifconfig br0 down
gksu brctl delif br0 eth0
gksu brctl delif br0 $2
gksu brctl delbr br0
gksu ifconfig eth0 up



After the scripts are ready open xVM and navigate to network adapter tab, Set the following config.




  • Attached to : Host Interface

  • Interface Name : tap0

  • Setup Application : ~/StartTap0.sh

  • Termination Application : ~/StopTap0.sh






All set just boot up the guest OS, fill in the password and enjoy full fledge network. At Guest OS Network adapter will only take static IP, remember to set it to something under the same subnet mask. Thus enjoy complete Network (lets play). :D


Sunday, July 6, 2008

Banshee (Removing library entries)

In case you use Banshee (Music player) and trying to remove 1000 or more songs, then you are in serious trouble. Banshee got some issues with banshee.db query string, ie while performing this operation it overflows raising exception. Still Banshee being a reliable player quiting it is not an option. So here's a way to remove the complete lib in jiffy.


cd ~
cd ./.config/banshee
ls
banshee.db covers plugins
mv banshee.db banshee.db.old


That's it, you have moved Banshee library nowhere but to something that banshee will never use.

Caution:
You need to import all your songs again on Banshee, still its better than deleting individual files.

Friday, July 4, 2008

Allah Updesh!

Sad but true!
Every once in our monotonous life, exceptions happen to make us ponder. Perhaps we wonder on stuffs that are materialistic and meaning-full to our existence in general, but mind being a wanderlust demarcates no boundaries. Well something of that sort happened, no not to me but to that day cab driver.

But triggering such offset thought need a very strong initializer, so here the catalyst - A drunk person. The catalyst come's to the cabbie and pleads "will you drop me at kottagurad,PLEASE". God man! he was all smelling like a bloated sausage filled with alcohol but he had the courtsey to say "Please" in a tone too childish and very frank. Cabbie replied in a jiffy saying NO!

But that's the beginning of the churning of thought process for him. He would have never spoken a work except "kaha jana hai?" while he was going to gimme a "Allah Updesh". Well here was a chain of thought going in his head, started instantly by quoting "Dost bhi bula raha tha pine ke liye, bola pe le kisi ko nahi pata chalega (friend asked him to drink, saying no one will get to know)" and more blah vlah saying never drink while driving, never drink when on duty...but then he realized something so true and so pure that i could sense his guilt.

The guilt was subtle "he failed to help a fellow human". He though maybe he could have dropped the person and helped him reach his destination. With a blaze verses of Quran hit him like stone, to help all is broken, he had sinned. How should he repay.

Here is his Updesh log:
"Insaan, Insaan se door jaa raha hai, saala koi parwah hi nahi hai. Jab saab ek hi aadam se paaida hue thab kya hua ki insaan insaan ko pyaar nahi karta. Ussi ko pyaar karna jo risthey mein aate, same type ke hote. thoda alag wale ko cut le kahte. Insaan ko koi padwah hi nahi ki koi jeeta ya marta hai"

"kya ho jata agar us piyakkar ko kottahguda tak le jata, par nahi insaan ab aisa kar hi nahi sakta, usko toh wahi chahiye jisse usko fayeda ho. kabhi nahi soochete ki saab bhai bahen hai. Waise toh galat koi nahi hoota par kaun toop ban gaya hai paise kamake, kitna bhi itoop ban jaao akhir mitti le jaati hai. Bachta hai insaniyat. Jo aapne doosro ka bhala kiya wahi rahta hai".

Next was unexpected but directed towards to me (IT professionals and other earning educated people)
"Waise sir aap bhi dekho na aapme ek baat hai, ek IT hai jisse aap paisa kamate hai, safal hote hai. Aaapke maa baap ne lakho kharach kar aapko honhaar banaya soo aap bada ban sako. Koi kaam de to usko pura kar sako. Par kya aapne us hunar ko kisi gareeb ko baatne ka soocha. Nahi paisa nahi kisi gareeb ko sikhane ki koshish jisse woh bhi kuch kar sake?? Galti aapki nahi Insaan ki hai. Usse doosre Insaan se pyaar hi nahi hai, maddath ku karega"

Cab screeched only to break me from my lessons. Well post hearing i had to still shake myself. Did i really listen to what he said??. I am now wondering.

Ends Allah Updesh.

Wednesday, July 2, 2008

Living with Ubuntu on Dell Inspiron 1525 (Post install life)

Well as Dell shipped my Inspiron 1525, the first notion in my head was i paid 5K for a crappy Vista. Being a hard core fan of linux & owner of pre-historic pentium4 desktop, i always thought so. But with all my guts and conscience i will be saying "Vista Rocks". Well not really on scale of performance and all, but looks are real beauty. I never found any distribution more beautifull that Vista. Vista ran on my Dell Inspiron like a bull, with 4GB of RAM at its disposal it satisfied itself with 1.5GB usage at normal working condition. Also Dell installed Media direct, real crappy stuff for a developer like me.

But then thats it, 2 hours of discovery and its done. i dont need the vista (for which i paid 5K) anymore. But it did serve the purpose of browsing website and helping me choosing the first linux distro that gonna run over my laptop. After much search i found Dell has official support for Ubuntu (after cursing why this service not available in india) so i settled for Ubuntu ( a distro i longed for long). Amazingly my friend had the Ubuntu 8.04 CD burned and ready for me. I popped in the CD and off goes ubuntu, detecting every possible hardware. Glad i decided this penguin to be my pet.

Amazingly Dell had crapped my HDD by 20GB, i decided to clean all stuff. Took the Vista CD, formatted all the partition, installed Vista over a 50GB partition. Popped Ubuntu again and installed it from Live CD. Thats it. Ubuntu Installed. Every piece of art started churning to live.

But as i have experienced for 3 years, linux make you search. Well ubuntu is great as software installation is not a problem, just apt-get it. But once i upgraded to 2.6.24-19-generic kernel problems propped from thin air. So here's the list of problems and my solution.

My hardware config (in case you are interested)


sudo lshw -short -sanitize
H/W path Device Class Description
==========================================================
system Inspiron 1525
/0 bus 0U990C
/0/0 memory 64KiB BIOS
/0/400 processor Intel(R) Core(TM)2 Duo CPU T5850 @ 2.16GHz
/0/400/700 memory 32KiB L1 cache
/0/400/701 memory 2MiB L2 cache
/0/400/1.1 processor Logical CPU
/0/400/1.2 processor Logical CPU
/0/1000 memory 4GiB System Memory
/0/1000/0 memory 2GiB DIMM DDR Synchronous 667 MHz (1.5 ns)
/0/1000/1 memory 2GiB DIMM DDR Synchronous
/0/100 bridge Mobile PM965/GM965/GL960 Memory Controller Hub
/0/100/2 display Mobile GM965/GL960 Integrated Graphics Controller
/0/100/2.1 display Mobile GM965/GL960 Integrated Graphics Controller
/0/100/1a bus 82801H (ICH8 Family) USB UHCI Controller #4
/0/100/1a.1 bus 82801H (ICH8 Family) USB UHCI Controller #5
/0/100/1a.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #2
/0/100/1b multimedia 82801H (ICH8 Family) HD Audio Controller
/0/100/1c bridge 82801H (ICH8 Family) PCI Express Port 1
/0/100/1c/0 eth0 network 88E8040 PCI-E Fast Ethernet Controller
/0/100/1c.1 bridge 82801H (ICH8 Family) PCI Express Port 2
/0/100/1c.1/0 network BCM4312 802.11a/b/g
/0/100/1c.4 bridge 82801H (ICH8 Family) PCI Express Port 5
/0/100/1d bus 82801H (ICH8 Family) USB UHCI Controller #1
/0/100/1d.1 bus 82801H (ICH8 Family) USB UHCI Controller #2
/0/100/1d.2 bus 82801H (ICH8 Family) USB UHCI Controller #3
/0/100/1d.7 bus 82801H (ICH8 Family) USB2 EHCI Controller #1
/0/100/1e bridge 82801 Mobile PCI Bridge
/0/100/1e/9 bus R5C832 IEEE 1394 Controller
/0/100/1e/9.1 system R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
/0/100/1e/9.2 system R5C843 MMC Host Controller
/0/100/1e/9.3 system R5C592 Memory Stick Bus Host Adapter
/0/100/1e/9.4 system xD-Picture Card Controller
/0/100/1f bridge 82801HEM (ICH8M) LPC Interface Controller
/0/100/1f.1 scsi3 storage 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
/0/100/1f.1/0.0.0 /dev/cdrom disk DVD+-RW TS-L632H
/0/100/1f.2 scsi0 storage 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
/0/100/1f.2/0.0.0 /dev/sda disk 250GB WDC WD2500BEVS-7
/0/100/1f.2/0.0.0/1 /dev/sda1 volume 70MiB Windows FAT volume
/0/100/1f.2/0.0.0/2 /dev/sda2 volume 50GiB Windows NTFS volume
/0/100/1f.2/0.0.0/3 /dev/sda3 volume 30GiB Windows FAT volume
/0/100/1f.2/0.0.0/4 /dev/sda4 volume 152GiB Extended partition
/0/100/1f.2/0.0.0/4/5 /dev/sda5 volume 50GiB HPFS/NTFS partition
/0/100/1f.2/0.0.0/4/6 /dev/sda6 volume 60GiB HPFS/NTFS partition
/0/100/1f.2/0.0.0/4/7 /dev/sda7 volume 20GiB W95 FAT32 partition
/0/100/1f.2/0.0.0/4/8 /dev/sda8 volume 86MiB Linux filesystem partition
/0/100/1f.2/0.0.0/4/9 /dev/sda9 volume 972MiB Linux swap / Solaris partition
/0/100/1f.2/0.0.0/4/a /dev/sda10 volume 21GiB Linux filesystem partition
/0/100/1f.3 bus 82801H (ICH8 Family) SMBus Controller
/1 power DELL RN87384
/2 wlan0 network Wireless interface


Amazingly post installation sound went bloop. So just update alsa for the new kernel.


sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa


Next was 3D Cube, just open config manager and set cube (also add 4 workspace to get cube effect)

compizconfig-settings-manager


Next came the wireless adapted (LED stopped blinking)

apt-get install linux-backports-modules-2.6.24-19-generic


Next install some cool player, along with their codecs

apt-get install banshee*
apt-get install mplayer*
apt-get install xine*
apt-get install gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad-multiverse
gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg libxine1-ffmpeg libdvdread3


Started banshee found the media button (play/pause/stop/next/back) are working cool but volume button are screwed. Fix is simple, goto System>Preference>Sound Set the Default Mixer Track to the one which works for you. Here's the one i set.


Fortunately every other stuffs working cool, so i am happy this posts not dragging more. Any more issues found/resolved will be appended for you (me).