Friday, January 7, 2011

Labels: , , ,

utorrent is the most popular bittorrent client around - and there is a linux version available. So, when I searched how to set up utorrent in ubuntu, I was taken aback by the results I found - almost all the posts were to use wine to run windows version of utorrent in linux!!
Thats absurd, if not why have utorrent taken the effort to build a version for linux?
When I finished setting up utorrent, and strated downloading I couldnt believe how simple the whole process was.. All it took was
1. Download the linux version of utorrent from http://www.utorrent.com/downloads/complete?os=linux
2. Go to the dowload folder (lets say home/Downloads). You will find the downloaded tar file - utorrent-server-3.0-23418.tar.gz
3. Extract the tar file, for that right click on the tar file and choose Extract here.

4. Go to the folder utorrent-server-v3_0 created. You will find 1 folder and 2 files - docsutserverwebui.zip


5. Double click on utserver and a configuration file settings.dat will be created and the utorrent server starts up. 

6. Now open a webbrowser and go to the url http://localhost:8080/gui/ to get the gui for utorrent.

Tuesday, January 4, 2011

Labels: , , , , , ,


People who had used windows all their life and are starting to try out various linux distros have always missed some of the windows applications they had used, eventhough better replacements are available for linux. This is a nice demonstration of how u can use wine to run windows application on your linux machine.

Sunday, January 2, 2011

Labels: , , , ,


After ubuntu released wubi for people who were "afraid" to touch their hard disk partitions, but wanted linux, many had tried ubuntu installing it inside windows. Once they are comfortable with ubuntu, they start thinking of moving ubuntu to a seperate partition. But, how can it be done without losing all their information and data in the current ubuntu installation? 
That is answered here..

These are the steps required to migrate a wubi 9.10, 10.04 or 10.10 install to partition (grub2 only). The first part shows how to do a manual migration, and the second how to use the attached script to do an automated migration.

The partition(s) must be created already - there are plenty of guides on how to do this.

Manual migration (see below for automated migration)

This example assumes the new install will be on /dev/sda5 and that there will be a swap on /dev/sda6. If there is no swap, just ignore lines containing /dev/sda6. If there is a swap partition it must be of type 'swap'. Change the device names as appropriate.

