Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borgmanJeremy/c993c1bdfbe47af0f5cd88c90ff69e17 to your computer and use it in GitHub Desktop.
Save borgmanJeremy/c993c1bdfbe47af0f5cd88c90ff69e17 to your computer and use it in GitHub Desktop.
Install Debian or Ubuntu like Arch
  1. Download and boot from a Debian live CD: https://www.debian.org/CD/live/
  2. Login with user:live
  3. Setup and mount disks at /mnt. Arch Linux has a good guide to this: https://wiki.archlinux.org/index.php/Partitioning
  4. Install and run debootstrap
    • sudo apt-get install debootstrap
    • Replace RELEASE below with the name of the release you want to install, like ``jessie`` or ``vivid``
    • Debian: sudo debootstrap RELEASE /mnt http://ftp.debian.org/debian
    • (If Ubuntu) sudo apt-get install ubuntu-archive-keyring
    • Ubuntu: sudo debootstrap RELEASE /mnt http://archive.ubuntu.com/ubuntu
  5. Mount Filesystems:
    • sudo mount --bind /dev /mnt/dev
    • sudo mount -t proc none /mnt/proc
    • sudo mount -t sysfs sys /mnt/sys
  6. Chroot into your new system with chroot /mnt /bin/bash
  7. Edit /etc/fstab https://wiki.archlinux.org/index.php/Fstab
  8. Set hostname with: echo HOSTNAME > /etc/hostname
  9. Set timezone with ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime
  10. Set root password with: passwd
  11. Generate Locales
    • apt-get install locales
    • Edit /etc/locales.gen
    • locale-gen
  12. Install a Linux kernel
    • Locate the apropiate one with: apt-cache search linux-image
    • Install it with apt-get install KERNELNAME
  13. Setup Bootloader
    • BIOS: apt-get install grub-pc
    • UEFI: apt-get install grub-efi
  14. Install Bootloader with grub-install /dev/DEVICENAME
  15. Exit Chroot with: exit
  16. Umount everthing:
    • sudo umount /mnt/dev
    • sudo umount /mnt/proc
    • sudo umount /mnt/sys
    • sudo umount /mnt
  17. Reboot with sudo shutdown -r now
  18. Remove installation media
  19. Enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment