Re: installing a Debian system on a 2nd hdd while booted off the first
> also sprach Haines Brown <brownh@hartford-hwp.com> [2003.07.12.2213 +0200]:
> > Using chroot did the trick for me,
>
> chroot. Then, how did you invoke the installation interface?
Here'a simple outline of a cross-installation, based on a the
debian installation guideline and some other sources, adapted to my
situation:
1. After mounting the target installation partition (in my case, on
/mnt/debinst), I run a local copy of debootstrap (in my case,
/usr/sbin/debootstrap) on it:
# /usr/sbin/debootstrap --arch i386 woody /mnt/debinst
http://http.us.debian.org/debian
This I guess answers your question, but it got me into a dead end
as the following shows.
2. I next did the localization setup (this command probably more
complicated than necessary. The string was wrapped by my MUA):
# chroot /mnt/debinst /usr/bin/env
-i HOME=/root TERM=$TERM PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin
/bin/bash --login
3. Next I wanted to set the system to mount the target installation
partition (/dev/sda13) and /pro. So a made a simple /etc/fstab:
make a basic fstab:
# filesystem mount-point fs-type options dump fsck-order
/dev/sda13 / auto defaults 0 1
proc /proc proc defaults 0 0
and mounted proc from chroot prompt:
# mount -t proc proc /proc
5. Besides finishing up the network configuration files, I did the
following from the chroot prompt. This just give a rough idea of
the sequence:
# dpkg-reconfigure console-data
# /usr/sbin/base-config
# apt-get install netselect wget
# cd /etc/apt; netselect-apt woody
# apt-get install ssh
# apt-get install locales
# dpkg-reconfigure locales
# apt-cache search kernel-image
6. At this point, I know which kernel I want, and so I did:
# apt-get install kernel-image-2.4.18-686
As I indicated the installation of the kernel failed because it looked
into the remote /proc to find out about the system, and the remote
/proc was empty because I had not booted the remote HD.
The cross-installation directions all seem to assume you are
installing debian on a partition on the booted disk, which is not what
you intend to do and not what I initially tried. I failed and ended up
creating an installation floppy and things went better.
So it may be that you should temporarily disable your local swap file,
do an installation into it, and then copy that installation over to
your other hard disk. I've not done this, but it may be the only way
to do a cross installation to a secondary hard disk.
Note that I have not set up grub, for I planned to make the secondary
HD bootable after it was working properly. I also left out my creating
the config files needed to get on line. I found that booting with a
grub boot floppy was was very handy.
Haines Brown
Reply to: