Posted by aionman on Aug 29, 2009 in
Networking
First Time Flashing instructions
Buffalo, unfortunately, encrypts their firmware, and their routers will accept only encrypted firmware in the web interface.
WHR-G300N is now only supported by dd-wrt V24-preSP2, created by BrainSlayer .
The first time you flash, the TFTP method can be used to bypass this ‘encrypted’ firmware requirement. Afterwards, the router firmware can be changed through the Web interface normally.
TFTP flashing
The latest DD-WRT build has a new, easy, and safe way to flash a WHR-G300N router. To do this, just Tftp_flash the firmware.tftp image to 192.168.11.1 in the 1st three seconds of booting when the router is in recovery mode.
The trick with this router is to wait for the blinking red light to stop and then start the tftp transfer. Be ready to press enter the very moment the red diag light stops blinking.
UPDATE:
There is a more convenient way to flash the firmware:
Every time the router boots it looks for a file called “firmware.ram” on a tftp server at 192.168.11.2. Now if you start a tftp server (e.g. TFTP32) and offer this file (simply rename firmware.tftp), the router fetches it automatically and flashes itself. This way you don’t have to try to hit enter at the right time and it’s fully automatic.
Posted by aionman on Aug 17, 2009 in
Ubuntu
Today you might have release Ubuntu 6.04 or 6.1 .The common name given to this release from the time of its early development was Dapper or Edgy.
Now we will see how to upgrade your Ubuntu to 7.04 or 8.04 (Hardy)
First thing i would suggest is backup all your important data and start upgrade process and you can use any one of the method to udgrade to ubuntu edgy eft.
We can Use Two methods to upgrade Ubuntu Dapper to Edgy
1) Using GUI
2) Using apt-get
Upgrading Ubuntu
Method 1
Using GUI
If you want to upgrade using GUI use the following command
gksu “update-manager -c ”
“-c” switch tells it to look for upgrades at all.You should see the following screen here Now you can see 6.10 is available for upgrade click on upgrade

Now you can see the following screen with the no.of packages available for download here click on start upgrade

Here it starts preparing the upgrade

You can see in this screen downloading required packages is in progress

Installing all the required packages in progress

After installing these packes you should see the following screen and here you need to click on restart and it will reboot your machine to take your new ubuntu 6.10 installation to effect all changes.

You can check the ubuntu version installed using the following command
sudo lsb_release -a
Output Looks like below
Distributor ID: Ubuntu
Description: Ubuntu edgy
Release: 6.10
Codename: edgy
Method 2
Using apt-get
Edit your /etc/apt/sources.list as root. Change every occurrence of dapper to edgy.
Use any prefered editor. If you have a CD-ROM line in your file, then remove it.
sudo vi /etc/apt/sources.list
or
use the following Simple command
sudo sed -e ’s/\sdapper/ edgy/g’ -i /etc/apt/sources.list
Now you need to update the source list using the following command
sudo apt-get update
Upgrade using the following command
sudo apt-get dist-upgrade
Double check your process was finished properly using the following commd
sudo apt-get -f install
sudo dpkg --configure -a
Now you need to Reboot your machine to take your new ubuntu 6.10 installation to effect all changes.
I hope you will enjoy your new Ubuntu Edgy Eft
_________
Another post regarding how to upgrade from Dapper to Hardy
Here is how I did it:
Ubuntu 6.06 to Ubuntu 8.04 Upgrade (Server)
I verified that my current install was completely up to date:
sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade
Also, to be thorough, this is what my sources.list looked like (each ‘deb’ entry should be one single line):
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universemultiverse
deb http://archive.ubuntu.com/ubuntu dapper-security main restricted universemultiverse
deb http://archive.ubuntu.com/ubuntu dapper-proposed main restricted universemultiverse
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universemultiverse
Once I had applied all updates (if you’re already up to date, you don’t need a reboot) I then installed the server-based update utility:
sudo aptitude install update-manager-core
Once this is installed you’re ready to begin the upgrade process. You can start the upgrade using:
sudo do-release-upgrade
Or use CD-ROM
$ mount -t iso9660 -o loop ~bvi/ubuntu-8.04-server-i386.iso /cdrom
$ apt-cdrom add
This should show output similar to the following as the CDROM is added to the Repo list.
Using CD-ROM mount point /cdrom/
Unmounting CD-ROM
Waiting for disc…
Please insert a Disc in the drive and press enter
Mounting CD-ROM…
Identifying.. [b36baea778d37bbf48a3c8bd75b5cffb-2]
Scanning disc for index files..
Found 2 package indexes, 0 source indexes and 1 signatures
Found label ‘Ubuntu-Server 8.04 _Hardy Heron_ – Release i386 (20080423.2)’
…
And should add a to the top of your /etc/apt/sources.list similar to the following:
deb cdrom:[Ubuntu-Server 8.04 _Hardy Heron_ - Release i386 (20080423.2)]/ hardy main restricted
Finally the update can be performed
do-release-update
Posted by aionman on Aug 15, 2009 in
Outlook
http://olfolders.com/Lang/English/OLfix/index.htm
|
OLfix combines some tools for repairing common things like the profile, contact links and features, for example calling the internal Outlook repair command line switches with a click of a button. Also some hidden settings can be set for example reminders in different folders.
Highlights:
- Repairs Outlook profiles
- Repairs Outlook contact links
- Extends reminder folders
- Enables Outlook address book in Outlook express and other programs
- Searches of dupes in Outlook
OLfix: Download Information
OLfix functions:
|
|
1. Repair Outlook profiles
|
| Outlook sometimes has problems with the profiles, if you for example delete a data file while Outlook is running, Outlook sometimes forgets to delete some registry keys. At next start Outlook will try to load the deleted store provider but will fail because some of the keys are deleted and some not.
This gives you sometimes double personal folders, double OLfolders, double Exchange folders, slow Outlook start and errors on startup.
Open repair profiles and select the profile you want to repair. OLFix will display all registry entries for this profile. Some of them are pre-selected, the pre-selected entries usually can be deleted.
Most data files require two registry keys, one main key and one detail key. Exchange usually has one more than two keys, the main key for Exchange and detail keys for your email accounts, shared folders, personal folders, delegates etc. If you find PST files, OLfolders files etc. with only one key or with more than two keys, they usually are damaged.

