Differences

This shows you the differences between two versions of the page.

Link to this comparison view

community:jessie-minimal-install [2018/02/20 13:38]
chillfan First version on dokuwiki, released under CC by SA
community:jessie-minimal-install [2018/02/20 13:49] (current)
chillfan Update formatting and fix a URL
Line 12: Line 12:
   * i386   * i386
  
-Introduction+===== Introduction ​=====
  
 We are going to use the installer as a means of easily configuring the system, whilst on the other hand shunning the preconfigured default package selection. To do this we will install only the bare essential packages allowed by apt, then chroot the installation. We will use the installer to setup the basics, which it will copy over to our install at the end of this process. We are going to use the installer as a means of easily configuring the system, whilst on the other hand shunning the preconfigured default package selection. To do this we will install only the bare essential packages allowed by apt, then chroot the installation. We will use the installer to setup the basics, which it will copy over to our install at the end of this process.
-Beginning steps+ 
 +===== Beginning steps =====
  
 Once you have booted from the install media start the installer using the expert install option. Once you have booted from the install media start the installer using the expert install option.
Line 22: Line 23:
  
 We will complete the first stage of the installation with debootstrap then chroot the install environment and continue from there. For those not familiar with debootstrap it is the tool responsible for installing Debian based systems. We will complete the first stage of the installation with debootstrap then chroot the install environment and continue from there. For those not familiar with debootstrap it is the tool responsible for installing Debian based systems.
-Debootstrap the target+ 
 +===== Debootstrap the target ​===== 
  
 First drop to a terminal. Press Alt + F2 now to do this and press ENTER to active the console. First drop to a terminal. Press Alt + F2 now to do this and press ENTER to active the console.
Line 28: Line 31:
 The installer has already helped us set up and mount the partitions so the disk is ready to install to. Confirm this by having a look at the directory structure of /target. The installer has already helped us set up and mount the partitions so the disk is ready to install to. Confirm this by having a look at the directory structure of /target.
  
-~ # ls /target+<​code>​~ # ls /target</​code>​
  
 Now we will debootstrap to /target completing the first stage of the install. It's important to include the --variant=minbase option as this will give us the bare minimum of packages. We will include the nano editor at this point to make life easier, which you can substitute for your favourite editor if you prefer. Now we will debootstrap to /target completing the first stage of the install. It's important to include the --variant=minbase option as this will give us the bare minimum of packages. We will include the nano editor at this point to make life easier, which you can substitute for your favourite editor if you prefer.
  
-~ # debootstrap --variant=minbase --include=nano jessie /target http://​pkgmaster.devuan.org/​merged +<​code>​~ # debootstrap --variant=minbase --include=nano jessie /target http://​pkgmaster.devuan.org/​merged</​code>​ 
-Chrooting the target+ 
 +===== Chrooting the target ​=====
  
 To continue with the install process we need to '​chroot'​ into the install environment so we can continue installing and configuring packages. To continue with the install process we need to '​chroot'​ into the install environment so we can continue installing and configuring packages.
Line 39: Line 43:
 We first need to make proc, dev and sys available to the chroot environment. We first need to make proc, dev and sys available to the chroot environment.
  
 +<​code>​
 ~ # mount -t proc proc /​target/​proc ~ # mount -t proc proc /​target/​proc
- 
 ~ # mount -o bind /dev /target/dev ~ # mount -o bind /dev /target/dev
- 
 ~ # mount -o bind /sys /target/sys ~ # mount -o bind /sys /target/sys
 +</​code>​
  
 Now chroot the install environment. Now chroot the install environment.
  
-~ # chroot /target /bin/bash +<​code>​~ # chroot /target /bin/bash</​code>​ 
-Removing unwanted packages+ 
 +===== Removing unwanted packages ​=====
  
 You can now get a more minimal system by purging packages that aren't needed but which cannot be removed during the bootstrap process. You can now get a more minimal system by purging packages that aren't needed but which cannot be removed during the bootstrap process.
Line 54: Line 59:
 Depending on your setup you may not care for internationalisation in debconf so this can be removed in that case. Depending on your setup you may not care for internationalisation in debconf so this can be removed in that case.
  
-root@devuan:/#​ dpkg --purge debconf-i18n+<​code>​root@devuan:/#​ dpkg --purge debconf-i18n</​code>​
  
 As you only need one gcc-base package you can remove gcc-4.8-base in favour of gcc-4.9-base. As you only need one gcc-base package you can remove gcc-4.8-base in favour of gcc-4.9-base.
  
-root@devuan:/#​ dpkg --purge gcc-4.8-base +<​code>​root@devuan:/#​ dpkg --purge gcc-4.8-base</​code>​ 
-Configuring APT to exclude recommended packages+ 
 +===== Configuring APT to exclude recommended packages ​=====
  
 As you may know recommended packages add much bloat to the system for the sake of features that are rarely ever essential. Another advantage of installing by debootstrap is you can make sure recommended packages do not bloat your system up to begin with. Try to remember that most browsers (and wget) require the ca-certificates package to verify SSL connections. So you will need to install this later for any systems that require this. Don't forget! As you may know recommended packages add much bloat to the system for the sake of features that are rarely ever essential. Another advantage of installing by debootstrap is you can make sure recommended packages do not bloat your system up to begin with. Try to remember that most browsers (and wget) require the ca-certificates package to verify SSL connections. So you will need to install this later for any systems that require this. Don't forget!
