Sunday 31 July 2011

simple way to install ubuntu 11.04

First of all ensure u have at least 20 GB of space free in ur hardisk(free means unallocated memory)

Once u do that reboot ur system and boot the ubuntu cd from the boot option or change boot preferences from the BIOS.

Once your BIOS is configured to boot from CD first, if you have Ubuntu in the drive, you should see the splash screen with a ubuntu written on it. Ubuntu will take a couple of minutes to load up. Just be patient.

Select your preferred language.
If you have at least 512 MB of RAM, you may want to select Try Ubuntu, as it will allow you to do other things (check your email, browse the web) while you're installing Ubuntu.
If you have only 256 MB or 384 MB of RAM, you should select Install Ubuntu. This will give you the same installation screens you see below, but you won't have the rest of the Ubuntu live session running as well.
Select your language.
There is a new option in the Ubuntu 11.04 and 10.10 installers that asks if you want to install closed source third-party software for MP3 playback and Flash, for example. I would strongly suggest—unless you know who Richard Stallman is—that you check (or tick) this option.
If you want to install Ubuntu next to Windows so you can choose which operating system you want at boot-up, select the first option. As mentioned before, do this only if you don't anticipate even a small possiblity of returning exclusively to Windows. A traditional dual-boot can be undone but it's not easy.
This is how u do it go to advanced option
Now make four partitions out of 20 gb free partition(if u have free space in extended partition choose partition type as logical)
One for boot with
Mount point as /boot
Filetype as Ext3
And size 300 MB
Next for root (where all system files are stored)
Mount point as /
Filetype as Ext3
And size 7 GB
Then for home directory( where ur main data is stored)
Mount point /home
Filetype Ext3
And size 9GB
Then for swap(ie for memory requirements)
No mount point
File type swap
Size 4 GB
While Ubuntu is preparing files to copy over for installation, it'll ask you some questions. They're self-explanatory.
Eventually, the installation will finish (the whole thing can take anywhere between 15 minutes and an hour, depending on the speed of your computer). You can either Continue Testing if you want to shutdown your computer or Restart Now if you want to restart your computer.
Either way, Ubuntu will eject your CD (or prompt you for when to remove your USB stick, if you used UNetBootIn instead of a CD burning program). The next time you boot up, you should have a working Ubuntu installation!

Saturday 30 July 2011

Making a backup of your Linux distribution using Remastersys (described for Ubuntu)

  1.  Open Ubuntu software Center 
  2. Select software sources from the edit menu 
     3.  Add the below repository in the software source
          deb http://www.geekconnection.org/remastersys/repository remastersys/ 
     4.       Close the software sources. 
     5.       The Ubuntu Software center will automatically refresh the list 
     6.       Now type in “remastersys” and select install 
     7.       After it installs open it from the menu it would be in administration 
     8.       If it is not found make it visible from the edit menu option when u right click on start menu 
     9.       Now got to customize option and set all the values as per ur requirements like name and all that 
     10.   Now select make a data backup and make a iso of the whole system 
     11.   This will create an iso for u 
     12.   Make a bootable pen drive using ubuntu startup disk creator 
     13.   And enjoy your new bootable pen drive contains your current state of your distribution

Friday 29 July 2011

Installing Softwares in Ubuntu


There are several ways of doing so
1.       Through ubuntu software center
a.       Search for the repositories(these are the locations where packages are present) in google.
b.      Add the repository in the software sources that is present in Edit -> Software sources.
c.       Copy the repository in the sources list.
d.      Update the software sources.
e.      Now type in the software name in the search box of the software sources.
f.        Click on install button and your software is installed.
g.       If u don’t see your software go to start menu right click on it , go to edit menu and check in the software from there.
2.       Through the Terminal using apt get
a.       Repeat the steps a to d from the previous steps.
b.      Now go to terminal.
c.        Now write the following code
apt-get install <package name>
d.      For resolving dependencies

apt-get install -f <package name>

e.      And your software is installed.
3.       Through terminal using debian packages (having extension .deb)
a.        Repeat the steps a to d from the previous steps.
b.      Now go to terminal.
c.        Now write the following code
dpkg install <package name>
d.      If it shows dependencies for the software(ie. Some more supporting file like lib files are need use this statement instead

dpkg install –f <package name>

e.      And your software is installed.
4.       Through terminal but using source files
a.       Download the source files from the net
b.      Most softwares  come with a readme file which defines the kind of commands it supports
c.       These are few set of commands
                                                               i.      Make
1.       Go to the source directory
2.       Then type in the following commands
make
make install

                                                             ii.      Cmake
1.       Go to the source directory
2.       Then type in this command
cmake

Monday 25 July 2011

Share Ur Ubuntu Desktop using Remote desktop using VNC

Remote Desktop will only work if there’s a GNOME login session.Leaving your computer with an unattended GNOME login session is not secure and not recommended.
Some Tips
1) You can lock your screen using System--->Quit

