Downgrade Debian from 8 to 7 (Jessie to Wheezy)

27 Фев

Fresh and worked instruction

if you want to downgrade from Debian 8 to 7
run

apt-get install sysvinit sysvinit-core sysvinit-utils
cp /usr/share/sysvinit/inittab /etc/inittab

if you want to downgrade from Debian 9 (10) to 7
run

apt-get install initscripts sysv-rc sysvinit-core sysvinit-utils
cp /usr/share/sysvinit/inittab /etc/inittab

Then reboot your server and remove all the systemd stuff!

reboot

Then run

apt-get remove --purge --auto-remove systemd

Set Apt-Pinning to prevent systemd upgrade mechanism:

echo -e 'Package: systemdnPin: release o=DebiannPin: release *nPin-Priority: -1' > /etc/apt/preferences.d/no-systemd

And continue with the previous downgrade tutorial steps:
First of all you have to remove or replace all Debian tags from your /etc/apt/sources.list to your preffered target release

Mine sources.list file looks like this after changes have made:

deb http://archive.debian.org/debian/ wheezy main contrib non-free
deb-src http://archive.debian.org/debian/ wheezy main main contrib non-free
 
deb http://archive.debian.org/debian-security/ wheezy/updates main
deb-src http://archive.debian.org/debian-security/ wheezy/updates main

Now we have to use the Apt-Pinning feature to get the correct default release tag for our apt downgrade

Modify or create the file /etc/apt/preferences and put following text in it:

Package: *
Pin: release a=stable
Pin-Priority: 1001

Important Update note: Replace a=stable with n=wheezy if you are running not the Debian but Jessie final release!

Now for successfully sowngrade we strongly need to create the next file:
/etc/apt/apt.conf.d/90no-check-valid-until
with next text:

Acquire::Check-Valid-Until "0";

or run next command:

echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until

At the next step we have to run the apt update and upgrade process for downgrading all packages

So you will need to enter these two commands to finish the downgrade process:

apt-get update
apt-get upgrade
apt-get dist-upgrade

Apt will ask you for downgrading all packages now.
Just say yes (Y), let it go and pray that all packages getting installed and downgraded properly!

If some packages failing on downgrade you have to purge them by doing:

apt-get purge your_failing_package
Rating of article:
[Total: 0 Average: 0]

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.