0

I'm actually trying to diagnose a partly-broken system -- several symptoms have recently arisen. Odd combinations -- Ctl-Alt-F1 no longer works, my web page is down, I can no longer mount FAT thumb drives, some files are temporarily unavailable (produce errors) then become available again. I suspect configuration files, software, hardware, or a curse. In other words, I have no clue.

What I want to do is replicate the system in a sanitary way -- not by copying (which might copy the cause) but by rebuilding.

So, I can get a list of installed packages with apt list, or dpkg-query, but don't immediately see a way to use that list to bring my copy up to the level of the original.

How can I do that? Especially, is there a simple way to use the list to get the packages installed. The tools I know about generate a list that is not immediately useful for input to apt or similar programs. Note that the usual simple reinstall from a thumb drive is not available because of the presence of other OS partitions, including Windows.

  • Providing details as to your software stack is always helpful, you tagged Xubuntu which helps (eg. we know it's a desktop Ubuntu system), but didn't provide the release detail. You can re-install a Ubuntu Desktop system non-destructively, which will fix most package problems, without touching your user files & having your manually installed packages auto-reinstall (where from Ubuntu repositories), that won't touch your configs (thus if your issue is a config issue, it'll remain, but you concentrate on packages & it'll help there), so it maybe an option for your unstated release. – guiverc Jan 30 '23 at 01:11
  • I'm on Xubuntu 20.04.5. I don't know how to do that non-destructive install, and I'm a bit leery of doing it anyway. I like my idea of building a clean copy of what it should be, so I want to know a good way to install all the packages listed by apt or dpkg. – ForDummies Jan 30 '23 at 01:32
  • I already know how to get the list. What I need is a way to use it to install those packages on another system. – ForDummies Jan 30 '23 at 01:35
  • "I can get a list of installed packages with apt list, or dpkg-query" such a list would seem to be very long...and therefore useless. Your final list should be a very short list to add to a fresh stock Ubuntu install. – user535733 Jan 30 '23 at 03:23
  • FYI: I'd likely just clone or copy your files across to another box/install, then re-install the system & if it's package related I'd expect the issue to be resolved. As installs are fast, the copy/clone process is the slowest step. I can re-install an OS within 15 minutes, and that's using a core2 era PC with spinning rust drive (download time & quantity of packages to re-install not found on your ISO/media also takes time; faster if using a modern PC & SSD too). If it doesn't work; you can always clean install as the original install wasn't touched. – guiverc Jan 30 '23 at 14:10
  • It is also not obvious how to do a "reinstall" with the usual installer because the system has other OS partitions including Windows -- which prevents the "reinstall" option from showing up. – ForDummies Jan 30 '23 at 14:30
  • The admins insist this question is a duplicate. I disagree, but give up. I'd like to point out a different discussion I found on AskUbuntu, which goes into some things much more helpful than the supposed answer here. See https://askubuntu.com/questions/2389. I'll be asking a very similar question over there.... – ForDummies Jan 30 '23 at 19:43
  • To do a repair or non-destructive re-install, I'll provide https://askubuntu.com/questions/446102/how-to-reinstall-ubuntu-in-the-easiest-way/1451533#1451533 though there are also many other questions with that same detail... – guiverc Jan 30 '23 at 20:04
  • @guiverc thanks. That will get me part-way there -- the diagnostic part. I also want what the title suggested -- a way to replicate the suite in installed packages from one machine to another. For two reasons: 1) it may help in diagnosing problems in manually-installed packages which I'm not sure a reinstall would do and 2) I run a cluster of 7 similar machines and I want them to have exactly the same software. :This is hard to keep up with manually. – ForDummies Jan 30 '23 at 22:23

0 Answers0