sudo aptitude install debootstrap coreutils util-linux e2fsprogs
df -h
sudo umount /dev/sdb1
sudo fdisk /dev/sdb
- o create a new empty DOS partition table
- p print the partition table
- n add a new partition
- use all defaults
- a toggle a bootable flag
- use partition 1
- w write table to disk and exit
# for non usb i'd use ext4
sudo mkfs.ext4 /dev/sdb1
# for usb i'd use ext2
sudo mkfs.ext2 /dev/sdb1
mkdir ~/tmp/usbstick -p
sudo mount /dev/sdb1 /home/grumpy/tmp/usbstick
sudo debootstrap --arch amd64 wheezy /home/grumpy/tmp/usbstick http://ftp.debian.org/debian/
sudo debootstrap --arch amd64 jessie /home/grumpy/tmp/usbstick http://mirror.rackspace.com/debian/
sudo mount -t proc none $HOME/tmp/usbstick/proc
sudo mount --bind /sys $HOME/tmp/usbstick/sys
sudo mount --bind /dev $HOME/tmp/usbstick/dev
sudo cp /etc/resolv.conf $HOME/tmp/usbstick/resolv.conf
sudo chroot $HOME/tmp/usbstick/
# my sources.list
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
# wheezy-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free
aptitude update
aptitude install locales sudo vim ntp openssh-client openssh-server tmux
add the following to /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
add the following to /etc/hosts
127.0.1.1 your_hostname
# setup timezone
dpkg-reconfigure tzdata
# i choose en_US.UTF-8
dpkg-reconfigure locales
make sure ntp is rocking
ntpq -p
date -R
# and if necessary..
dpkg-reconfigure ntp
adduser grumpy
adduser grumpy sudo
# or if no adduser
usermod -G sudo -a grumpy
aptitude install grub-pc linux-base linux-image-amd64
# when the "Configuring grub-pc" menu pops up I selected "/dev/sdb"
blkid /dev/sdb1 -o export | head -n 1 > /etc/fstab
then edit /etc/fstab
to look something like this:
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=5763e67c-53f4-448c-8376-d371c24f4057 / ext4 errors=remount-ro 0 1
exit
sudo umount $HOME/tmp/usbstick/sys
sudo umount $HOME/tmp/usbstick/dev
sudo umount $HOME/tmp/usbstick/proc
sudo umount $HOME/tmp/usbstick/
a good deal of my steps were gleaned from reading this