Thursday, August 5, 2010

Btrfs - System Rollback comes to Fedora

Btrfs helps in creating lightweight filesystem snapshots that can be mounted (and booted into) selectively. The created snapshots are copy-on-write snapshots, hence there is no file duplication overhead involved for files that do not change between snapshots.
A "rollback" to an older snapshot is non destructive for other snapshots. If user switches to an earlier snapshot, the later snapshots will still be available afterwards.

Btffs will allow users to :
1. Automatically create new disk snapshots before each yum transaction.
2. Change which snapshot will be next booted into, if neded.
3. Manually create a new snapshot, if needed.

For carrying out any of the above mentioned tasks under Btrfs user need to have Root user privileges.

PS : Btrfs is a File system type, so if you desire for a partition to be Btrfs strong you need to format the partition with FS type set to Btrfs.

Saturday, April 3, 2010

Downloading RPM's using YUM

YUM now provides you with the ability to :
1. Download the RPM's without installing them.
2. Just get the list of URLs from where the RPM's would be downloaded.
3. Resolve the dependencies for the package that you plan to download, and get then too along with the package.
4. Get the source if you are intrested in that being more geeky.

And not just this much , yum will get you all this specific to your release and arch,so no more no-arch packages.

So here is how to go with this :
First of all you need to install the package 'yum-utils' as the utility that provides all this functionality using the configuration of YUM. Make sure that this all will work using the repos (software repositories both online and offline (if-any)) configured under /etc/yum.repos.d/ that are used by YUM for package searching, dependency resolution and many other packages related tasks. It all depends on the configuration in the repo files, using which yum will be looking up the packages in the stable and unstable repositories.

1. Download of RPM's
# yumdownloader firefox
The command will download the latest firefox from the closeset repository , into the PWD.
2. URL's of the RPM.
# yumdownloader --urls firefox
This will be listing the location [URL] of the RPM's, but will not download them, hence saving the bandwidth.
3. Installation of packages sometime need other packages for its installation known as 'Dependencies'. If these are missing the package will not install.
So in order to install all of the dependent packages we need to fire.
# yumdownloader --resolve firefox
If we only need to see the dependent packages without installing them, in that case the command need to be edited with
# yumdownloader --urls --resolve firefox
4. As listed above 'yumdownloader' just lists/ download the RPM's by default but incase if you want to get the source packages, we need to add the option '--source' to the query.
# yumdownloader --source firefox
In order to just get the URL's of the scource packages, the command need to be edited a bit.
# yumdownloader --urls --source firefox
And if one need the URL's of the scource packages along with the source of the dependencies, the command will look like.
# yumdownloader --urls --resolve --source firefox

Once you have the RPM's you can install them using different methods, either by 'rpm' command or by 'yum'.

Plymouth : The new Graphical Boot of Fedora

Plymouth is the new graphical boot animation in place of the text messages that normally get shown corresponding to the services getting started. Fedora [Live CD] by default is supplied by only single Plymouth theme knows as 'plymouth-theme-charge', in which the boot process is animated with the Fedora Bubble getting filled up and finnaly it blasts off with white light.

There are multiple other plymouth themes provided by Fedora which can be installed using YUM.
[root@xbox ~]# yum list all|grep plymouth-theme
plymouth-theme-charge.x86_64 0.8.0-0.2009. @updates
plymouth-theme-fade-in.x86_64 0.8.0-0.2009. @updates
plymouth-theme-script.x86_64 0.8.0-0.2009. @updates
plymouth-theme-solar.x86_64 0.8.0-0.2009. @updates
plymouth-theme-spinfinity.x86_64 0.8.0-0.2009. @updates
[root@xbox ~]#

All of the missing ones can be installed using
#yum install
or simply installing all of them
#yum install -y plymouth-theme

Ocnce installed the themes can be check under '/usr/share/plymouth/themes/' with a symbolic link under there 'default.plymouth' pointing to the one being used presently.

In order to change the default theme the user needs to run the following command
#plymouth-set-default-theme where is the name of the directory under '/usr/share/plymouth/themes/'
e.g. in oder to instal the solar theme one need to run.
#plymouth-set-default-theme solar
Doing this updates the symbolic link under the '/usr/share/plymouth/themes/' to the new theme. BUt this is not all, we need to update the same with initrd and for doing that user needs to run following.

Once this is done, the next time system is booted the Fedora Bubble will not be there and the new theme as selected by you will be there.

Fedora : Hiding Desktop Icons

With a aim to have a clean desktop of all of the default icons like My Computer, Sawrub's Home, Trash the Gconf Editor was looked at and here is how to do the same.
- Open Gconf-Editor under Application -> System Tools -> Configuiration Editor, if the same is missing install it first.
- Navigate to /apps/nautilus/desktop in the left hand side tree
- Once there check the right hand side frame for options corresponding to each of the default icons present at the desktop.
- In order to disable the Computer icon uncheck the flag against 'computer_icon_visible'
- The computer icon will no longer be availble at the desktop.
- Similar steps can be followed for other icons.

Monday, March 8, 2010

Hacked Google Calender addon for Thunderbird

I was trying to get the add-on 'Provider for Google Calendar' to work reading steps from , but was not able to do so since the option for Google Calender setup as shown in was not coming up. So finally after around 2 hrs of fight looking for help at FAQ, IRC, I finally got the hit and hacked the config file of the extension a bit and was able to do it all.

1. Checked the presence of the 'install.rdf' in the /home/sawrub/.thunderbird/xxxxxxxx.default/extensions/ directory that contained the data corresponding to the calender sync like a snip from it read liek "The Original Code is Google Calendar Provider code"

grep -i google \{xx12xx12x1x-5fdc-40c2-873c-223b8a6925cc\}/install.rdf
2. Once the file was there, read through for the dependencies and there the problem was.I was ok with all other things mentioned in the config file except this.

        <!-- Lightning (also Sunbird via extension stub) -->

3. It was found the Lightning version that I have is 1.0b2pre and the add-on was just good enough to support Lightning to version 1.0b1 as said in '1.0b1' so i just thought of playing around.I edited the line to '1.0b3' saved the file and restarted the Thunderbird. I hope you understand why i did it to 1.0b3.

4. Followed the steps mention in the blog, and now the option for the Google Calender was with me, rest was a child's play.

Hope this helps some one. Cheers to the open source.

Wednesday, February 24, 2010

Command of the Day

The Post include the diffrent commands that i come to know on daily baises.
- package-cleanup
- yumdownloader
- pdfto group [pdftohtml pdftoppm pdftops pdftotext]
- DenyHosts

Tuesday, February 23, 2010

Samba Share Setup

Following are the steps that i followed to setup a simple drive share on RHEL 5 system.The system did not had the YUM configured with repos, so had to download and install them using YUM to bypass dependency issues. YUM used to prompt me with the missing dependency till they were not fullfilled, i started with samba3-3.2.15-40.el5.x86_64.rpm, downloaded the rest later.

1. Downloaded the packages from ''
Packages :

- samba3-3.2.15-40.el5.x86_64.rpm
- libwbclient0-3.2.15-40.el5.x86_64.rpm
- samba3-client-3.2.15-40.el5.x86_64.rpm

2. Installed packages
[root@QAV5 samba]# yum --nogpgcheck localinstall samba3-3.2.15-40.el5.x86_64.rpm libwbclient0-3.2.15-40.el5.x86_64.rpm samba3-client-3.2.15-40.el5.x86_64.rpm
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Local Package Process
Examining samba3-3.2.15-40.el5.x86_64.rpm: samba3 - 3.2.15-40.el5.x86_64
Examining libwbclient0-3.2.15-40.el5.x86_64.rpm: libwbclient0 - 3.2.15-40.el5.x86_64
Examining samba3-client-3.2.15-40.el5.x86_64.rpm: samba3-client - 3.2.15-40.el5.x86_64
Marking samba3-3.2.15-40.el5.x86_64.rpm to be installed
Marking libwbclient0-3.2.15-40.el5.x86_64.rpm to be installed
Marking samba3-client-3.2.15-40.el5.x86_64.rpm to be installed
Resolving Dependencies
-- Running transaction check
--- Package samba3-client.x86_64 0:3.2.15-40.el5 set to be updated
--- Package samba3.x86_64 0:3.2.15-40.el5 set to be updated
--- Package libwbclient0.x86_64 0:3.2.15-40.el5 set to be updated
-- Finished Dependency Resolution
Dependencies Resolved
Package     Arch      Version        Repository         Size
samba3     x86_64    3.2.15-40.el5      samba3-3.2.15-40.el5.x86_64.rpm       38 M
Installing for dependencies:
libwbclient0     x86_64    3.2.15-40.el5      libwbclient0-3.2.15-40.el5.x86_64.rpm       65 k
samba3-client     x86_64    3.2.15-40.el5      samba3-client-3.2.15-40.el5.x86_64.rpm       38 M
Transaction Summary
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 76 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
libwbclient0 ######################### [1/3]
Installing: samba3-client ######################### [2/3]
Installing: samba3 ######################### [3/3]

Installed: samba3.x86_64 0:3.2.15-40.el5
Dependency Installed: libwbclient0.x86_64 0:3.2.15-40.el5 samba3-client.x86_64 0:3.2.15-40.el5
[root@QAV5 samba]#
3. Added the following config to the samba
[root@QAV5 samba]# cat /etc/samba/smb.conf
comment = samba share
path = /opt/apache-tomcat-5.5.20/logs
public = yes
[root@QAV5 samba]#

4. Added the user to the system
[root@QAV5 samba]#
[root@QAV5 samba]# useradd share
[root@QAV5 samba]#
5. Added the user to samba user list,and setting its password.
[root@QAV5 samba]#
[root@QAV5 samba]# smbpasswd -a share
New SMB password:
Retype new SMB password:
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Added user share.
[root@QAV5 samba]#

6. Restarted samba service.
[root@QAV5 samba]#
[root@QAV5 samba]# service smb restart
Shutting down SMB services: [ OK ]
Shutting down SMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@QAV5 samba]#
7. Accessed the share by typing "\\QAV5\share" in explorer.