Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, October 17, 2008

Ubuntu - Auto mounting HDD at boot

After fidlling lot with Ubuntu finally here the sequence to auto mount HDD partitions and make them behave properly.

1. Open /etc/fstab. Add these lines.
 
/dev/sda2 /media/Vista ntfs-3g defaults,user,exec,uid=1000,gid=100,umask=000 0 0
 /dev/sda3 /media/SOFTWARE vfat defaults,user,exec,uid=1000,gid=100,umask=000 0 0


2. Make the corresponding directories in /media ( remember to mount the HDD partitions in the /media not the traditional /mnt else Ubuntu wont show it as HDD ).

3. Test the fstab success
 sudo mount -a


4. To find all the drives entries use fdisk or blkid
 sudo blkid


That's it, next reboot all partitions will be auto mounted.

Saturday, October 11, 2008

iMac defeated

Finally tweaked ubuntu to defeat the display superiority of Mac. It aint so easy since Ubuntu is as ugly as anything can be. Unfortunately connonical didnt realize that users "look" at the monitor, so looks should be pleasant. But no big deal, not everything should be done by them lets fix it.

Simply install avant-window-manager and conky to get the look.

Installation guides.
http://www.quicktweaks.com/2008/04/11/three-little-things-to-make-your-ubuntu-desktop-beautiful-and-productive/
http://www.quicktweaks.com/2008/09/27/gmail-weather-beauty-right-on-your-ubuntu-desktop/

For Mac-user's envy here's the screenshot.

Mplayer

Well sometime linux can be frustrating and when it comes to mplayer nothing can me more worse. After lots of head banging i found a simple and elegant way to do it. Simply type in the following commands and mplayer will be up n running.

1. Add mplayer repositories. For that open /etc/apt/sources.list and augment these two line.
 deb http://archive.ubuntu.com/ubuntu dapper multiverse
 deb-src http://archive.ubuntu.com/ubuntu dapper multiverse


2. Run these two commands.
 sudo apt-get update
 sudo apt-get install mplayer


3. Run Mplayer, If all goes fine you can have a gala time. But for it was not so. Mplayer took lots of loading time while disabling screensaver. I read that a conflict b/w comfiz and mplayer. So simply goto mplayer>right click>preference>misc and uncheck "Disable screensaver" stuff.

4. In case mplayer not finding video out device. open ~/.mplayer/config and search for line "vo".
Simply add the output device name like xv. Finally your mplayer conf should have something like "vo=xv". To list all supported device type `mplayer -vo help` that will list you out all the option..
 mplayer -vo help


5. Worst, mplayer's got dumb. Simply mplayer>Right click>preference>Audio Tab select "pulseAudio".

Hope this helps

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

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


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).