LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-19-2022, 03:17 PM   #1
winger9
Member
 
Registered: Jan 2014
Posts: 85

Rep: Reputation: 1
How can I list recently installed packages without /var/log/dpkg.log available?


Summary

1. I had live knoppix on a usb stick, but it won't boot anymore. However, I
do have a file image of the stick, and can view the files on it. So I'd like to
list what packages I installed on that system since say a year ago, showing the
dates of installation.

2. However, the file /var/log/dpkg.log doesn't exist, so is there another way I
can list the packages?

Full Details

3. I've added the following just to show that I HAVE tried to recover the system
on the usb stick but without success.

4. When booting the usb stick, it fails in the following way. At the boot
prompt, after pressing ENTER, I get 4 error messages of the form "ERROR xxxx
reading SECTOR xxxxx". The first message is "CHS: ERROR 8001 READING SECTOR
22815 (12/8/32)". After the 4th error message it just stops, sits there, and
nothing else happens.

5. Prior to the usb stick not booting at all, the system ran but malfunctioned.
At that stage I was able to create a file image of the stick on another drive,
using ddrescue.

6. I ran reiserfsck* on the filesystem that's within the file image, but it
didn't succeed in fixing it. (*Including using --badblocks, --rebuild-tree, and
--rebuild-sb.) One of the error messages that reiserfsck gives is "Fatal
corruptions exist".

Last edited by winger9; 01-19-2022 at 03:19 PM. Reason: Was going to add a tag but no facility to do so.
 
Old 01-20-2022, 08:38 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,112
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Can't say if what I used in MX Fluxbox 21 will work in Knoppix with your weird situation or not.

Code:
comm -23 <(apt-mark showmanual|sort) \
<(zcat /var/log/installer/initial-status.gz|sed -n 's/^Package: //p')
Should not hurt anything to try though.
 
Old 01-22-2022, 10:16 AM   #3
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
What about
Code:
zcat /var/log/apt/history.log*gz
 
Old 01-24-2022, 01:17 AM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Is there any reason not to chroot to it, then try to use apt*?
 
Old 02-05-2022, 04:23 PM   #5
winger9
Member
 
Registered: Jan 2014
Posts: 85

Original Poster
Rep: Reputation: 1
Many thanks rokytnji #2 and ondoho #3. Unfortunately the directory
/var/log/installer doesn't exist, and /var/log/apt/history.log is
empty.

Knoppix is a customisation of Debian, so I presume the customisers decided not
to include certain logging (most logging?). I've had a flick through the
/var/log directory, and most of the subdirectories are empty. Also, the log
files in the non-empty directories are empty.
 
Old 02-05-2022, 04:41 PM   #6
winger9
Member
 
Registered: Jan 2014
Posts: 85

Original Poster
Rep: Reputation: 1
Many thanks mrmazda #4.

Sorry for being so dim. Could you tell me what to chroot to please. Also, could
you tell me what you mean by "apt*", and what you mean by "try to use atp*"?

I'm so sorry for asking for some elaboration.
 
Old 02-05-2022, 05:24 PM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Looking back at what I wrote 17 days ago I must have thought you had installed Knoppix, something I last did too many years ago to remember anything about it. Looking at output of mount while booted to Knoppix 8.6 I'm at a loss what to suggest you would chroot to. Klaus Knopper has a mailing list debian-knoppix at lists.debian.org. I suggest you ask for suggestions there.

apt*:
Code:
 ls -1 /usr/bin/apt*
/usr/bin/apt
/usr/bin/apt-cache
/usr/bin/apt-cdrom
/usr/bin/apt-config
/usr/bin/apt-extracttemplates
/usr/bin/apt-ftparchive
/usr/bin/apt-get
/usr/bin/apt-key
/usr/bin/apt-mark
/usr/bin/apt-mirror
/usr/bin/apt-sortpkgs
/usr/bin/aptitude
/usr/bin/aptitude-create-state-bundle
/usr/bin/aptitude-curses
/usr/bin/aptitude-run-state-bundle
 
