Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remote Distribution Convert mini-HOWTO
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 07 Nov 2004
Posts: 35
Location: /brazil/sp/sao carlos

PostPosted: Sun Dec 26, 2004 12:38 am    Post subject: Remote Distribution Convert mini-HOWTO Reply with quote

Hello, guys. I wrote a simple howto on how to convert the Linux system in a machine that you don't have physical access. That happened to me when I needed to (re)install a Gentoo System in a University computer and I was in my summer vacation, taking driving lessons. I didn't know where to put it or who to send it, so, I am posting it here (hope you like it):

Remote Distribution Convert mini-HOWTO
Bruno Rodrigues Nery

This document is about converting a Linux Install remotely, that is, to change
the Linux distribution in a machine that you don't have physical access, but
have remote access.


What? I don't want distribution XYZ!

Suppose you rent a machine that is a thousand miles away, and that it has
ABC Linux installed, but you really like XYZ Linux. Or suppose that, just like
me, you have a Gentoo install that has only one big root partition and you
wanna change it, installing Gentoo again, but with a new partitioning scheme,
and this month you can't go there because you are taking driving lessons. :)
If you wanna do stuff like that, so this is your place.

And how would I do it, without a boot CD or something?

Well, you got to believe me: there is a way (I did it, and it worked, of
course :)). The idea is simple: you create a basic Linux install in a separated
partition, reboot the machine in the new install, repartition your hard disk,
and install the new distribution.

Let's do it!

Preparing the path

Before you start, you should know that you must have free space in your hard
disk: either as unpartitioned space, or as a reasonably big swap space (well,
the amount of megabytes - or gigabytes you need depends on your intermediary

In my case, I used Gentoo as the intermediary install (wich took me at about
700MB, but my swap space was 2GB, anyway), but you can use any distribution
that can be installed from another Linux distribution (such as Debian or
Slackware - Zipslack would do great).

Well, the first thing you should do is prepare the space: you can make a new
partition, or you may just do like me; first, turn off your swap:

# swapoff /dev/hda2

After that, change the filesystem type of the partition with fdisk the regular
way, and prepare the partition to receive the intermediary system:

# mkreiserfs /dev/hda2

Finally, install the intermediary system in your fresh new partition. In Gentoo,
I just untared a stage3 tarball; in Zipslack, it would be a simple unzip task.
With Debian, just a debootstrap command. Remember always to change hda2 to your
swap partition or any partition you are using to do the task.

Adjusting the tools

Intermediary system install is done. Now, you have to chroot in the boat that
will take you to your new install, just like that:

# chroot /bin/bash /mnt/hda2

Now that you are there, configure accounts so that you can login, network so that
you can access your boat remotely, and, of course, sshd or telnet (or you will
have a boat that you can't go in). Don't forget to configure the boot loader with
the new partition as the main one, and if you want, use any options that allow
a fallback to the old system in case of failure. It is also a good idea to create
a script to reboot in the old system after ten minutes or so (in case the system
boots, but network don't).

Cross your fingers and...

Now is the hour: prepare your self and type the magig 'reboot' word in the console.
Wait, wait, wait and login into the boat that will take you to your new distribution.
After you login in the intermediary system (and I hope it will work, just like with me),
just do like a normal Linux install: repartition, download, install, configure, and
so on. After that, reboot, turn the boat into a swap partition and have fun. :)
bruno nery, i.e., solo soramame

you won't suceed unless you try.
Back to top
View user's profile Send private message

Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Sun Dec 26, 2004 8:30 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum