The officially official Devuan Forum!

You are not logged in.

#1 Re: Hardware & System Configuration » Sub-process /usr/bin/dpkg returned an error code (1) » 2022-03-09 15:46:13

Head_on_a_Stick wrote:

Well I can't reproduce the problem so I can't help. I have no problem installing packages in my test container.

EDIT: and I've just installed a new Debian bullseye system from Alpine using a similar method. Everything works fine.

I also tested using devuan_chimaera_4.0.0_amd64_desktop-live.iso and it worked perfectly. I don't know what might be happening, maybe it's a problem with apt. hmm

#2 Re: Hardware & System Configuration » Sub-process /usr/bin/dpkg returned an error code (1) » 2022-03-07 00:18:19

k3yw0ow wrote:
Head_on_a_Stick wrote:

Perhaps it's your strange mount options.

Do you still experience the error if you use arch-chroot(8) instead of the string of mount commands?

This version works for me when chrooting into a test container from Alpine:

for i in proc sys dev{,/pts} ; do mount --bind /$i /mnt/$i ; done
chroot /mnt /bin/su -

Using /bin/su - instead of /bin/bash ensures the correct login environment.

Right, I tested an installation using arch-chroot instead of set the mount commands and the result was the same. I will try the other way you indicated above.

Error persists sad

#3 Re: Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-05 00:46:30

fsmithred wrote:

If you install runit, you only get run scripts for the gettys, and also for openssh-server if you install that. No setup or linking is needed.

There are run scripts available from a couple of locations outside the repository. They can be added after the install. Basic procedure is to copy the script dir for a service to /etc/sv/, stop the init script, and then run

update-service --add /etc/sv/<service>

Where <service> is the name of the run script directory and is the same name as the init script.

Great, I will research more about runit. Could also explain how sysvinit service management works?

#4 Re: Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-05 00:28:16

Head_on_a_Stick wrote:

Both dd and cp use the same system call to burn the image.

Another option:

cat devuan.iso > /dev/sdX ; sync

See also https://www.vidarholen.net/contents/blog/?p=479

Thanks for sharing me this site, it will be very useful.

#5 Re: Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-05 00:23:55

golinux wrote:
k3yw0ow wrote:
Head_on_a_Stick wrote:

This guide recommends you the use of balenaEtcher or Rufus to write the ISO on a storage media (CD/DVD/USB).

Debian do not recommend those tools and I have seen quite a few problem threads over at forums.debian.net caused by Rufus not burning images correctly.

The recommended technique is

cp devuan.iso /dev/sdX ; sync

Reference: https://www.debian.org/CD/faq/index.en.html#write-usb

I have never seen that command recommended at Devuan and have always used the dd command. These are the methods recommended on the Devuan website:

Writing an image to a CD/DVD or USB drive

Images can be written to a CD or DVD using wodim.

user@hostname:~$ wodim dev=/dev/sr0 -eject filename.iso

All Devuan ISO images are hybrid ISOs and may be written to a USB drive using dd.

root@hostname:~# dd if=filename.iso of=/dev/sdX bs=1M && sync

Well, then I will adopt the method advised by Devuan. wink

#6 Re: Hardware & System Configuration » Sub-process /usr/bin/dpkg returned an error code (1) » 2022-03-04 22:12:57

Head_on_a_Stick wrote:

Perhaps it's your strange mount options.

Do you still experience the error if you use arch-chroot(8) instead of the string of mount commands?

This version works for me when chrooting into a test container from Alpine:

for i in proc sys dev{,/pts} ; do mount --bind /$i /mnt/$i ; done
chroot /mnt /bin/su -

Using /bin/su - instead of /bin/bash ensures the correct login environment.

Right, I tested an installation using arch-chroot instead of set the mount commands and the result was the same. I will try the other way you indicated above.

#7 Re: Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-04 21:58:44

Camtaf wrote:

Go on the Devuan GNU+Linux download page and download the stable minimal-live ISO file devuan_{codename}_{version}_{architecture}_minimal-live.iso.

Wouldn't it just be easier to use refracta installer which, I believe, is included in the 'live' image - you seem to be creating your installation as if from a 'net install' image, to my mind(?).

Yep, I know that use refracta installer is an easy way, but I chose to create and follow a path close to Arch, Gentoo and others.

#8 Re: Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-04 21:53:04

Head_on_a_Stick wrote:
k3yw0ow wrote:

This guide recommends you the use of balenaEtcher or Rufus to write the ISO on a storage media (CD/DVD/USB).

Debian do not recommend those tools and I have seen quite a few problem threads over at forums.debian.net caused by Rufus not burning images correctly.

The recommended technique is

cp devuan.iso /dev/sdX ; sync

Reference: https://www.debian.org/CD/faq/index.en.html#write-usb

Fixed

k3yw0ow wrote:

If you are booting from a legacy BIOS and have chosen a GPT partition table, the first partition must be of type BIOS boot and of size 1 MB [...]

 - /dev/sda1 -> BIOS boot partition -> 256 MB

