[vox-tech] Conversion
Mike Simons
vox-tech@lists.lugod.org
Thu, 22 May 2003 16:39:54 -0400
--Y+Z5jE7Arku/2GrR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, May 22, 2003 at 12:59:21PM -0700, Matt Holland wrote:
> On Thursday, May 22, 2003, at 10:52 AM, Mike Simons wrote:
> >On Mon, May 19, 2003 at 01:41:41PM -0700, Richard Crawford wrote:
> >Hypothetically speaking, how difficult would it be to switch an
> >existing RH box to Debian? Assuming, of course, that all of the home
> >directories and downloaded extra software live on different partitions
> >than root...
> >
> > This is easy ... as Gabe mentioned it can be done remotely.
>=20
> Is it really? I've been having problems doing this myself, as I try to=
=20
> migrate a Gentoo system to Debian stable.
Yes, I've installed Debian on many dozens of machines that had some
other linux system before hand at least 5 remotely... I'm sorry he=20
didn't ask for steps so I didn't bring them up.
> The main problem is that I=20
> can't get the system to boot, and I think this is because I can't get=20
> mkinitrd to work.
If you have physical access:
Step one - Format your old root partition,
Step two - Proceed through the install process
Step three - ...
Step four - Working system (or profit!).
> I have noticed some curious things when I'm in the chroot environment. =
=20
> For one thing, /etc/mtab claims that /proc is the only mounted file=20
> system:
[...]
> My /etc/fstab looks like:
>=20
> # file system mount point type options dump pass
> /dev/hdb1 / ext2 defaults 1 1
> /dev/hdb2 none swap sw 0 0
> proc /proc proc defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,rw,sync,user,exec 0 0
This is not the system he described, he said home was another
partition.
> So... it seems to me that maybe something is wrong in the chroot? It=20
> seems that if this is the way things should be, it would be impossible=20
> to run mkinitrd from inside a chroot, in which case it would seem like=20
> for your initial boot you'd have to use a kernel that doesn't use=20
> initrd,=20
Debian does not (at least upto woody) use initrd for the base system...=
=20
I don't think it even uses initrd for the install process... it loads
a compressed ramdisk filesystem as root. Unless I'm mistaken this is
not initrd, it was available _long_ before initrd became available
(which is a little root like filesystem does some setup and then=20
either disappears or trades place with the "new" root filesystem).
> Ah, one more thing. I'm using Grub as my bootloader, as I'm keeping=20
> the Gentoo system around for the time being, and it's set up with Grub.=
=20
> My Grub entry for Debian looks like:
>
> title=3DDebian
> root (hd1,0)
> kernel /boot/vmlinuz-2.4.18-k6 root=3D/dev/hdb1=20
^^
Perhaps someone more familiar with Grub can comment, but it appears you
are passing the wrong partition to the kernel... if the fstab above is
correct.
> So far, every boot=20
> attempt I've made with the Debian kernel has resulted in a kernel panic=
=20
> because it can't mount the root file system.
Sounds about right... linux can't do much without a filesystem.
> Any idea what I'm doing wrong, or if maybe my Gentoo system is just=20
> sufficiently wonky that the chroot command doesn't work as it does=20
> elsewhere?
So anyway there are a bunch of different ways to load Debian remotely
if that is what you are after... what I have done most often is to=20
use a local machine to do the base install and configuration on
(including sshd), then once I'm sure things are setup for the target
machine, I tar up the filesystem image, convert the remote machine's swap
into ext3 and dump the tar there. Configure lilo to boot the new system,
and do that... from there I nuke the old root filesystem and dump the
tar again, reconfigure lilo to boot that one by default... and reboot
again. Take back the swap partition and go from there...
This way if I mess anything up the old system is around to rescue
from. I did mess up one setting on the first machine I did this on
but the next 4 have gone smoothly...
The installing into a chroot environment sounds interesting, but=20
I've not had a reason to fiddle with it so I can't help with pointers.
Good Luck
--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56 8109 E10C 249F B7FA ACBE
--Y+Z5jE7Arku/2GrR
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+zTWa4Qwkn7f6rL4RAsk5AJ412nP4l8w7ORHzfInSr6awfIshOwCfViwX
s8bhrG7xz5hq8G+Ufm+fIxI=
=FqDs
-----END PGP SIGNATURE-----
--Y+Z5jE7Arku/2GrR--