Step 1 - Netinstall CD

Netinstall >
updated March 2023


Netinstall method

The following method is ideal for building a minimal Devuan-Debian install (without bloat) installing just the basic system without a desktop environment or any software packages, following which, you boot into a command prompt (or you can chroot into it from a working Debian system) and install whatever else you need, through the internet.

The Netinstall ISO does give you the choice to install a full Desktop Environment as well, if you choose to, but then you can't specify exactly what you want installed at that level.

A Live CD will also install a full DE (desktop environment) of your choice, but again you lose the fun of building the install yourself, cut down to the exact packages you want on your box.


Each release of Debian/Devuan is code-named and passes through three stages of development life before becoming stable -



A new release is called Stable, packages are well-tested and bugs mostly already repaired, security updates are maintained but software is not so cutting-edge as in testing and it's sometimes needful to obtain packages direct from developers to run the most up-to-date versions.

You can follow any release stage (e.g. Testing), by adding its stage code name to your sources list file (see below) which means you will always keep your system on that release, regardless whether testing becomes stable in a new release and the previous 'unstable' becomes the new testing. If you add the code name of the current testing to your sources, you will stay with that release when it becomes stable and will need to change the code name in order to follow testing again - whereas, if you just use the code name 'testing' you will aqlways stay on testing, regardless if testing beis released as stable, or if you use 'stable' you will keep on stable, regardless if stable becomes 'old stable' at some point.

