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

 

 

 

How does lsb_release determine system OS?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
sayansg
Posts: 21
Joined: 2018-09-13 17:05

How does lsb_release determine system OS?

#1 Post by sayansg »

Hello Everyone,

I've got a strange situation here. Up until a few days ago, lsb_release used to say I had sid stable-updates. (Not sure what the stable-updates meant.)

Today after a bit of tinkering with the sources.list, it shows the following.

Code: Select all

root@sayan:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux testing (buster)
Release:	testing
Codename:	buster
Here is the current sources.list

# deb cdrom:[Debian GNU/Linux 9.5.0 _Stretch_ - Official i386 xfce-CD Binary-1 20180714-11:11]/ stretch main

# deb cdrom:[Debian GNU/Linux 9.5.0 _Stretch_ - Official i386 xfce-CD Binary-1 20180714-11:11]/ stretch main


deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ buster/updates main contrib non-free

deb http://deb.debian.org/debian/ buster-updates main contrib non-free
deb-src http://deb.debian.org/debian/ buster-updates non-free contrib main

# deb http://deb.debian.org/debian/ sid main contrib non-free
# deb-src http://deb.debian.org/debian/ sid main contrib non-free

Most of the packages on my system currently are from stretch. A few says b1 or b2 at the end of the version(Don't know what it means. Buster perhaps??). A rare few say Unstable.

Should I change the sources.list to stretch? Or keep it as it is? Synaptic says over 40% of the packages are upgradable, probably not surprising given the current sources.list. Should I upgrade them?

P.S. I'm a novice debian user.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: How does lsb_release determine system OS?

#2 Post by arzgi »

Do you know what is the difference between stable, testing, and unstable? You have all them in your sources.list, which is not anyway recommended. Some are commented out, but I guess you have used them, why else would they be there.

If you have not read this:

https://wiki.debian.org/DontBreakDebian

it would be good time.

I think the question is secondary, if you have borked your system. I would install Debian Strectch (stable) again, and do not do changes to /etc/apt/sources.list

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How does lsb_release determine system OS?

#3 Post by bw123 »

lsb_release could possibly gather the info from different places on the system, including files in /etc /usr and /var and maybe the version of pkg lsb_release you have installed? Perhaps something from apt-cache policy? There is a short man page and also brief documentation on it at /usr/share/doc/lsb_release

Also the bug page might help you understand how it works? https://bugs.debian.org/lsb-release

The situation isn't that strange, people do this stuff a lot. Look up frankendebian on the forum, or the words repo+parade

The b1 and b2 at the end of a .deb often stands for beta.
Not sure what to say about your other questions, what to do? Not sure what problem you want to solve?
resigned by AI ChatGPT

sayansg
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

#4 Post by sayansg »

I wanted to know if my system would become unstable if I upgrade fully to buster. I guess it will be. It's just that some of the packages in stretch are over a year old. I had used sid repo to install a few up-to-date packages, but that may have been a mistake. System isn't misbehaving yet though.

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

#5 Post by HankB »

I would highly recommend sticking with one Debian release. Trying to install packages from sid w/out upgrading the entire installation to sid is going to be a can-O-worms. (Upgrading everything to sid can also be a can-O-worms. That's where things are tested to see if they break.)
I also do not recommend sid or testing for a new user. I'm using testing on one PC now and thinking about reinstalling Stretch because of some of the issues I'm running into.
If you really need newer packages, I suggest asking about ways to get them installed on Stretch. A couple ways I can think of include backports, Snap packages or perhaps Docker images. Depending on the app, one of these may be more appropriate than the others.
I also counsel that running year old S/W is not necessarily a bad thing. One of the hallmarks of Debian stable releases is that they are generally rock solid.

Good luck!

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: How does lsb_release determine system OS?

#6 Post by None1975 »

According to your source list, now you are on buster. I do not know if you installed something from Sid. If so, you have probably have a FrankenDebian. So, output of command

Code: Select all

lsb_release -a
is right.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: How does lsb_release determine system OS?

#7 Post by arzgi »

If that, that you have packages more than year old, is a problem then why are you using Debian? There is Ubuntu, which has newer versions, and I think Mint or some other Debian-derivative has even rolling-release.

TIme between Debian relaeses has many times been many years.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: How does lsb_release determine system OS?

#8 Post by debiman »

this is a follow-up from this:
http://forums.debian.net/viewtopic.php?f=10&t=138604
the suggestion there was that the system is likely already broken, therefor a reinstall is in order.
fixing lsb_release won't fix your system.

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

#9 Post by HankB »

FWIW:

Code: Select all

hbarta@rocinante:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux stable-updates (sid)
Release:	stable-updates
Codename:	sid
hbarta@rocinante:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian-debug buster-debug main contrib non-free
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://ftp.debian.org/debian buster main contrib non-free

deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
hbarta@rocinante:~$ 

hbarta@rocinante:~$ cat /etc/apt/sources.list.d/google-chrome.list 
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
hbarta@rocinante:~$

hbarta@rocinante:~$ cat /etc/issue
Debian GNU/Linux buster/sid \n \l

hbarta@rocinante:~$ 

I went straight from Stretch to Buster and have never had sid in my sources.

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

Re: How does lsb_release determine system OS?

#10 Post by CwF »

I like the "you must re-install" challenge...

I've created these problems, making frankendebians as they say. Fortunately I've had the resources to never force the conclusion, ie re-install. With another copy of whatever I just borked, I just move on. The borked systems I have saved for a rainy day, or in my case, a snow day.

After 2 long snow days awhile back I dug up 2 borked systems, mounted them in a vm, and attempted to fix them.

From my limited experience I have not uncovered an unsurmountable reason to start over. Except removing the kernel while in gui, that's interesting.

Anyway, I challenge you to get the sources.list down to a single line, maybe 2.

Code: Select all

deb http://deb.debian.org/debian buster main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
From there, in a variable order, rip the system down to not much, and re-install desired packages.

You can do much in the current GUI if still working. Synaptic, with the updated repository will show all those 0B and 1B packages that you have installed that do not correlate to a valid repository version. Rip them out. Read what synaptic is going to do, pay attention. You can try to reinstall things at this step too, I'd install aptitude just in case.

So if you blew up the desktop somehow that's where aptitude come in. A combination of a default xorg and aptitude, your root VT1 terminal can at least have a mouse driven nicely displayed aptitude interface. Same thing here, use this to recreate your preferred package selections.

I've never learned so much on a snow day. You can clean it up. If you've never tried, a fresh install will be way faster. Once you've cleaned a few system, I am claiming this can be faster. I'm also claiming there are lots of details missing ...

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

#11 Post by HankB »

CwF wrote: I've never learned so much on a snow day. You can clean it up. If you've never tried, a fresh install will be way faster. Once you've cleaned a few system, I am claiming this can be faster. I'm also claiming there are lots of details missing ...
No doubt any install can be un-borked. My personal choice is to avoid borking them in the first place but I'm sure you do learn a lot about dependencies by misusing and then fixing the packaging system.
In another post this user has self described as "a linux newbie" and that factors into the recommendation to reinstall.
I think we better serve the OP by helping them to find the easiest solution to what they want to do rather than leading them into a "learning experience."

sayansg
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

#12 Post by sayansg »

Thank you all for your input. I'll keep the system as it is for now. Everything works pretty wonderfully, especially after I started using LXDE as my default DE. So I'm not going to re-install debian. The name in lsb_release does not matter as long as things just work. There is something to be said for Debian. Even with quite a few packages from testing and one or two from unstable, it is extremely stable overall.

If only, it was both stable and contained recent packages. But I suppose the testing takes time and thus the very thing I love so far about Debian - its stability - is its biggest downside as well.

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: How does lsb_release determine system OS?

#13 Post by milomak »

is that to say you will continue to mix stable and testing repos?

if so, the best thing you can do for yourself is to run apt-listbugs
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

sayansg
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

#14 Post by sayansg »

How exactly does apt-listbugs work? Can you explain please?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: How does lsb_release determine system OS?

#15 Post by dilberts_left_nut »

It shows open bug reports for packages prior to install - highly recommended when running testing or sid.
Will, however, be no help at all for your next unsatisfiable dependency hairball.
AdrianTM wrote:There's no hacker in my grandma...

sayansg
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

#16 Post by sayansg »

Thank you. I installed it. And then installed shotwell from buster repo. Stretch wouldn't let me install shotwell because of dependency issues. Installing shotwell from buster also upgraded a few other packages but apt didn't complain about bugs.

Post Reply