Стадию разметки пропускаю по причине различных конфигураций для каждого отдельно взятого сетапа.
mount -t ext3 /dev/sda1 /mnt
debootstrap etch /mnt http://ftp.debian.org/debian/
proc
и чрутимся:mount -t proc proc /mnt/proc chroot /mnt
# cat > /etc/apt/apt.conf APT::Default-Release "stable"; APT::Force-LoopBreak "true";
# cat > /etc/apt/sources.list deb http://ftp.debian.org/debian etch main non-free contrib deb http://security.debian.org/ etch/updates main contrib non-free deb http://ftp.debian.org/debian etch-proposed-updates main non-free contrib
# cat > /etc/resolv.conf nameserver YOUR_NAMESERVER1_IP nameserver YOUR_NAMESERVER2_IP
# cat > /etc/fstab /dev/sda1 / ext3 defaults 0 1 /dev/sda2 none swap sw 0 0 /dev/sda3 /home ext3 defaults,errors=remount-ro,noatime,nodiratime 0 0 proc /proc proc defaults 0 0
# cat > /etc/hosts 127.0.0.1 localhost serverlabel.YOUR_DOMAIN.COM
# cat > /etc/hostname serverlabel.YOUR_DOMAIN.COM
# cat >> /etc/bash.bashrc if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi
# cat > /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address СИСТЕМНЫЙ IP netmask 255.255.255.0 network СЕТЬ broadcast СЕТЬ.255 gateway ШЛЮЗ dns-nameservers YOUR_NAMESERVER1_IP YOUR_NAMESERVER2_IP
# cat > /etc/locale.gen en_GB ISO-8859-1 en_US ISO-8859-1 ru_RU.KOI8-R KOI8-R
# ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime # cat > /etc/timezone Etc/UTC
# /usr/bin/apt-get update # /usr/bin/apt-get dist-upgrade # /usr/bin/apt-get -y -q install ssh alien aria2 arping bash bash-completion bc bridge-utils build-essential busybox bzip2 bzr checkinstall chkconfig chkrootkit coreutils cpio cron curl cvs dash debian-archive-keyring debian-keyring diffutils dmidecode dnsutils dos2unix dosfstools dselect e2fsprogs ebtables ethtool ext3grep extundelete fakeroot findutils fping fuse gcc gdb geoip-bin geoip-database git gzip hdparm hostname htop iotop ipcalc iperf ipmitool iproute iptables iputils-ping less lftp libc6-dev libwww-perl links lm-sensors locales logrotate lrzip lsb-security lsof lvm2 lzma make mdadm mercurial monit mtr mysqltuner mytop nano netcat nmap ntfs-3g ntp openipmi p7zip p7zip-full parallel parted patch pbzip2 pciutils perl pigz procps psmisc pwgen python rkhunter rsync rsyslog ruby screen sed snmp sqlite3 strace subversion sysstat tar tcpdump tcsh telnet tmux unhide unzip usbutils uw-mailutils vim wget whois xinetd xz-utils zip # /usr/sbin/ntpdate pool.ntp.org # echo "0 0 * * * /usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1" | /usr/bin/crontab - # cd /dev && MAKEDEV generic # source /etc/bash.bashrc
grub
:# cp -a /usr/lib/grub/i386-pc /boot/grub
/usr/src
:# cd /usr/src/linux
# make-kpkg --bzImage kernel_image # dpkg -i /usr/src/linux-image-x.x.x-blablabla.deb
grub
в mbr
:# update-grub # grub --no-floppy > root (hd0,0) > setup (hd0) > quit