But no problem, downgrading is easy in apt.
Just put:
Package: *in /etc/apt/preferences and do again
Pin: release a=oldstable
Pin-Priority: 1001
apt-get update && apt-get upgradeI was so lucky to have to force jsut one package
dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit_2.86.ds1-61_i386.debAnd reinstall one of them because apticron was failing the downgrade
apt-get install mktemp --reinstall && apt-get install apticronCheers
thanks, man, saved my ass today!!!
ReplyDeleteONE thing: I already had a new libc on the system - tis breaks the downgrade! What helped was to manually download from package repo and then force install:
wget http://ftp.de.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_i386.deb
dpkg -i --force-all libc6_2.7-18lenny7_i386.deb
Also another package had to be forced:
dpkg -i --force-all /var/cache/apt/archives/sysvinit_2.86.ds1-61_i386.deb
Then go into /etc/apt/sources.list and start using the appropriate code name (lenny) so that this does not happen in future. Change the code name to the new stable release when you are prepared and ready to dist-upgrade.
ReplyDeleteThis was really useful.
ReplyDeleteI accidentally upgraded our VPS to Squeeze, half-way anyhow.. Since it uses Paralells Virtuozzo solution.
Anyways, seems like its going fine now.. I'm downgrading some packages, gets some errors, downgrade more.. etc.
Might just start to work again! Thanks!
I'm leaning before you in a dust my master :)
ReplyDeleteI cannot confirm that my progress was as painless as yours (XEN domU, lots of blocked packages and not working pyGRUB), but you gave me the initial hint. Thank you.
Thanks man! I got the same problem two years after, from wheezy to squeeze, and it still works! Just create a file in /etc/apt/preference.d/ with the content you gave, and follow the procedure.
ReplyDeleteRan into a problem where /bin/sh was missing causing an error
ReplyDeleteSub-process /usr/sbin/dpkg-preconfigure --apt || true returned an error code (100)
A simple "ln -s /bin/bash /bin/sh" fixed it
...
Ran into an issue with ldconfig missing (after libc-bin was removed) to fix it
mkdir ~/libc6
dpkg -x /var/cache/apt/archives/libc6_2.7-18lenny7_amd64.deb ~/libc6/
cp ~/libc6/sbin/ldconfg /sbin/
Then mktemp went missing and was giving errors so
mkdir ~/mktemp
dpkg -x /var/cache/apt/archives/mktemp_1.5-9_amd64.deb ~/mktemp
cp ~/mktemp/bin/mktemp /bin/
After this I was able to follow any cleaup prompts and removed any squeeze packages and added replacement lenny packages.
This was done in the Rackspace next gen cloud to provide me with a necessary Lenny box to bring up a sandbox
Running through this a second time, I was able to fix the mktemp problem by running a simple apt-get install mktemp when the mktemp error came up.
DeleteAlso didn't run into the ldconfig issue this time.
The difference is that I ran apt-get upgrade and got it to complete error free before running apt-get dist-upgrade
I stil had to do the ldconfig fix above for the dist-upgrade to finish.
If anyone wants, I'll put together a full script on how to do the downgrade to Lenny in the Rackspace Squeeze image
Hi Jason,
Deleteit is dangerous to run a dist-upgrade on a downgrade since you are going backwards and dist-upgrade's logic works forward.
It will make decisions for you about removing packages based on their deps that you really want to make yourself. dist-upgrade will definitely give you unpredictable results (for instance removing mktemp while you really need it).
So on downgrade always use "upgrade" only :)
I would just like to add, that on a basic install with no packages added, you are still able to do this to roll back from Wheezy to Squeeze!! I'm delighted as I now no longer have to go to the DC to rollback to test package compatibility when upgrading from squeeze to wheezy :)
ReplyDeleteNo-one else seems to know that this is possible.
Extraordinary post, you have called attention to some phenomenal focuses , I similarly think this s an exceptionally brilliant site.
ReplyDeleteRegistering Ideal Domain