1. Do this all as root
Code:
sudo -i
1.a. Ensure you do not have grub-legacy. If the output of the following shows version 0.97 then please do not continue. These instructions only work with grub versions 1.96 and greater.
Code:
grub-install --version
2. Format new partition if not done so already - make sure it's empty, large enough and unmounted
WARNING -- the next command will wipe all existing data on /dev/sda5
Code:
mkfs.ext4 /dev/sda5
3. Mount new partition and copy files. 
Code:
mkdir /tmp/wubimove
mount /dev/sda5 /tmp/wubimove
rsync -av --exclude=/host --exclude=/mnt/* --exclude=/home/*/.gvfs --exclude=/media/*/* --exclude=/tmp/* --exclude=/proc/* --exclude=/sys/* / /tmp/wubimove
chmod -x /tmp/wubimove/etc/grub.d/10_lupin
4. Setup swap partition and enable hibernation (swap must be at least as big as RAM to hibernate)
Code:
mkswap /dev/sda6
echo "RESUME=UUID=$(blkid -o value -s UUID /dev/sda6)" > /tmp/wubimove/etc/initramfs-tools/conf.d/resume
5. Edit fstab (blank out wubi mounts with sed and add new partitions)
Code:
sed -i 's:/.*[\.]disk .*::' /tmp/wubimove/etc/fstab    
echo "UUID=$(blkid -o value -s UUID /dev/sda5)    /    ext4    errors=remount-ro    0    1" >> /tmp/wubimove/etc/fstab
echo "UUID=$(blkid -o value -s UUID /dev/sda6)    none    swap    sw    0    0" >> /tmp/wubimove/etc/fstab
6. Remove lupin support and update grub (all in chroot). Note that this step installs the grub bootloader to /dev/sda and will replace your windows bootloader (the line 'grub-install /dev/sda') -- see note below
Code:
mkdir /tmp/wubimove/host
for i in dev proc sys dev/pts host; do mount --bind /$i /tmp/wubimove/$i; done
chroot /tmp/wubimove
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
apt-get -y remove lupin-support
update-grub
grub-install /dev/sda
rm /sbin/initctl
dpkg-divert --local --rename --remove /sbin/initctl
exit
for i in host dev/pts dev proc sys; do umount /tmp/wubimove/$i; done
rmdir /tmp/wubimove/host
umount /dev/sda5
7. Update wubi grub menu to pick up new install and exit sudo
Code:
update-grub
exit
You're done. When you reboot, you should see a grub menu instead of the windows boot menu. Select the first entry. If you didn't run 'grub-install' you can boot from the wubi menu, select your new install from the bottom after the Windows entry.

NOTE on installing the grub bootloader: you can try out the new installation by booting it from the wubi grub menu first - if you want to make sure everything is working before replacing the windows bootloader. To do this, bypass the line 'grub-install /dev/sda' (in step 6.). You can then install the grub2 bootloader manually later after booting into the new install.
I also recommend updating the grub menu after booting into the target partition
Code:
sudo update-grub
Automated migration

I have attached a parameter driven script that does the above with additional validation e.g. checks the target partition is big enough and empty etc.

Usage instructions:
Code:
bash wubi-move.sh --help
To migrate wubi to /dev/sda5 without swap
Code:
sudo bash wubi-move.sh /dev/sda5
To migrate wubi to /dev/sda5 with swap on /dev/sda6
Code:
sudo bash wubi-move.sh /dev/sda5 /dev/sda6
If you don't want to install the grub bootloader i.e. you want to leave the windows bootloader in place, use the --no-bootloader option. In this case, you can boot the new install using the wubi menu, and will have to manually install the grub bootloader later.
Code:
sudo bash wubi-move.sh --no-bootloader /dev/sda5 /dev/sda6

Warning - while I have tested this numerous times and every attempt has been made to ensure there are no bugs, use it at your own risk.

Please note - it takes some time to copy all the data from wubi to the target partition. e.g. on my computer it takes about 5-10 minutes for a small install (5GB).

Known issues:
1. For some reason, running "update-grub" in the chroot doesn't pick up other linux installations on the same drive (same running the script or manual commands listed above). This is unlikely an issue for wubi users. Run sudo update-grub after booting the new install for the first time.
Attached Files
File Type: shwubi-move.sh (12.9 KB, 296 views)

Labels: , , , , , , ,

Connecting to internet using mobile phone as modem is easy from windows XP. The manufacturer provides you with the softwares required for windows - all that was required is to install the software and run the application. But when it comes to Linux, the whole picture changes. There is no default software from the manufacturer, there is no other third-party applications available.


Most of the linux users, like me gave up linux when they faced this. I had searched the net for days (months maybe), but got nothing valuable - there is always the geeky way, setting up wvdial/kppp running commands from 'terminal'. But, when I found out that all these were not required, everything needed to setup the connection was just a few clicks away - I felt a fool of myself - for not taking the effort to look for it. It even has all the mobile sevice providers details for each country with the access point names (APN), for which we had to call the customer care earlier!!!.


I tried this with Ubuntu 10.10 and nokia 6300, but Iam sure this works for all other linux OS and mobile phones.
This is what is to be done.


Step 1: Go to System -> Preferences -> Network Connections. The below screen pops up.



Step 2: Select the tab "Mobile Broadband". Click "Add"


Step 3: In the screen that opens, your mobile phone model is shown. Click "Forward" if the model shown is correct or select the correct model and click "Forward".


Step 4: The next screen asks you to select the Service Provider's Country. Select the country and click "Forward".




Step 5: The next screen lists the service providers present in the country selected in previous step. Select your service provider  and click "Forward".



Step 6: The data plans available for the selected service provider is listed along with the plans APN. Select the plan you have subscribed to and click "Forward".


Step 7: The settings you have selected is shown. Click "Apply" to confirm the settings.



Step 8: In the next screen enter the dial up Number, Username, Password of the connection. Also give a suitable name for the connection in "Connection name" and then click "Apply".


Step 9: You are done with the setup. The Network Connections screen now shows the new connection under the tab "Mobile Broadband".


Step 10: To connect to the internet, click on the Connection icon in the toolbar and select your connection from the drop down list.