[Cialug] migrating from ubuntu server to debian

Paul Gray gray at cs.uni.edu
Wed Mar 24 08:09:32 CDT 2010


Matthew Nuzum wrote:
> Hi, I have a server running Ubuntu 9.04 server. I'm trying to run
> software that's not well supported in Ubuntu but is well supported in
> Debian. I was wondering if anyone has any suggestions for switching.
> 
> There's a catch - I have no physical access to the server. :-/
> 
> I'm doing a test now in virtualbox but if anyone has any experience
> I'd appreciate it. The ideas that come to mind are:
> 
> 1. use dist-upgrade after changing the sources.list to point to debian
> 2. try to trigger the installer from a mounted ISO
> 
> I'm OK with either option. I have a 90GB filesystem on a 500GB drive
> using LVM. Does that give anyone any ideas?

You might be better served using debootstrap.  You can use debootstrap from 
within Ubuntu to install Debian.

Since you're using LVM, you can carve out a small partition (4GB) for the root 
Debian image, and dual boot your Ubuntu system alongside the Debian install 
system while you're troubleshooting the migration. (I'm wasn't sure if you were 
intending the entire 90GB LVM for Debian, or if that's what your current Ubuntu 
install is using.  If it's in use, 4GB is fine for a base install.)

Debootstrap is quite easy to use to pull in a base Debian installation.  The 
only real gotcha's are setting root password, configuring networking, and 
starting up ssh.

To start off, mount the Debian-to-be partition, under /target for example, and 
issue:
   debootstrap lenny /target http://debian.cns.uni.edu

Let it grind for a while.  Afterwards, (this is from memory, so take it with a 
grain of salt):
   mount --bind /dev /target /dev
   chroot /target
   # Now fix things in the target image so that you can boot it up and get in.
   mount -t proc none proc /proc
   mount -t devpts none /dev/pts
   apt-get install ssh locales initramfs-tools
   passwd
   vi /etc/network/interfaces  # define eth0 as appropriate
   # finally... You MAY need to generate an initrd
   mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
   # Then, you need to decide which system is going to maintain your grub setup
   # ... optional ...
   apt-get install grub
   # then fix grub.

Hope that I haven't missed any steps, but the above outline should get you 
through the bulk of the transition....at least enough to play with on your VBox 
environment.

-- 
Paul Gray                                         -o)
314 East Gym, Dept. of Computer Science           /\\
University of Northern Iowa                      _\_V
  Message void if penguin violated ...  Don't mess with the penguin
  No one says, "Hey, I can't read that ASCII attachment ya sent me."


More information about the Cialug mailing list