Upgrading Fedora to the latest version

Fedora team have released next version of Fedora i.e Jules Verne Fedora 16. If you already have Fedora 15 installed on your machine, there is an easy way of upgrading your Linux distribution to the latest version Fedora 16.

Steps are as follows:

Update your Fedora 15 system

Run the following command to install any updates to your Fedora 15 distribution.

su -c 'yum update'

Install the ‘preupgrade’ tool
Preupgrade is a GUI tool that walks you through the upgrade process.

su -c 'yum install preupgrade'

Start the preupgrade tool
You can run the preupgrade tool by entering the command in the terminal or via the menu.

$ preupgrade

It will ask you for your root password before presenting you the GUI.

The preupgrade tool will prepare your Fedora 15 system for upgrade.

First you have to choose the version of Fedora you want to upgrade to from the available Fedora releases.

The preupgrade tool will then start downloading the release info; the installer images; determine which packages to download; and download the packages.

Be patient, it will take some time depending upon your internet connection speed.

Lastly it will prepare and test the upgrade.

Start the upgrade process
Once the preupgrade tool has finished doing its job, it will prompt you to reboot.

When you reboot back into Fedora, it will start the Anaconda installer and the upgrade process will start.

No user intervention is required at this stage as everything is done automatically by the Anaconda installer.

The installer will do the dependency check of packages and start upgrading your system.

Post upgrade configuration include installing the boot loader which is automatically installed in the Master Boot Record (MBR) of your machine.

Once the upgrade process is finished, you can log into your brand new Fedora 16 Linux system.

Automatically Install Updates Ubuntu

Updating your system at periodic time is a good practice. But some of us forgot to do so. In search of automatic updates I found Unattended Upgrade. You can modify the package as per your need.

To start, first you need to install Unattended-Upgrade

sudo apt-get install unattended-upgrades

Unattended-Upgrade calls /etc/cron.daily/apt
To set everything first create a file /etc/apt/apt.conf.d/10periodic and edit it with your favorite editor. For eg I am attaching my file below.

sudo /etc/apt/apt.conf.d/10periodic
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "5";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::RandomSleep "1800";
APT::Periodic::Verbose "1";

Note: Details about what these values mean may be found in the header of the /etc/cron.daily/apt file.
When the apt job starts, it will sleep for a random period between 0 and APT::Periodic::RandomSleep seconds. The default value is “1800″ so that the script will stall for up to 30 minutes (1800 seconds) so that the mirror servers are not crushed by everyone running their updates all at the same time. Only set this to 0 if you use a local mirror and don’t mind the load spikes. Note that while the apt job is sleeping it will cause the execution of the rest of your cron.daily jobs to be delayed.

Now edit /etc/apt/apt.conf.d/50unattended-upgrades, it should look like below:

// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {    
    // ${distro_id} and ${distro_codename} will be automatically expanded
    "${distro_id} stable";
    "${distro_id} ${distro_codename}-security";
    "${distro_id} ${distro_codename}-updates";
//  "${distro_id} ${distro_codename}-proposed-updates";
};
 
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
//  "vim";
//  "libc6";
//  "libc6-dev";
//  "libc6-i686";
};
 
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you 
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "root@localhost";
 
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";
 
// Automatically reboot *WITHOUT CONFIRMATION* if a 
// the file /var/run/reboot-required is found after the upgrade 
//Unattended-Upgrade::Automatic-Reboot "false";

Note : The double “//” serve as comments, so whatever follows “//” will not be evaluated

Now create STAMP file,

touch /var/lib/apt/periodic/update-stamp
touch /var/lib/apt/periodic/download-upgradeable-stamp
touch /var/lib/apt/periodic/upgrade-stamp
touch /var/lib/apt/periodic/autoclean-stamp

Now we will set cronjob to run the unattended-update

su
crontab -e
19 13 * * * /etc/cron.daily/apt > /home/vidyadhar/apt.log 2>&1

That’s it. The task will run at 1:19 PM every day.

Create Wifi Hotspot in Windows

This tutorial will guide you in setting up your laptop as a wifi-hotspot to share wifi or dial-up connection. I am using Windows 7 as a base OS and connectify to work as wifi-hotspot.

In this way you can share your internet / wifi / dial-up connection with your wifi enabled device.