Old 02-06-2022, 03:27 AM   #8
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 winger9 View Post
and /var/log/apt/history.log is
empty.
It is not what I wrote!!!
 
Old 02-06-2022, 03:33 PM   #9
winger9
Member
 
Registered: Jan 2014
Posts: 85

Original Poster
Rep: Reputation: 1
Sorry ondoho (#8), I should have said there are no files in /var/log/apt/ that end in "gz", not even history.log*gz.
 
Old 02-06-2022, 04:25 PM   #10
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Anything in /var/lib/dpkg/status ?
You could diff it with a stock knoppix.
 
Old 02-07-2022, 04:16 AM   #11
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
@OP. I'm not quite sure what you're looking at. If it's the main Knoppix overlay (KNOPPIX) then there are probably no log files at all, as Knoppix is a live system supposed to be run from read-only media (CD/DVD) among others. You should be looking at its persistent store instead. It's probably a partition after the main one, but could by a file image as well.
 
Old 02-09-2022, 05:13 PM   #12
winger9
Member
 
Registered: Jan 2014
Posts: 85

Original Poster
Rep: Reputation: 1
Good thinking descendant_command (#10). I have got /var/lib/dpkg/status on my image-file of the knoppix stick. I'll call it the "faulty stick".

The problem with comparing that /var/lib/dpkg/status with one on a stock knoppix is as follows.

I could create a new stock knoppix on a usb stick and compare its /var/lib/dpkg/status with the one on the image-file of the faulty stick. But that will list every package I've installed since day one.

I actually want to list what packages I installed on the faulty stick since about a year ago (and showing the dates of installation).

The following info might or might not help.

Presently I have 3 usb sticks that have the same basic knoppix on them. I'll call them sticks 1, 2 (the faulty one), and 3.

But I use the 3 sticks at different times, and I believe that on all 3 I have installed different packages (sometimes the same packages). As I say, I don't know if this info helps in finding a solution.

EDIT (10feb22):

1. I've just realised that my above explanation about the 3 sticks is incomplete. I should have added the following.

2. The dates I've specified below aren't exact, but illustrate the sequence.

3. STARTING POINT: I installed live knoppix on stick 1 on 1jan16. Then between 1jan16 and 1jan17, I installed various packages on it.

4. On 1jan17, I cloned stick 1 onto stick 2. I subsequently installed more packages onto stick 2.

5. On 1jan20 I cloned stick 1 onto stick 3. At the point of the cloning, stick 1 may have had more packages installed on it (by me) than were there on 1jan17 (4.).

I subsequently installed more packages onto stick 3.

Last edited by winger9; 02-10-2022 at 04:57 PM. Reason: Removed unnecessary newlines.
 
Old 02-10-2022, 04:51 PM   #13
winger9
Member
 
Registered: Jan 2014
Posts: 85

Original Poster
Rep: Reputation: 1
Thanks shruggy (#11).

The live knoppix on the usb stick does indeed consist of 2 partitions.

Partition 1 (labelled "KNOPPIX") contains knoppix itself; and its main directory is /KNOPPIX.

Partition 2 (labelled "KNOPPIX-DATA") is the persistence partition, which includes /home.

On partition 2, the file /var/log/dpkg.log doesn't exist, and the directory /var/log/apt/ is empty.

On partition 2, the only files (ie not directories) in /var/log/ are

Xorg.0.log
Xorg.0.log.old
wtmp
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Broken dpkg. Empty /var/lib/dpkg/available file. Shum Debian 6 12-05-2011 09:51 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
dpkg is dead! error in /var/lib/dpkg/available dezert_fox Debian 4 11-22-2011 10:28 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
/var/log/packages and /var/log/setup sunny_5252 Slackware 4 05-17-2007 08:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 PM.

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