Archive for August, 2007 Page 5 of 6



Move linux to another hard drive (dump, restore, backup)

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

There are several methods to move running Linux to another hard drive at the same server. But I used Unix dump/restore utility to perform this…

First of all it’s necessary to partition new hard drive in the same way as it’s done with old drive (Linux is running at). I usually use ‘fdisk’ utility. Let’s assume that old drive is /dev/hda and new one is /dev/hdb. To view hda’s partition table please run ‘fdisk -l /dev/hda’ which should show something like this:

Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 15 120456 83 Linux
/dev/hda2 16 276 2096482+ 82 Linux swap
/dev/hda3 277 7297 56396182+ 83 Linux

After this run ‘fdisk /dev/hdb’ and make the same partitions at it. Interactive mode of fdisk utility is well documented and is very intuitive, so I don’t think it would be difficult to perform partitioning.

After this is done, we should make new filesystems at partitions we’ve created:

mkfs -t ext3 /dev/hdb1
mkfs -t ext3 /dev/hdb3
mkswap /dev/hdb2

When it’s done it’s NECESSARY to mark newly created filesystems as it’s done with old ones. To check filesystem volume name run command ‘tune2fs -l /dev/hda1 | grep volume’ and etc. You’ll see something like this:

Filesystem volume name: /boot

It means that we should mark new hdb1 with label /boot. It can be done by command:

tune2fs -L “/boot” /dev/hdb1

The same should be performed for all partitions except swap one. In my case I should label hdb3 by command:

tune2fs -L “/” /dev/hdb3

At this point new hard drive preparation is finished and we can proceed with moving Linux to it. Mount new filesystem and change directory to it:

mount /dev/hdb1 /mnt/hdb1
cd /mnt/hdb1

When it’s done we can perform moving by command:

dump -0uan -f - /boot | restore -r -f -

And the same with / partition:

mount /dev/hdb3 /mnt/hdb3
cd /mnt/hdb3
dump -0uan -f - / | restore -r -f -

When dump/restore procedures are done we should install boot loader to new HDD. Run ‘grub’ utility and execute in it’s console:

root (hd1, 0)
setup (hd1)
quit

In case everything is done carefully and right (I’ve tested this method by myself) you can boot from new hard drive and have ‘old’ Linux running at new hard drive running.

Good luck!

Autostart programs in Ubuntu

Ubuntu newbies sometimes ask how to add certain program into startup or autostart. Actually it usually happens with ex-Windows users ;)

Answer: To make program start just after user logins Gnome, go to “System” menu, then choose “Preferences” and select “Sessions”:

gnome sessions

Then press button “Add”, type application name, command to start it (it’s location like /usr/sbin/local/liferea), and press “Ok” and then “Close”. After next login to Gnome application will start. It works with any Linux distro running Gnome as Desktop manager.

Google phone (GPhone) rumors

LinuxDevices.org:

“Google’s first mobile phone will run a Linux operating system on a Texas Instruments “Edge” chipset, and will likely ship to T-Mobile and Orange customers in the Spring of 2008, according to unconfirmed reports. “GPhone” call minutes and text messages reportedly will be funded by mobile advertising…

News of the so-called “GPhone” or “G-Phone” broke quietly about two weeks ago in the island nation of Singapore, where Jennifer Tan of Reuters subsidiary Anian Research filed a report on July 12.

Tan cited “industry sources,” “U.S. sources,” and “manufacturing and component supply chain sources” in backing her assertion that after year-long delays finding a manufacturer, Google contracted Taiwan-based smartphone maker High Tech Computer (HTC) to design its phone hardware. HTC is best-known for its Windows Mobile smartphones, however, and Tan offered no conjecture about who might supply the phone’s Linux-based operating system.

Additional details reported by Tan include:

* The G-Phone will have a large color screen with a predictive Qwerty keypad to simplify Google searching
* A follow-up 3G-capable model (Edge is considered “2.75G”) will use a Qualcomm chipset
* Scheduled for production in Q1 of 2006, the Google phone will hit retail shelves next spring
* Call minutes and text messages are to be funded by “mobile advertising”
* Google originally hoped to launch a phone this year, but was delayed by “difficulties in nailing down a deal with a handset maker”
* T-Mobile will carrier the phone in the U.S., along with (possibly) Orange in other markets

Tan quotes Susquehanna Financial Group analyst Marianne Wolk as having said, “A mobile offering would be consistent with Google’s goal to make search accessible. We believe Google would design a solution to facilitate greater use of Google Search and other applications like Google Talk, Gmail, Google Maps, encourage wireless video, and leverage this usage to hasten the market for mobile advertising.”

Google itself has declined to comment on rumors it plans to produce a phone, Tan reported.”

Ryan Lortie: I’m excited about the future of gnome

“About half a year ago i was looking around me and seeing stagnation in the gnome community. I was concerned that gnome had lost its momentum and that we were just making boring incremental releases that added very little new functionality.

I think i was very wrong.”

Ryan Lortie

Google calendar and Linux Evolution sync

As we know Evolution is a default mail client program of Gnome Desktop manager. Here is a good article about how to sync Google Calendar with Evolution one.

Keep ssh session saved (Unix “screen” utility)

Unix screen utility is very useful when you’re managing remote unix server by means of ssh. This utility allows to save session opened and come back to it after being disconnected…
Let me describe the certain situation: you’ve started dump/restore backup operation for full filesystem mirroring to another hard drive remotely by ssh. It works fine and more than 50% is completed but after power outage or your internet supplier issue you’ve been disconnected from ssh session. As the result backup/restore operation is stopped and it’s necessary to start it again.

To prevent this just start ’screen’ utility and run needed command after this. In case of disconnection you’ll need to type ’screen -r’ (-r means restore) and come back to operations you were performing before being disconnected.

This utility is rather powerful and besides allows to create several virtual windows and switch between them by means of hot keys.

Here are some of useful hot keys:

CTRL-a c Create a new window
CTRL-a spacebar Go to next window
CTRL-a backspace or del Go to previous window
CTRL-a 2 Go to window 2
CTRL-a w list windows

Mobile phone contacts, calendar and messages online backup

I’m using different mobile phones and it’s very important for me to keep my contact list as well as calendar entries backed up and to be sure that all this data can be restored in case I’ve lost my phone or it’s broken or so…

As it usually seems annoying for me to get phone connected to PC via usb cable, bluetooth or etc. I’m using FREE online backup service ZYB.

By means of this service I regularly synchronize my phone data with online storage and in case if phone is lost or broken I restore contacts and etc. to new phone easily.

To get your cell phone data backed up it’s only needed to register at www.zyb.com, choose phone model, get synchronization settings via sms and synchronize data with online backup storage. It took less than 3 minutes to finish when I used it for the first time!

Very nice service and absolutely free (as beer)!




Information Improvisation: Operating system is the backbone for every organization. Having professionals with CISSP certification in organization ensures the life running through its networks. Organizations manage tremendous amounts of traffic due to the use of pc phone and people with 646-058 certifications are ideal for this job. They can also manage online networks which can be hosted on lunarpages, which also provides free email hosting. With the company's logo design every page and a well crafted web template the site can be given a graceful look.

 

Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››