Line 65: Line 71:
 Use an editor to make the necessary changes. Use an editor to make the necessary changes.
  
-root@devuan:/#​ sensible-editor /​etc/​apt/​apt.conf.d/​01lean+<​code>​root@devuan:/#​ sensible-editor /​etc/​apt/​apt.conf.d/​01lean</​code>​
  
 Add the following lines. Add the following lines.
  
 +<​code>​
 APT::​Install-Recommends "​0";​ APT::​Install-Recommends "​0";​
 APT::​AutoRemove::​RecommendsImportant "​false";​ APT::​AutoRemove::​RecommendsImportant "​false";​
 +</​code>​
  
-Updating the system+===== Updating the system ​=====
  
 Before continuing you should make sure your system is up-to-date with the latest security patches. Before continuing you should make sure your system is up-to-date with the latest security patches.
Line 78: Line 86:
 First add the repositories. First add the repositories.
  
-root@devuan:/#​ sensible-editor /​etc/​apt/​sources.list+<​code>​root@devuan:/#​ sensible-editor /​etc/​apt/​sources.list</​code>​
  
 Make sure your sources.list has these lines. Make sure your sources.list has these lines.
  
 +<​code>​
 deb http://​pkgmaster.devuan.org/​merged jessie main deb http://​pkgmaster.devuan.org/​merged jessie main
 deb http://​pkgmaster.devuan.org/​merged jessie-updates main deb http://​pkgmaster.devuan.org/​merged jessie-updates main
 deb http://​pkgmaster.devuan.org/​merged jessie-security main deb http://​pkgmaster.devuan.org/​merged jessie-security main
 deb http://​pkgmaster.devuan.org/​merged jessie-backports main deb http://​pkgmaster.devuan.org/​merged jessie-backports main
 +</​code>​
  
 Update from the repositories so we can use them. Update from the repositories so we can use them.
  
-root@devuan:/#​ apt-get update+<​code>​root@devuan:/#​ apt-get update</​code>​
  
 You can now perform an upgrade to update the base packages. You can now perform an upgrade to update the base packages.
  
-root@devuan:/#​ apt-get dist-upgrade +<​code>​root@devuan:/#​ apt-get dist-upgrade</​code>​ 
-Choosing a debconf interface+ 
 +===== Choosing a debconf interface ​=====
  
 There is more than one interface to debconf and you may choose between them based on your style as none are installed yet. This is a good opportunity to customise your system. There is more than one interface to debconf and you may choose between them based on your style as none are installed yet. This is a good opportunity to customise your system.
-Whiptail+ 
 +==== Whiptail ​====
  
 Whiptail is an easy to use interface similar to dialog and is the default debconf interface for Devuan. Whiptail is an easy to use interface similar to dialog and is the default debconf interface for Devuan.
-Dialog+ 
 +==== Dialog ​==== 
  
 Dialog is similar to whiptail and will be familiar to many users who have done text-based installs before. Dialog is similar to whiptail and will be familiar to many users who have done text-based installs before.
-Readline+ 
 +==== Readline ​====
  
 The readline interface is not so much an interface as it is a prompting for your choice of configuration options by numeric responses. The readline interface uses a Perl module so this may be a good choice if you already have other uses for Perl. The readline interface is not so much an interface as it is a prompting for your choice of configuration options by numeric responses. The readline interface uses a Perl module so this may be a good choice if you already have other uses for Perl.
-Editor+ 
 +==== Editor ​====
  
 This method of configuring packages is not an interface, rather debconf will open an editor at first relevant line in the configuration file for the installed package. This could be a useful tool for learning more about your system, or give you more control if it is needed. This method of configuring packages is not an interface, rather debconf will open an editor at first relevant line in the configuration file for the installed package. This could be a useful tool for learning more about your system, or give you more control if it is needed.
-Install and configure the debconf interface+ 
 +===== Install and configure the debconf interface ​=====
  
 A good choice for minimalism purposes is the default whiptail interface. A good choice for minimalism purposes is the default whiptail interface.
  
-root@devuan:/#​ apt-get install whiptail+<​code>​root@devuan:/#​ apt-get install whiptail</​code>​
  
 The readline interface is a good alternative for console fans. The readline interface is a good alternative for console fans.
  
-root@devuan:/#​ apt-get install libterm-readline-perl-perl+<​code>​root@devuan:/#​ apt-get install libterm-readline-perl-perl</​code>​
  
 Or use the dialog interface if you prefer it over whiptail. Or use the dialog interface if you prefer it over whiptail.
  
-root@devuan:/#​ apt-get install dialog+<​code>​root@devuan:/#​ apt-get install dialog</​code>​
  
 Now reconfigure debconf to let it know which interface you want to use. Now reconfigure debconf to let it know which interface you want to use.
  
