Debian 9: Install Debian 9

This article will describe installing Debian 9 (stretch).

1 Install Debian 9

Download debian-9.0.0-amd64-netinst.iso which will install packages via network.

Run debian-9.0.0-amd64-netinst.iso.

GRUB menu is displayed. Select "Graphical Install".

0001_GRUB.png

Select language. This article selects English.

0002_SelectALanguage.png

Select location. Displayed location is based on selected language. When selecting "other", all location will be displayed. This article selected "other", "Asia" and "Japan".

0003_SelectYourLocation.png

If combination of language and location is undefined like combination of "English" and "Japan", you need to select locale. This article selected en_US.UTF-8.

0004_ConfigureLocales.png

Select keyboard.

0005_ConfigureTheKeyboard.png

Input hostname.

0006_ConfigureHostname.png

Input domain name. This can be empty.

0007_ConfigureDomain.png

Setting of root password is displayed. If root password is empty, you cannot switch to root with root password. But sudo package will be installed and you can switch to root with "sudo su -". This is the same with Ubuntu. This article did not set root password.

0008_RootPasswd.png

Input user full name. This can be empty.

0009_Fullname.png

Input user name.

0010_Username.png

Input user password twice.

0011_UserPasswd.png

Select a way of partition disk. This article selected "Guided - use entire disk and set up LVM".

0012_SelectGuideForPartitionDisks.png

Select a disk to be installed.

0013_SelectDisk.png

Select a way of separating partition. This article selected "All files in one partition (recommended for new users)".

0014_SeparatePartition.png

Confirmation for writing LVM to disk is displayed. Selecting "Yes" will write to disk.

0015_ConfirmLVMWrite.png

Confirmation for separating partition is displayed. If you do not modify separating partition, select"Finish partitioning and write to disk".

0016_ConfirmPartition.png

Confirmation for writing partition table to disk is displayed. Selecting "Yes" will write to disk.

0017_ConfirmWrite.png

If you have additional CD/DVD for third party package, insert it and select "Yes". This article selected "No".

0018_AnotherCDOrDVD.png

Select location of mirror server of debian archive. You should select the nearest location to your country. This article selected "Japan".

0019_DebianArchiveMirrorCountry.png

Select mirror server of debian archive.

0020_DebianArchiveMirrorServer.png

Input proxy URL. This can be empty. If your company needs proxy for accessing internet, input proxy URL.

0021_http-proxy.png

Decide whether to send statics data of used package to debian developers. Select "Not" if you do not send it, "Yes" if you send it.

0022_Statics.png

Select software like desktop environment. This article selects "GNOME", "SSH server" and "standard system utilities".

0023_SoftwareSelection.png

Confirmation for installing GRUB is displayed. Selecting "Yes" will install GRUB.

0024_InstallGRUB.png

Select device to install GRUB.

0025_SelectDeviceForGRUB.png

Debian installation is completed.

0026_InstallationComplete.png

After reboot, Debian 9 will start.

0027_DebianStretch.png

2 Upgrade Debian 8 to Debian 9

Make Debian 8 up to data.

$ sudo apt-get update -y
$ sudo apt-get upgrade -y
$ sudo apt-get autoremove -y
$ sudo apt-get clean
$ sudo reboot

Check if there is hold package. The hold package must be changed to "install".

$ dpkg --get-selections | grep 'hold$'
$

Change repository from jessie to stretch.

$ sudo cp -a /etc/apt /etc/apt.jessie # Backup
$ for f in /etc/apt/sources.list $(find /etc/apt/sources.list.d -type f); do
  sudo sed -e 's/jessie/stretch/g' -i "${f}";
done

Run Debian 9 upgrade. This needs some interactive reaction like reading README, replacing file and restarting service.

$ sudo apt-get update -y
$ sudo apt-get dist-upgrade -y

Reboot Debian 8.

$ sudo reboot

After reboot, Debian 9 will start.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.0 (stretch)
Release:        9.0
Codename:       stretch