debootstrap

Det mest har jag plockat rakt av från http://paste.lisp.org/display/59031.

Idag har jag dock kollat in http://d-i.alioth.debian.org/manual/en.i386/apds03.html då jag försöker få till en lättare installation som bara drar igång en browser när X startar.

Observera att det är skillnader mellan Debian och Ubuntu, t ex console-data vs console-setup. Ubuntu-info: http://www.cs278.org/blog/ubuntu-configuration/feisty-debootstrap-encrypted-install/

debootstrap hardy /mnt/ http://se.archive.ubuntu.com/ubuntu/
cp /etc/hosts /mnt/etc/
cp /etc/network/interfaces /mnt/etc/network/
cp /etc/bash.bashrc /mnt/etc/

mount --bind /dev /mnt/dev
mount -t proc proc /mnt/proc
mount -t sysfs sysfs /mnt/sys
LANG=C chroot /mnt

aptitude update
aptitude install locales console-data
dpkg-reconfigure locales console-data
# localedef -f UTF-8 -i sv_SE sv_SE.UTF-8
# cp /usr/share/zoneinfo/Europe/Stockholm /etc/localtime

# sed -i 's/main/& universe multiverse restricted/' /etc/apt/sources.list
apt-get update
apt-get dist-upgrade

passwd
adduser ceda
addgroup admin
adduser ceda admin
echo "%admin ALL=(ALL) ALL" >> /etc/sudoers 

FSTAB!

apt-get install linux-image-server grub
mkdir /boot/grub
update-grub -y
update-initramfs -u
exit

echo "(hd0) /dev/sdb" > /boot/grub/device.map # alltså ej i target
grub-install --root-directory=/mnt --no-floppy /dev/sdb

umount /mnt/dev/
umount /mnt/proc/
umount /mnt/sys
umount /mnt/

One thought on “debootstrap”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.