Once you click on quit you should see the following screen here you need to select lockscreen

2) switch off your monitor when computer is left unattended
Configuring Remote Desktop
First you need to go to System -> Preferences -> Remote Desktop

Once it opens you should see the following screen

In the above screen you need to configure remote desktop preferences for sharing and security
For Sharing
you need to tick the box next to the following two options
Allow other users to view your desktop
Allow other users to control your desktop
For Security
you need to tick the box next to the following two options
Ask you for confirmation (If you tick this option some one need to click on allow from remote desktop once it connected if you don’t want you can untick this option)
Require the user to enter this password:
Password: Specify the password

Connecting from Ubuntu Machine
Open your terminal from Applications--->Accessories--->Terminal and enter the following command
vncviewer -fullscreen 192.168.2.23:0
now you should see the following message asking for password enter the password after complete success you can see VNC authentication succeeded message and starting remote desktop
VNC viewer version 3.3.7 - built Jul 4 2006 10:04:48
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.7 (viewer 3.3)
Password:
VNC authentication succeeded
If you want to quit vncviewer
Press ‘F8′ and select Quit viewer
Connecting from Windows machine
If you are trying to connect from your windows machine you need to install vncviewer of your choice i have installed from here http://www.realvnc.com/download.html.Install this program once you install this you can opem from start--->All programs--->RealVNC--->VNC Viewer 4--->Run VNC Viewer once it opens you should see the following screen here enter the remotemachine ipaddress:0 format and click ok

Now it will prompt for password enter your password and click ok

Now on the remote machine you should see the following screen asking for permission to allow this connection you need to click on allow this will comeup only if you tick “Ask you for confirmation” option under sharing

Once it connected you should see the remote machine desktop.

Thursday 14 July 2011

making Ubuntu 10.4 Fast by loading it to ram

What this guide will try to accomplish

The guide basically explains how to create a squashfs image out of your existing Ubuntu installation and copy the entire image to RAM upon boot to speed up your OS. I will also go into some detail of how to make your /home mount from a regular hard drive thereby making sure the important information one would wish to save on their machine would remain untouched between boots.

A little history

I have always been fascinated with the idea of speeding up an OS by the non-conventional way of providing a faster medium from which it runs. I call this non-conventional because I use to think (and I believe many people still do) that just by buying faster and faster processors that my computer would keep speeding up more and more. Although this is the case to some degree, after purchasing my QX9650 a few years back and not seeing as much of a difference as I would have hoped, I realized there had to be something else that was slowing my computer down.

That's when I found out about SSDs. I've read much about them, and finally a few months ago got my first SSD - an X25-M 160GB Intel SSD. Installing my Windows 7 on it, I realized how insanely fast this made it run. Everything just seemed to open instantly. All my games loaded instantly. This was what I had been looking for to speed up my OS.

Unfortunately the downside of this was that the speed of my Windows 7 now made my Ubuntu 10.04 feel slow. The first thought that came to mind was of course to create another partition on the large, 160GB SSD and move my Ubuntu there. In order to maintain the SSD's fast speeds however, TRIM was required. TRIM is something that keeps an SSD running at its top speed. Without it, an SSD will slowly slow down while being used. TRIM is built into Windows 7, so I had no problems with my SSD in Windows, but, from what I've read, TRIM did not make it into the kernel Lucid uses by 1 day.

I had a choice here. I could either find the patched kernel that included TRIM support, and replace my existing kernel with it (messing with the kernel is something I've never done as I've never had the need to), or I could take the opportunity to make my Ubuntu work even faster than the SSD could allow.

One of the first Linux distributions I tried was knoppix. Knoppix had (and probably still does) an amazing feature called "toram". The way you would use this is simply add the string "toram" to the boot line when knoppix was starting from the cd and the entire knoppix CD would be copied into your RAM before being run. Now even though this took a while (about a minute in most cases), the advantage to this was that this made knoppix run insanely fast. Which brings me to the reason why you would want to do this:

Why do this?

Looking at the DDR2 page of wiki, it is clear the advantage RAM has over regular hard drives. Something as cheap as DDR2-533, something you could easily obtain an extra 1 GB of for about $30, has roughly a speed of 4266 MB/s. Compared to a regular 100MB/s hard drive, that's 42 times faster. If you have a slightly more expensive system that supports faster RAM (I have 6GB of DDR2-1066 RAM), the speed of the RAM can be up to 8533 MB/s. Imagine every file your operating system requests to read or write being served up at that speed!

Who should do this?

