Skip to content

Instantly share code, notes, and snippets.

@bashelled
Forked from Tookmund/Debootstrap Install.rst
Last active May 21, 2021 20:10
Show Gist options
  • Select an option

  • Save bashelled/c7263d1e7b026fe66ebdc7f2d66efe00 to your computer and use it in GitHub Desktop.

Select an option

Save bashelled/c7263d1e7b026fe66ebdc7f2d66efe00 to your computer and use it in GitHub Desktop.

Revisions

  1. bashelled revised this gist May 21, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ Indicators:
    9. Set timezone with
    `ln -sf /usr/share/zoneinfo/<ZONE>/<SUBZONE> /etc/localtime`

    10. Set root password with: `passwd`, and make a user if needed (`adduser <user>`)
    10. 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._

    11. Generate Locales
    - `apt-get install locales`
  2. bashelled revised this gist Apr 9, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -25,9 +25,9 @@ Indicators:

    5.

    Mount Filesystems:
    `Mount Filesystems:`

    : - `sudo mount --bind /dev /mnt/dev`
    - `sudo mount --bind /dev /mnt/dev`
    - `sudo mount -t proc none /mnt/proc`
    - `sudo mount -t sysfs sys /mnt/sys`

  3. bashelled revised this gist Apr 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ Indicators:

    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...)
    - `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>>`
  4. bashelled revised this gist Apr 9, 2021. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,8 @@ Indicators:
    3. Setup and mount disks at `/mnt`. Arch Linux has a good guide to
    this: <https://wiki.archlinux.org/index.php/Partitioning>

    4.
    4.

    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...)
    @@ -22,7 +23,8 @@ Indicators:
    - Ubuntu:
    `sudo debootstrap <RELEASE> /mnt <<http://archive.ubuntu.com/ubuntu>>`

    5.
    5.

    Mount Filesystems:

    : - `sudo mount --bind /dev /mnt/dev`
  5. bashelled revised this gist Apr 9, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ Indicators:
    4.
    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...)
    - `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>>`
  6. bashelled revised this gist Apr 9, 2021. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,6 @@ Indicators:
    this: <https://wiki.archlinux.org/index.php/Partitioning>

    4.

    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...)
    @@ -24,7 +23,6 @@ Indicators:
    `sudo debootstrap <RELEASE> /mnt <<http://archive.ubuntu.com/ubuntu>>`

    5.

    Mount Filesystems:

    : - `sudo mount --bind /dev /mnt/dev`
  7. bashelled revised this gist Apr 9, 2021. 2 changed files with 74 additions and 39 deletions.
    74 changes: 74 additions & 0 deletions Debootstrap Install.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,74 @@
    # Install Debian/Ubuntu/Kali like Arch/Gentoo
    Indicators:
    - <<>>: Replacable
    - <>: Replace

    1. 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)

    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` (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>>`

    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> or install `arch-install-scripts` and use `genfstab /mnt >> /mnt/etc/fstab` **before you chroot**

    8. 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

    9. Set timezone with
    `ln -sf /usr/share/zoneinfo/<ZONE>/<SUBZONE> /etc/localtime`

    10. Set root password with: `passwd`, and make a user if needed (`adduser <user>`)

    11. Generate Locales
    - `apt-get install locales`
    - Edit `/etc/locale.gen`
    - `locale-gen`

    12. Install a Linux kernel
    - Locate the apropiate one with: `apt-cache search linux-image`
    - Install it with `apt-get install linux-image-<version>`

    13. Setup Bootloader (skip to 15 on installed OS)
    - BIOS: `apt-get install grub-pc`
    - UEFI: `apt-get install grub-efi`

    14. Install Bootloader with:
    - BIOS: `grub-install /dev/<DEVICENAME>`
    - UEFI: `grub-install --efi-directory=<efi-dir>`

    15. Exit Chroot with: `exit` (installed OS users must update the bootloader, if Debian/Ubuntu isn't recognised, skip back to 13)

    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!
    39 changes: 0 additions & 39 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -1,39 +0,0 @@
    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``
    5. Chroot into your new system with ``chroot /mnt /bin/bash``
    6. Edit ``/etc/fstab`` https://wiki.archlinux.org/index.php/Fstab
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
    10. Generate Locales
    - ``apt-get install locales``
    - Edit ``/etc/locales.gen``
    - ``locale-gen``

    11. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
    12. Setup Bootloader
    - BIOS: ``apt-get install grub-pc``
    - UEFI: ``apt-get install grub-efi``
    13. Install Bootloader with ``grub-install /dev/DEVICENAME``
    14. Exit Chroot with: ``exit``
    15. Umount everthing:
    - ``sudo umount /mnt/dev``
    - ``sudo umount /mnt/proc``
    - ``sudo umount /mnt/sys``
    - ``sudo umount /mnt``
    16. Reboot with ``sudo shutdown -r now``
    17. Remove installation media
    18. Enjoy!
  8. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,9 @@
    9. Set root password with: ``passwd``
    10. Generate Locales
    - ``apt-get install locales``
    - ``dpkg-reconfigure locales``
    - Edit ``/etc/locales.gen``
    - ``locale-gen``

    11. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
  9. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    - ``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``
  10. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    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. Run debootstrap
    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``
    - Ubuntu: ``sudo debootstrap RELEASE /mnt http://archive.ubuntu.com/ubuntu``
  11. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,4 @@
    - ``sudo umount /mnt``
    16. Reboot with ``sudo shutdown -r now``
    17. Remove installation media
    17. Enjoy!

    .. _Debian .. _Partitioning https://wiki.archlinux.org/index.php/Partitioning
    .. _fstab
    18. Enjoy!
  12. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -17,21 +17,21 @@
    10. Generate Locales
    - ``apt-get install locales``
    - ``dpkg-reconfigure locales``
    10. Install a Linux kernel
    11. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
    11. Setup Bootloader
    12. Setup Bootloader
    - BIOS: ``apt-get install grub-pc``
    - UEFI: ``apt-get install grub-efi``
    12. Install Bootloader with ``grub-install /dev/DEVICENAME``
    13. Exit Chroot with: ``exit``
    14. Umount everthing:
    13. Install Bootloader with ``grub-install /dev/DEVICENAME``
    14. Exit Chroot with: ``exit``
    15. Umount everthing:
    - ``sudo umount /mnt/dev``
    - ``sudo umount /mnt/proc``
    - ``sudo umount /mnt/sys``
    - ``sudo umount /mnt``
    15. Reboot with ``sudo shutdown -r now``
    16. Remove installation media
    16. Reboot with ``sudo shutdown -r now``
    17. Remove installation media
    17. Enjoy!

    .. _Debian .. _Partitioning https://wiki.archlinux.org/index.php/Partitioning
  13. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,9 @@
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
    10. Generate Locales: https://people.debian.org/~schultmc/locales.html
    10. Generate Locales
    - ``apt-get install locales``
    - ``dpkg-reconfigure locales``
    10. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
  14. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
    10. Generate Locales: https://people.debian.org/~schultmc/locales.html
    10. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
  15. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    1. Download and boot from a Debian_. live cd
    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: Partitioning_.
    3. Setup and mount disks at ``/mnt``. Arch Linux has a good guide to this: https://wiki.archlinux.org/index.php/Partitioning
    4. Run 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``
    @@ -10,7 +10,7 @@
    - ``sudo mount -t proc none /mnt/proc``
    - ``sudo mount -t sysfs sys /mnt/sys``
    5. Chroot into your new system with ``chroot /mnt /bin/bash``
    6. Edit ``/etc/fstab`` (Guide for fstab_.)
    6. Edit ``/etc/fstab`` https://wiki.archlinux.org/index.php/Fstab
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
    @@ -31,6 +31,5 @@
    16. Remove installation media
    17. Enjoy!

    .. _Debian https://www.debian.org/CD/live/
    .. _Partitioning https://wiki.archlinux.org/index.php/Partitioning
    .. _fstab https://wiki.archlinux.org/index.php/Fstab
    .. _Debian .. _Partitioning https://wiki.archlinux.org/index.php/Partitioning
    .. _fstab
  16. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,8 @@
    - ``sudo umount /mnt``
    15. Reboot with ``sudo shutdown -r now``
    16. Remove installation media
    17. Enjoy!
    17. Enjoy!

    .. _Debian https://www.debian.org/CD/live/
    .. _Partitioning https://wiki.archlinux.org/index.php/Partitioning
    .. _fstab https://wiki.archlinux.org/index.php/Fstab
  17. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Debootstrap Install.rst
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    - ``sudo mount -t proc none /mnt/proc``
    - ``sudo mount -t sysfs sys /mnt/sys``
    5. Chroot into your new system with ``chroot /mnt /bin/bash``
    6. Edit ``/etc/fstab``
    6. Edit ``/etc/fstab`` (Guide for fstab_.)
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
  18. @Tookmund Tookmund renamed this gist May 9, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  19. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions basic.rst
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    1. Download and boot from a Debian or Ubuntu Live CD
    - Debian_.
    - Ubuntu_.
    2. (On Debian) Login with ``user:live``
    1. Download and boot from a Debian_. live cd
    2. Login with ``user:live``
    3. Setup and mount disks at ``/mnt``. Arch Linux has a good guide to this: Partitioning_.
    4. Run debootstrap
    - **Replace RELEASE below with the name of the release you want to install, like ``jessie`` or ``vivid``**
  20. @Tookmund Tookmund revised this gist May 9, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion basic.rst
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@
    - UEFI: ``apt-get install grub-efi``
    12. Install Bootloader with ``grub-install /dev/DEVICENAME``
    13. Exit Chroot with: ``exit``
    14: Umount everthing:
    14. Umount everthing:
    - ``sudo umount /mnt/dev``
    - ``sudo umount /mnt/proc``
    - ``sudo umount /mnt/sys``
  21. @Tookmund Tookmund created this gist May 9, 2015.
    34 changes: 34 additions & 0 deletions basic.rst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    1. Download and boot from a Debian or Ubuntu Live CD
    - Debian_.
    - Ubuntu_.
    2. (On Debian) Login with ``user:live``
    3. Setup and mount disks at ``/mnt``. Arch Linux has a good guide to this: Partitioning_.
    4. Run 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``
    - 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``
    5. Chroot into your new system with ``chroot /mnt /bin/bash``
    6. Edit ``/etc/fstab``
    7. Set hostname with: ``echo HOSTNAME > /etc/hostname``
    8. Set timezone with ``ln -sf /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime``
    9. Set root password with: ``passwd``
    10. Install a Linux kernel
    - Locate the apropiate one with: ``apt-cache search linux-image``
    - Install it with ``apt-get install KERNELNAME``
    11. Setup Bootloader
    - BIOS: ``apt-get install grub-pc``
    - UEFI: ``apt-get install grub-efi``
    12. Install Bootloader with ``grub-install /dev/DEVICENAME``
    13. Exit Chroot with: ``exit``
    14: Umount everthing:
    - ``sudo umount /mnt/dev``
    - ``sudo umount /mnt/proc``
    - ``sudo umount /mnt/sys``
    - ``sudo umount /mnt``
    15. Reboot with ``sudo shutdown -r now``
    16. Remove installation media
    17. Enjoy!