How does lsb_release determine system OS?

If none of the more specific forums is the right place to ask

How does lsb_release determine system OS?

Postby sayansg » 2018-09-18 10:43

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.
sayansg
 
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

Postby arzgi » 2018-09-18 11:09

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
arzgi
 
Posts: 389
Joined: 2008-02-21 17:03
Location: Finland

Re: How does lsb_release determine system OS?

Postby bw123 » 2018-09-18 11:18

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?
User avatar
bw123
 
Posts: 3572
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How does lsb_release determine system OS?

Postby sayansg » 2018-09-18 12:33

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.
sayansg
 
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

Postby HankB » 2018-09-18 13:48

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!
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

Postby None1975 » 2018-09-18 15:11

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.
User avatar
None1975
 
Posts: 695
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: How does lsb_release determine system OS?

Postby arzgi » 2018-09-18 17:52

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.
arzgi
 
Posts: 389
Joined: 2008-02-21 17:03
Location: Finland

Re: How does lsb_release determine system OS?

Postby debiman » 2018-09-19 05:27

this is a follow-up from this:
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.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: How does lsb_release determine system OS?

Postby HankB » 2018-09-20 14:40

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.
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

Postby CwF » 2018-09-20 15:24

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 ...
CwF
 
Posts: 165
Joined: 2018-06-20 15:16

Re: How does lsb_release determine system OS?

Postby HankB » 2018-09-20 16:24

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."
HankB
 
Posts: 46
Joined: 2012-03-07 15:15

Re: How does lsb_release determine system OS?

Postby sayansg » 2018-09-23 17:05

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.
sayansg
 
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

Postby milomak » 2018-09-23 21:27

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: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Debian Sid, Win10,
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Debian Sid
milomak
 
Posts: 1853
Joined: 2009-06-09 22:20

Re: How does lsb_release determine system OS?

Postby sayansg » 2018-09-24 09:53

How exactly does apt-listbugs work? Can you explain please?
sayansg
 
Posts: 21
Joined: 2018-09-13 17:05

Re: How does lsb_release determine system OS?

Postby dilberts_left_nut » 2018-09-24 10:53

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...
User avatar
dilberts_left_nut
 
Posts: 4911
Joined: 2009-10-05 07:54
Location: enzed

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable