Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

[Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#1 Post by bkpsusmitaa »

This is a question that I have been considering for some time.
Suppose that I remove the original lines of grub.cfg mentioning the version of Debian.
Is there any other means to know what the version is, many years hence?
There is a package called debian-distro-info -fsc but it doesn't say much. Says only about the major version, but not the minor one, i.e., the digits following the dot.
Any advice please?

Later Addition to avoid confusion: This issue is on a separate laptop of make Lenovo, earlier belonging to my daughter. Not the HP laptop whose HDD was changed, debian and knoppix were installed, which ended with Debian Unity desktop, to which Aki responded in the other post: [Installation] The nightmare of another upgrade.
Last edited by bkpsusmitaa on 2023-01-17 00:22, edited 5 times in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

Aki
Global Moderator
Global Moderator
Posts: 2935
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 72 times
Been thanked: 402 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#2 Post by Aki »

Hello,

The Debian version is stored in /etc/debian_version ; for example:

Code: Select all

$ cat /etc/debian_version
11.6
The following command is also available:

Code: Select all

$ lsb_release -a
LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#3 Post by bkpsusmitaa »

Thank you, Aki, for posting your reply.
Strangely enough, debian stretch 9.11 doesn't throw any result for either cat /etc/debian_version or lsb_release -a
From the root terminal, the 2nd one throws up:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux (n/a)
Release:
Codename: n/a
Strange, aren't they?!
It was a good coincidence that the repository line has CD-ROM line:
Official Debian GNU/Linux Live 9.11.0 lxde 2019-09-08T19:13
Later Addition to avoid confusion: This is on a separate laptop of make Lenovo earlier belonging to my daughter. Not the HP laptop whose HDD was changed.
Last edited by bkpsusmitaa on 2023-01-17 00:06, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

Aki
Global Moderator
Global Moderator
Posts: 2935
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 72 times
Been thanked: 402 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#4 Post by Aki »

Hello,
bkpsusmitaa wrote: 2023-01-16 18:00 Strangely enough, debian stretch 9.11 doesn't throw any result for either cat /etc/debian_version or lsb_release -a
The file /etc/debian_version should be in Debian Stretch (9.x), too: see [1]. It's in the base-files package that is an essential package of debian installation. Therefore, this let me suppose that your installation is missing something.

The output of lsb_release command gets the information as showed here [2]. The version of the release is from /etc/debian_version

---
[1] https://packages.debian.org/stretch/amd64/base-files/filelist
[2] https://sources.debian.org/src/lsb/9.20161125/lsb_release.py/#L223
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#5 Post by bkpsusmitaa »

Aki wrote: 2023-01-16 18:35... The file /etc/debian_version should be in Debian Stretch (9.x), too: see [1]. It's in the base-files package that is an essential package of debian installation.
Aki wrote: 2023-01-16 18:35Therefore, this let me suppose that your installation is missing something.
I should inform that this issue is on a separate laptop of make Lenovo earlier belonging to my daughter. Not the HP laptop whose HDD was changed, debian and knoppix were installed, which ended with Debian Unity desktop to which you responded in the other post. I have posted this Later Addition to avoid confusion: above too for future readers referring to this post for info.
Aki wrote: 2023-01-16 18:35. The version of the release is from /etc/debian_version
Okay. Thank you. So that set up has some problem somewhere too. Isn't there any other way?
Thank you for posting evidences to allay my confusion. So thoughtful of you.

In the end, Isn't there any other way to determine a version (later addition to avoid confusion: of Debian release exactly, in numerical value abcdef x.yz, e.g., Stretch 9.11 in my case) installed?
Last edited by bkpsusmitaa on 2023-01-17 03:52, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

CwF
Global Moderator
Global Moderator
Posts: 2686
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#6 Post by CwF »

bkpsusmitaa wrote: 2023-01-17 00:16 In the end, Isn't there any other way to determine a version installed?

Code: Select all

$  dpkg -l linux-image* | grep ii

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [Installation] How to determine the version for Debian if the menu.cfg lines are edited to remove original versions

#7 Post by bkpsusmitaa »

CwF wrote: 2023-01-17 01:09

Code: Select all

$  dpkg -l linux-image* | grep ii
No, I am sorry I couldn't explain better. I have added words to the earlier post:
... Debian release exactly, in numerical value abcdef x.yz, e.g., Stretch 9.11 in my case
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

Post Reply