What this will do is basically remove (or at least significantly decrease) the conventional hard drive as a bottleneck for computing. That means your processor will likely be the next in line to be the bottleneck. If you have a slow processor (anything below dual core I would imagine) than this will likely not help you as your processor won't be fast enough to take advantage of the speed increase and the trouble of setting this up and maintaining it would not be worth the slight (if any) increase in performance.

You also need enough RAM to pull this off. I would guess that you would need at least 2GB 3.5GB to fit the entire Ubuntu Lucid 10.04 OS into your RAM and have RAM left over to work with. As RAM is cheap these days, this should not be too much of a problem for most people. I have 6GB so I've had no problems running out so far and do not plan to have any in the future. You could of course use less RAM (eg 2GB), but that would require you to keep a close eye on your free space, or remove packages from Ubuntu that you do not use to decrease its size (like Open Office). If you are curious why the sudden change from my initial estimates, this is mainly due to the recently discovered inaccuracy of System Monitor in telling the used/free RAM. See the "Possible Reason for Slowdown" section of this howto at the bottom for more info.

You will also need at least an intermediate knowledge of linux. A beginner might be able to do this with a little reading into the concepts being used here but will more than likely get lost.

Lets Begin

The following is an almost word for word copy and paste of capink's original post (link above). This is because many of the steps he wrote about in 2008 are still relevant today. To keep this from being half quotes and half not quotes, effectively destroying formatting, I will not put the sections that came from him in quotes. I will however make them red, while my additions will be black.

