:: [DNG] Quick start guide to uprading…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: dev1fanboy
Fecha:  
A: dng
Asunto: [DNG] Quick start guide to uprading to Devuan and configuring minimalism
Quick start guide to uprading to Devuan and configuring minimalism.

There are a lot of people talking about minimalism in Devuan and some
may be wondering if they can upgrade to Devuan. The answer is yes, you
can upgrade to Devuan right now and expect it to work with few if any
problems in the stable branch - which is not yet announced stable but
is clearly a lot better than alpha quality as you might have heard
mentioned on devuan.org. I am currently putting in a little research
before writing a more full guide to upgrading, installing and getting
more minimalism out of Devuan. Hopefully I will be starting a wiki for
all this info and more to go into in the near future, but for now I
want to just put it out there for people trying to upgrade their
current system or get more minimalism in their system. 

Let's get started.


1) Upgrading Debian to Devuan Stable (aka Jessie 1.0)

You can upgrade to Devuan Jessie 1.0 from either Debian Wheezy or from
Debian Jessie. For other branches you are on your own for now, and I
suggest avoiding upgrades to Devuan testing (ascii) for now until after
the official stable release.

First simply open a terminal and type:

user@debian:~$ sudo -s

Enter your user password.

Or if sudo is not available:

user@debian:~$ su

Enter your root password.

Now we can continue with the upgrade. You need to edit the sources.list
configuration file so that apt will be getting packages only from the
devuan mirror (there is just one for now):

root@debian:~# nano /etc/apt/sources.list

Comment out ALL current lines in your sources.list and add the Devuan
mirror with the Jessie (stable) branch. This is roughly how it should
look:

#deb http://ftp.us.debian.org/debian wheezy main
deb http://packages.devuan.org/merged jessie main

Now we need to get the devuan keyring from the repoistory so we can
authenticate packages:

root@debian:~# apt-get update
root@debian:~# apt-get install devuan-keyring

Many people coming over to Devuan will be hoping to escape the web of
systemd in the process - if this is your choice you need to specify
your init system now before you proceed. I will be using sysvinit in
this example as it is what I have tested - systemd init will be removed
if present:

root@debian:~# apt-get install sysvinit-core 

The base-files package will be installed automatically in the case of
an upgrade from Debian Wheezy, but it has been reported that this
package will need to be selected manually when upgrading from Jessie.
Either way we can do this now:

root@debian:~# apt-get install base-files

Start the system upgrade with:

root@debian:~# apt-get dist-upgrade

Depending on your connection speed it could take a while, grab yourself
a drink.

Once finished you will be using Devuan GNU/Linux 1.

Do some optional cleaning up:

root@devuan:~# apt-get autoremove --purge
root@devuan:~# apt-get autoclean

The first command will remove any 'orphaned' dependencies from your
previous install including unwanted configurations for those packages.
I highly recommend this because it's good security practice. The second
command clears up all cached packages except for those that are
installed on the running system, reclaiming a little disk space.

Now you should simply reboot so that you are using the kernel shipped
with Devuan:

root@devuan:~# reboot

If in the upgrade process gnome was removed do not panic, the reason
for this is it depends on systemd and you have opted for sysvinit. The
default desktop environment in Devuan is XFCE:

root@devuan:~# apt-get install xfce4

Check that you can start your desktop environment:

root@devuan:~# su - username
user@devuan:~$ startxfce4

If it all works you can add a display manager safely for when you next
reboot:

root@devuan:~# apt-get install slim


2) Configure minimalism in the system

Thanks to a tip given to me by a fellow minimalist from #debianfork
(unnamed for now until I talk to them) you will be able to debloat your
system in a very neat way. This is completely optional and may be done
either before or after the upgrade. We are going to configure apt to
ignore all 'recommended' packages in Debian/Devuan as the majority of
these often will not make sense to be there. There are some exceptions
where recommends should definitely be installed and we will take care
of this as well. 

First use an editor to make the necessary changes:

root@devuan:~# nano /etc/apt.conf.d/01lean

Add the following lines:

APT::Install-Suggests "0";
APT::Install-Recommends "0";
APT::AutoRemove::SuggestsImportant "false";
APT::AutoRemove::RecommendsImportant "false";