Click to enlarge / Back – click on your Browser “Back” button.
It seems that Outlook loads deleted services at startup this:
• Slows down the Outlook start
• Shows data files which are already deleted, but you can not close them because the main key is no longer present.
Because OLfolders gives the same store entry ID for each connection to the same file, it does not like the same data file be present many times. If you for example have 30 references to the same file and the last one which Outlook tries to load does not work because some keys are already deleted or you have the wrong user name or password, you only will see a file which is not opening in Outlook.
Hints, Warnings
OLfix is using undocumented registry keys, usually it works, in some cases it may damage your Outlook profile. If this happens re-create your Outlook profile in control panel/mail. You may copy the profile before running OLfix.
In most cases where you run OLfix, re-creating the profile was the only option anyway. |
|
2. Repair contact links
|
| In Outlook, elements can contain links to contacts, Outlook stores the entry ID of the contact. If you export the file into a new one, the links will still point to the old file, if that is not present, the contact link no longer works. There may be other opportunities to damage contact links. Outlook also stores some other information about the contact, which allows us to find the contact and repair the link.
Use this function, if your contact links are not working any more or after exporting your .pst file.
Hints, Warnings
Repair contacts is using undocumented data structures. It is a good idea to back up your data before using this function. |
|
3. Extend reminders folders
|
| Outlook displays reminders only in Inbox, Calendar, Contacts and Tasks. If you want to have reminders in other folders, for example in sub folders of calendar, in other email folders, you can use this function.
Though there is no interface in Outlook to do this, the functions are document MAPI functions, this function is not using any undocumented things.

|
|
4. Delete search folders
|
|
If Outlook crashes while you have a search folder open or any search running (including activities) it will not delete the search folder it has created for this search. After 99 search folders, it will not create new ones. Search Folders also keep searching your data file until they are deleted, so each search folder will take some computing time.
Please do not remove the standard search folders like Reminders.

|
|
5. Change Message class
|
| A message class defines which Outlook form is used to display data. For example the contact form is named IPM.Contact. If you created a new contact form for your customers, this may be named as IPM.Contact.Customer. Now after creating a new form, the old contacts will still open with old contact form until you change the message class.
It is easy to create a new contact (or any other) form in Outlook, you do not even need to know anything about VB scripting or programming until you want to do some very special things.
- Open the contact folder
- Create a new contact
- Select tools/forms/Modify to start designing the contact.
- Choose a free tab sheet (for example S.2)
- At the Actions menu, rename the tab sheet
- In the field window, create a new field, for example customer number
- Move the field to the new page.
- A new page with only one field is somewhat boarding, but you can add more fields or for example a picture. Find the toolbox window and add an element from type Display, now right click and select extended properties. You will find a field where to choose the picture from.
- Save the contact using tools/forms/publish
This name is the message class, for example IPM.Contact.Customer
- You do not need to save your empty form, it has been published (but before closing it, try if you can instanciate a new element of this).
- To create a new instance of your new form, click in Actions/New: Customer, this will open a new empty form with your additional field.
- In order to see the new field in all existing contacts, use OLfix change message class on the contact folder and modify IPM.Contact into IPM.Contact.Customer.
- If you like to edit the form definition, start by creating a new element.
- Use your form
If you work in a network, all workstations will now have access to the new form.
Hint: If you have many versions of Outlook, edit the form definition on the oldest one, newer Outlook can read the old form definition, if older Outlooks can read a new form definition, nobody knows. |
|
6. Find duplicates
|
|
Innovative duplicates finder for Outlook.
The duplicates finder searches for different kinds of duplicates in a file or in all files. It is always searching in all folders available and all kinds of objects (contacts, emails, tasks) etc.
OLfix can find three different kinds of duplicates:
-
Elements which are a copy of each other.
You copied a contact to a different folder. OLfix is able to find this contact (this also applies to all other elements).
-
Contacts by email
Finds all contacts with the same email address
-
Emails by Message ID
Finds all emails which have been received more than once or have been copied.
We can not find elements which are equal by field compare, for example if you entered the same contact more than once, probably written a bit different.
After the search has been finished, you will see a list of duplicate elements, which can be marked as duplicated and then be displayed in a special Outlook search folder will combine all elements of all folders and allow you to easily open and delete the duplicate entries. We currently do not delete duplicates, because usually if you have duplicate elements, both of them are different, for example if one instance has been updated. On each pair, you must find out by yourself, which of the copies you want to keep and which should be deleted.

Picture 1: Selection of files