Why have you recommended two different sizes for the BIOS boot partition? I use sectors 34-2047 because they should be free in any correctly-aligned disk. Note that the BIOS boot partition should *not* have a filesystem applied.

Fixed

k3yw0ow wrote:

Configure fstab

What about the swap line? You seem to have missed that.

Fixed

k3yw0ow wrote:

The fstab file can be automatically generated from currently mounted filesystems by copying the file /proc/mounts

Simpler version:

grep '^/dev' /proc/self/mounts > /etc/fstab

^ That will only copy lines starting with /dev to /etc/fstab. Note that /proc/mounts is a symlink to /proc/self/mounts so it's probably best to use the latter.

And I still think you should at least mention the existence of genfstab(8) for people who are used to installing Arch and don't want to manually edit fstab. The same goes for arch-chroot(8) as an alternative to manual mounting & chrooting.

In progress

k3yw0ow wrote:

You may also want to add some additional sources, for example source packages and security updates

As I mentioned in your last thread security updates should not be considered optional. They are absolutely essential for users of the stable release.

Fixed

k3yw0ow wrote:

If you are dual booting with Windows, edit the third line of the /etc/adjtime file to UTC or LOCAL to determines whether the system will interpret the hardware clock as being set UTC format to respective local time.

Windows should *always* be set to UTC. There is no reason whatsoever to force Devuan to use localtime. See my ArchWiki link in your last thread for the Registry hack needed to correct Windows' time standard.

Fixed

k3yw0ow wrote:
  • If you're on UEFI/GPT:

 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

The --target option is irrelevant in Devuan because it supplies separate GRUB packages for UEFI & non-UEFI systems. The UEFI version of GRUB presumes that the EFI system partition is mounted under /boot/efi and the ID defaults to "Devuan" for SecureBoot to work.

And anyway it's better to use dpkg to set the bootloader options so that they are saved in the debconf database and re-applied after the bootloader package is updated.

So for non-UEFI systems use

apt install grub-pc
dpkg-reconfigure grub-pc

And for UEFI systems use

apt install grub-efi-amd64
dpkg-reconfigure grub-efi-amd64

There is also a grub-efi-ia32 package for machines with 32-bit UEFI firmware.

Fixed

k3yw0ow wrote:

If you are going to use a wireless network card, you will also need wpasupplicant:

 apt install wpasupplicant

iwd is better than wpasupplicant but it does need the init script supplied by the orphan-sysvinit-scripts package.

Fixed

k3yw0ow wrote:

Other useful groups are disk, games, input, lp, optical, rfkill and storage. The audio and video groups are useful to communicate to audio and video related hardware.

elogind should handle all permissions for access to input, audio and video hardware. Adding users to those groups should be considered a security risk and so is probably not advisable.

The disk group membership is root-equivalent, please do not recommend that.

The games group is for games to record high scores, users are not supposed to be added to that group at all.

Fixed

k3yw0ow wrote:

Configure sudo so that it grants users of the wheel group the ability to run commands as root

Devuan's sudo is already configured to grant access to users in the sudo group so why not just use that instead?

And finally can you please use code tags to display commands rather than italics? It would make the guide easier to follow. The board also offers list tags that you can use instead of copy & pasting bullet points manually.

Fixed

#9 Hardware & System Configuration » Sub-process /usr/bin/dpkg returned an error code (1) » 2022-03-04 14:57:48

k3yw0ow
Replies: 5

Hello everyone!

I'm tryin install Devuan via command-line - Devuan GNU+Linux Command-line Installation Guide (In progress). However, I encounter an error when installing certain packages inside the chroot, such an error appears for example:

 Errors were encountered while processing:
  orphan-sysvinit-scripts
 E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank you to whoever is willing helped me and a great job to the Devuan team.

#10 Documentation » Devuan GNU+Linux Command-line Installation Guide (In progress) » 2022-03-04 14:34:47

k3yw0ow
Replies: 12

Installation

Pre-installation

Live ISO download and storage media preparation

Go on Devuan GNU+Linux download page and download the stable minimal-live ISO file devuan_{codename}_{version}_{architecture}_minimal-live.iso.

If you're using a Linux machine, use the following technique to write the ISO on a storage media (CD/DVD or USB drive):

  • In CD or DVD:

 wodim dev=/dev/sr0 -eject devuan_{codename}_{version}_{architecture}_minimal-live.iso
  • In USB drive:

 dd if=devuan_{codename}_{version}_{architecture}_minimal-live.iso of=/dev/sdX bs=1M && sync

Booting into the live ISO

Remember to disable Secure Boot from the UEFI Settings to install and use the distro.

If you are unable to boot after disabling Secure Boot, make sure that your storage configuration is set to AHCI.

Login

On the live ISO you have two possibilities regarding login:

  • User devuan, password devuan (all important commands must be prefixed with sudo).

  • User root, password toor.