The main idea and the general principles are similar to the original wiki on how to boot Ubuntu to RAM (https://wiki.ubuntu.com/BootToRAM). But this guide has some differences to the original wiki:

1. Rather than using a live CD, we will use the system installed on your harddisk as the basis of the image we will create.
2. This guide uses live-initramfs instead of casper. This is because live-initramfs is present in both Ubuntu and Debian so that guide can serve wider audience. For those who want to use casper instead it should work the same but I have not tested it, you will just need to replace live-initramfs with casper and /live with /casper.
3. No editing of the boot scripts as live-initramfs introduced an option to boot from ram automatically.
4. Unlike the method of the original wiki, using this method all your partitions are going to be mounted automatically exactly as they are mounted when you boot your normal system, with the exception of the root partition.

Note: Since the system is going to be copied to RAM, the boot process takes slightly longer time. For those of you with an SSD, I will explain how to copy the image to a partition on the SSD to speed this up a bit.

N.B This guide works only for Ubuntu gutsy and Debian lenny or later. I have tested this only with Ubuntu Lucid 10.04. You may need to modify a few things to get it to work with other versions of Ubuntu.

NOTE: Although I will cover a way to make the data on your desktop and in your home folder (the entire /home) remain after a reboot, anything you install or configure (with a few exceptions) will be lost after a reboot! This guide also deals with partitioning your disks and formatting them. This can also destroy data if not done carefully. Proceed with caution.

Requirements

Enough RAM. How much depends on the size of the squashfs image we are going to create from the installed system. A system that is 1.5 G in size will create roughly a 500 M squashfs. Since this 500 M is going to be copied to RAM, your RAM must be larger than 500 M, at least by an additional 256 M of RAM (Amount of RAM required = squashfs size + at least 256 M). But to work comfortably in the previous scenario it is recommended to have 1 G or more of RAM.

If you have a swap partition (which you should since you already have a copy of Ubuntu installed), The system will fall back to it when the RAM gets full. But this will severely limit the speed of the system which defeats the purpose of this guide.


You also need enough harddisk space. At least double the amount taken up by your system.

Note: A command to know how much space is taken up by your system:

sudo du -hcs --one-file-system / --exclude=/dev/* --exclude=/tmp/* --exclude=/sys/* --exclude=/proc/* --exclude=/home/*

The process:


1. Install some essential packages:

live-initramfs is present in the universe section of the repository. You must first enable universe repository before attempting to install the package. Here is guides to enable universe (Ubuntu GUI (https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096), Kubuntu GUI (http://linux.about.com/od/kubuntu_doc/a/kubudg22t04.htm), CLI (https://help.ubuntu.com/community/Repositories/CommandLine#head-e1a24b1b2037f68b5a95f54388582b58ea4c9bd0)).

sudo apt-get update

sudo apt-get install live-initramfs squashfs-tools


Note: the 'linux-ubuntu-modules-$(uname -r)' from capink's guide can no longer be found in the Lucid repos and is not necessary, so it has been removed.
Also, if you have casper installed, you may have to remove it for live-initramfs to install properly (thanks to CarloMagno for the tip).

If you run into problems (especially in Jaunty) where apt exits with a message similar to:

update-initramfs: Generating /boot/initrd.img-2.6.28-19-generic
cpio: ./bin/udevinfo: Cannot stat: No such file or directory
update-initramfs: failed for /boot/initrd.img-2.6.28-19-generic
dpkg: subprocess post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)

run:
gksudo gedit /usr/share/initramfs-tools/hooks/live

and change the line that reads:

copy_exec /usr/bin/udevinfo /bin

to

copy_exec /sbin/udevadm /bin

also add the line:

copy_exec /usr/bin/du /bin

to the file. Save and exit gedit.

then run:

sudo dpkg --configure -a

Thanks to happyhamster for the tip.

2. Update the kernel modules dependencies:

sudo depmod -a

3. Update the initramfs

sudo update-initramfs -u

4. Copy your filesystem to temporary directory (go get yourself a cup of coffee once you do this since this could take a few minutes)

DEST=/var/squashfs

sudo mkdir -p ${DEST}

sudo rsync -av --delete / ${DEST} --one-file-system \
--exclude=/proc/* --exclude=/tmp/* --exclude=/dev/* \
--exclude=/sys/* --exclude=/boot/* \
--exclude=/home/* --exclude=/etc/mtab \
--exclude=/live --exclude=${DEST}

Note: You can replace /var/squashfs with any path you wish. Just make sure that it have enough space.

5. The home directory

The home directory is the location where your Desktop, Music, Pictures, and user specific settings are kept. The main idea behind this guide is that in linux, the home directory is modified frequently, such as when you save files to your desktop, add mp3s to your collection or even modify programs like firefox, evolution, pidgin, or the like which creates files to store those settings in your home directory. The rest of the system however is rarely modified where the modifications are vital. This is why keeping the /home directory on a non-volatile storage medium will in most cases keep your files and settings between reboots, while the speed of the RAM which the rest of the system will reside upon will give you a much needed boost. Of course this means that things like system updates, log files, and settings stored in /etc will not survive a reboot, but I will show you how to deal with this below.

To move the home directory, you must first create a new partition where it will reside:

sudo apt-get install gparted
gksudo gparted

Note: Be careful with this tool as you can seriously damage your system by wiping out Linux or Windows completely if you start formatting things you shouldn't be.

Using gparted, create a new partition using some free space somewhere on your hard drives. In most cases, you will not have any unallocated space to create such a partition. In this case, you will first have to find your linux partition, and resize it by taking some space from the end of it. Because you are working from within the linux located on this partition, you may first have to boot into a live cd and launch gparted from there in order to resize your linux partition. You can also use a usb drive to store your /home partition but you would need to remember to always have it pluged in when booting into your Ubuntu.

You will need this partition to be as big as you expect to use up with the files that will be on your desktop, your music folder, pictures, and anything else in your home directory. I recommend at least 5GB.

You will also be asked which file system to use for this partition. I recommend ext4 as it is the latest and greatest, or ext3 if you would rather have stability and peace of mind (ext4 originally had some issues that kept people from adopting it - I think they have been worked out since then though).

Take note of the device this partition is using (eg. /dev/sda3). You will need this later.

Once you have created the new partition, mount the device:

sudo mkdir -p /mnt/home
sudo mount /dev/sda3 /mnt/home

Change /dev/sda3 to the one in your case. Then run:

sudo cp -a /home/* /mnt/home/

to copy everything you have in your /home to the new partition that will contain your /home. The -a will preserve the file permissions and ownership.

6. Modify fstab of the copied filesystem
gksudo gedit ${DEST}/etc/fstab

delete the entry of the root directory. It should look like this:

UUID=..... / ext3 defaults,.... 0 1


To use the partition that we created in step 5 as our /home, add a line similar to the following:

/dev/sda3 /home ext4 auto 0 0

Change /dev/sda3 to the device you took note of in step 5, and ext4 to the type of filesystem you created in step 5 (likely either ext4 as above, or ext3).

After finishing with that, save the file and close gedit.

7. Clean some unnecessary files

Delete some files under ${DEST}/var

[ -n "$DEST" ] && sudo find ${DEST}/var/run ${DEST}/var/mail ${DEST}/var/spool ${DEST}/var/lock ${DEST}/var/backups ${DEST}/var/tmp -type f -exec rm {} \;

Delete only OLD log files:

[ -n "$DEST" ] && sudo find ${DEST}/var/log -type f -iregex '.*\.[0-9].*' -exec rm -v {} \;

[ -n "$DEST" ] && sudo find ${DEST}/var/log -type f -iname '*.gz' -exec rm -v {} \;

Clean current log files:

[ -n "$DEST" ] && sudo find ${DEST}/var/log -type f | while read file; do echo -n '' | sudo tee $file; done

Note the small difference from the original command by capink which prevents the extra newline created in log files.

Clean Pakcage cache:

[ -n "$DEST" ] && sudo rm -v ${DEST}/var/cache/apt/archives/*.deb

8. Create the squashfs image

The squashfs image must reside in /live

sudo mksquashfs ${DEST} /live/filesystem.squashfs -noappend -always-use-fragments

Examine the size of the image and make sure it is less than the size of your RAM.

sudo du -h /live/filesystem.squashfs

9. Add a new entry to Grub

If you are using regular grub (the old grub), than capink's instructions will probably work for you. If however you are using Grub2, which comes default in Lucid, skip to the grub2 section.

Grub:

Add a new entry to /boot/grub/menu.lst of your main system
gksudo gedit /boot/grub/menu.lst

Copy the entry of your main system and modify it to look exactly like this:

title RAM Session
root (hd0,2)
kernel /boot/vmlinuz-$(uname -r) BOOT=LIVE boot=live toram username=user nosudo noxautoconfig noautologin quickreboot ro quiet splash
initrd /boot/initrd.img-$(uname -r)


The text highlighted in blue should match the corresponding parts of your main system entry.
Replace user with your account username.
The parts highlighted in Red are essential.


Grub2:

This is probably the biggest change since capink's guide. Since 2008, Grub2 has become Ubuntu's default, and it works a little differently from Grub. To create the menu entry for your RAM session using grub2 do the following:

Create a file called 50_RAMSESS in your /etc/grub.d/ folder.

gksudo gedit /etc/grub.d/50_RAMSESS

The file should read something very similar to:

#!/bin/sh -e

cat << EOF

menuentry "Ubuntu, Linux $(uname -r) to RAM" {
set root='(hd0,1)'
linux /boot/vmlinuz-$(uname -r) boot=live toram=filesystem.squashfs apparmor=0 security=""
initrd /boot/initrd.img-$(uname -r)
}
EOF

Where (hd0,1) is the location of your Ubuntu installation.

Save the file and exit gedit. Run:

sudo chmod a+x /etc/grub.d/50_RAMSESS

to make the script executable and:

sudo update-grub2

to update the grub menu.

10. Reboot and choose the RAM Session from your boot menu.

It will take a few seconds or minutes to copy the squashfs image into your RAM, after which, the system will boot and you will be able to use it at incredible speeds.

Speeding up boot using an SSD

If you are fortunate enough to have an SSD (for your Windows 7 for example because this obviously can't be done in Windows), you can speed up the boot process by copying the squashfs image onto a partition on the SSD. Since the SSD is faster than a regular hard drive, your system will copy the image into RAM during boot at far greater speeds (with an X25-M, I can copy the ~1.5GB image in about 10 seconds at 160MB/s, about 3 times faster than from my regular 7200RPM WD hard drive at about 50MB/s).

To do this, resize whatever partition is currently on your SSD. If it's Windows, you may want to do the resize with Windows tools such as those provided by Paragon or Acronis as they will properly inform Windows of the change, something I don't think gparted does - though I could be wrong. All you need is a partition big enough to fit your squashfs image. If you have plenty of space on your SSD, a 5GB partition should do. If not, try 3GB.

I formated my partition as ext4 but you could probably get away with ext3 if you like.

Make a folder on the newly created partition on your SSD in the root of the drive (don't make it in any subfolders) and call the folder "live".

Copy your /live/filesystem.squashfs to this folder. You will need to repeat this whenever you update /live/filesystem.squashfs.

Modify your /etc/grub.d/50_RAMSESS on your Lucid (NOT ON THE RAM IMAGE OR /var/squashfs) to read:

#!/bin/sh -e

cat << EOF

menuentry "Ubuntu, Linux $(uname -r) to RAM" {
set root='(hd0,2)'
linux (hd0,1)/boot/vmlinuz-$(uname -r) boot=live toram=filesystem.squashfs apparmor=0 security=""
initrd (hd0,1)/boot/initrd.img-$(uname -r)
}
EOF

Where (hd0,2) should now point to your newly created 5GB partition on your SSD, while (hd0,1) should point to your regular Ubuntu Lucid partition.

Once this is done, run:

sudo update-grub2

and your image should now be copied from your SSD during boot.

Issues once you boot from RAM

The first time I did this, as soon as I booted from RAM I noticed that my Internet was not working. It turns out as stated here (https://bugs.launchpad.net/ubuntu/+source/fsprotect/+bug/477012) by jesbecker:

apparmor does not work well with stacked and read only files systems. A work around for this bug is to either disable for remove apparmor.

Disable:
You can disable by adding apparmor=0 and security="" as kernel options in your grub boot configuration.

Remove:
You can also choose to remove apparmor by executing: sudo apt-get remove apparmor

This issue seems to affect any program that is protected/enforced by apparmor.

As you may have noticed, this is the reason I added apparmor=0 and security="" to the end of the 50_RAMSESS. This fixes the internet. I also tried "sudo apt-get remove apparmor" as suggested by jesbecker before I made those additions to my 50_RAMSESS and that works too.

Broken time

If your time is wrong every time you boot into your RAM session, run:

gksudo gedit /var/squashfs/etc/rc.local

from your regular Lucid and add the line:

dpkg-reconfigure --frontend noninteractive tzdata

just before the "exit 0" line that is already there. Save and exit. You will have to recreate your filesystem.squashfs image with:

sudo mksquashfs /var/squashfs /live/filesystem.squashfs -noappend -always-use-fragments

and move it to your SSD if necessary.

Broken applets

You may also find that some of your items from the Panel (top right) have disappeared, or moved around. I'm not sure why this happens but once you restore them once, and arrange them the way you want, they should be fine. The way these items are arranged is saved within the /home folder as settings so in theory they should remain the way you set them up despite reboots. They do get jumbled around sometimes after a reboot for some reason.

For those adventurous enough to test something that has yet to be properly tested, try this to fix the panel:

Organize the panel the way you want it to be. Then run:

mkdir -p ~/.settings/
gconftool-2 --dump /apps/panel > ~/.settings/saved_panel_settings.entries

Boot into or mount and chroot into your regular lucid, and open your /var/squashfs/etc/rc.local with a text editor as root:

gksudo gedit /etc/rc.local

and above the "exit 0" line, add:

gconftool-2 --dump /apps/panel > /tmp/saved_panel_settings.entries
if [[ `md5sum /tmp/saved_panel_settings.entries | cut -d ' ' -f 1` != `md5sum ~/.settings/saved_panel_settings.entries | cut -d ' ' -f 1` ]]
then
rm /tmp/saved_panel_settings.entries
gconftool-2 --load ~/.settings/saved_panel_settings.entries
killall gnome-panel
fi

The code above works better as a script for some reason. Try saving it to your ~/Documents/ folder, making it executable with:

sudo chmod a+x panelfix.sh

and in the RAM session, go to System --> Preferences --> Startup Applications. Create a new startup program, call it anything, and for command, browse to or type the entire path including the file name of panelfix.sh.

Because fixing the panel involves reloading gnome-panel, which for a second makes the panel disappear and may be annoying every time you boot, this will check if the panel layout has changes since you saved it. If there has been a change, it will reload the panel to restore the save file. If not, it will not bug you.

After you have edited /var/squashfs/etc/rc.local, recreate your squashfs image with:

sudo mksquashfs /var/squashfs /live/filesystem.squashfs -noappend -always-use-fragments

Move it to the SSD if you need to.

If after a while you decide to change the panel again and want to save it again, just rerun:

gconftool-2 --dump /apps/panel > ~/.settings/saved_panel_settings.entries

This method of saving/loading the panel seems to work manually, but above is my attempt to make the process automated. I'm not sure if it will work. Let me know if there's a problem with it.

Performing System Updates/Changes

Although you may not need to modify your system other than your /home folder for quite a while, eventually you will need to perform updates or will want to install packages that will modify the system. This will be overwritten on next reboot unless you do the following (from within the RAM Session):


sudo mkdir -p /mnt/lucid
sudo mount /dev/sdc1 /mnt/lucid/
sudo mount -o bind /proc /mnt/lucid/var/squashfs/proc
sudo mount -o bind /dev /mnt/lucid/var/squashfs/dev
sudo mount -o bind /dev/pts /mnt/lucid/var/squashfs/dev/pts
sudo mount -o bind /sys /mnt/lucid/var/squashfs/sys
sudo cp /etc/resolv.conf /mnt/lucid/var/squashfs/etc/resolve.conf
sudo chroot /mnt/lucid/var/squashfs /bin/bash


change /dev/sdc1 to the device of your partition where Lucid was installed. You are now modifying the image you boot from (not directly - you will need to recreate it). To do updates run:

sudo apt-get update
sudo apt-get upgrade

and to install packages run

sudo apt-get install vlc

change vlc for the package you wish to install. Once you are done this, you will need to unmount the RAM disk and mount the regular lucid install to recreate the image. Type:

exit

and

sudo umount /mnt/lucid/var/squashfs/proc
sudo umount /mnt/lucid/var/squashfs/dev/pts
sudo umount /mnt/lucid/var/squashfs/dev
sudo umount /mnt/lucid/var/squashfs/sys

to unmount the previously mounted partitions. Then run:

sudo mount -o bind /proc /mnt/lucid/proc
sudo mount -o bind /dev /mnt/lucid/dev
sudo mount -o bind /dev/pts /mnt/lucid/dev/pts
sudo mount -o bind /sys /mnt/lucid/sys
sudo cp /etc/resolv.conf /mnt/lucid/etc/resolve.conf
sudo chroot /mnt/lucid /bin/bash

rerun:

sudo mksquashfs /var/squashfs /live/filesystem.squashfs -noappend -always-use-fragments

to recreate the image. This will create a new /live/filesystem.squashfs with the changes you made. If you moved your filesystem.squashfs to an SSD as mentioned earlier, copy the new filesystem.squashfs from /live to the SSD.

Now Reboot.

To simplify the steps above, I have created a script to mount either the lucid installation or the RAMDISK. I keep this script in my /home/Documents folder and launch it from within the RAM session when I need to do updates or want to install a new program. It seems to work ok. See the file attached for the script.

Edit: Sorry, I forgot to mention that the script has the device hardcoded as /dev/sdc1, which for me it is. I made it easier to change by only making it necessary to modify a single variable at the top, but you will still have to open the file with a text editor such as gedit and change the $DEVICE at the top to the proper device for your setup.

Possible Reason for Slowdown

As I keep using my RAM session and notice things about it, I update this article as much as I can. The thing I recently noticed was that when you use a program (VMware in my case) that takes up your entire RAM, your swap begins to fill up. Now that's not unusual, but it does mean that your system may become ridiculously slow if this happens (in my case so much so that even the music I had playing started to lag a lot). This is why you should keep an eye on your RAM and swap space if you know you are going to be using programs that eat up RAM.

In order to see how much RAM is used up by your system, DO NOT use the System Monitor. The System Monitor seems to show how much RAM your OS (Ubuntu) is using, but does not tell you how much RAM is actually in use. As RAM is normally only used by your OS, this works fine most of the time, but since in our case we initially copied an image into RAM that the OS does not account for, the System Monitor ends up showing that you have much more free RAM than you actually have. To display a proper reading of how much RAM and SWAP space you are using (in MB), use:

free -m

One other problem that I noticed was that if you already started using a program that eats RAM and your swap fills up, simply turning off that program frees up RAM but your OS still continues to use that SWAP space, keeping it slow when it doesn't have to be. To solve this, you can either reboot, or run:

sudo swapoff -a && sudo swapon -a

to dump your swap and make the system use RAM again.

Conclusion

I'm no Linux expert, and i myself read it from this thread http://ubuntuforums.org/archive/index.php/t-1499338.html  and tried it and worked out well, I'll try to help you out with them and found no better way to put it. Also if those more wise than myself see any problems or corrections with what I wrote, let me know so I can fix them.

Wednesday 13 July 2011

Scalable Images in Linux

Scalable Vector Graphics (SVG) is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic (i.e. interactive or animated).

The SVG specification is an open standard that has been under development by the World Wide Web Consortium (W3C) since 1999.

SVG images and their behaviors are defined in XML text files. This means that they can be searched, indexed, scripted and, if required, compressed. Since they are XML files, SVG images can be created and edited with any text editor, but drawing programs are also available that support SVG file formats.

All major modern web browsers have at least some degree of support and render SVG markup directly with the exception of any version of Microsoft Internet Explorer (IE) released for the widely used Windows XP.

SVG allows three types of graphic objects: vector graphics, raster graphics, and text. Graphical objects, including PNG and JPEG raster images, can be grouped, styled, transformed, and composited into previously rendered objects. SVG does not directly support z-indices[6] that separate drawing order from document order for overlapping objects, unlike some other vector markup languages like VML. Text can be in any XML namespace suitable to the application, which enhances search ability and accessibility of the SVG graphics. The feature set includes nested transformations, clipping paths, alpha masks, filter effects, template objects and extensibility.

Printing

Though the SVG Specification primarily focuses on vector graphics markup language, its design includes the basic capabilities of a page description language (PDL), like Adobe's PDF. It contains provisions for rich graphics, and is also compatible with CSS for styling purposes. It is unlike XHTML, whose primary purpose is communication of content, not presentation, and therefore specifies objects to be displayed but not where to place such objects. Conversely SVG is an ideal PDL for print-oriented uses, as it contains all the functionality required to place each glyph and image in a chosen location on the final page.

Compression

SVG images, being XML, contain many repeated fragments of text and are thus particularly suited to compression by gzip, though other compression methods may be used effectively. Once an SVG image has been compressed it may be referred to as an "SVGZ" image, with the corresponding filename extension. The resulting file may be as small as 20% of the original size.

Use in Linux

Most images in icon set in themes in gnome and graphics user interfaces uses these scalable images for dynamic imaging displays and thus the use and manupulation of such images could be very vital in development of themes and icon set.The most popular editor for svg images is Inkscape which is able to perform all kinds of editing in a scalable image.

Tuesday 12 July 2011

Basic Files Systems in Linux

minix
is the filesystem used in the Minix operating system, the first to run under Linux. It has a number of shortcomings: a 64MB partition size limit, short filenames, a single time stamp, etc. It remains useful for floppies and RAM disks.
ext
is an elaborate extension of the minix filesystem. It has been completely superseded by the second version of the extended filesystem (ext2) and has been removed from the kernel (in 2.1.21).
ext2
is the high performance disk filesystem used by Linux for fixed disks as well as removable media. The second extended filesystem was designed as an extension of the extended file system (ext). ext2 offers the best performance (in terms of speed and CPU usage) of the filesystems supported under Linux.
ext3
is a journaling version of the ext2 filesystem. It is easy to switch back and forth between ext2 and ext3.
xiafs
was designed and implemented to be a stable, safe filesystem by extending the Minix filesystem code. It provides the basic most requested features without undue complexity. The xia filesystem is no longer actively developed or maintained. It was removed from the kernel in 2.1.21.
msdos
is the filesystem used by DOS, Windows, and some OS/2 computers. msdos filenames can be no longer than 8 characters, followed by an optional period and 3 character extension.
umsdos
is an extended DOS filesystem used by Linux. It adds capability for long filenames, UID/GID, POSIX permissions, and special files (devices, named pipes, etc.) under the DOS filesystem, without sacrificing compatibility with DOS.
vfat
is an extended DOS filesystem used by Microsoft Windows95 and Windows NT. VFAT adds the capability to use long filenames under the MSDOS filesystem.
proc
is a pseudo-filesystem which is used as an interface to kernel data structures rather than reading and interpreting /dev/kmem. In particular, its files do not take disk space. See proc(5).
iso9660
is a CD-ROM filesystem type conforming to the ISO 9660 standard.
High Sierra
Linux supports High Sierra, the precursor to the ISO 9660 standard for CD-ROM filesystems. It is automatically recognized within the iso9660 filesystem support under Linux.
Rock Ridge
Linux also supports the System Use Sharing Protocol records specified by the Rock Ridge Interchange Protocol. They are used to further describe the files in the iso9660 filesystem to a UNIX host, and provide information such as long filenames, UID/GID, POSIX permissions, and devices. It is automatically recognized within the iso9660 filesystem support under Linux.

hpfs

is the High Performance Filesystem, used in OS/2. This filesystem is read-only under Linux due to the lack of available documentation.

sysv

is an implementation of the SystemV/Coherent filesystem for Linux. It implements all of Xenix FS, SystemV/386 FS, and Coherent FS.

nfs

is the network filesystem used to access disks located on remote computers.

smb

is a network filesystem that supports the SMB protocol, used by Windows for Workgroups, Windows NT, and Lan Manager. To use smb fs, you need a special mount program, which can be found in the ksmbfs package, found at ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs.

ncpfs

is a network filesystem that supports the NCP protocol, used by Novell NetWare. To use ncpfs, you need special programs, which can be found at ftp://linux01.gwdg.de/pub/ncpfs.

Monday 11 July 2011

7 steps to configure your kernel manually

1. Download the latest kernel source package from the website kernel.org.
2. extract the package
3. Use the following command list

make mrproper
make LANG=LC_ALL LC_ALL=menuconfig

( during the config don't manually select modules till your not 100 percent sure of Wt ur doing . Instead u could use the config file of previous kernel from the boot folder and load it)

make
make modules_install
cp -v arch/x86/boot/bzImage /boot/linuxconfig (if arch is 32bit)

cp -v System.map /boot/System.map
cp -v .config /boot/config

4. Delete the source files
5. Update grub (verify whether the grub finds two kernel files )
6. Restart the system
7. If the new kernel works properly delete the previous kernel files from etc , bin , usr folders and update grub again

How to start on with Linux

Having used windows over 17 years now shifting to Linux seems very hard. But is not as hard as it gets if you have the right start .In my opinion the right way to start learning Linux is having a virtual machine software like virtual box by sun and download the latest version of Ubuntu  .
The main benefit of working in a virtual environment that your current working operating system is not effected even if Linux crashes. So u can work around your way to learning the OS without really worrying about the problems u might encounter in the \process as even if it does all u need to do is install a fresh version over it. So it gives a good carefree start towards working your way towards learning Linux.
As for Ubuntu , it is the most windows type UI that u could get and more over in its functionality is very windows type. In the sense you easily brows through software compatible with your version of ubuntu and install them very conveniently and also use them to get a feel of the whole thing.

In a matter of time u will install it in your main system and u will realize all your work is done in Linux except for some basic patented work that is carried out specifically in Windows.