However, when Testing is still new in life there may be some things that could break your system (most likely you'll have package install conflicts to sort out)... so its advisable to run stable while testing is newly down from untable and still needs ironing out, and it's highly recommended for production systems or servers (where you don't want to run into any problems at all). You can still install some packages from testing as well, by using the "-t testing" option with apt, while your default release is set to stable (but that's mish-mashing releases which may not be healthy).

Upgrading from Stable to Testing is very straight forward - see my page upgrade debian.

I used to be really avid following testing, to make sure I had the more recent packages and newer program versions running, and that is OK if you have a good internet connection, to keep upgrading the system (dist-upgrade), and also the time at hand to fix things (and also good internet is needed to sort things out)... but nowadays, me having a poor internet connection being one reason, and with many important apps now shipping Appimages that run by themselves, not needing an up-to-date system, I keep the box on stable, and find that plenty good.




Pre-install, get an ISO file...

An ISO file contains every file needed to be put on a CD/DVD/USB stick in order to make a bootable medium with the chosen type of Debian/Devuan Linux. A suitable ISO to USB program will unpack the ISO to the USB stick (but burning a CD is still probably the easiest method).


Netinstall CD/Live ISO


Devuan

Devuan is a fork of Debian that excludes the controversial "systemd-sysv" and is maintained by the Devuan foundation.

In 2016, a change took place in Debian when it was voted to switch to a complex start-up daemon called systemd and the old 'init' start-up scripts that were easy to customise were scrapped, leaving practically no choice on the matter to debian users (which opens the controversy about systemd as Debian is meant to be about freedom of choice). The new daemon is also extremely difficult to learn and also it can't easily be bypassed as so many other programs depend on it. Trying to run Debian on the old sysinit is now nigh impossible.

Finding systemd running after upgrading to Debian Jessie came as a little surprise and I tried everything I could to remove it, as the reason I chose Debian was to be free of lock-ins. While I succeeded at the time, I was then left unable to install any program that depended on systemd. After that I came to Devuan, a Debian branch that keeps systemd out of everything. Sysinit is able to operate like before and any system or software package that needs systemd is repackaged by Devuan maintainers in order to exclude it. All other packages are simply mirrored from the Debian software repositories. Release code names are different to Debian and it is not possible (since Jessie) to dist-upgrade from Debian to Devuan.

From the Devuan website you can follow links to download mirrors from which you can find either stable or old-stable (those being chimaera and beowulf currently, end of 2021).
--> under the 'installer-iso' links you will find the base-system CD images, whereas under 'live' are the full desktop installer images.
Of the base-system images, you will find the 'netinstall' CD (300Mb) that requires an active internet connection to successfully install (LAN cable or WiFi) as well as a set of CD's numbered 1-4 (each around 600Mb) with CD1 named 'server' -- and these are for installing to a disconnected PC (no internet required) with CD1 installing the base and 2-4 with options of the main desktops (refer to Devuan website).
devuan.org/get-devuan

After completing a fresh install this June 2020 without any internet available, I had god success with the Server installer ISO. And actualy only CD1 is necessary to download if you want to install minimal.

I should also note that it was necessary to use 'Expert install' under 'Advanced options', as simply running the top 'install' option the installer keeps asking for the network!

If you use a 'live' ISO (with a desktop environment) the first part of the install method on this page will not be needed (desktop packages) and the resulting install will not be very minimal, or with the exact packages you'd like installed - but it is a less complicated method if you just need a box with Debian running, like for a server or for introducing someone to Linux.....

There's also Refracta Live CD made with Devuan.. sourceforge.net/projects/refracta

For standard Debian you can look at the site here Debian.org


It's a good idea to run the checksum on the downloaded ISO so that you don't waste a CD or spend time making a USB stick and then the thing fails to boot!

Download the SHA256SUMS from the release archive and run this in same dir as the downloaded ISO file:
 


Build your own ISO

Or you could build your own Live Cd (an advanced method and you need a running Linux OS to work from), a custom-made Devuan-Debian with all the software you need pre-installed, using Live Build -see my Live build page.

But this method can take days and days to configure and build it right, with so many errors and fails that can occur...

It basically uses a progam called Debootstrap and a load of scripts to install a Debian system in a target directory before packing it all into an ISO file for install to CD or USB stick. Then the stick boots as a live medium and the live system can be installed to a disk.


Install a system with Debootstrap

This method removes the need for downloading an ISO file and booting into a live system from removable media before installing it. All you need to do is run debootstrap from a running linux box to install a complete system onto another device (SSD, USB etc), which will be bootable by the end of the process.

This method is actually the fastest of all these methods, but you will need to know something about Debian first, and of course, already have a working linux box to work from.

Check out my bootstrapping page!


Make a bootable USB stick

Put the ISO onto a usb stick with a few easy steps with Refracta2usb or any other one.


Or onto a CD/DVD with any disk-burning utility, or with Linux command line.. using wodim or dd
 
 
works??




Prepare to install

The installer will ask for missing wireless firmware. You can get a zipped archive of firmware from Debian, and simply copy it to the USB stick with the Live ISO and unpack it there. The installer will search for what it wants. https://www.debian.org/releases/stable/amd64/ch06s04.html.en

If you know what wireless adapter your box has, you can look on Debian.org https://wiki.debian.org/WiFi#PCI_Devices

If your firmware comes packaged as a .deb binary, you can search/download it from https://packages.debian.org/ download and unpack it to copy the firmware files out.

Otherwise, the wireless and other firmware can be loaded after Debian is installed (see below).




Get a partition ready!

If you have a new harddisk to install on, or one with nothing worth keeping on it (like Windoze), you can format the harddisks with the installer.

On a PC which already has an OS installed, use the Gnome partition editor (gparted) to make free space for your new partitions, or do this with the installer.

You can get the Gparted Live CD or install it if you have a Linux OS already on the PC.
1. shrink a large partition which has some unused space, to make enough for your combined system and home area, perhaps 30 or 40Gb.

Note: it's not advisable to move a partition along on the hdd, as Gparted will actually copy the whole file system, sector by sector, taking a very long time. Shrinking from the right should be fast, but if you need to move the partition along to the right, it would be better to copy the data off it, delete it and then create new partitions.

2. make an Extended partition, size = total size of the partitions needed for Linux, or else resize existing Extended partition to add Logical partitions to it.

3. in the extended partition, make a Logical partition for the Linux system, 15-20GB, formatted with ext4,

4. and another Logical for the home partition (if you choose to make it separate - actually a good idea because then you can make a fresh install or clone any time over the system without wiping over your all your configuration files), anything from 2Gb to 20Gb... formatted ext3 or ext4 also.

5. then a swap area, which just needs 1Gb to work fine in my opinion and formatted as Linux swap - you can also forget this and just set up a swapfile on your system partition.

Windows dual-boot is beyond me nowadays.




The Net install /server install CD


1. I chose expert install.

2. configure network hardware: insert a usb stick at prompt for network firmware.

3. for Netinstall CD set up the network by either Ethernet (eth0) or wireless (wlan0), if you have the ESSID ready (your wireless network name)

4. Partitioning - assuming the partitions were set up with Gparted earlier:

5. install software.. uncheck all (tap Spacebar) including graphical desktop, select laptop if installing to a laptop. Or select nothing!

6. Install GRUB (if this is the only install on the hddl) or otherwise don't - add the new install to the GRUB menu by running update-grub on another Linux installed on the hdd that is set to boot in BIOS GRUB page

Then finish the install, set-up users and passwords... and you can restart and boot into the system - as yet without a desktop (it will be just a command prompt).

If you already have a working Linux install on the same box, the easiest method is to chroot into the new install from that (chroot="change root", kind of jump into one system from another) and run the following config and desktop install commands... see my chrooting page. Although it might be a good idea to check that the install made you a bootable system by booting into it once.

And for the following tasks you must be logged in as root, or else switched to root with the `su` command and root password, if logged in as a user. If chrooting into the new install then you will definitely be switched to root already.




Sources list

If the installer failed to download the APT files and didn't make the sources.list properly, you'll need to put that right before you can retrieve/install packages from Debian. APT is the the package manager that controls package installation and it first retrieves the lists of packages from the Devuan-Debian release you choose, with their current version numbers.

 
enter the above command and hit Enter

The command "nano" there opens a file to edit inside the command-line (because you don't have a graphical file editor yet).

(You'll need these lines handy, on another screen while you follow these steps)
Make sure you have the repository lines like the ones below in the file.

lines needed for Devuan:
 

save the file with Ctrl-X (close file), y (yes) and Enter.

then update your package lists (which are updated frequently at the server side repository)
if your lists are old you'll get errors when installing packages because old package versions will no longer be available.

while still root user, run the command:
 


you can make a system upgrade now as well if you like, to make sure all is up to date, including the kernel etc.
 




Prevent install of "recommended" packages

Setting this up in the APT conf file does the same thing as adding the option --no-install-recommends to every install command. It prevents all the "recommended" packages being installed which are promoted by whatever you install and that means a lot less files will be downloaded and less disk space used, and quite possibly a few less processes running. Besides, why would you want to install what something else wants?

still as root, type
 

fill the file with:
 

"0" also works.

You can knock out the downloading of language packs with every apt update, by adding to the same file:
 

and add whatever language you need to be downloaded before the "none"
then save the file, Ctrl-X, y, Enter




Install the desktop environment

Follow this part only when using the Netinstall/Server CD --a Live CD will have a desktop environment already, though you might still need some of the following packages.

The Debian command to install software via the Terminal is 'apt install'... You will need these 'apt' commands handy as you won't have a desktop at this stage of install.

Another way would be to chroot into the new install from another Debian install, as I mentioned already, which would make it much easier, pasting commands from here or a file.

You could also make a script to automate the process, and to save forgetting anything - see my basic example on my LXDE fast install page. But the script will spew errors if some packages are no longer available.


XFCE Desktop

Apologies for anything that no longer works!!! I don't run Xfce any more and so I can't really make corrections here.

To install a fully-functioning XFCE desktop, enter this on the command line:
 


If you need a GUI package manager and installer, add synaptic apt-xapian-index gdebi

This gets you a window manager, light desktop, display manager (login), power manager, browser, text editor, a cool terminal and sturdy network manager.

the wicd network manager is no longer maintained
lightdm is your best choice of display manager, Gnome's gdm3 comes with bloat of dependencies.
firestarter (firewall) is no longer maintained, so you are better off using iptables (see my firewall page)
for browsers you can choose between chromium, iron, icecat, midori, plus others - see my Step4 page.


LXDE Desktop

To install LXDE, (Lightweight X Desktop Environment) a slightly less memory-hungry desktop, enter this on the command line:
 


It's possible to run openbox alone without installing the lxde package (but just the parts of it you might need) and without even a Display Manager (login screen etc), but its a little complex to set up unless you're handy with Debian already.

To do that I leave out lxde and lightdm, and add instead: openbox lxpanel lxtask. Then at boot, when reaching the command prompt, just type "startx" and Enter. But you may have problems with Xorg display permissions if you opt out of installing a display manager -see Xorg issue

Warning! this is not perhaps a good idea for beginners. Installing LXDE will be more straightforward. But see see my page, plain openbox if this is the way you want to go!


Just in case, there ae a few essentials that the Installer CD may not have installed, so you should check that they are now:
 
And you can install any firmware you might need for wireless or video cards, e.g. firmware-linux firmware-linux-nonfree firmware-iwlwifi




Install Thunar file manager

Thunar is the best light-weight graphical file browser in my opinion, beating the default LXDE file manager, because of its ability to carry out possibly any action whatsoever on files through its custom right-click menu actions. There are more powerful file browsers about, such as Dolphin or Krusader (both KDE), but you should look at this one first, and see my custom actions on my thunar page. For example, Krusader can do some picture resizing actions - but you need the KIO plugins installed, whereas with thunar, all you need is imagemagick (a small program) and a few custom actions and you can resize pic's with two clicks - or resize a whole directory of pic's, even recursively.

There are alternative file browsers too, such as xfe (with no bookmarking except your own real symlinks), gentoo (two pane with task buttons), emelfm2 (lots of task buttons), and rox-filer (very basic graphical).

But for those bored of GUI mouse-clicking browsers there's Ranger, a file browser which runs in a terminal window (takes up my 2nd desktop in full screen) - see my ranger page.

So for thenar...
 


Additional installs


Prepare for bluetooth, NTFS and FAT32/exFAT support, ssh, archiving, printing, pgp, time, system backup
 

To install the opensource java environment, needed for Libre office, run a search for it with 'apt search openjdk' because its name actually changes with each new version



before booting into the desktop, you could set up the wireless and edit your sudoers file (see below)




Sudoers file

To give your user(s) super-user priveleges, they need to be added to the sudoers file. This means that they can run commands with 'sudo' infront to carry out commands as super-user (nearly root) with their user password.

as root still (and if you already rebooted then you need to open a Terminal and "switch user" to root, with the command 'su' and enter the root password), run "visudo" with,
 
which will allow you to safely edit the sudoers file using the friendly nano editor (otherwise you'll have to learn vim if you run just `visudo`)

and you can either add this line after the root's line:
 

but the more recommended practice is to add the sudo group to sudoers, so that the file doesn't fill up with dozens of user names, like this:
 

write to file by Ctrl-X, y, Enter

and if you added the sudo group to sudoers, you must add your user(s) to the sudo group!
 

Note: if there's no "sudoers" file just install sudo.




Enable the wireless

If you don't have the wireless firmware installed yet, first identify the wireless chipset, using this command
 
Then go to the Debian Wi-Fi page (and you'll need to reboot into the Desktop to get to the internet) https://wiki.debian.org/WiFi#PCI_Devices and find the correct firmware for your device.

If the firmware is included in the kernel, but wireless still doesn't work, check the interfaces file below, and check that your wireless interface is wlan0 or wlan1 (with wicd you need to set this in Preferences).
 

comment out everything except the lines (i.e. insert a '#' before each line to comment out)
 

check if user is added to netdev group with
 

and add your user to that group if it wasn't listed with above command
 

then restart networking with:
 
or just reboot into the desktop

Then do
 

or sometimes using `wlan1`, depending on your wireless hardware.

Note: you can check what device it is using `ifconfig` (my wireless changed to "wlp3s0")




Add groups

While you're adding groups, here's some more you'll probably need: dialout plugdev lpadmin admin clamav fuse audio

to add user to a new group, make the group, e.g., as root do
 

then add the user,
 

to add them all in one go, use something like this:
 
where the -f option prevents groupadd from stopping if the group already exists.




Auto-mount partitions at boot time - set the fstab file

Linux uses a small file called "fstab" (file system table) to list disk partitions so the system can mount them with any particular options/permissions. You need to make this file tidy so that your partitions are nicely mounted at boot (those you want mounted) and you can read/write to them without the file manager saying "not authorized" etc.

Note: to write to NTFS file systems you need ntfs-3g (install line above)

Find the disks and their sizes on system to note their device names (e.g. sda2)
 

List the uuid's of disks
 

You need to add an fstab entry for each harddisk partition that wants mounting at boot. So open the fstab file with:
 

First of all, you can omit the USB or DVD device lines that might have been added during the install.
Don't touch the lines for your linux install (mounted on /) or home partition (/home), or swap, and don't give two lines the same mount point (especially not both "/")!

example of line for NTFS partition
 

example of a data partition with ext3 format
 

create mounts for any partitions you added that are mounted in /media, e.g.
 

and mount the partitions to the mount points (or you can reboot), e.g.
 

check the partitions are mounted with:
 

If you can't write to the partition (it's read-only):
 

If your installation CD (e.g. Debian Live Build) left you with NO fstab file at all, you will need to add good root, home (if separate) and swap lines above the ones for data partitions.

example (tab separated):
 

currently, I put /var on its own partition as the contents change quite a lot (e.g. apt cache) and / is on a solid state disk that shouldn't need so many write operations
 

since Debian 7 /tmp is on tmpfs (RAM) so it doesn't need moving to another partition


If using a swap file instead of a partition, the correct fstab line will look like this:
 


If changing from a swap partition, you need to boot into the system and create the swapfile with
 

then edit the file /etc/initramfs-tools/conf.d/resume and replace "UUID=..." with "/swapfile"
followed by this command:
 


there's an fstab documentation here ..ubuntu.com/community/Fstab


And that's it for installing the desktop, you can boot into it now hopefully.

type 'reboot' to terminate processes and boot into your new desktop!




Quick desktop settings


Get sound working:

In XFCE, add Mixer to the panel and Left click on it, to open Alsa Mixer, then add 'master', 'speaker', 'PCM', 'Pc Beep' (so as to silence it!) and check unmute sound.

In LXDE, add Volume Control applet, right-click on it and open settings, or you can run `alsamixer`

Check that your user is in the audio group with `groups`


Still no sound? alsamixer levels all appear at zero?
Alsa may not detect your sound card properly.

find card modules with
 
this may show only one card, e.g.
0 snd_hda_intel
1 snd_hda_intel

Put this in a file /etc/modprobe.d/alsa-base.conf
looking like this:
 
(and note that 0 sets preferred device, incase you had two cards)


Display: select theme, Tango icons or whichever you like

Set power options: like close laptop lid suspends PC or turns off the display, critical battery warning, inactivity time, screen sleep time, uncheck lock screen, etc.

Removable media: in the file manager settings, check auto mount when hot-plugged or inserted


XFCE problem: on login, the default session shows Xsession, not Xfce, so open a file

 
and edit   'user-session=lightdm-xsession'  -->   'user-session=xfce'

or uncomment the line "#usersession=default" (remove "#") and change "default" to xfce




Install build dependencies


Get dependencies needed for building software from source (you could leave this for another time).
 

Note: bear in mind that the build dependencies will need updating all the time, whenever you have to build from source, to enable compiling without meeting dependency problems. All you have to do is run the above command again and all that needs updating will be, but do remember to run 'apt update' first.




Next page:

Step2 - video editors, ffmpeg, XnViewMP, Libre Office