Set the console keyboard layout

The default console keymap is US. Available layouts can be listed with:

 ls -R /usr/share/keymaps/i386/

To modify the layout, append a corresponding file name to loadkeys, omitting path and file extension. For example, to set a German keyboard layout:

 loadkeys de-latin1

Console fonts are located in /usr/share/consolefonts/ and can likewise be set with setfont.

Connecting to the Internet

Configure your network interfaces with "setnet.sh":

 setnet.sh

Partition the disks

You need to figure out which disk you want to install Devuan. lsblk is a command that lists the available disks, and usually one invocation of it is enough to figure out which disk you have to work on.

Partition your storage devices with cfdisk (this guide will assume the disk is /dev/sdx), the partition numbers and order are at your discretion:

  • If you only need to modify the partition table of an existing disk (e.g. dual booting), the command to be issued is:

 cfdisk /dev/sdx
  • If, on the other hand, you need to reinitialize the disk in question (no partition table), the command to issue is:

 cfdisk -z /dev/sdx

The cfdisk partition manager will open. If you are creating the partition table now and are on UEFI or a Legacy BIOS that supports booting from GPT disks, choose gpt; otherwise choose msdos.

Create the following partitions:

  • If you are booting from a legacy BIOS and have chosen a GPT partition table, the first partition must be of type BIOS boot and of size 200 MB; In case you are booting from a legacy BIOS which only boots from MBR (msdos) partition tables, then there is no need to create this partition.

  • If you don't already have it, add the boot partition; it must be about 512 MB and preferably of EFI System type.

  • Add a partition for the root file system (and leave it flagged as Linux filesystem).

  • If you want, you can add a swap partition by creating it and flagging it as Linux swap.

  • In a GPT partition table, pre-flagging the boot partition as ESP even if you are on Legacy BIOS is useful to make a possible conversion from Legacy BIOS to UEFI easier.

Confirm the changes by issuing the Write command; confirm by typing yes and then quit the partition manager by issuing the command Quit.

For ease of reference:

 /dev/sdx
 - /dev/sdx1 -> EFI System
 - /dev/sdx2 -> Linux filesystem
 - /dev/sdx3 -> Linux swap -> Optional

Format the partitions

The boot partition will be /dev/sdx1 so do (only on EFI System):

 mkfs.fat -F 32 /dev/sdx1

The Linux root partition will be /dev/sdx2 so do:

 mkfs.ext4 -L ROOT /dev/sdx2

The swap partition will be on /dev/sdx3, so do (If created):

 mkswap -L SWAP /dev/sdx3

The -L switch assigns labels to the partitions, which helps referring to them later through /dev/disk/by-label without having to remember their numbers.

Mount the file systems

If you have created a swap partition, activate it with the command:

 swapon /dev/disk/by-label/SWAP

Mount the root filesystem on /mnt:

 mount /dev/disk/by-label/ROOT /mnt

Create the directory where you can mount the boot partition filesystem:

 mkdir -p /mnt/boot/efi

Mount the boot partition file system:

 mount /dev/disk/by-label/BOOT /mnt/boot/efi

Installation

Install a base system with debootstrap:

 debootstrap --arch=amd64 <codename> /mnt http://deb.devuan.org/merged

Note: Choose a codename available in /usr/share/debootstrap/scripts/.

Configure the system

Mount the pseudo-filesystems needed for a chroot:

 for i in proc sys dev{,/pts} ; do mount --bind /$i /mnt/$i ; done

Copy the DNS configuration into the new root so that we can download new packages inside the chroot:

 cp /etc/resolv.conf /mnt/etc/

Change root into the new system:

 chroot /mnt /bin/su -

Swap file creation (alternative)

As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether.

Use dd to create a swap file the size of your choosing. For example, creating a 4 GB swap file:

 dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress

Set the right permissions:

 chmod 600 /swapfile

After creating the correctly sized file, format it to swap:

 mkswap /swapfile

Activate the swap file:

 swapon /swapfile

Configure fstab

The fstab file can be automatically generated from currently mounted filesystems by printing the file /proc/self/mounts:

 grep '^/dev' /proc/self/mounts > /etc/fstab

Remove lines in /etc/fstab that refer to dev, proc, pts and sys.

Replace references to /dev/sdx with their respective UUID, which can be found by running blkid. Referring to filesystems by their UUID guarantees they will be found even if they are assigned a different name at a later time. In some situations, such as booting from USB, this is absolutely essential. In other situations, disks will always have the same name unless drives are physically added or removed. Therefore, this step may not be strictly necessary, but is almost always recommended.

The information from blkid results in the following /etc/fstab:

 # <device>                             <dir>       <type> <options>               <dump> <fsck>
 UUID=xxxx[...]                         /boot/efi   fat    defaults                0      2
 UUID=xxxx[...]                         /           ext4   defaults                0      1