You have two options with duplicates:
1. Mark all duplicates with a flag so that they appear in our search folders
2. Automatically move the items to a sub folder
1. If you mark your duplicates, nothing will be moved or deleted, however all duplicate elements will appear in a special search folder und “OLFix duplicates” in your tree. You are now able to examine all duplicates and manually delete each item. If you delete the item in the search folder, it gets deleted at the original position, so please do not delete all items in the search folder, instead move the search folder to the deleted items folder if done.
2. If you choose to move the elements, OLfix will create a structure under “OLfix duplicates” and move all elements from the original position to that folder. Below that folder it will create the same structure as you have in your Outlook. Because this operation can not be undone, please create create a backup of your data before you are using this function.
You can find the position of your PST file by file/data files in the property window. If you are using Exchange, we recommend exporting the data to a PST file.
Cautions:
-
We will not delete any data, but we will move elements from one folder to a different folder. You may not be able to find your elements at the previous position.
-
OLfix can not find out, which of the copies you wanted to keep and which of the copies you wanted to delete. Usually you must look at the results and move some elements back.
-
Use this function at your own risk!
-
Please create a backup of your data before staring automatic movement.
-
Instead of deleting the duplicates we moved to the folder, we recommend moving them to an archive file. You may discover later, that you made for example a comment in an older copy of a contact.
Picture 2: Displaying duplicates
Click to enlarge / Back – click on your Browser “Back” button.
|
|
7. Automatically find and delete Extend.dat
|
|
Outlook nearly always forgets to update its cache for extensions, which is stored in extend.dat if an extension has been de-installed. You get an error message about a missing DLL after de-installing any application. Deleting extend.dat resolves this problem, the cache will be re-built with the current settings from the registry and the add-in directory.
If you still get an error message, try to find the reference here:
c:\program files\microsoft\office\<your office version>\add-ins
You should find an .ecf for the deleted extension, this can be deleted
Registry: HKLM\Software\Microsoft\Exchange\Client\Extensions and HKCU\Software\Microsoft\Exchange\Client\Extensions
You should find a registry key here naming the name and the DLL.
|
|
7. File extensions
|
|
Sets or re-sets blocked file extensions. Outlook does not show or does not allow opening certain files, this menu item can modify this
|
|
8. Outlook repair
|
|
Outlook can be started with some command line arguments, however this not documented in the manuals but can be found somewhere at the Microsoft technet sites and various other sites. OLFix allows starting repair options without typing
/CleanFreeBusy. Resets the free/busy
/Cleanreminders. Re-Creates the reminders folder
/Cleanviews. Re-Creates views
/CheckClient. Checks if Outlook is standard mail client
/ResetFolders. Re-Creates the default folders
/CleanSchedPlus. Recovers calendar entries
/Safe. Start in safe mode.
/Cleanpst. In Internet-Mode: Creates a new profile with PST file
/Cleanfinders. Re-Creates search folders at the Exchange server
|
|
9. CALL scanpst, Repair the inbox
|
|
Outlook has a built in inbox repair tool: SCANPST, however in each version of Outlook, depending on the windows version and languages of Outlook and Windows, the file is in a different directory. OLFix tries to find SCANPST.EXE, calls it, enters the file name and waits for the file to be checked, if there is an error, it presses automatically the repair function.
If you do not wisth to call it automatically, just disable the button and let OLfix start SCANPST for you with the file name in the clipboard.
If OLfix is unable to find SCANPST.EXE, please copy it to the program directory of OLfix.
|
|
10. Secret options
|
|

Turns secret options on or off.
-
Use Query Editor
Enables the hidden query editor in Outlook or hides it.You find the query editor in the last tab in advanced search.
-
Use Outlook Adressbook as Windows Adress book
In Windows prior to Vista, the windows Addressbook was able to read the Outlook address book, this way Outlook Express and many other sofware where able to read and modify the Outlook data without even knowing that the data comes from Outlook
-
Modify shortcuts
The file open menu can display different shortcuts in the right button pane, for example you can set up your memory stick here or hide some of the default folders.
In order to do so, you eventually must enter the office version manually, Outlook 2000 is Office 9, 2002 is Office 10 etc. Each office version may have different settings.

|
|
COPYRIGHT und TRADEMARK
Microsoft und Outlook und/or other Microsoft products are registered trade marks of Microsoft Microsoft Corporation in the U.S and other countries. All other trade marks are owned by the manufacturers of the products.
|
Posted by aionman on Aug 14, 2009 in
CentOS,
Linux
How To Install VMware Server On A CentOS 5.0 Desktop
This tutorial provides step-by-step instructions on how to install VMware Server on a CentOS 5.0 desktop system. With VMware Server you can create and run guest operating systems (“virtual machines”) such as Linux, Windows, FreeBSD, etc. under a host operating system. This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free).
Also, with VMware Server you can let your old Windows desktop (that you previously converted into a VMware virtual machine with VMware Converter, as described in this tutorial:http://www.howtoforge.com/vmware_converter_windows_linux) run under your CentOS desktop. This can be useful if you depend on some applications that exist for Windows only, or if you want to switch to Linux slowly.
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Find Out Your Kernel Version
Before we go on and install additional software, it’s a good idea to find out about your kernel version because in chapter 2 we will install the package kernel-devel which is needed by VMware Server. There are multiple kernel-devel packages available, and to select the right one you need to know your kernel version.
To find out about your kernel version, open a terminal (Applications > Accessories > Terminal):

Then become root by running:
su
Then run
uname -r
The output should look like this:
[root@localhost Desktop]# uname -r
2.6.18-8.1.3.el5
which means you have kernel 2.6.18-8.1.3.el5 installled.
2 Installing Required Packages
Before we install VMware Server, we must install some prerequisites. To install them, go to Applications > Add/Remove Software:

Type in the root password:

The Package Manager opens. Go to the Browse tab and select:
- Development > Development Libraries
- Development > Development Tools

Then go to the Search tab and search for xinetd. Select the xinetd package for installation:

Do the same for the kernel-devel package. Please make sure you select the kernel-devel package that corresponds to your current kernel (so if you kernel is 2.6.18-8.1.3.el5, select the kernel-devel – 2.6.18-8.1.3.el5.i686 package).

Click on Apply afterwards.
The Package Manager will then resolve all dependencies, download the packages, maybe ask you to accept some unknown software keys (please accept them), and finally install the packages.
3 VMware Server
To download VMware Server, go to http://www.vmware.com/download/server/ and click on Download Now:

Accept the license agreement by clicking on Yes:

Then download the VMware Server for Linux .tar.gz file (not the rpm file!) to your desktop (e.g. to /home/falko/Desktop):



To get the serial number you need to run VMware Server, go to http://register.vmware.com/content/registration.html. Fill in your personal details. Afterwards you will get a page with a serial number for VMware Server. Write it down or print it out:


To install VMware Server, open a terminal (Applications > Accessories > Terminal) and become root:
su
Then go to the location where you saved the VMware Server .tar.gz file, e.g. /home/falko/Desktop (replace falko with your own username!):
cd /home/falko/Desktop
Unpack the VMware Server .tar.gz file and run the installer:
tar xvfz VMware-server-*.tar.gz
cd vmware-server-distrib
./vmware-install.pl
The installer will ask you a lot of questions. You can always accept the default values simply by hitting <ENTER>. When it asks you
In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]
you can accept the default value or specify a different location where you have more free disk space, e.g. like /home/falko/virtual_machines, but this is up to you and not necessary.
At the end of the installation, you will be asked to enter a serial number:
Please enter your 20-character serial number.
Type XXXXX-XXXXX-XXXXX-XXXXX or ‘Enter’ to cancel:
Fill in your serial number for VMware Server.
After the successful installation, you can delete the VMware Server download file and the installation directory:
cd ../
rm -f VMware-server*
rm -fr vmware-server-distrib/
You will now find VMware Server under Applications > System Tools:

