Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Installing Debian
Introduction
Installing or reinstalling Debian. For an upgrade of Debian to a newer version see Updating Debian
You can also have a look at Newniks: Tips for new Unix users for some other views. Be warned: This is about Debian 6 Squeeze
This document was originally about Debian 7 Wheezy. It is has been worked on ever since. It has been last updated for Debian 11 Bullseye
If you make changes in files other than in /root and /home it is advised to add a comment in them so when you are reinstalling Debian you can find them with grep -rl yourremark / . We use username yymmdd as the tag for changes
What you need
- A Debian install CD or DVD, or put the ISO file on an USB drive with like the Ventoy boot system
- An external CD/DVD player (and its powersupply if applicable) if your PC does not have an internal CD/DVD player
- An USB cable for the external CD/DVD player
- An ethernet cable of sufficient length
- A ethernet RJ45 port connected to the Internet
Dual boot with Windows
To achieve this install Windows first. Windows will be found by the Grub.
Getting the install image
If you already have images then use jigdo, see jigdo, to get the latest images
If you do not have any images download the CD or DVD which suits your needs and your computers needs from Debian on CDs. The preferred way is using Bittorent. A convenient way is using http
From now on we will mention CD meaning CD or DVD, just what you use
We prefer the xfce Netinstall ISO. On an older computer with a slower CPU (Passmark 800 and below, 2 GB or less memory the QT or LXDE desktops are advised
With http download the current stable version from:
* i386
* AMD64
Burn the downloaded ISO to a CD. Maybe you can use a USBdrive instead. How to do that is not explained here. Or create a Ventoy multi ISO boot USB drive
Pre install actions
- Make sure there is at least 4 GB of free hard disk space. 2.8 GB is not enough
- Set the PC clock to UTC via the BIOS. See: time shifting issues
- Partition the hard disk. Here is more on why
- It might be faster and more convenient to pre partition the disk to your needs using a tool like Parted Magic.
- Create a swap partition of at least half the size of the memory with a maximum of 1GB depending or to your needs. More on Formatting
- It is advisable to make separate partitions for some directories in the root of the filesystem ( / ).
- We did not try LVM (logical volume management).
- Since the partition size is static you have to estimate the size needed for the partitions. We have put a proposal for the size in the next table
Directory | Size | Advised size | Remark |
---|---|---|---|
/ | >= 4 GB | 30GB | Primary partition |
/boot | >= 1 GB | 1 GB | Can be ommitted and incorporated in / |
/home | >= 10 GB | 30 GB | In extended partition |
/opt | >= 2 GB | 20 GB | In extended partition |
/root | 0,1 GB | 0,1 GB | In extended partition |
/tmp | 10 GB | 20 GB | In extended partition |
/var | >= 6 GB | 40 GB | In extended partition |
swap | 1 GB | 1 GB | In extended partition |
This comes to use when you have to reinstall Debian. A lot settings are preserved then if you keep the data of these partitions when partitioning, do NOT format them. You can cleanup /var. Keep /var/backups, /var/log, /var/mail, /var/spool
Pre reinstall actions
- Copy /etc to /var/backup/etc
- Save your custom themes in /usr/share/themes/
- Cleanup /var . Keep /var/backups, /var/log, /var/mail, /var/spool
If you get Errors
If you get an error, a screen with a red background, type
CTRL ALT 2
to open a console.
To login press enter
Do
cd /var/log
check the logfiles for clues
more
can be used to step through the logfiles To go back to the install screen type CTRL ALT 1
apt error
When an apt occurs this can be caused when the CD drive you are installing from is not sr0. This can be solved by mounting the drive with the CD to /media/cdrom in a terminal screen (CRTL ALT 2). Do
mkdir /media/cdrom && mount /dev/sr[numberOfTheDriveTheCDisIn] /media/cdrom
You can check if you have mounted the right drive with
ls /media/cdrom
See also /var/log/syslog or do
tail /var/log/syslog
for more clues
Red screen
- During installation of the basesystem. We could solve the issue by doing
- BIOS: Setting the SATA setting in the BIOS of the Intel motherboard to RAID
- BIOS: Enabling UEFI
- Creating a GPT partitiontable in stead of a MSDOS one
The installation
Installation terminals
During installation, after a certain point, there are terminals avaiable
ALT-F1 The install terminal ALT-F2 Available for the user ALT-F3 Available for the user ALT-F4 Install events output. Here you can see in detail what is going on
CD does not eject
If the CD does not eject by means of the eject button, go to terminal F2 and typ eject at the prompt. After inserting an other CD wait until the light on the drives stops blinking before pressing <ENTER>
Use TAB to navigate through a page
Use SPACE to select items
Use ENTER to activate
Let's go
One line per screen:
- Make sure your PC is connected to the Internet via an Ethernet cable connection
- Load the CD in the PC you want to install Debian on
- When the CD is booted select: Advanced options
- Select: Expert install
- Wait until the installer has been started up. This can take some time. Finally the “Debian installer main menu” shows up. Continue in this menu:
- Choose language
- Select a language
- Language: English - English
- Select your location
- Country, territory or area: Europe > Nehterlands
- Configure locales
- Country to base default settings locale on: United States - en_US.UTF-8
- Additional locales: Select what you need. We also want nl_NL.UTF-8
- System locale: en_US.UTF-8 Text's will be in US english.
- In our case if we would select nl_NL.UTF-8 text's would be in Dutch
- Access software for a blind person using a braille display
- Skip if not needed
- Configure the keyboard
- Keymap to use: American English (or according to your needs (not tested by us))
- Detect and mount CD-ROM
- CD-ROM detected
- Pre Debian 9: Modules to load: Select usb-storage (and others if presented and needed)
- CD-ROM detected:
- Continue
- Load installer components from CD
- Installer components to load:
- choose-mirror
- parted-udeb
- Loading additional components: This takes a some of time
- Detect network hardware
- If you get a screen with in the bottom “Load missing firmware from removable media?” then try to find what is missing (see the screen). Something like rt18168d-2.fw. Put is on an USB stick, or a diskette, insert is and do <Yes>. If that does not work, as in our case, do <No> and try to install the firmware after installation. When done do ALT-F2 and ENTER to start a console. Do blkid to see which device the USB stick is. Then do eject /dev/TheUSBstickDevice and remove the USB stick. Press ALT F1 to get back to the installer
- Configure the network
- Waiting time (in seconds) for link detection: 3
- Primary network interface
- Choose the wired interface you connected to the Internet
- Auto configure networking?:
- No
- IP adres: The IP adres you want to assign to your computer
- Netmask: 255.255.255.0
- Gateway: The IP adres of your router or gateway
- Name server address: The address of the DNS server, mostly of your Internet provider. Can also be your router if it is configured accordingly
- Currently configured network parameters: Check if all is entered as desired
- Yes if you were not able to load the firmware and the networkcard is not functioning (after this step that will be clear). We got a working connection even if we were not able to install the firmware. Also if and / or you want to use DHCP and thereby auto configure the network
- Waiting time (in seconds) for link detection: 3
- Hostname: The hostname (a name you can make up yourself) of your PC
- Domain name: Leave empty
- Choose a mirror of the Debian archive
- Protocol for file downloads:
- http We use http
- https We tried this but did not succeed. You need to enter a mirror manually, not tested further
- FTP. We did not test ftp
- Debian archive mirror country: Your country (type the first letter to move fast). For us: The Netherlands
- Debian archive mirror: Select one at your choice. We choose ftp.nluug.nl
- HTTP proxy information (blank for none): Leave blank if not needed
- Set up users and passwords
- Enable shadow passwords?: Yes
- Allow login as root?: Yes (or No at your choice)
- Root password: Enter the root password of your choice
- Re-enter password to verify: reenter the root password of your choice
- Create a normal user account now?: Yes
- WARNING: When upgrading old /home data to a new install then read the Migration page on how to handle the user accounts
- Full name for the new user: Enter the name of the user
- Username for your account: press Enter
- Choose a password for the new user: Enter a password of your choice
- Re-enter password to verify: Reenter the password of your choice
- Configure the clock.
- Why we use UTC: time shifting issues
- Set the clock using NTP?: Yes
- NTP server to use: press Continue (or enter an alternative first)
- Select your time zone: Coordinated Universal Time (UTC)
- Detect disks
- Partition disks
- It is advisable to make separate partitions. See pre install actions on the top of this page
- Partitioning method: Manual (or an other choice depending on your needs. We did not test the other choices)
- If there are at least two options BOIS method or EFI method then:
- BIOS: Proceed with the next step
- EFI: Set the filesystem to GPT. If there is a EFI partition leave it as is. If there is no EFI partition create a 250MB EFI partition which will be formatted to ESP format at the beginning of the harddisk. Select EFI System Partition in stead of the usual ext4 journaling file system. Set the bootable flag to on
- Check if all partitions are set as needed. For every partition check and or set
- Use as: Ext4 journaling file system
- Format the partition: yes if the partition is empty or all data can be deleted. We did not test not formatting the partition
- Mount point: At least one as root ( / )
- Mountoptions: defaults (Leave all unselected)
- Label: At your choice
- Reserved blocks: 5%
- Typical usage: standard
- Bootableflag: Off. On for the root ( / ) partition when MBR based partitioning is used. off for EFI based partitioning
- Select Done setting up the partition and press Enter
- Repeat this, from “Check if all partitions are set as needed”, for other partitions
- Create a swap partition
- Use as: swap area
- Bootable flag: off
- When ready select: Finish partitioning and write changes to disk. Press Enter
- Write changes to disk?: Check if all is as desired and if so select Yes and press Enter
- Install the base system. This can take some time
- Pre Debian 8 Jessie info
- rt Realtime kernel
- Kernel to install (The x's represent the version number):
- On a computer with a 64 bit CPU install linux-image-x.x.x-x-amd64 (If you choose linux-image-amd64 it might not be possible to remove the old kernel after an kernel upgrade, to be investigated)
- 32 bit CPU
- On a computer with a 32 bit CPU and a maximum of 3GB RAM install the linux-image-x.x.x-x-686 kernel (non pae)
- On a computer with a 32 bit CPU and in which there is between 3GB RAM and 4GB RAM install the linux-image-x.x.x-x-686-pae kernel. The pae kernel will solve the BIOS memory hole issue that can exist so the memory between 3GB RAM and 4GB RAM is also accessable
- On a computer with a 32 bit CPU and in which there is or will be more than 4GB RAM (max 64GB) install the linux-image-x.x.x-x-686-pae kernel
- If you have an very old PC you might need linux-image-486 (not available from Debian 8 onwards)
- Drivers to include in the initrd: targeted: only include drivers needed for this system
- Configure the package manager
- If you use a full CD you will be asked: “Scan another CD or DVD?” If so do that, if not select <No>. If <YES>, then the CD will not eject with the button on the drive press ALT-F2. Then ENTER to get the command prompt. Type eject and the drive will eject. Replace the CD with the next one to be scannned. Type eject -t and the tray will close. Return to the installation screen with ALT-F1. Wait until the light on the CD drive goes off and do , if <CONTINUE> is selected, red, <CONTINUE> by pressing ENTER. Repeat until all CD's are scannned. If you use a netinstall CD this question will not be asked
- Use a network mirror?: Yes
- Protocol for file downloads: http
- Debian archive mirror country: Your country (type the first letter to move fast). For us: The Netherlands
- Debian archive mirror: Select one at your choice. We choose ftp.nluug.nl
- HTTP proxy information (leave blank for none): Leave blank if not needed
- Use non-free software?: Yes (Or No if you do not want to use non-free software)
- Enable source repositories in APT?“ We choose <No>
- Debian 10 Buster: Configuring discover. Updates management on this system: Install security updates automatically
- Retrieving file “number” of “total”: This takes a bit off time
- Services to use: Select
- security updates (from security.debian.org)
- release updates
- Configuring discover
- Updates management on this system: No automatic updates (since with automatic update choices can not be made)
- Retrieving file “number” of “total”: This takes a bit off time
- Select and install software.
- Retrieving file “number” of “total”: This takes some time
- Configure populatity-contest
- Participate in the package usage survey?: Yes (Or No to have more privacy)
- Software selection
- Choose software to install
- Debian desktop environment (If you do not need a windowmanager, so just a commandline, unselect this)
- Items 2 until 10 as desired. We choose Xfce
- Standard system utilities
- Retreiving file x of total amount (x time remaining). Now the final installation starts. This takes a long time. 1000+ packages have to be read from CD and / or downloaded and installed
- Install the GRUB boot loader on a hard disk
- Install the GRUB boot loader to the master boot record?: Yes
- Device for boot loader installation: Select the device where the bootloader has to be installed. We did not try “Enter device manually
- Force GRUB installation to the EFI removable media path?: <Yes> Just to be sure, we did not test <No>
- Finish the installation
- Is the system clock set to UTC?: Yes
- Installation complete:
- Remove the CD from the CD drive (and close the tray)
- <Continue>
- The system will reboot now
- While the system reboots check the logging for errors like
- Missing driver for Radeon R300_gb. Solution install the firmware-amd-graphics package with aptitude
- After the reboot has finished login as root and check journalctl -xb for any issues and resolve them
- Reboot and check journalctl -xb again. Repeat until all issues are resolved
- Ready
Post install actions
- Settings > Power Manager > Security >
- “Automatically lock the session”: Never
- “Lock screen when system is going to sleep”: Off
Login into a terminal and become root and do
- apt-get install aptitude
- systemctl status nftables.service to check if the firewall is active. You should see Active: active (exited) since. If so then it is ok. If not
- run systemctl start nftables.service
- check again with systemctl status nftables.service
- Run a script to set up and install a lot of software. T.b.d.
- After uninstalling fonts choose an other font in:
- Terminal > Edit > Preferences > Appearance > “Use System font”* Off; Dejavu Sans Mono Book; Size: 12
- Where the system font is set is not clear at this point. It is not in:
- Menu > Settings > Appearance > Default Font > Dejavu Sans Book; Size: 10
- Menu > Settings > Appearance > Default Monospace Font > Monospace Regular; Size: 10
- Selecting text and pasting it with a click on the mouse wheel results in unreadable text with only blocks. This can not be solved in Menu > Settings > Somewhere in on of the items. T.b.d.
- exo-open is from the Default Applications in Menu > Settings > Default Applications were the default WebBrowser, MailReader, TerminalEmulator and FileManager can be set
- The configuration file is xdg/xfce4/helpers.rc
- aptitude remove vim-tiny (set syntax on does not work in vim-tiny, it does in vim)
- aptitude install vim and see configure vim
- This is important, vi /root/.bashrc and add PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
- source /root/.bashrc
- Turn the use of the CD('s) off in /etc/apt/sources.list
- Set the locale according to your needs following Locale
- If exim4 is not installed install, with aptitude, dma first so there is a MTA (Mail Transport Agent) for mutt
- Check if the clock in the panel is to UTC. Add a second clock, Orage, to the panel for local time
- Install firmware that could not be installed before. If the computer has Realtek network hardware it might be useful to install with aptitude firmware-realtek. Also firmware-linux-nonfree, firmware-amd-graphics or an other one depending on the hardware in your computer might be useful to install. You can also search for errormessages in the output e-mail of logcheck for missing firmware
- Set the swappiness of the swappartition. See our Swap page
- set /etc/logrotate.d/[apt, aptitude, dpkg] to longer times so you can always see what has been installed. We choose rotate 120 monthly. A good alternative is rotate 12 yearly. Keep an eye on the logsize.
- Set Update-alternatives for editor, view, vi, www-browser, x-terminal-emulator
- Make sure you have your Debian backup system set up
- Check if any settings have to be changed for GTK2 and GTK3 with the gsettings command
Additional software
Start aptitude and update the package list by pressing u
If any updates are found press U and then g. Evaluate what is going to be done. If satisfied press g again. When the installation is finished press Retrurn. Repeat this until there are no more updates to be installed
Do <CTRL> T and go to options.
- Set “Prompt for confirmation on exit” to off.
- Set “Display tabs for the information area” to on
Leave aptitude by pressing q twice
Install via aptitude according to your needs. It might be possible that some packages are not available, obsolete, to new, for the Debian version you are installing
- firmware for hardware that does not function properly, check the bootlogd output (post systemd systems), journalctl (on systemd systems) or the output of logcheck and / or logwatch for errors and warnings
- In a root terminal:
- Some commandline programs, programs that function in a terminal, (links2 takes 214MB) by doing aptitude install auditd beep bc backup2l dnsutils htop iotop lshw mc mutt wipe links2 localepurge smartmontools lm-sensors nwipe logcheck package-update-indicator (and dependency packagekit (do not install the recommended packages)) syslog-summary
- Optional
- nwipe (If you need to wipe harddrives)
- shiki-colors-xfwm-theme
- xfce-keyboard-shortcuts
- xfce4-statusnotifier-plugin
- localepurge when asked
- Use dpkg --path-exclude? choose No . More information
- Also delete localized man pages? choose Yes
- logcheck mails its output to the local mailbox. Use mutt to read it. See also the log configuration page
- Uninstall unattended-upgrades. It is better to update manually so you can make the decision when a program asks for it
- When you installed Xfce do: aptitude install info geany feh orage qpdfview pk-update-icon smart-notifier package-update-indicator
Remarks:
- bootlogd is (Pre Debian 8 Jessie). The same information can be found in the local mail when the t.b.d. package is installed
- mc: See change the F10 behaviour
Firefox
See Firefox
What can be removed from Debian
See What can be removed from Debian to make the Debian installation footprint smaller and the Debian installation safer by removing software that is not needed
Configuring bash
Change default settings and add settings to .bashrc for the user(s) and root
# Bash history shopt -s histappend # append to the history file, don't overwrite it HISTCONTROL=ignorespace:ignoredups (Is the same as HISTCONTROL=ignoreboth) HISTFILESIZE=2000000 HISTSIZE=100000 # The prompts #echo $color_prompt force_color_prompt=yes if [ "$color_prompt" = yes ]; then if [ $USER == root ]; then # For root PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \#\[\033[00m\]\$ ' else # users PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h \D{%d %b %Y} \A UTC\[\033[00m\]:\[\033[01;34m\]\' fi else # Default prompt PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt # Aliasses # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases.sh, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases.sh ]; then . ~/.bash_aliases.sh fi
- Create and fill the bash_aliases.sh file with aliases
- Enlarge the scrollback buffer of the terminal in Edit | Preferences… | General tab | Mark Unlimited scrollback
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.