-root@devuan:/#​ dpkg-reconfigure debconf +<​code>​root@devuan:/#​ dpkg-reconfigure debconf</​code>​ 
-Adding the network components+ 
 +===== Adding the network components ​=====
  
 Install the minimum required packages to get networking. Install the minimum required packages to get networking.
  
-root@devuan:/#​ apt-get install netbase net-tools ifupdown+<​code>​root@devuan:/#​ apt-get install netbase net-tools ifupdown</​code>​
  
 Some optional network tools may be wanted, especially a DHCP client for automatic network configuration. Some optional network tools may be wanted, especially a DHCP client for automatic network configuration.
  
-root@devuan:/#​ apt-get install isc-dhcp-client inetutils-ping +<​code>​root@devuan:/#​ apt-get install isc-dhcp-client inetutils-ping</​code>​ 
-Installing the Linux kernel+ 
 +===== Installing the Linux kernel ​=====
  
 In order to boot from your new GNU/Linux system you will need to install the Linux kernel. In order to boot from your new GNU/Linux system you will need to install the Linux kernel.
  
-root@devuan:/#​ apt-get install linux-image-`dpkg --print-architecture` +<​code>​root@devuan:/#​ apt-get install linux-image-`dpkg --print-architecture`</​code>​ 
-Installing the boot loader+ 
 +===== Installing the boot loader ​=====
  
 Since it has a smaller installed size and more support than lilo we will be using GRUB2 as the boot loader. Since it has a smaller installed size and more support than lilo we will be using GRUB2 as the boot loader.
Line 146: Line 166:
 If you are using logical volumes you need to install the lvm2 package first. If you are using logical volumes you need to install the lvm2 package first.
  
-root@devuan:/#​ apt-get install lvm2+<​code>​root@devuan:/#​ apt-get install lvm2</​code>​
  
 If you have another OS installed on this system and want to boot it, install the os-prober package. If you have another OS installed on this system and want to boot it, install the os-prober package.
  
-root@devuan:/#​ apt-get install os-prober+<​code>​root@devuan:/#​ apt-get install os-prober</​code>​
  
 We will now install the bootloader. We will now install the bootloader.
  
-root@devuan:/#​ apt-get install grub2+<​code>​root@devuan:/#​ apt-get install grub2</​code>​
  
 Usually you will want to install the bootloader on the MBR of the first disk which will most often be /dev/sda. Usually you will want to install the bootloader on the MBR of the first disk which will most often be /dev/sda.
-Optional extras+ 
 +===== Optional extras ​=====
  
 Some optional packages for a base install. Some optional packages for a base install.
  
-root@devuan:/#​ apt-get install psmisc pciutils rsyslog less+<​code>​root@devuan:/#​ apt-get install psmisc pciutils rsyslog less</​code>​
  
 This is a suggestion for packages you may want that will help you post-install if needed. This is a suggestion for packages you may want that will help you post-install if needed.
  
-root@devuan:/#​ apt-get install man manpages lynx irssi+<​code>​root@devuan:/#​ apt-get install man manpages lynx irssi</​code>​
  
 If shell access over the network is needed don't forget to install the shell server now. If shell access over the network is needed don't forget to install the shell server now.
  
-root@devuan:/#​ apt-get install openssh-server openssh-client openssh-blacklist+<​code>​root@devuan:/#​ apt-get install openssh-server openssh-client openssh-blacklist</​code>​
 Exiting the chroot environment (cleanly) Exiting the chroot environment (cleanly)
  
 First exit the chroot environment. First exit the chroot environment.
  
-root@devuan:/#​ exit+<​code>​root@devuan:/#​ exit</​code>​
  
 Make sure proc, dev and sys are unmounted. Make sure proc, dev and sys are unmounted.
 +<​code>​
 ~ # umount /​target/​proc ~ # umount /​target/​proc
- 
 ~ # umount /target/dev ~ # umount /target/dev
 +~ # umount /target/sys
 +</​code>​
  
-~ # umount /​target/​sys +===== Finishing the installation ​=====
-Finishing the installation+
  
 It's time to tell the installer to finish the install now. All remaining configuration files will be created on the target system so this step must not be omitted. It's time to tell the installer to finish the install now. All remaining configuration files will be created on the target system so this step must not be omitted.
Line 191: Line 212:
 You will be asked to install the base system but you should decline this by choosing the go back option which will skip this step. This should be done for the bootloader step that will follow as well. You will be asked to install the base system but you should decline this by choosing the go back option which will skip this step. This should be done for the bootloader step that will follow as well.
  
-This work is released under the Creative Commons Attribution-ShareAlike 4.0 International [CC BY-SA 4.0] license. All trademarks are the property of their respective owners. This work is provided "AS IS" and comes with absolutely NO warranty.+This work is released under the Creative Commons Attribution-ShareAlike 4.0 International [[https://​creativecommons.org/​licenses/​by-sa/​4.0/​|CC BY-SA 4.0]] license. All trademarks are the property of their respective owners. This work is provided "AS IS" and comes with absolutely NO warranty.