When you start it, select Local host:
With VMware 2.0 The most noticeable change is that the vmware server console is … gone.

Afterwards, you can create virtual machines (or import your virtual Windows machine that you created with VMware Converter):

Posted by aionman on Aug 14, 2009 in
Others
How To Install VMware Server On A CentOS 5.0 Desktop
Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 05/08/2007
This tutorial provides step-by-step instructions on how to install VMware Server on a CentOS 5.0 desktop system. With VMware Server you can create and run guest operating systems (“virtual machines”) such as Linux, Windows, FreeBSD, etc. under a host operating system. This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free).
Also, with VMware Server you can let your old Windows desktop (that you previously converted into a VMware virtual machine with VMware Converter, as described in this tutorial:http://www.howtoforge.com/vmware_converter_windows_linux) run under your CentOS desktop. This can be useful if you depend on some applications that exist for Windows only, or if you want to switch to Linux slowly.
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Find Out Your Kernel Version
Before we go on and install additional software, it’s a good idea to find out about your kernel version because in chapter 2 we will install the package kernel-devel which is needed by VMware Server. There are multiple kernel-devel packages available, and to select the right one you need to know your kernel version.
To find out about your kernel version, open a terminal (Applications > Accessories > Terminal):

Then become root by running:
su
Then run
uname -r
The output should look like this:
[root@localhost Desktop]# uname -r
2.6.18-8.1.3.el5
which means you have kernel 2.6.18-8.1.3.el5 installled.
2 Installing Required Packages
Before we install VMware Server, we must install some prerequisites. To install them, go to Applications > Add/Remove Software:

Type in the root password:

The Package Manager opens. Go to the Browse tab and select:
- Development > Development Libraries
- Development > Development Tools

Then go to the Search tab and search for xinetd. Select the xinetd package for installation:

Do the same for the kernel-devel package. Please make sure you select the kernel-devel package that corresponds to your current kernel (so if you kernel is 2.6.18-8.1.3.el5, select the kernel-devel – 2.6.18-8.1.3.el5.i686 package).

Click on Apply afterwards.
The Package Manager will then resolve all dependencies, download the packages, maybe ask you to accept some unknown software keys (please accept them), and finally install the packages.
3 VMware Server
To download VMware Server, go to http://www.vmware.com/download/server/ and click on Download Now:

Accept the license agreement by clicking on Yes:

Then download the VMware Server for Linux .tar.gz file (not the rpm file!) to your desktop (e.g. to /home/falko/Desktop):



To get the serial number you need to run VMware Server, go to http://register.vmware.com/content/registration.html. Fill in your personal details. Afterwards you will get a page with a serial number for VMware Server. Write it down or print it out:


To install VMware Server, open a terminal (Applications > Accessories > Terminal) and become root:
su
Then go to the location where you saved the VMware Server .tar.gz file, e.g. /home/falko/Desktop (replace falko with your own username!):
cd /home/falko/Desktop
Unpack the VMware Server .tar.gz file and run the installer:
tar xvfz VMware-server-*.tar.gz
cd vmware-server-distrib
./vmware-install.pl
The installer will ask you a lot of questions. You can always accept the default values simply by hitting <ENTER>. When it asks you
In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]
you can accept the default value or specify a different location where you have more free disk space, e.g. like /home/falko/virtual_machines, but this is up to you and not necessary.
At the end of the installation, you will be asked to enter a serial number:
Please enter your 20-character serial number.
Type XXXXX-XXXXX-XXXXX-XXXXX or ‘Enter’ to cancel:
Fill in your serial number for VMware Server.
After the successful installation, you can delete the VMware Server download file and the installation directory:
cd ../
rm -f VMware-server*
rm -fr vmware-server-distrib/
You will now find VMware Server under Applications > System Tools:

When you start it, select Local host:

Afterwards, you can create virtual machines (or import your virtual Windows machine that you created with VMware Converter):