Add an entry for the swap file (If you're set it):

 # <device>  <dir> <type> <options>                <dump> <fsck>
 /swapfile   none  swap   defaults                 0      0

Also add an entry to mount /tmp in RAM:

 # <device>  <dir> <type> <options>                <dump> <fsck>
 tmpfs       /tmp  tmpfs  defaults,nosuid,nodev    0      0

Editing the software repositories

The /etc/apt/sources.list is the main sources configuration file. If you need the contrib and non-free components, add contrib non-free after main. You may also want to add some additional sources, for example source packages and security updates (the latter only in stable releases):

 deb http://deb.devuan.org/merged <codename> main contrib non-free
 deb-src [url]http://deb.devuan.org/merged <codename> main contrib non-free

 deb [url]http://deb.devuan.org/merged <codename>-security main contrib non-free
 deb-src http://deb.devuan.org/merged <codename>-security main contrib non-free

 deb http://deb.devuan.org/merged <codename>-updates main contrib non-free
 deb-src http://deb.devuan.org/merged <codename>-updates main contrib non-free

Make sure to run apt update after you have made changes to the sources list.

Microcode package installation for AMD and Intel CPUs

To install the latest microcode package:

 apt install amd64-microcode        <-- AMD CPUs
 apt install intel-microcode        <-- Intel CPUs

The boot loader is responsible for loading the updated microcode.

Install the Linux Kernel

To install the latest Linux kernel, run this command:

 apt install linux-headers-amd64 linux-image-amd64

If your system needs firmware blobs that are not present in the Linux kernel (for example, to get network cards to work properly), you can install the firmware-linux package:

 apt install firmware-linux

Install a init system

Install the init system of your choice:

  • OpenRC:

 apt install elogind libpam-elogind openrc orphan-sysvinit-scripts
  • runit:

 apt install elogind libpam-elogind orphan-sysvinit-scripts runit runit-run
  • sysvinit:

 apt install libpam-elogind orphan-sysvinit-scripts sysvinit-core

Time zone

Install the time synchronization service and add it to the list of startup services:

 apt install chrony
  • OpenRC:

 rc-update add chronyd default
  • runit:

 ln -s /etc/service/chronyd /etc/runit/runsvdir/default
  • sysvinit:

 ?

Set the time zone:

 dpkg-reconfigure tzdata

Localization

To configure your locale settings to use a other language than English, install the locales support package and configure it:

 apt install locales
 dpkg-reconfigure locales

To configure your keyboard, install the console-setup support package and configure it:

 apt install console-setup
 dpkg-reconfigure keyboard-configuration 

If you have chosen OpenRC as your init system, edit the /etc/conf.d/keymaps file:

 keymap="en"         <-- Your keyboard layout
 windowkeys="YES"    <-- Type YES if you are using a common Windows keyboard

If, on the other hand, you have chosen runit as your init system, add permanently the console font and keymap preferences in /etc/vconsole.conf:

 FONT=lat1-16
 FONT_MAP=8859-1_to_uni
 KEYMAP=de-latin1

Choose a hostname for your machine

Edit /etc/hostname:

 myhostname

Edit /etc/hosts:

 127.0.0.1     localhost
 ::1           localhost
 127.0.1.1     myhostname

If you have chosen OpenRC as your init system, edit /etc/conf.d/hostname:

 # Set to the hostname of this machine
 hostname="myhostname"

Boot loader configuration

Install the packages needed to install and configure GRUB:

 apt install grub-pc            <-- If you're using BIOS
 apt install grub-efi-amd64     <-- If you're using UEFI
 apt install ntfs-3g os-prober  <-- If you're dual booting

Install GRUB:

  • If you're on BIOS:

 dpkg-reconfigure grub-pc
  • If you're on UEFI:

 dpkg-reconfigure grub-efi-amd64

If you are dualbooting with Windows or any other operating system, you have to make sure GRUB will call os-prober; to do so, uncomment this line on the configuration file at /etc/default/grub:

 GRUB_DISABLE_OS_PROBER=false

Generate the GRUB configuration file:

 update-grub

Install a network manager

Install a DHCP client together with NetworkManager and add it to the list of startup services:

 apt install dhcpcd5 network-manager
  • OpenRC:

 rc-update add NetworkManager default
  • runit:

 ln -s /etc/service/NetworkManager /etc/runit/runsvdir/default
  • sysvinit:

 ?

Installing a system logger

Install syslog-ng and add it to the list of startup services:

 apt install syslog-ng
  • OpenRC:

 rc-update add syslog-ng default
  • runit:

 ln -s /etc/service/syslog-ng /etc/runit/runsvdir/default
  • sysvinit:

 ?

User configuration

Change the root password:

 passwd

After that, create a user that you will use for your normal operations:

 adduser username

Set a password for this new user:

 passwd username

Exiting the chroot

You can exit the chroot simply by exiting the interactive shell, like so:

 exit

Unmounting the partitions

You can unmount all the partitions you previously mounted by using umount -R /mnt.

Reboot

Issue the reboot command.

Remember to remove the installation medium.

#11 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-25 00:51:43

Head_on_a_Stick wrote:
k3yw0ow wrote:

Mount the file systems

Create the directory where you can mount the home partition filesystem:

mkdir /mnt/home

Mount the home partition file system:

mount /dev/disk/by-label/HOME /mnt/home

Mount the root filesystem on /mnt:

mount /dev/disk/by-label/ROOT /mnt

You have that backwards. If you create /mnt/home/ before mounting the root partition then the root partition will cover it up when it is mounted:

# mkdir /mnt/home
# mount -o subvol=HOME /dev/nvme0n1p2 /mnt/home/
# mount -o subvol=ROOT /dev/nvme0n1p2 /mnt
# ls /mnt
# umount /mnt
# ls /mnt     
home
#

The process should be

# mount /dev/disk/by-label/ROOT /mnt
# mkdir /mnt/home
# mount /dev/disk/by-label/HOME /mnt/home
k3yw0ow wrote:

Mount the pseudo-filesystems needed for a chroot:

mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
mount --rbind /dev/pts /mnt/dev/pts && mount --make-rslave /mnt/dev/pts
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys

Copy the DNS configuration into the new root so that we can download new packages inside the chroot:

cp /etc/resolv.conf /mnt/etc/

Change root into the new system:

chroot /mnt /bin/bash

Those steps can be replaced with two commands:

# apt install arch-install-scripts
# arch-chroot /mnt
k3yw0ow wrote:

Configure fstab

Simpler method (run before entering the chroot):

# genfstab -U /mnt > /mnt/etc/fstab

The genfstab command is also supplied by the arch-install-scripts package.

k3yw0ow wrote:

You may also want to add some additional sources, for example source packages and security updates

The security repositories are absolutely essential, omitting them is a very bad idea. The source repositories are entirely optional and are only needed for patching packages.

k3yw0ow wrote:

Install the Intel Microcode

There is also an amd-microcode package, which should be considered essential for AMD systems (just as the Intel version is).

k3yw0ow wrote:

To install the latest Linux kernel, run this command:

apt install linux-headers-amd64 linux-image-amd64

The headers are only needed for building kernel modules such as the proprietary NVIDIA drivers.

For such cases it is best to use

# apt install module-assistant
# m-a prepare

^ That will install the headers and any other packages needed to build the modules.

k3yw0ow wrote:

After that, create a user that you will use for your normal operations:

useradd -m username

It's probably best to use the provided Debian abstraction instead:

# adduser

Note that your guide only covers non-UEFI systems, which aren't very common these days.

The guide has been updated. I decided to do an installation without the arch-install-scripts package.

#12 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-23 15:51:58

Hello, I'm here again!

I finished writing an installation guide for my system, the contents of other distro's guides are merged but the result was as expected. If there are any mistakes that I can fix, please let me know.

Here is:

Installation

Pre-installation

Live ISO download and storage media preparation

Go on the Devuan GNU+Linux download page and download the stable minimal-live ISO file devuan_{codename}_{version}_{architecture}_minimal-live.iso.

This guide recommends you the use of balenaEtcher or Rufus to write the ISO on a storage media (CD/DVD/USB).

Booting into the live ISO

Remember to disable Secure Boot from the UEFI Settings to install and use the distro.

If you are unable to boot after disabling Secure Boot, make sure that your storage configuration is set to AHCI.

Login

On the live ISO you have two possibilities regarding login:

● User devuan, password devuan (all important commands must be prefixed with sudo).
● User root, password toor.

Set the console keyboard layout

The default console keymap is US. Available layouts can be listed with:

ls -R /usr/share/keymaps/i386/

To modify the layout, append a corresponding file name to loadkeys, omitting path and file extension. For example, to set a German keyboard layout:

loadkeys de-latin1

Console fonts are located in /usr/share/consolefonts/ and can likewise be set with setfont.

Connecting to the Internet

Configure your network interfaces with "setnet.sh":

setnet.sh

Partition the disks

You need to figure out which disk you want to install Devuan. lsblk is a command that lists the available disks, and usually one invocation of it is enough to figure out which disk you have to work on.

Partition your storage devices with cfdisk (this guide will assume the disk is /dev/sda), the partition numbers and order are at your discretion:

● If you only need to modify the partition table of an existing disk (e.g. dual booting), the command to be issued is:

cfdisk /dev/sda

● If, on the other hand, you need to reinitialize the disk in question (no partition table), the command to issue is:

cfdisk -z /dev/sda

The cfdisk partition manager will open. If you are creating the partition table now and are on UEFI or a Legacy BIOS that supports booting from GPT disks, choose gpt; otherwise choose msdos.

Create the following partitions:

● If you are booting from a legacy BIOS and have chosen a GPT partition table, the first partition must be of type BIOS boot and of size 1 MB; In case you are booting from a legacy BIOS which only boots from MBR (msdos) partition tables, then there is no need to create this partition.

● If you don't already have it, add the boot partition; it must be about 500 MB and preferably of EFI System type.

● Add a partition for the root file system (and leave it flagged as Linux filesystem).

● If you want, you can add a swap partition by creating it and flagging it as Linux swap.

● In a GPT partition table, pre-flagging the boot partition as ESP even if you are on Legacy BIOS is useful to make a possible conversion from Legacy BIOS to UEFI easier.

Confirm the changes by issuing the Write command; confirm by typing yes and then quit the partition manager by issuing the command Quit.

For ease of reference, the disk used in this guide will be /dev/sda and it will be partitioned as follows:

● BIOS/MBR

/dev/sda
- /dev/sda1 ->  Linux filesystem (root) -> Remainder of the device
- /dev/sda2 -> Linux swap (optional)
-> 2GB±

● BIOS/GPT

/dev/sda
- /dev/sda1 -> BIOS boot partition -> 256 MB
- /dev/sda2 -> Linux filesystem (root) -> Remainder of the device
- /dev/sda2 -> Linux swap (optional)
-> 2GB±

● UEFI/GPT

/dev/sda
- /dev/sda1 -> EFI System -> 512 MB
- /dev/sda2 -> Linux filesystem (root) -> Remainder of the device
- /dev/sda3 -> Linux swap (optional)
-> 2GB±

Format the partitions

The boot partition will be /dev/sda1 so do (only on legacy BIOS):

mkfs.ext4 -L BOOT /dev/sda1

The boot partition will be /dev/sda1 so do (only on EFI System):

mkfs.fat -F 32 /dev/sda1

The Linux root partition will be /dev/sda2 so do:

mkfs.ext4 -L ROOT /dev/sda2

The swap partition will be on /dev/sda3, so do:

mkswap -L SWAP /dev/sda3

The -L switch assigns labels to the partitions, which helps referring to them later through /dev/disk/by-label without having to remember their numbers.

Mount the file systems

If you have created a swap partition, activate it with the command:

swapon /dev/disk/by-label/SWAP

Mount the root filesystem on /mnt:

mount /dev/disk/by-label/ROOT /mnt

If you're using legacy BIOS, create the directory where you can mount the boot partition filesystem:

mkdir -p /mnt/boot

Mount the boot partition file system (legacy BIOS):

mount /dev/disk/by-label/BOOT /mnt/boot

If you're using UEFI, create the directory where you can mount the boot partition filesystem:

mkdir -p /mnt/boot/efi

Mount the boot partition file system (UEFI):

mount /dev/disk/by-label/BOOT /mnt/boot/efi

Installation

Install a base system with debootstrap:

debootstrap --arch=amd64 <codename> /mnt http://deb.devuan.org/merged

Note: Choose a codename available in /usr/share/debootstrap/scripts/.

Configure the system

Mount the pseudo-filesystems needed for a chroot:

mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
mount --rbind /dev/pts /mnt/dev/pts && mount --make-rslave /mnt/dev/pts
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys

Copy the DNS configuration into the new root so that we can download new packages inside the chroot:

cp /etc/resolv.conf /mnt/etc/

Change root into the new system:

chroot /mnt /bin/bash

Configure fstab

The fstab file can be automatically generated from currently mounted filesystems by copying the file /proc/mounts:

cp /proc/mounts /etc/fstab

Remove lines in /etc/fstab that refer to dev, proc, pts and sys.

Replace references to /dev/sda with their respective UUID, which can be found by running blkid. Referring to filesystems by their UUID guarantees they will be found even if they are assigned a different name at a later time. In some situations, such as booting from USB, this is absolutely essential. In other situations, disks will always have the same name unless drives are physically added or removed. Therefore, this step may not be strictly necessary, but is almost always recommended.

Change the last zero of every other line to 2 and the last zero of the entry for / to 1. These values configure the behaviour of fsck. For example, the partition scheme used throughout previous examples yields the following fstab:

# <device>      <dir>        <type>        <options>        <dump> <fsck>
/dev/sdax        /boot/efi      fat            defaults           0          0
/dev/sdax        /             ext4            defaults           0          0

The information from blkid results in the following /etc/fstab:

# <device>                             <dir>   <type> <options>               <dump> <fsck>
UUID=xxxx[...]                         /boot/efi fat     defaults                  0          2
UUID=xxxx[...]                         /        ext4     defaults                  0          1
UUID=xxxx[...]                        none   swap    sw                         0          0

Also add an entry to mount /tmp in RAM:

# <device>  <dir> <type> <options>                <dump> <fsck>
tmpfs         /tmp tmpfs  defaults,nosuid,nodev 0          0

Note: The output of /proc/mounts will have a single space between each field. The columns are aligned here for readability.

Editing the software repositories

The /etc/apt/sources.list is the main sources configuration file. If you need the contrib and non-free components, add contrib non-free after main. You may also want to add some additional sources, for example source packages and security updates:

deb http://deb.devuan.org/merged <codename> main contrib non-free
deb-src http://deb.devuan.org/merged <codename> main contrib non-free

deb http://deb.devuan.org/merged <codename>-security main contrib non-free
deb-src http://deb.devuan.org/merged <codename>-security main contrib non-free

deb http://deb.devuan.org/merged <codename>-updates main contrib non-free
deb-src http://deb.devuan.org/merged <codename>-updates main contrib non-free

Make sure to run apt update after you have made changes to the sources list.

Microcode package installation for AMD and Intel CPUs

To install the latest microcode package:

apt install amd64-microcode        <-- AMD CPUs
apt install intel-microcode            <-- Intel CPUs

The boot loader is responsible for loading the updated microcode.

Install the Linux Kernel

To install the latest Linux kernel, run this command:

apt install linux-headers-amd64 linux-image-amd64

If your system needs firmware blobs that are not present in the Linux kernel (for example, to get network cards to work properly), you can install the firmware-linux package:

apt install firmware-linux

Install a init system

Install the init system of your choice:

● OpenRC:

apt install elogind libpam-elogind openrc orphan-sysvinit-scripts

● runit:

apt install elogind libpam-elogind orphan-sysvinit-scripts runit runit-run

● sysvinit:

apt install libpam-elogind orphan-sysvinit-scripts sysvinit-core

Time zone

Install the time synchronization service and add it to the list of startup services:

apt install chrony

● OpenRC:

rc-update add chronyd default

● runit:

ln -s /etc/service/chronyd /etc/runit/runsvdir/default

● sysvinit:

?

Set the time zone:

dpkg-reconfigure tzdata

If you are dual booting with Windows, edit the third line of the /etc/adjtime file to UTC or LOCAL to determines whether the system will interpret the hardware clock as being set UTC format to respective local time.

Localization

To configure your locale settings to use a other language than English, install the locales support package and configure it:

apt install locales
dpkg-reconfigure locales

To configure your keyboard, install the console-setup support package and configure it:

apt install console-setup
dpkg-reconfigure keyboard-configuration

If you have chosen OpenRC as your init system, edit the /etc/conf.d/keymaps file:

keymap="en"         <-- your keyboard layout
windowkeys="YES"  <-- type YES if you are using a common Windows keyboard

If, on the other hand, you have chosen runit as your init system, add permanently the console font and keymap preferences in /etc/vconsole.conf:

FONT=lat1-16
FONT_MAP=8859-1_to_uni
KEYMAP=de-latin1

Choose a hostname for your machine

Edit /etc/hostname:

myhostname

Edit /etc/hosts:

127.0.0.1     localhost
::1             localhost
127.0.1.1    myhostname

If you have chosen OpenRC as your init system, edit /etc/conf.d/hostname:

# Set to the hostname of this machine
hostname="myhostname"

Boot loader configuration

Install the packages needed to install and configure GRUB:

apt install grub2 ntfs-3g os-prober  <-- If you're dual booting

Install GRUB:

● If you're on BIOS/GPT or BIOS/MBR:

grub-install /dev/sda

● If you're on UEFI/GPT:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

If you are dualbooting with Windows or any other operating system, you have to make sure GRUB will call os-prober; to do so, uncomment this line on the configuration file at /etc/default/grub:

GRUB_DISABLE_OS_PROBER=false

Generate the GRUB configuration file:

update-grub

Install a network manager

Install a DHCP client together with NetworkManager and add it to the list of startup services:

apt install dhcpcd5 network-manager

● OpenRC:

rc-update add NetworkManager default

● runit:

ln -s /etc/service/NetworkManager /etc/runit/runsvdir/default

● sysvinit:

?

If you are going to use a wireless network card, you will also need wpasupplicant:

apt install wpasupplicant

Installing a system logger

Install syslog-ng and add it to the list of startup services:

apt install syslog-ng

● OpenRC:

rc-update add syslog-ng default

● runit:

ln -s /etc/service/syslog-ng /etc/runit/runsvdir/default

● sysvinit:

?

User configuration

Change the root password:

passwd

After that, create a user that you will use for your normal operations:

adduser username

Set a password for this new user:

passwd username

Add this user to the wheel group (so it can operate as an administrator):

adduser username wheel

Other useful groups are disk, games, input, lp, optical, rfkill and storage. The audio and video groups are useful to communicate to audio and video related hardware.

Sudo

Configure sudo so that it grants users of the wheel group the ability to run commands as root:

EDITOR=nano visudo

At around three quarters of the file, you will find this line; uncomment it:

%wheel ALL=(ALL) ALL <-- uncomment this line

Exiting the chroot

You can exit the chroot simply by exiting the interactive shell, like so:

exit

Unmounting the partitions

You can unmount all the partitions you previously mounted by using umount and the -R (recursive) option:

umount -R /mnt

Reboot

Issue the reboot command.

Remember to remove the installation medium.

#13 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-22 21:32:18

Head_on_a_Stick wrote:

Follow the linked guide.

I did a brief test yesterday from my Arch box using debootstrap and I was able to install grub-pc with no problems.

If you do encounter any issues be sure to post the complete list of commands that were used along with the full error message(s).

Hello again!

I followed step-by-step the Arch, Debian and Void Linux guides, however I still have problems when installing certain packages, the grub-pc package installing error was just one among several others.
Soon, I will send a guide that I am developing so that we can analyze my mistakes.

https://www.debian.org/releases/stable/ … 03.en.html

https://docs.voidlinux.org/installation … hroot.html

https://wiki.archlinux.org/title/Chroot

#14 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-20 13:18:13

Head_on_a_Stick wrote:

^ /dev/pts will have been mounted under /dev/ by the --rbind option.

k3yw0ow wrote:

Yes, I copied the static information about the file systems to the new system:

cp /etc/mtab /mnt/etc/mtab

/etc/mtab should be a symlink to /proc/self/mounts in the running system. It is not necessary to populate it while installing but you can create the symlink once the system is independently booted. Just creating /etc/mtab will not cause the listed partitions to be mounted.

If you have /var/ on a separate partition it needs to be explicitly mounted before using chroot.

So if the root filesystem is on /dev/sdX1 with /var/ on /dev/sdX2 you should use

# mount /dev/sdX1 /mnt
# mkdir -p /mnt/var
# mount /dev/sdX2 /mnt/var

Also mount any other required partitions using the same method.

If you're doing this from a Devuan or Debian live system you can use the Arch Way to proceed:

# apt install arch-install-scripts
# genfstab -U /mnt > /mnt/etc/fstab
# arch-chroot /mnt

The arch-chroot command mounts the API filesystems and copies over /etc/resolv.conf automagically. But you probably alread know that :-)

You can also use the Arch Way to generate /etc/adjtime instead of creating it manually as the Debian guide suggests:

# hwclock --systohc

^ That presumes the hardware clock is using UTC, which it should be even if you're multi-booting with Windows[0]. Make sure the system clock is correct before running that.

[0] https://wiki.archlinux.org/title/System … ft_Windows

Ok, I reworked my steps adding these last two lines after the debootstrap command:

 genfstab -U /mnt >> /mnt/etc/fstab
 arch-chroot /mnt

What should I do next?

#15 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-19 00:51:36

Head_on_a_Stick wrote:

What was the exact command you ran to produce that error message?

k3yw0ow wrote:

I go into chroot

How did you do that, exactly? Is /var/ on a separate partition and was that partition mounted correctly under the root partition before you chrooted in?

I typed:

 apt install grub-pc

Yes, I copied the static information about the file systems to the new system:

 cp /etc/mtab /mnt/etc/mtab

And I mounted the filesystems on the mount points:

 mount --make-rslave --rbind /dev /mnt/dev
 mount --make-rslave --rbind /proc /mnt/proc
 mount --make-rslave --rbind /run /mnt/run
 mount --make-rslave --rbind /sys /mnt/sys

#16 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-18 20:28:21

Head_on_a_Stick wrote:

Use the --exclude= option for debootstrap(8).

Forgive me for delay.

I have already installed the base system, however when I go into chroot and try to install GRUB it gives an error.

Here is the problem:

dpkg (subprocess): unable to execute installed grub-pc package post-installation script (/var/lib/dpkg/info/grub-pc.postinst): No such file or directory
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 2
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-11-amd64
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)

#17 Installation » The best init system » 2022-02-11 16:26:15

k3yw0ow
Replies: 18

Hi, everyone!

I am in doubt to choose which init is best for my system, recently I have abandoned systemd and am quite layman about alternative inits.

I saw that according to https://www.devuan.org/os/init-freedom there are eight inits available in Devuan, however, in your Gitea repository Epoch additional packages are shown.

Which system init is the best choice?

Thanks.

#18 Re: Installation » [SOLVED] Installing Devuan via command line » 2022-02-09 01:16:49

Head_on_a_Stick wrote:

See https://www.debian.org/releases/stable/ … 03.en.html but note that the linked Debian debootstrap packages only support ASCII & beowulf so use https://pkgmaster.devuan.org/devuan/poo … bootstrap/ if you need chimaera or later.

Ok, now I see that using debootstrap also installs several useless programs. How can I delete these programs? Editing the debootstrap files or similar like this https://github.com/archlinux/svntogit-p … k/PKGBUILD, or do I use the --exclude command (I think adding the uselessness to this last utility takes longer)?

#19 Installation » [SOLVED] Installing Devuan via command line » 2022-02-08 00:47:36

k3yw0ow
Replies: 16

Hi, everyone!

I have finished installing a Devuan minimal-live ISO and I want to do an installation, however, guides for this type of installation for Devuan are very scarce. Can anyone help me with a console installation guide specifically for Devuan?

Thanks.

Board footer

Forum Software