l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
January 6: Social gathering
Next Installfest:
Latest News:
Nov. 18: Club officer elections
Page last updated:
2003 May 22 15:04

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 Thursday, May 22, 2003, at 01:39 PM, Mike Simons wrote:

On Thu, May 22, 2003 at 12:59:21PM -0700, Matt Holland wrote:

 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
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'm trying to do this while keeping the old system around; hence, I added a second drive (hdb) and made two partitions: hdb1 for root, hdb2 for swap. Formatted /dev/hdb1, mounted it at /mnt/debinst, and debootstrap'd into /mnt/debinst... chroot'd to /mnt/debinst, set up apt, and things pretty much worked as expected. I'm probably leaving some steps out, but I followed the instructions in section 3.7 of the Woody installation manual (Installing Debian GNU/Linux from a Unix/Linux System).

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
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
Right, this is my system... I'm horning in on an established thread.

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
  Debian does not (at least upto woody) use initrd for the base
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).
Debootstrap doesn't install a kernel, but in order to boot the system after setting it up in the chroot, you need to install a kernel, and all of the appropriate images that I see in "apt-cache search kernel-image" seem to use initrd. I've thought of compiling my own kernel without initrd, but "make menuconfig" doesn't work in the chroot (some complaint about missing ncurses, even though libncurses is installed and other curses interfaces [e.g., setting up apt] work fine), and I'm too impatient to survive an old-fashioned "make config".

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
 My Grub entry for Debian looks like:

root (hd1,0)
kernel /boot/vmlinuz-2.4.18-k6 root=/dev/hdb1
  Perhaps someone more familiar with Grub can comment, but it appears
are passing the wrong partition to the kernel... if the fstab above is
How so? (hd1,0) is Grub-speak for /dev/hdb1, and /dev/hdb1 *is* the root device.

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
into ext3 and dump the tar there.  Configure lilo to boot the new
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...
Maybe I'll do something like that to make the initrd image... then perhaps I can find out if that's really my problem.

  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.
Seems like it should work, though, since it's documented in the install guide.


Matt Holland
Population Biology Graduate Group
University of California
Davis, CA 95616

vox-tech mailing list

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:
O'Reilly and Associates
For numerous book donations.