Indicators:
- <<>>: Replacable
- <>: Replace
-
Download and boot from a Debian/Ubuntu live CD: https://www.debian.org/CD/live/ (if you have an existing Linux system with debootstrap support, skip to step 3)
-
Login with
user:live
-
Setup and mount disks at
/mnt
. Arch Linux has a good guide to this: https://wiki.archlinux.org/index.php/Partitioning
Install and run debootstrap
- `sudo apt-get install debootstrap` (or `sudo pacman -S debootstrap`, `sudo dnf install debootstrap`, `sudo xbps-install debootstrap`, `emerge -a debootstrap` and so on...)
- **Replace RELEASE below with the name of the release you want to install, like `jessie` or `vivid`**
- Debian:
`sudo debootstrap <RELEAS>E /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>>`
Mount Filesystems:
- `sudo mount --bind /dev /mnt/dev`
- `sudo mount -t proc none /mnt/proc`
- `sudo mount -t sysfs sys /mnt/sys`
-
Chroot into your new system with
chroot /mnt /bin/bash
-
Edit
/etc/fstab
https://wiki.archlinux.org/index.php/Fstab or installarch-install-scripts
and usegenfstab /mnt >> /mnt/etc/fstab
before you chroot -
Set hostname with:
echo <host> > /etc/hostname
and edit/etc/hosts
to match it, although editing/etc/hosts
is not required because it is already set -
Set timezone with
ln -sf /usr/share/zoneinfo/<ZONE>/<SUBZONE> /etc/localtime
-
Set root password with:
passwd
, and make a user if needed (adduser <user>
) Note: On some systems like Arch Linux, (/usr)/sbin is not in $PATH. Be sure to add it. -
Generate Locales
apt-get install locales
- Edit
/etc/locale.gen
locale-gen
-
Install a Linux kernel
- Locate the apropiate one with:
apt-cache search linux-image
- Install it with
apt-get install linux-image-<version>
- Locate the apropiate one with:
-
Setup Bootloader (skip to 15 on installed OS)
- BIOS:
apt-get install grub-pc
- UEFI:
apt-get install grub-efi
- BIOS:
-
Install Bootloader with:
- BIOS:
grub-install /dev/<DEVICENAME>
- UEFI:
grub-install --efi-directory=<efi-dir>
- BIOS:
-
Exit Chroot with:
exit
(installed OS users must update the bootloader, if Debian/Ubuntu isn't recognised, skip back to 13) -
Umount everthing:
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt
-
Reboot with
sudo shutdown -r now
-
Remove installation media,
-
Enjoy!