Requirement:
OS Windows 7 (Not tried on XP)
WIFI enabled laptop
Connectify. You can download the free version from here.

1. To start the process download and install Connectify from above link.
2. After installation it will ask to reboot the machine, do the same.
3. After restart you will see Connectify icon in task bar notification area.

4. Click on the Icon. Now we need to create wifi-hostspot. Fill up require details as per your wifi configuration and click on Start Hostspot. For better understanding see below screenshot.

Remember Select the proper network adapter in Internet option. If you are getting connected to internet via dial up connection select dial up connection in Internet option. I am using wireless network connection to connect internet.

5. Now setup your wifi enabled device to use our laptop connection as an access point. I have tried the same with Nokia phone. After successful connection you will see your device in Client tab.

That’s it. Enjoy your new wifi-hotspot.

Fix Windows Registry in Ubuntu

Most of the time you need to edit windows registry to solve windows problem. But what you will do if your windows is not getting loaded, you will search for software or live cd of a program to fix you registry. But no need of doing this if you have Ubuntu live cd or Ubuntu on another partition. To access windows registry boot your need to boot your machine in Ubuntu

Please note use this utility on your risk. I have tested chntpw on Ubuntu 11.04 with Windows XP SP 2.

Install chntpw utility

sudo apt-get install chntpw

Mount Windows partition:
Find the Windows partition:

sudo fdisk -l

Assume it is on /dev/sda1. Next step is mounting of the partition:

sudo mkdir /media/windows 
sudo mount /dev/sda1 /media/windows

Registry editing
To go in proper hive you must know the Hive name. For same please refer following table.

Registry Key Name 	             Hive Filename
HKEY_CURRENT_USER 	             NTuser.dat
HKEY_LOCAL_MACHINE\SAM 	             SAM
HKEY_LOCAL_MACHINE\SECURITY 	     SECURITY
HKEY_LOCAL_MACHINE\SOFTWARE 	     SOFTWARE
HKEY_LOCAL_MACHINE\SYSTEM 	     SYSTEM
HKEY_USERS\DEFAULT 	             DEFAULT

For eg. you need to go HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Themes and change the Start value to 4.

then do as follows

chntpw -l /mnt/sda1/WINDOWS/system32/config/system

At the new command prompt type ? to see various commands used for registry editing. Most useful commands are dir,cat,cd,ed etc.

Now type ‘dir’ command to see all the subkeys under the root key. You will see many ControlSet00* keys under this, but where is the CurrentControlSet key. We need this subkey to edit properties of Themes service..!

Well, don’t be panic. The answer is hidden in ‘Select’ subkey. Now enumerate all the values under ‘Select‘ subkey as shown below.

cd Select 
dir

Now the value associated with ‘Current’ subkey will tell you which is the currently used ControlSet00* key. For example if the ‘Current’ has value 2 then that means you have to select ‘ControlSet002′ etc. On my machine the ‘Current’ has value 1. So I am going to select ‘ControlSet001′ key.

Know we know which controlset we have to use for our purpose. Now select it and move on to Themes subkey as shown below. Note that we are under Select key. You have to go back to root key to choose the ControlSet key.

cd ..
cd ControlSet001\Services\Themes

Now type ‘dir’ command to see all the names and their values under this key. We have to just change DWORD value of ‘Start’ to 4 using the ‘ed’ command.

ed Start

When you are prompted to enter new value, just type 4 and press ‘ENTER’ to set the new value.To verify use the below shown command.

cat Start

Once you have modified all required changes, type ‘q’ to quit the registry editor and then press ‘y’ to save your changes. After that restart the system and you should be able to login normally without any problem.

PHP 5.3 on CentOS

Recently I need to install PHP 5.3 on CentOS. You can install PHP 5.3 by compiling source code, but for me yum is better. To install PHP 5.3 from yum you need to add Remi’s repository.

On CentOS 6, run

wget http://download.fedora.redhat.com/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

On CentOS 5.X, run

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

By default Remi’s repository is not enable. Open /etc/yum.repos.d/remi.repo and change enable=0 to enable=1

Then install PHP 5.3 by running,

yum install php php-*

Restart HTTP server to get changes reflected.

service httpd restart
Page 6 of 26« First...«456789»1020...Last »
rss twitter facbook

Categories

Archives