Press the Ctrl and X keys together to save and quit.

Now we are going to retroactively remove all recommended packages,
along with any suggests you may have pulled in. Adjust the above
accordingly to your needs if you still want either suggests or
recommends. Before proceeding we will protect the ca-certificates
package from getting removed along with isc-dhcp-common if it is
installed. The ca-certificates package contains ssl certificates from
certificate authorities and naturally you will want this for any system
where you will be using a browser (if you don't know then you need it).
The isc-dhcp-common package takes care of automatic network
configuration via dhcp on boot (see man 5 interfaces), if you don't
know what this means then you need this package too. 

root@devuan:~# apt-get install ca-certificates isc-dhcp-common

This will manually select these packages and they will now not be
removed. If you are asked to configure the ca-certificates package by a
dialog screen you should answer to always trust new certificates
authorities to avoid having to manually select them.

Now all that needs to be done is remove the packages we have opted out
of:

root@devuan:~# apt-get autoremove --purge

The now 'orphaned' recommends and suggests will be retroactively
removed, cutting away some fat. Unused configuration files for those
packages will also be removed. Check the list of packages to be removed
before proceeding and make notes of packages you are sure you want to
keep so you can install them later (man apt-get for details). 

Some optional cleaning up:

root@devuan:~# apt-get autoclean

Unwanted archives will be removed from the package cache, if any.


3)​ What about removing dbus?

Sadly XFCE depends on dbus and so do many other packages, there will be
several solutions to removing dbus but you may have to compromise a
bit. 

A quick list of window managers that do not depend on dbus with
suggestions from a couple of #debianfork regs:

fluxbox
blackbox
openbox
fvwm
fvwm-crystal
icewm

For a graphical browser I suggest iceweasel, you might also like:

epiphany
links2
dillo

For example:

root@devuan:~# apt-get install fluxbox bbkeys menu iceweasel
root@devuan:~# apt-get purge dbus

Check the list of packages to be purged carefully before proceeding to
ensure you really want to do this. 

Login to your user account, set your WM in the xinit file and start the
X server:

root@devuan:~# su - user
user@devuan:~$ echo "exec fluxbox" > .xinitrc
user@devuan:~$ startx

You can now login by the console each time at boot and type startx.
Information on display managers will come later, for now you should do
some research if you need this.

In the process of removing dbus you might have noticed the gvfs package
being removed which is used for USB automounting, this is expected as
it depends on dbus. A simple alternative to USB auto-mounting is to put
your user in the disk group and set the possible mount points in fstab.
You will then be able to mount your USB disks with ease. Further
information may appear here after a little research on the topic of
auto-mounting and graphical file managers.

root@devuan:~# adduser yourusername disk
root@devuan:~# cp /etc/fstab /etc/fstab.backup
root@devuan:~# nano /etc/fstab

At the bottom of the fstab simply add the following:

/dev/sdb1        /media/usb0    auto    user,noauto    0 0
/dev/sdc1        /media/usb1    auto    user,noauto    0 0

An important thing here is that 'user' mode is set as it allows your
user to mount the disk where usually only root can do that. The
'noauto' option specifies the filesystem will not be mounted at boot.
See man 5 fstab and man mount for more details.

This is based on a single hard disk system. Your mount points may be
different, if so you will need to adapt this if /dev/sdb1 or /dev/sdc1
are already in use in the fstab. If everything is correct hit Ctrl and
X together to save and exit.

Now create the mountpoints:

root@devuan:~# mkdir /media/usb0
root@devuan:~# mkdir /media/usb1

You should now plug in your usb drive(s) and test that it works:

user@devuan:~$ mount /media/usb0
user@devuan:~$ mount /media/usb1

When done unmount:

user@devuan:~$ umount /media/usb0
user@devuan:~$ umount /media/usb1


--


There you have it, a retro style Devuan install that wouldn't be out of
place before systemd, dbus and other madness became the trend for
GNU/Linux. 

As you might have noticed It's a very smooth upgrade to Devuan in the
here and now, not much different if you simply upgraded your Debian
system. With a little more work you can get a reasonably minimal system
as well and remove dbus if you want to. 


Enjoy Devuan!

~~

dev1fanboy