How To Remotely Install Debian Over A RH Based Distro
|
Submitted by jakev383 (Contact Author) (Forums) on Fri, 2008-08-08 14:25. :: CentOS | Debian | Fedora
How To Remotely Install Debian Over A RH Based DistroIntroductionOcassionally, servers need to be retasked for various reasons. It has always been a challenge when the server has a distribution other than what I need. I do not want to drive to the data center to swap CDs around, so I decided to see if there was a way to remotely install the machine. I found some notes by Erik Jacobsen and used them to come up with an up-to-date how-to. Hopefully this will be useful to others out there. Be warned that you can cause some serious headaches for yourself. I offer no warranties, expressed nor implied, that this will work for you. In this tutorial, I have an ancient Fedora Core 3 machine that I need to turn into a Debian Etch machine. The machine is 600 miles from my home office so traveling to put in CDs is not an economical option. The system has one 80G hard drive that is currently divided into 3 partitions: a 100M /boot partition, a 1G swap partition, and the remainder as the / partition for the Fedora Core installation. The machine has a public static IP address and will be accessed through an SSH connection. You'll need to make sure your swap space is adequate. We will be loading the base Debian system into the space currently allocated for swap, so you need to make sure you have enough room to accomplish this task. In my case I used 371M of space out of a 1012M swap when the Debian base was loaded, leaving me 590M of free space.
1) Install debootstrapIf you have another Debian machine available to you, you can build the debootstrap package yourself. You may download the latest debootstrap .deb file from here: http://packages.debian.org/etch/all/debootstrap/download On the Debian build machine, install alien: apt-get install alien You then need to convert the Debian .deb file to a RPM for the RH machine to use: alien -rkv debootstrap*.deb This will create a debootstrap RPM file that you need to install on the current RH based machine once you get it transferred over: rpm -Uvh debootstrap* I've made a copy of the RPM available in the event you cannot build it for whatever reason. You may download the RPM from http://v2gnu.com/filemgmt/visit.php?lid=27. I make this file available, but I will not be updating it.
2) Change the swap space into a usable filesystemThe remainder of this paper will be run on the RH machine that we will be converting into a Debian based machine. Turn off your swap space so we can load Debian onto it: swapoff -a Use fdisk -l to see which partition your swap space is. On my system, the swap space is /dev/hda2: Disk /dev/hda: 80.0 GB, 80026361856 bytes *** WARNING - You are now entering the point of no return where your system may be unusable! *** fdisk /dev/hda
Command (m for help): t Double check to make sure that the swap partition (/dev/hda2) is now a Linux partition: fdisk -l Disk /dev/hda: 80.0 GB, 80026361856 bytes We next need to format this partition as ext3 so that we may load the Debian base onto it: mke2fs -j /dev/hda2 mke2fs 1.35 (28-Feb-2004) There was an issue with the older Debian distros that balked at the dir_index flag. This issue may or may not be present in the newer versions. We're going to turn it off to be on the safe side: tune2fs -O ^dir_index /dev/hda2
3) Load the Debian packages onto the new partitionNext we create a variable name for the new partition to save on typing. We used $ASD as an arbitrary place holder since it was easier and quicker to type than /dev/hda2. Feel free to substitute any variable name that is convenient for you: export ASD=/mnt/asd We next create the directory to serve as the mount point: mkdir -p $ASD And lastly we mount the new partition: mount /dev/hda2 $ASD From here on, we can use $ASD in the place of /dev/hda2. Now we run debootstrap which will take a while and populate the packages needed. You will be choosing the architecture (i386 here), distribution (Etch used here), directory, and URL to a Debian archive. For the URL at the end, it can be any valid Debian mirror. You are encouraged to choose a mirror closest to your geographic location. A list of available mirrors is available on the main Debian site, specifically here: http://www.debian.org/mirror/list. I am going to use one of the more permanent mirrors so it may be a little slow, but feel free to use any mirror you wish (even your own repo!): /usr/sbin/debootstrap --arch i386 etch $ASD http://mirrors.kernel.org/debian This will take a while. Go have a cup of coffee or order a pizza. Once it's done you will have the base Debian packages installed into the new partition ($ASD).
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com





print: 
Recent comments
16 hours 22 min ago
17 hours 51 min ago
21 hours 25 min ago
1 day 19 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 6 hours ago