Posted by aionman on Aug 11, 2009 in
Ubuntu,
Zimbra
Ubuntu Backup and Restore
1: Backing-up
To do this, become root with
and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)
Now, below is the full command I would use to make a backup of my system:
Code:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
Since I always keep an update copy of my mail server, I’ll exclude that from the backup as well
Code:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exlucde=/backup --exclude=/opt/zimbra /
Now, lets explain this a little bit.
The ‘tar’ part is, obviously, the program we’re going to use.
‘cvpfz’ are the options we give to tar, like ‘create archive’ (obviously),
‘preserve permissions’(to keep the same permissions on everything the same), and ‘gzip’ to keep the size down.
Next, the name the archive is going to get. backup.tgz in our example.
Next comes the root of the directory we want to backup. Since we want to backup everything; /
Now come the directories we want to exclude. We don’t want to backup everything since some dirs aren’t very useful to include. Also make sure you don’t include the file itself, or else you’ll get weird results.
You might also not want to include the /mnt folder if you have other partitions mounted there or you’ll end up backing those up too. Also make sure you don’t have anything mounted in /media (i.e. don’t have any cd’s or removable media mounted). Either that or exclude /media.
EDIT : kvidell suggests below we also exclude the /dev directory. I have other evidence that says it is very unwise to do so though.
Well, if the command agrees with you, hit enter (or return, whatever) and sit back&relax. This might take a while.
Afterwards you’ll have a file called backup.tgz in the root of your filessytem, which is probably pretty large. Now you can burn it to DVD or move it to another machine, whatever you like!
EDIT2:
At the end of the process you might get a message along the lines of ‘tar: Error exit delayed from previous errors’ or something, but in most cases you can just ignore that.
Alternatively, you can use Bzip2 to compress your backup. This means higher compression but lower speed. If compression is important to you, just substitute
the ‘z’ in the command with ‘j’, and give the backup the right extension.
That would make the command look like this:
Code:
tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /
2: Restoring
Warning: Please, for goodness sake, be careful here. If you don’t understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!
Well, we’ll just continue with our example from the previous chapter; the file backup.tgz in the root of the partition.
Once again, make sure you are root and that you and the backup file are in the root of the filesystem.
One of the beautiful things of Linux is that This’ll work even on a running system; no need to screw around with boot-cd’s or anything. Of course, if you’ve rendered your system unbootable you might have no choice but to use a live-cd, but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I’m not giving you that command though! 
Well, back on-topic.
This is the command that I would use:
Code:
tar xvpfz backup.tgz -C /
Or if you used bz2;
Code:
tar xvpfj backup.tar.bz2 -C /
WARNING: this will overwrite every single file on your partition with the one in the archive!
Just hit enter/return/your brother/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure that, before you do anything else, you re-create the directories you excluded:
Code:
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
etc...
And when you reboot, everything should be the way it was when you made the backup!
2.1: GRUB restore
Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say, install Windows), You’ll also need to reinstall GRUB.
There are several very good howto’s on how to do that here on this forum, so i’m not going to reinvent the wheel. Instead, take a look here:
http://www.ubuntuforums.org/showthre…t=grub+restore
There are a couple of methods proposed. I personally recommend the second one, posted by remmelt, since that has always worked for me.
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Isn’t it easier to do this:
1. Pop in the Live CD, boot from it until you reach the desktop.
2. Open a terminal window or switch to a tty.
3. Type “grub”
4. Type “root (hd0,6)”, or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
5. Type “setup (hd0)”, ot whatever your harddisk nr is.
6. Quit grub by typing “quit”.
7. Reboot.
I may be missing your point though, if so, please forgive me 
Quote:
Originally Posted by vnbuddy2002
Restore GRUB quite simple in Ubuntu, instead going through all the “gain root access” and play with shell commands, you can use the Ubuntu installation CD to
restore it without going through all kinds of hassles.Here are the steps:
1. Boot your computer up with Ubunto CD
2. Go through all the process until you reech “[!!!] Disk Partition”
3. Select Manual Partition
4. Mount your appropriate linux partions
/
/boot
swap
…..
5. DO NOT FORMAT THEM.
6. Finish the manual partition
7. Say “Yes” when it asks you to save the changes
8. It will give you errors saying that “the system couldn’t install …..” after that
9. Ignore them, keep select “continue” until you get back to the Ubuntu installation menu
10. Jump to “Install Grub ….”
11. Once it is finished, just restart your computer
Good luck!.
Zimbra Emergency Repairs
Preparing to Back Up
Before we begin, make sure that you are logged in as a user that can perform the tasks outlined here.
It is always good practice to backup your copy of Zimbra in the event of unforeseen circumstances.
To prevent changes to any Zimbra databases during the backup processes you may wish to use:
>su zimbra
>zmcontrol stop
to terminate Zimbra.
If you get some kind of error, you may want to make sure that Zimbra has completly stopped by running:
>ps auxww | grep zimbra
and kill any left over processes such as the log.
Alternatively as root you could run the following command to kill all Zimbra user owned processes instantly (use wisely):
>ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'`
Backing Up
Make sure that the copy location has enough space to support your backup copy (i.e. the /tmp folder probably isn’t the best location).
Since all of the components Zimbra needs are stored in the Zimbra folder itself, you can simply copy the folder to a safe location.
It may be possible to create a cron job to do these tasks automatically.
Copy Command: cp -Rp /opt/zimbra [location path]
Depending on your hardware and the amount of data contained in your Zimbra installation, this process can take a while.
Note: It is a very good idea to tag your installation with the version/build of zimbra that will be backed up (ie 3.0.0_GA_156) and the date of backup. You’ll need this later.
Restoring
Before restoring, you should make sure that all of the processes accociated with the damaged/failed Zimbra installation are terminated. Failure to terminate all of the processes could have dire consquences. See “Preparing to Backup” for additional info.
====Rename your “broken” Zimbra installation.’
You may be able to scavenge data, if needed. If you simply do not want the old data, you can skip this part.
>mv /opt/zimbra [new location i.e. /tmp/zimbra-old]
You may want to move it completly out of the /opt folder just to be safe.
Copy your backup Zimbra installation to the /opt folder and name it “zimbra”.
>cp -rp [location of backup] /opt
>mv /opt/[backup name] /opt/zimbra
Restore to Existing/Backup Zimbra Server
In the event of a failure, you can either restore your /opt/zimbra folder to a server that is not currently running Zimbra and download a dummy copy of Zimbra and run an upgrade in order to clean everything up and make it run correctly again (see next section), or you may restore the backup to an existing Zimbra server. This will only work if the existing server is running the EXACT SAME VERSION of Zimbra as the backup you want to restore. Also, this has been tested and seems to work well with CE 4.5.8, but did not work with 4.5.7. This may be, for example, a backup email server that you want to always keep current with last night’s backup, so it can replace the production server on short notice in the event of a disaster.
Simply set up your backup server identical to your production server (preferably the same OS, but necessarily the exact same version of Zimbra). Any modifications you made or packages you added for your production server with regards to extra anti-spam protection, etc., should also be added to this server. Shut down Zimbra on the backup server. Copy /opt/zimbra from your backup to the backup server.
chown -R zimbra:zimbra /opt/zimbra
/opt/zimbra/libexec/zmfixperms
Start Zimbra. Everything should work. The advantage to this method is that you can retain all your customizations (anti-spam modifications, for example) that would otherwise have been lost in the “upgrade” method. Also, this allows you to use a script to keep a backup server current without having to reinstall Zimbra after each time the backup server is made current, or before putting the backup server into production in the event of a failure.
Downloading a Dummy Copy of Zimbra
Now, we need to know what build/version of zimbra you were running. If you followed the backup instructions above, then the backup folder should be tagged with the version/build you have backed up.
You need to download the full install of the Zimbra version you were running. You may find all Zimbra releases at: Sourceforge.
If you don’t know your version number, you can find it by:
Method 1 - view install_history file.
cat /opt/zimbra/.install_history
Method 2 - dont think this will work unless you did a bunch of chroots.
zmcontrol -v
Both of the above listed methods were from this forum post
Installing the Dummy Copy of Zimbra
Once you have downloaded the tar file, you will need to uncompress it by:
>tar -xvzf [name of file].tgz
This will create a folder in the directory named “zcs”, cd to it and run the install script:
>cd zcs
>./install.sh
WARNING: Do not run the script with the -u option. You will remove all of your backup data & you must run the script as root, NOT ZIMBRA.
The script will remove the existing packages, and install them again. The script will attempt to stop Zimbra Services and “UPGRADE FAILED – exiting”. This is okay, simply rerun the script, and it will install normally.
If you experence error 389, -1, connection refused errors, please search the Forums. These errors are covered extensivly.
Resetting Permissions
If you are up and running now, you may have one more hurdle to overcome: permissions.
You may need to reset the permissions on the message store by running the following:
>/opt/zimbra/libexec/zmfixperms
This is potentially a dangerous suggestion, but if you have trouble getting tomcat to start even after you run zmfixperms, try running (worked for ZCS 4.5.7 CE)
chown -R zimbra:zimbra /opt/zimbra
Of course, you must run
/opt/zimbra/libexec/zmfixperms
again after that. It appears that zmfixperms is supposed to chown zimbra:zimbra on something, but it misses it. This way, you chown EVERYTHING zimbra:zimbra, and zmfixperms puts back things that need to be owned as root, postfix, etc.
Disaster Recovery
In the unfortunate event of losing your complete server or installation, the following will get you up and running.
This has been tested successfully on v5.0.5
- The machine you are recovering to must have the same hostname as the original machine.
- Once you have your OS and all pre-requisites installed. Download and install Zimbra as normal.
- Once Zimbra is installed, stop all Zimbra services and move/rename the /opt/zimbra folder:
sudo -u zimbra /opt/zimbra/bin/zmcontrol shutdown
mv /opt/zimbra /tmp/zimbra-old
- Uncompress the most recent backup file to the /opt/zimbra folder
mkdir /opt/zimbra
tar zxvf [backup file] -C /opt/zimbra
or if you prefer…
tar zxvf [backup file] -C /tmp/zimbra-backup
cp -Rp /tmp/zimbra-backup /opt/zimbra
- Fix the Zimbra permissions
chown -R zimbra:zimbra /opt/zimbra
/opt/zimbra/libexec/zmfixperms
- Restart all Zimbra services
sudo -u zimbra /opt/zimbra/bin/zmcontrol startup
zmcontrol startup
You should now be able to access Zimbra as normal.
Posted by aionman on Aug 10, 2009 in
Zimbra
Account mailbox database structure
Each zimbra account is associated with a mailbox group, which is based on the mailbox id number. (The mailboxId is specific to the store, the zimbraId on the other hand is system wide). You can determine the mailbox id for an account (this example account is named “b@test.test”) like this:
$ zmprov getMailboxInfo b@test.test
mailboxId: 5247
quotaUsed: 1951021
Mailbox users are members of mailbox groups on a rotation up to a maximum of 100 mailbox groups; you can determine the mailbox group by modulo division of the mailbox id by 100 (the remainder of dividing the mailbox id by 100, i.e only the last two digits). Note that if the result is zero, the mailbox group is 100, not 0.
$ expr 5247 % 100
47
Take a look at the mail_item table in the mailbox group database, particularly the date, size, sender, and subject columns.
$ mysql mboxgroup47
mysql> describe mail_item;
+--------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| mailbox_id | int(10) unsigned | NO | PRI | | |
| id | int(10) unsigned | NO | PRI | | |
| type | tinyint(4) | NO | | | |
| parent_id | int(10) unsigned | YES | | NULL | |
| folder_id | int(10) unsigned | YES | | NULL | |
| index_id | int(10) unsigned | YES | | NULL | |
| imap_id | int(10) unsigned | YES | | NULL | |
| date | int(10) unsigned | NO | | | |
| size | int(10) unsigned | NO | | | |
| volume_id | tinyint(3) unsigned | YES | MUL | NULL | |
| blob_digest | varchar(28) | YES | | NULL | |
| unread | int(10) unsigned | YES | | NULL | |
| flags | int(11) | NO | | 0 | |
| tags | bigint(20) | NO | | 0 | |
| sender | varchar(128) | YES | | NULL | |
| subject | text | YES | | NULL | |
| name | varchar(128) | YES | | NULL | |
| metadata | text | YES | | NULL | |
| mod_metadata | int(10) unsigned | NO | | | |
| change_date | int(10) unsigned | YES | | NULL | |
| mod_content | int(10) unsigned | NO | | | |
+--------------+---------------------+------+-----+---------+-------+
Let’s examine a single mail item.
mysql> select * from mail_item where id>26000 and mailbox_id=5247 limit 1 \G
*************************** 1. row ***************************
mailbox_id: 5247
id: 26001
type: 5
parent_id: NULL
folder_id: 2
index_id: 26001
imap_id: 26001
date: 1182380903
size: 95842
volume_id: 1
blob_digest: rbrw+fj0tvyvTPt2haxssued7,A=
unread: 1
flags: 2
tags: 0
sender: sender@domain.com
subject: Message subject
name: NULL
metadata: d1:f147:This message...1:p8:Re: SF: 1:s21:sender@domain.com1:vi10ee
mod_metadata: 30102
change_date: 1182380905
mod_content: 30102
1 row in set (0.00 sec)
With the volume_id, mailbox_id, id, and mod_content fields, you can determine the location of the message “blob” file. Volume 1 is the default message store:
mysql> select * from zimbra.volume;
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+
| id | type | name | path | file_bits | file_group_bits | mailbox_bits | mailbox_group_bits | compress_blobs | compression_threshold |
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+
| 1 | 1 | message1 | /opt/zimbra/store | 12 | 8 | 12 | 8 | 0 | 4096 |
| 2 | 10 | index1 | /opt/zimbra/index | 12 | 8 | 12 | 8 | 0 | 4096 |
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+
On the filesystem, the user directories and the message directories within each user directory are split so that there are a maximum of 4096 (that is, 212) files in each directory. To determine the appropriate directory “hash” numbers, bitshift the mailbox_id and the mail item id to the right by 12 bits (i.e. divide by 212, rounding down). It is significant to note that if the id is less than 4096, the hash number will be 0.
$ perl -e 'print 5247 >> 12 ; print "\n"'
1
$ perl -e 'print 26001 >> 12 ; print "\n"'
6
The mod_content field is used to keep track of message blob file revisions. If a blob file is ever updated (for example, if a calendar appointment is modified), the filename and this field are updated. So, if the user with mailbox_id 5427 has a message on volume 1 with id 26001 and mod_content 30102, we’ll see it like this:
$ ls -l /opt/zimbra/store/1/5247/msg/6/26001-30102.msg
-rw-r----- 1 zimbra zimbra 95842 Jun 20 16:08 /opt/zimbra/store/1/5247/msg/6/26001-30102.msg
Assuming only the default message store is in use, the filename for an item may be derived with a query.
mysql> select id,
concat('/opt/zimbra/store/', (mailbox_id >> 12), '/', mailbox_id, '/msg/',
(id >> 12), '/', id, '-', mod_metadata, '.msg') as file
from mail_item where mailbox_id="723" limit 1;
+-----+-------------------------------------------+
| id | file |
+-----+-------------------------------------------+
| 261 | /opt/zimbra/store/0/723/msg/0/261-103.msg |
+-----+-------------------------------------------+
Posted by aionman on Aug 6, 2009 in
Windows XP
The sfc scannow option is one of several specific switches available in the sfc command, the Command Prompt command used to run System File Checker. Sfc /scannow is the most common way that the sfc command is used.
Sfc /scannow will inspect all of the important Windows files on your computer, including Windows DLL files. If System File Checker finds an issue with any of these protected files, it will replace it.
Important: You must be logged in as a user with administrator rights in order to run the sfc /scannow command.
Follow these steps for using sfc with the scannow option to repair important Windows files:
Difficulty: Easy
Time Required: Using sfc /scannow to repair important Windows files usually takes 5 to 10 minutes.
Here’s How:
Open Command Prompt.
Important: You must run Command Prompt as an administrator in Windows 7 and Windows Vista to use System File Checker.
Once Command Prompt is open, type the following command and then press Enter.
sfc /scannow
System File Checker will now verify the integrity of every protected operating system file on your computer.
Note: In some situations, especially in Windows XP and Windows 2000, you may also need access to your original Windows installation CD or DVD.
Restart your computer if sfc /scannow did actually repair any files.
Note: System File Checker may or may not prompt you to restart but even if it doesn’t, you should restart anyway.
Repeat whatever process caused your original problem to see if sfc /scannow corrected the issue.
Posted by aionman on Aug 5, 2009 in
Ubuntu
You can repair a corrupted filesystem with the program “fsck”.The system utility fsck (for “file system check” or “file system consistency check”) is a tool for checking the consistency of a file system in Unix and Unix-like operating systems such as Linux.
Note:- File systems must be unmounted, you cannot repair them while they are running.So fsck must ALWAYS be run on an UNmounted filesystem. Running fsck on a mounted filesystem can do SEVERE damage.
A quick fsck options overview:
Many options for fsck exist, but the most important are:
-f which performs a FAST check
-p which fixes minor problems without user interaction
-y which gives permission to correct every problem found
-n which indicates to only search (and not correct) problems
The most simple variant to run fsck is to force fsck on restart, and then restart your system:
sudo touch /forcefsck
The other option is to swich the system to runlevel 1 (logs-out any userRunning fsck on a mounted filesystem can do SEVERE damage), unmount all partitions. run fsck & repair, remount all drives, increase the runlevel to 3 and continue.
1) Take system down to runlevel one (make sure you run all command as root user):
# init 1
2)Unmount file system, for example if it is /home (/dev/sda3) file system then type command:
# umount /home
OR
# umount /dev/sda3
3) Now run fsck on the partition:
# fsck /dev/sda3
However be sure to specify the file system type using -t option. Recenly one of our sys admin run the command on ext3 file system w/o specifying file system. Result was more corruption as fsck by default assumes ext2 file system.
# fsck -t ext3 /dev/sda3
OR
# fsck.ext3 /dev/sda3
Tip if you don’t know your file system type then typing mount command will display file system type.
fsck will check the file system and ask which problems should be fixed or corrected. If you don’t wanna type y every time then you can use pass -y option to fsck.
# fsck -y /dev/sda3
Please not if any files are recovered then they are placed in /home/lost+found directory by fsck command.
4) Once fsck finished, remount the file system:
# mount /home
5) Go to multiuser mode
# init 3
Read man page of fsck for more information. Make sure you replace /dev/sda3 with your actual device name.
Posted by aionman on Aug 4, 2009 in
Linux,
Ubuntu
This guide shows how to remove a failed hard drive from a Linux RAID1 array (software RAID), and how to add a new hard disk to the RAID1 array without losing data.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
In this example I have two hard drives, /dev/sda and /dev/sdb, with the partitions /dev/sda1 and /dev/sda2 as well as /dev/sdb1 and /dev/sdb2.
/dev/sda1 and /dev/sdb1 make up the RAID1 array /dev/md0.
/dev/sda2 and /dev/sdb2 make up the RAID1 array /dev/md1.
/dev/sda1 + /dev/sdb1 = /dev/md0
/dev/sda2 + /dev/sdb2 = /dev/md1
/dev/sdb has failed, and we want to replace it.
2 How Do I Tell If A Hard Disk Has Failed?
If a disk has failed, you will probably find a lot of error messages in the log files, e.g. /var/log/messages or /var/log/syslog.
You can also run
cat /proc/mdstat
and instead of the string [UU] you will see [U_] if you have a degraded RAID1 array.
3 Removing The Failed Disk
To remove /dev/sdb, we will mark /dev/sdb1 and /dev/sdb2 as failed and remove them from their respective RAID arrays (/dev/md0 and /dev/md1).
First we mark /dev/sdb1 as failed:
mdadm –manage /dev/md0 –fail /dev/sdb1
The output of
cat /proc/mdstat
should look like this:
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[2](F)
24418688 blocks [2/1] [U_]
md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/2] [UU]
unused devices: <none>
Then we remove /dev/sdb1 from /dev/md0:
mdadm –manage /dev/md0 –remove /dev/sdb1
The output should be like this:
server1:~# mdadm –manage /dev/md0 –remove /dev/sdb1
mdadm: hot removed /dev/sdb1
And
cat /proc/mdstat
should show this:
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0]
24418688 blocks [2/1] [U_]
md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/2] [UU]
unused devices: <none>
Now we do the same steps again for /dev/sdb2 (which is part of /dev/md1):
mdadm –manage /dev/md1 –fail /dev/sdb2
cat /proc/mdstat
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0]
24418688 blocks [2/1] [U_]
md1 : active raid1 sda2[0] sdb2[2](F)
24418688 blocks [2/1] [U_]
unused devices: <none>
mdadm –manage /dev/md1 –remove /dev/sdb2
server1:~# mdadm –manage /dev/md1 –remove /dev/sdb2
mdadm: hot removed /dev/sdb2
cat /proc/mdstat
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0]
24418688 blocks [2/1] [U_]
md1 : active raid1 sda2[0]
24418688 blocks [2/1] [U_]
unused devices: <none>
Then power down the system:
shutdown -h now
and replace the old /dev/sdb hard drive with a new one (it must have at least the same size as the old one – if it’s only a few MB smaller than the old one then rebuilding the arrays will fail).
4 Adding The New Hard Disk
After you have changed the hard disk /dev/sdb, boot the system.
The first thing we must do now is to create the exact same partitioning as on /dev/sda. We can do this with one simple command:
sfdisk -d /dev/sda | sfdisk /dev/sdb
You can run
fdisk -l
to check if both hard drives have the same partitioning now.
Next we add /dev/sdb1 to /dev/md0 and /dev/sdb2 to /dev/md1:
mdadm –manage /dev/md0 –add /dev/sdb1
server1:~# mdadm –manage /dev/md0 –add /dev/sdb1
mdadm: re-added /dev/sdb1
mdadm –manage /dev/md1 –add /dev/sdb2
server1:~# mdadm –manage /dev/md1 –add /dev/sdb2
mdadm: re-added /dev/sdb2
Now both arays (/dev/md0 and /dev/md1) will be synchronized. Run
cat /proc/mdstat
to see when it’s finished.
During the synchronization the output will look like this:
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
24418688 blocks [2/1] [U_]
[=>...................] recovery = 9.9% (2423168/24418688) finish=2.8min speed=127535K/sec
md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/1] [U_]
[=>...................] recovery = 6.4% (1572096/24418688) finish=1.9min speed=196512K/sec
unused devices: <none>
When the synchronization is finished, the output will look like this:
server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
24418688 blocks [2/2] [UU]
md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/2] [UU]
unused devices: <none>
That’s it, you have successfully replaced /dev/sdb!
Tags: RAID, Rebuild RAID