Change linux version name

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Ubuntu/Mint Linux installation instructions to use $VERSION_CODENAME #5156

Change Ubuntu/Mint Linux installation instructions to use $VERSION_CODENAME #5156

needs-investigation A bug not 100% confirmed/fixed OS/Linux priority/P3 The next thing for us to work on. It’ll ride the trains. QA/Yes release-notes/exclude

Comments

As mentioned in #5111 (comment), we might be able to directly support Debian in our official instructions by changing the variable we use to pick the right repository.

Instead of $UBUNTU_CODENAME , we could use $VERSION_CODENAME .

The text was updated successfully, but these errors were encountered:

It also won’t work on recent versions of Mint:

$ echo $UBUNTU_CODENAME xenial $ echo $VERSION_CODENAME sylvia 

and adding all of its codenames to the repo would be a lot of work because they change often.

The following however, will work with Debian 10+, Ubuntu 16.04+ and Mint 18+:

echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ `(test -z "$UBUNTU_CODENAME" && echo $VERSION_CODENAME) || echo $UBUNTU_CODENAME` main" 

For Ubuntu 14.04, Mint 17 and Debian 9, we can use the Mint 17 instructions.

As I have mentioned in #5111, what about using ‘lsb_release -sc’ ? I think it works the same under all those situations.

rebron added the priority/P3 The next thing for us to work on. It’ll ride the trains. label Jul 5, 2019

