LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-27-2018, 01:22 PM   #1
xcynthos
LQ Newbie
 
Registered: Jun 2018
Location: Vienna
Distribution: Arch
Posts: 4

Rep: Reputation: Disabled
Unhappy Replace current OS-Files with original ones (Debian 9)


Hi,
I am currently running Debian 9 and i think i screwed up...
Long ago I added ParrotSec Package Mirrors to my sources.list file. Shortly after the original Debian kernel was replaced by a laggy ParrotSec kernel. But that's not the problem... I "downgraded" my kernel to latest version of the plain Debian kernel, but since then I've got dependency problems over and over. I tried to fix it by doing this:
apt-get autoclean

apt-get update && apt-get upgrade

apt-get -f install

dpkg --configure -a

apt-get -f install

apt-get -u dist-upgrade

It didn't solve my problem. Now I am thinking about reinstalling Debian but I want to keep all my files, installed packages, and configs. Is there a possibility to keep them, when reinstalling?
Thanks for your help.
 
Old 06-27-2018, 02:11 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
you could always backup your $HOME, plus a list of all installed packages.
but you cannot keep the packages themeselves.
also, the backed-up home likely won't "just work" when you mount it to become the new home. i wouldn't even try it, just collect the important configurations.

also:
https://wiki.debian.org/DontBreakDebian
 
Old 06-27-2018, 06:26 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Nice link ondoho - if I'd followed that, I'd never have learnt anything ...

Never been a Debian user, but back in the day I used Ubuntu for a while. I successfully used a separate /home partition with different release levels. Generally I would create a new partition and install the new version there, using the current /home and creating same user(s) with same uid/gid. Reinstall necessary packages and off I'd go. Everything "just worked" as expected, including simply booting back to the previous release in need.
All this was is response to continued failure of the upgrade-in-place tool. Things have probably gotten better these days, but I have used the same philosophy successfully on Fedora.
So hopefully should work ok for the OP - after backups of course. Note the use of a separate /home partition - set that up first. A good deal less work if it goes ok. Probably not the "Debian way" though ...
 
Old 06-28-2018, 04:25 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by syg00 View Post
Nice link ondoho - if I'd followed that, I'd never have learnt anything ...

Never been a Debian user
well that sort of explains why it is useless to you, no?

seriously, i added that because i hoped it
  1. explains why adding parrotsec sources is only a good idea if you know what and why you are doing this, and why this is generally very difficult to undo
  2. conatins some help on how to deal with breakage
it seems a bit thin on 2. though...

Quote:
I successfully used a separate /home partition with different release levels. Generally I would create a new partition and install the new version there, using the current /home and creating same user(s) with same uid/gid. Reinstall necessary packages and off I'd go. Everything "just worked" as expected, including simply booting back to the previous release in need.
without the smallest manual adjustments? i find that hard to believe, even 10 years ago.
desktop environments have gotten much more complicated these days.
even an advanced user cannot always tell if something in the gui doesn't work because of system files, or because of user configuration, so for the unconcerned average user a system is just as broken, if they try to use their old /home on a new install.
this is likely to happen, i've experienced it once or twice myself and seen it many more times on various forum threads.

Quote:
All this was is response to continued failure of the upgrade-in-place tool. Things have probably gotten better these days
i recently did a dist-upgrade on my debian server, no problems at all.
can't speak for ubuntu though.

Quote:
Note the use of a separate /home partition - set that up first. A good deal less work if it goes ok. Probably not the "Debian way" though ...
why not?
 
Old 08-02-2018, 09:26 AM   #5
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
Hy. Do you try doing a backup? When i install a new SO or version, i did a full backup:
tar -czv /mnt/NewPartitionOS > "OS Linux,Debian version,date-with Kurumin.tgz"
Then, i can reinstall it from an auxiliar Linux (tiny version or liveCD like Kurumin o Knoppix).
Have a nice day.
 
Old 08-02-2018, 09:34 AM   #6
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
Hi again! I forget mention to include in tgz name the type of code text (unicode,latin,utf,etc). When you reinstall (tar -xzvf arch.tgz) it extract file names with codes of the linux, but if you use a different distribution (or version) it can be different (in my case, old versions use latin1, newer use utf8).
I hope this was a good comment for you.
Have a nice day.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Imagemagick: Replace image keeping aspect ratio of original. cantab Linux - Software 3 03-26-2014 09:15 PM
[SOLVED] Must original kernel headers 2.6.37 be reinstall before recompile of current? NightSky Slackware 13 07-13-2012 09:06 PM
Convert many files to individual .bz2 files retaining original name? touser Linux - Newbie 5 03-29-2010 12:58 AM
Has anyone installed a 32-bit debian system to replace their current 64-bit system? BigVig Debian 2 06-27-2008 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration