Re: Converting a *live* Fedora box to Debian
On Sat, Feb 05, 2005 at 01:32:59PM +0000, Robert Brockway wrote:
> On Sat, 5 Feb 2005, Joe Emenaker wrote:
>
> >What I'm wondering is: is it possible to convert the machine completely
> >from Fedora to Debian *all* through an ssh session, without ever having
> >access to the box. I think it can be done. I'm experimenting with a raw
> >Fedora install
>
> Depends. If they left free space on the disk, and you do not care to hold
> on to any of the existing data it is relatively easy - just make a new
> Debian install using debootstrap in a free filesystem, setup your
> bootloader to know about it and boot into Debian. Now blow away Fedora
> and repeat installing Debian onto the rest of the disk.
and if there isn't any free disk space, you can unmount the swap partition and
reformat it as ext2/3 or xfs or whatever and install a base debian plus ssh
onto that. then reboot into debian, repartition and/or reformat the rest of
the disk and do the filesystem shuffle (i.e "cp -afx") to "install" onto your
real root fs. then reboot again and start installing whatever extra packages
you need. and mkswap the swap partition and swapon.
(if you're converting multiple boxes, take a .tar.gz of the debian-on-swap
filesystem and untar it onto the other machines as you need it. faster,
simpler, and easier than going through the install process multiple times.
remember to change /etc/hostname, /etc/mailname and any other files that
should be unique on each server - "find /etc -type f -print0 | xargs -0 grep
-il "HOSTNAME" will give you a list of files that need editing.)
i converted 4 RH9 boxes to debian this way a few months back. they were in
the UK, and i'm in .au. worked fine. i did have the advantage of the boxes
being compaq dl360/dl380 machines with rilo remote access cards, but it would
have been almost as easy to do without that.
> If you want to keep data is becomes a bit more complicated...
>
> You have to shuffle data. You can shutdown all services by stepping
> backwards through rcX.d (whatever runlevel you are using) and use fuser to
> umount filesystems as processes release them. You are effectively
> entering single user mode the hard way. I wouldn't just init S in case it
> shutdown networking.
easier to copy the data after rebooting into the mini debian partition but
before reformatting the old RH partitions - if you have enough free space on
the debian partitition (or somewhere easily accessible) that is.
and, of course, if you have important data on the RH box then make a backup
first - even an rsync to another machine could save you a lot of grief.
> This sort of endeavour will fall apart if you make one mistake.
it is easy to screw up, but a few *little* mistakes wont kill the whole
system. be careful, think ahead and plan what you are going to do and it
should be a hassle-free procedure.
but yes, this will be a lot easier if you are very familiar with debian (esp.
how the installer works) and very experienced at installing debian on a wide
variety of hardware.
if it is at all possible, practice it on a local machine first - but try not
to do anything (aside from the initial install of RH) that you wouldn't or
couldn't do remotely.
craig
--
craig sanders <cas@taz.net.au> (part time cyborg)
Reply to: