Created
November 30, 2015 20:02
-
-
Save RobinDavid/4d702643888abd6a8715 to your computer and use it in GitHub Desktop.
Bootstrap command for debootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Do all the partition stuff | |
#Let's consider we install to sda1 | |
mkdir /media/debian | |
mount /dev/sda1 /media/debian | |
debootstrap jeesie /media/debian http://ftp.fr.debian.org/debian | |
mount -o bind /dev /media/debian/dev | |
mount -o bind /dev/pts /media/debian/dev/pts | |
mount sysfs -t sysfs /media/debian/sys | |
mount proc -t proc /media/debian/proc | |
chroot /media/debian | |
aptitude update | |
aptitude install locales console-data vim bash-completion dialog | |
dpkg-reconfigure locales | |
#To uncomment completion stuff | |
vim /etc/bash.bashrc | |
source /etc/bash_completion | |
aptitude install linux-image-amd64 grub | |
#if required | |
vim /etc/hostname | |
echo "auto lo\niface lo inet loopback" >> /etc/network/interfaces | |
#Set the partition | |
vim /etc/fstab | |
#Not set by default | |
passwd | |
exit | |
#Back on host... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment