The officially official Devuan Forum!

You are not logged in.

#1 2022-02-08 00:47:36

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

[SOLVED] Installing Devuan via command line

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.

Last edited by k3yw0ow (2022-02-25 00:16:09)

Offline

#2 2022-02-08 05:53:24

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

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.


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#3 2022-02-09 01:16:49

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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)?

Last edited by k3yw0ow (2022-02-09 01:20:24)

Offline

#4 2022-02-09 06:30:57

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

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


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#5 2022-02-18 20:28:21

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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)

Offline

#6 2022-02-18 21:56:28

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

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?


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#7 2022-02-18 23:12:11

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 695  

Re: [SOLVED] Installing Devuan via command line

It's not unusal to get all sort of such problem if you happen to omit or forget to set up the virtual filesystems (esp. proc, sysfs and devpts) and device nodes in the chroot.

grub, for instance, will want to access both the disk device as a whole as well as the boot partition on that device, and it also wants that boot directory to be present on that disk device.

But you probably don't want that installation to mess with your "outside" boot so you should refrain from bind-mounting /dev. Rather you set up the appropriate device node for the target disk image under an alias name within the chroot; i.e., for example, use mknod naming it "sda" but with major/minor identifying the actual device (perhaps "sdf" for a removable, or "loop0" for a  duly set up disk image file).

Offline

#8 2022-02-19 00:51:36

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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

Last edited by k3yw0ow (2022-02-19 00:52:46)

Offline

#9 2022-02-19 03:11:59

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 695  

Re: [SOLVED] Installing Devuan via command line

devpts ?

Offline

#10 2022-02-19 08:29:54

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

^ /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 already 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

Last edited by Head_on_a_Stick (2022-02-19 08:33:12)


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#11 2022-02-20 13:18:13

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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?

Offline

#12 2022-02-20 15:28:12

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

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).


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#13 2022-02-22 21:32:18

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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

Offline

#14 2022-02-23 15:51:58

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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.

Last edited by k3yw0ow (2022-03-04 14:23:13)

Offline

#15 2022-02-23 17:36:01

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,386  

Re: [SOLVED] Installing Devuan via command line

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.

Last edited by Head_on_a_Stick (2022-02-23 21:23:37)


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#16 2022-02-25 00:51:43

k3yw0ow
Member
Registered: 2022-02-08
Posts: 21  

Re: [SOLVED] Installing Devuan via command line

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.

Offline

#17 2022-06-06 15:25:25

Ogis1975
Member
Registered: 2017-04-21
Posts: 259  
Website

Re: [SOLVED] Installing Devuan via command line

k3yw0ow wrote:

Hello, I'm here again!

other useful groups are disk

This is raw access to disks. Mostly equivalent to root access. The group

disk

can be very dangerous, since hard drives in /dev/sd* and /dev/hd* can be read and written bypassing any file system and any partition, allowing a normal user to disclose, alter and destroy both the partitions and the data of such drives without root privileges. Users should never belong to this group.

storage

The group plugdev may be more practical.

Last edited by Ogis1975 (2022-06-06 15:29:58)


What economists call over-production is but a production that is above the purchasing power of the worker, who is reduced to poverty by capital and state.
            ----+- Peter Kropotkin -+----

Offline

Board footer