After Googling and ogling a lot of documentation about installing
Debian in a chroot
environment, I decided to put together
this quick checklist, mostly for my own purposes, so that I wouldn't
have to search around so much the next time I install Debian. Feel
free to use it if you wish.
debootstrap
. The Debian package can
be fetched from /debian/pool/main/d/debootstrap
on your
preferred Debian mirror, such
as ftp://ftp.se.debian.org/
.debootstrap
to bootstrap the base system. Quick
command:
debootstrap --arch amd64 buster /mnt/debian ftp://ftp.se.debian.org/debian
/proc
and /sys
in Debian's prefix.dpkg-reconfigure tzdata
.
/etc/fstab
.LANG="en_US.UTF-8"
or similar to /etc/default/locale./etc/hostname
, /etc/hosts
and /etc/network/interfaces
. A rather
standard configuration for the last would be as follows:
auto lo eth0 iface lo inet loopback iface eth0 inet dhcp
debootstrap
should have
gotten /etc/resolv.conf
right, but it is
wise to check to be sure.
/etc/apt/sources.list
. The
following is a rather sane default configuration for a stable
system:
deb http://ftp.se.debian.org/debian buster main contrib deb-src http://ftp.se.debian.org/debian buster main contrib deb http://security.debian.org/ buster/updates main contrib deb-src http://security.debian.org/ buster/updates main contribRemember to run
apt-get update
afterwards.
root
password.APT::Install-Recommends "0";
in /etc/apt/apt.conf
.
locales-all
package.console-data
, unicode-data
and kbd
packages.linux-image-amd64
. It
is probably a good idea to set up a /etc/kernel-img.conf
first, as well. Sample contents:
do_symlinks = Yes do_initrd = Yes link_in_boot = Yes
sysvinit-core
and remove systemd
.grub-pc
, not grub
. Sample config:
set timeout=10 set default=0 menuentry "Debian Buster" { insmod gzio set root=(hd0,msdos1) linux /boot/vmlinuz ro root=/dev/sda1 initrd /boot/initrd.img }Note, in particular, that the initrd requires a root filesystem on LVM to be specified as
/dev/mapper/$VG-$LV
, not as
/dev/$VG/$LV
.
You may want to run tasksel
to get some common
packages (for example, the standard
set).
nfs-common
less
nis
krb5-user
libpam-krb5
openssh-server