<br /> Shockingly easy server upgrade – Debian Planet

Welcome to Debian Planet

News for Debian. Stuff that *really* matters

These are important Debian sites one should not be without!

  • Official Debian site
  • Package search
  • Mailing list archives
  • Bug reports
  • Debian on CD
  • Debian Weekly News — excellent news source!
  • Unofficial APT sources

  • Developers’ Corner
  • Community
    Need help? You’re not alone on this planet.

  • debianHELP
    (User support site)

  • Debian International
  • DebianForum.de

  • DebianForum.dk

  • EsDebian

  • DebianWorld

  • Debian-Fr

  • MaximumDebian

  • DebianUsers

  • Debian-BR

  • DebianHOWTO (Deutsch)
  • Contribute
    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you’ve written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    General feedback should be sent to staff@debianplanet.org

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.oftc.net.

    Many of the Debian Planet staff live there so pop by and say hello.

    Debian Planet also has its own channel on the same network called #debianplanet.


    DP is sponsored by Xinit Systems.

    Domains paid for and hosted by uklinux.net.

    Buy your Debian merchandise at DebianShop.com.

    Support Debian through Bytemark Hosting. At least £7 will be given for each new account


    Shockingly easy server upgrade
    Submitted by mmims on Tuesday, December 03, 2002 – 02:44
    DebianFor a couple of years, I’ve been running a Debian GNU/Linux server in-house. The system is small, a 233 MHz Pentium MMX with 128 MB RAM. Initially, it only ran Majordomo with a couple of very small e-mail lists. As new needs arose, I began adding additional services: Samba, mgetty for two incoming fax lines, CVS, Jabber, Bugzilla, etc.

    Eventually, with the increasing demands placed on the system, performance became a concern — an upgrade was in order.

    A Dell PowerEdge 1400SC with 1.4 GHz Pentium III, 512 MB RAM, and a 4 x 36 GB RAID array using a PERC 3/DCL controller was ordered to replace the old system.

    The new server was ordered via 2-day air shipping to arrive in time to potentially spoil my Thanksgiving weekend. It Wednesday, the day before the holiday. We typically take a 4 day weekend. It was clear I was expected to have the new server up and running by Monday morning to avoid any down-time. The company’s experience has typically been with Windows server upgrades. The last one took nearly two weeks before it was 100% complete (a hardware upgrade coupled with an Exchange Server 5.5 to Exchange Server 2000 upgrade).

    I found an excellent resource for Linux and Dell PowerEdge servers at Matt Domsch’s Linux page. In particular, the netinst image provided by Steve Mickeler was invaluable.

    What follows, is the step-by-step process I went through to upgrade the system. Perhaps my searching skills have failed me, but I have not found HOW-TO style documentation for this type of upgrade. The method I used may, therefore, not be optimal (or even correct). It was surprisingly simple, though — so easy, in fact, that I must have missed something. More experienced Debian admins may be able to point out the shortcomings. If this technique proves to be sufficient, perhaps it will benefit others.

    The upgrade process:

    Download the netinst image

    Download Steve Mickeler’s netinst image and create a bootable CD.
    Install a base Debian system

    Use the netinst CD to install a base Debian system on the PowerEdge server.
    Edit /etc/apt/sources.list

    Edit /etc/apt/sources.list to provide access to an appropriate archive (CD, FTP, or HTTP) to obtain the two additional Debian packages required to complete the upgrade.
    Install netcat and pax
    apt-get install netcat pax
    Create a directory

    Create a directory to contain the old server contents and make it the current directory. I used the name of the old server:

    mkdir /minneola; cd /minneola
    Prepare to receive

    Pick an arbitrary port to listen on and prepare to receive the contents of the old server:
    nc -l 2666 | pax -rvp e
    Prepare to send

    Prepare the old server to transfer data. First enter single user mode to stop services and prevent changes to the file system during the transfer:
    telinit 1
    Un-mount foreign devices

    umount any all nfs, smb, cdrom, and other devices that are not part of the file system you wish transferred.
    Transfer top-level directories

    Transfer selected top lever directories to the new system:
    cd /
    pax -wv bin etc home lib root sbin usr var | nc -w 3 2666
    In my case, this set of top level directories contained all of the data I needed. The new server had been configured with a static address in the private addressing range we use in-house. I relied on the new system’s existing mnt, boot, dev, and tmp directories and the cdrom and floppy mount points. My case was also simplified by the fact that I used a single, large partition on both the old an new systems.

    The transfer time depends upon the amount of data to transfer and the speed of your network connection. In my case, it took about 2.5 hours to complete the transfer. The -v option used on the pax command will provide enough output to help you gauge the progress.
    Reboot from CD

    Reboot the new system using the netinst CD. When booted, start a shell and mount the the appropriate hard disk volume. In my case, that was /dev/sda5. I used the existing /mnt directory as a mount point. Make the mounted directory current.
    mount /dev/sda5 /mnt
    cd /mnt
    Copy hardware specific files

    Copy the three files with hardware specific configuration from the root directory into the old server tree:
    cp /etc/modules minneola/etc/modules
    cp /etc/fstab minneola/fstab
    cp /etc/lilo.conf minneola/lilo.conf

    Move kernel modules

    Move the kernel modules to the old server tree:
    mv /lib/modules/2.4.19-ac4 minneola/lib/modules
    Replace top-level directories

    Replace the top-level directories with the old server copies and remove the empty directory that held the old server tree.
    for i in bin etc home lib root sbin usr var; do
    rm -fr $i
    mv minneola/$i .
    rmdir minneola

    Reboot the new server and you’re done!

    This procedure work well for me. I started the process at 7 PM and was
    completely finished by 10 PM preserving my 4-day, holiday weekend. All the services came up without a problem and everything seems to be running well. I wonder, however, if I’ve missed anything important. Are there other hardware specific files I should copy from the old server or edit on the new server other than the three listed above?

    I suspect I re-invented the wheel and documentation exists describing how to migrate from one system to another with dramatically different hardware. Where is that documentation?

    Comments are welcome.

    Category: HOWTOs

    Control panel

    Comment viewing options:

    Select your prefered way to display the comments and click ‘Update settings’ to activate your changes.

    Subject: Thanks!
    Author: mootah
    Date: Thursday, 2003/05/01 – 16:47
    I used your suggested process to migrate from my trusty 200Mhz NEC 9629 to a similar Dell server (PowerEdge 1300). Simply put, I amazed myself completing the process in about an hour. Thanks so much for generously making the time to write that HOW-TO.

    I’d like to point out the very few problems I had acting on your suggestions to the letter.

    Instead of
    nc -l 2666 | pax -rvp e
    I had to add -p to specify the port like so:
    nc -l -p 2666 | pax -rvp e

    Later for the steps taken in /mnt I had to follow your instructions without the preceding /’s . Example:
    (after cd /mnt)
    cp /etc/modules minneola/etc/modules
    I did as :
    cp etc/modules minneola/etc/modules

    For the line
    mv /lib/modules/2.4.19-ac4 minneola/lib/modules
    I think it’s worth adding that one should cd to
    /mnt/lib/modules to see what their 2.x.x-x really is.
    I know this is should be obvious to someone confident enough to attempt this sort of thing but I think it would make it even more straightforward for people.

    Thanks to your clear explanations, it was easy for me to understand what you were meant. I’d like to add that this was the first server migration I’ve ever performed, so you’ve obviously done a great job on this.

    Thanks again!

    [ return ]

    Search articles

    ·News (189)
    ·Features (4)
    ·Site News (8)
    ·HOWTOs (41)
    ·Tips (5)
    ·Opinion (12)
    ·Q & A (18)
    ·Sponsorship (1)

    Log in


    Remember me

    » Register
    » New password

    Debian Security Announcements
    DSA-342 mozart
    DSA-341 liece
    DSA-339 semi
    DSA-338 proftpd
    DSA-337 gtksee
    DSA-336 linux-kernel-2.2.20
    DSA-335 mantis
    DSA-334 xgalaga
    DSA-333 acm
    DSA-332 linux-kernel-2.4.17

    Latest poll: Favourite music?
    (Prog) trance/house/hard house/etc
    Hayseed Dixie (AC/DC in hillbilly dixie style)
    I’m a rocker. I rock out.
    Bad 80’s

    home · archives · news feeds · about · polls · search · sections · user account

    Powered by the amazing Drupal

    Debian Planet is not officially related to the Debian Project.
    Debian and the Debian logo are trademarks of Software in the Public Interest, Inc.