l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 May 22 14:28

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Conversion

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.
> Is it really?  I've been having problems doing this myself, as I try to 
> 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 
didn't ask for steps so I didn't bring them up.

> The main problem is that I 
> can't get the system to boot, and I think this is because I can't get 
> 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.  
> For one thing, /etc/mtab claims that /proc is the only mounted file 
> system:
> My /etc/fstab looks like:
> # 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

> So... it seems to me that maybe something is wrong in the chroot?  It 
> seems that if this is the way things should be, it would be impossible 
> to run mkinitrd from inside a chroot, in which case it would seem like 
> for your initial boot you'd have to use a kernel that doesn't use 
> initrd, 

  Debian does not (at least upto woody) use initrd for the base system... 
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 
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 
> the Gentoo system around for the time being, and it's set up with Grub. 
>  My Grub entry for Debian looks like:
> title=Debian
> root (hd1,0)
> kernel /boot/vmlinuz-2.4.18-k6 root=/dev/hdb1 
  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

> So far, every boot 
> attempt I've made with the Debian kernel has resulted in a kernel panic 
> 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 
> sufficiently wonky that the chroot command doesn't work as it does 
> 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 
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 
I've not had a reason to fiddle with it so I can't help with pointers.

    Good Luck
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

Attachment: pgp00029.pgp
Description: PGP signature

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.