We used to use lsb_release -sc , but it caused some problems on Debian/Ubuntu derivatives (see #2343).

+1 from @jkhgvfgvsth for Debian install instructions via #5161

@fmarier @srirambv They key issue is that users do not know to follow «Mint 17+» steps.

Ideally, it would have installation steps for Mint 17+ and Debian 9 (and lower) as well as a Ubuntu 16.04+, Mint 18+, and Debian Buster+ (stable) install steps. Otherwise people will continue to not understand how to install Brave safely for their system.

Читайте также:  Система мониторинга системы linux zabbix

Small notice.
Now that debian 10 (buster) is released as stable, development will shift to debian 11 (bullseye) and that codename will be used in the new /etc/os-release. once base-files (the package containing /etc/os-release) gets updated in the next days or weeks.
So, you will probably need to make one more folder in the repo.

The package base-files was updated today, for the first time after the release of debian 10, and it now /etc/os-release contains only these 🙁

# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux bullseye/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" 

As listed on the changelog, $VERSION_CODENAME was dropped

base-files (11) unstable; urgency=medium * Change issue, issue.net, debian_version and os-release to read "bullseye/sid". * Drop VERSION, VERSION_ID and CODENAME from os-release. * Make "mesg n" silent in default /root/.profile. Closes: #930654. 

Источник

zrruziev / How to change linux kernel versions.md

This command will search all the packages available in the package manager’s cache that match the string «linux-image-» and pipe the output to grep, which filters out any packages that contain the string «generic» in their name.

You can also use the following command to see the available versions in the repository:

apt-cache policy linux-image-generic

To see a list of all the available kernel versions on your system, you can run the command

dpkg --list | grep linux-image

To list the kernel versions that are installed and available to boot, you can use the command

dpkg --list | grep linux-image | awk '< print $2 >'

Once you have determined the version of the kernel that you want to downgrade to,
you can use the following command to install it:

sudo apt-get install linux-image-version>-generic

Where «version» is the version number of the kernel that you want to install, and «generic» is the type of kernel. After installing the kernel, you will need to reboot your system for the changes to take effect.

To change the kernel version that your Linux system is booting to

We will use the grub bootloader to do this:

    Open a terminal window and run the following command. This will open the GRUB configuration file in the nano text editor.

GRUB_TIMEOUT_STYLE=menu # it was "hidden" by default GRUB_TIMEOUT=10 # it was "0" by default 

The above changes make grub menu to be shown automatically(you don’t need to press ESC or Shift keys) while booting and it waits 10 secs
Then, update the GRUB bootloader configuration:

When you run the command sudo update-grub , it scans the system for installed operating systems and kernels, generates a new GRUB configuration file and updates the menu entries in the GRUB bootloader. This ensures that the boot menu shows the correct options and that the system can boot to the correct operating system or kernel version.
Then reboot the system:

  • You can make the specific kernel version default while booting. If the kernel version you want to make default is already running on your system (as shown by the output of uname -r ) and you would like to prevent it from being upgraded when using sudo apt update && sudo apt upgrade , you can use the apt-mark command to mark the package as hold:
sudo apt-mark hold linux-image-version>-generic

This will prevent the package from being automatically upgraded or removed. To make it default during boot, you can use sudo update-grub command to update the grub bootloader configuration file and set the desired kernel as the default.

sudo apt-mark unhold linux-image-version>-generic

If the kernel version you want to make default is not running on your system (as shown by the output of uname -r ) then read this gist from the start.

You can remove older kernels that are not in use by running the following command

sudo apt-get purge kernel-version>

This will free up disk space and make sure that the current kernel version is the only one available to boot.

Источник

can I change uname?

I want to install Discovery Studio Visualizer but the precompiled binary checks the system for OS version. When it finds that I am not running RHEL, the installer exits. Is there a way to change or trick programs that call uname into displaying different info?

You would need to either recompile the kernel (and give it a different name) or recompile the DSV so it does not check, or see how DSV checks your OS.Run the script from here — accelrys.com/products/collaborative-science/… and contact upstream.

Is there some reason not to run Centos then ? It is difficult to know how they are perfroming OS detection. You could edit /etc/issue perhaps?

2 Answers 2

You cannot customize uname ‘s output, but you can spoof the installer by making the system run a custom script instead of the «real» /bin/uname .

First you’ll need to check the exact command the installer is running to check your system’s information; in this example for the sake of easiness I’ll pretend that an executable ~/tmp/check is running uname -n and that the output of uname -n should be ubuntu in order for ~/tmp/check to print «Passed!».

~/tmp/check ‘s source (this of course is not relevant, and is just to showcase what the test executable does):

#include #include #define MAX_STRING_LENGTH 32 int main(void) < FILE* output = popen("/bin/uname -n", "r"); char expected[] = "ubuntu"; char hostname[MAX_STRING_LENGTH]; fgets(hostname, MAX_STRING_LENGTH, output); pclose(output); if(hostname[strlen(hostname) - 1] == '\n') hostname[strlen(hostname) - 1] = '\0'; if(strcmp(expected, hostname) == 0) < printf("Passed!\n"); return 0; >return 1; > 
user@debian:~/tmp$ uname -n debian user@debian:~/tmp$ ./check user@debian:~/tmp$ 

It’s easy to track the exact command run by the executable using strace :

user@debian:~/tmp$ strace -f ./check 2>&1 > /dev/null | grep execve execve("./check", ["./check"], [/* 34 vars */]) = 0 [pid 13122] execve("/bin/sh", ["sh", "-c", "/bin/uname -n"], [/* 34 vars */] [pid 13122] ) = 0 [pid 13123] execve("/bin/uname", ["/bin/uname", "-n"], [/* 34 vars */]) = 0 

So to get around this one should make uname -n output ubuntu : the easiest solution would be to just move /bin/uname and to create a symbolic link /bin/uname linking to a custom script (which will ignore any argument and just output ubuntu ):

#!/bin/bash echo ubuntu exit 0 
user@debian:~/tmp$ sudo mv /bin/uname /bin/uname1 user@debian:~/tmp$ sudo ln -s ~/tmp/spoofer.sh /bin/uname 
user@debian:~/tmp$ uname -n ubuntu user@debian:~/tmp$ ./check Passed! user@debian:~/tmp$ 

Bingo! (remember to remove /bin/uname and to move /bin/uname1 back to /bin/uname afterwards: sudo rm /bin/uname && sudo mv /bin/uname1 /bin/uname )

Источник

Change Debian TTY/text terminal login OS version name

I’m running testing, and purely for aesthetic purposes, I don’t want it to say sid here. (Who would? I don’t want to be reminded of this Pixar character every time I use my computer.) Is there a way to change this without kernel hacking? Is there a way to change it at all?

1 Answer 1

That message is stored in /etc/issue and /etc/issue.net ; you can edit them to display whatever you want instead.

These files are intended to be edited by administrators, and your changes will be preserved on upgrade (but you may be asked what to do with them).

+1. also worth noting that some getty programs support all sorts of useful escape codes. e.g. i have Debian GNU/Linux \n \l eth0:\4 in /etc/issue on my cloned VMs so I don’t have to grep my dhcp log for VMs with dynamic IP addresses to get an IP address to use with ssh.

You must log in to answer this question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.13.43531

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Оцените статью
Adblock
detector