FedoraForum.org - Fedora Support Forums and Community
Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Question How to re-generate /etc/system-release

    I had a failed boot due to a bug and I did make some changes to grub, I do not recall exactly what now. After recovering from Emergency mode the boot option is now "Generic release 26 (Generic)". This value is stored in /etc/system-release but also other files such as /etc/issue, /etc/issue.net and others. How can I re-generate this? I am not sure why it changed, seems like it should remain constant unless os/kernel is installed or updated. Manually changing is not really an option as it will not include the latest kernel version once it is updated or cover all files that may have this name.

    uname -a also give the wrong output:

    Linux Server 4.14.6-200.fc26.x86_64 #1 SMP Thu Dec 14 15:32:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  2. #2
    Join Date
    Oct 2011
    Posts
    1,678

    Re: How to re-generate /etc/system-release

    Those files usually belong to a package, and they get repaired by reinstalling the package they belong to. To query to which package a file belongs to you can use:
    Code:
    $ rpm -qf /etc/system-release
    `uname` command tells which kernel is booted into. Fedora by default keeps last 3 kernels installed in case the new installed one fails to boot. If your grub configuration misses last installed kernel, you can also repair that by reinstalling the new kernel version, assuming that default Fedora repositories are enabled, and there are no new repositories added that overrides packages from those.

    Code:
    $ sudo dnf reinstall <package>

  3. #3
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    Code:
    [dom@Server ~]$ rpm -qf /etc/system-release
    generic-release-26-1.noarch
    There is a bug that seems to be what happened to my system: https://bugzilla.redhat.com/show_bug.cgi?id=1512584

    The question is why did generic-release got installed in the first place? I did not specifically install it and only used dnf update.

  4. #4
    Join Date
    Oct 2011
    Posts
    1,678

    Re: How to re-generate /etc/system-release

    Could you provide a relevant log of update where generic-release-26 gets installed? Even better, you should mention this case and attach it in the bug report. You can use "sudo dnf history info <id>" to get it.

    Not sure what is exactly happening, but judging by the bug report, `/etc/os-release` which is read by systemd to determine OS seems to be a broken link.

  5. #5
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    226

    Re: How to re-generate /etc/system-release

    "Generic-release" refers to a Fedora system that was respun without Fedora logos etc. I use a kickstart file to create a generic fedora-based system that includes non-free programs such as vlc, etc. This is what I did in the kickstart:
    Code:
    -fedora-release 
    -fedora-logos 
    -fedora-release-notes 
    generic-release 
    generic-logos 
    generic-release-notes
    The packages with the minus-sign are removed and the generic packages are installed. I assume you haven't used a kickstart, so I don't know why you would have a generic system. Use "dnf search" to see if you have these generic packages. If you do, remove them and replace them with fedora-logos, fedora-release-notes and fedora-release.

  6. #6
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    Never even heard of kickstart before now. All I did was update with dnf, there was a failed kernel install at somme point with dnf but that's it. I do have some extra repos enabled but nothing related to this, any repos I have are what one would expect for home server. What repos could generic packages be in?

    Here are the results from dnf search, it does seem there are some generic packages. Which ones seem out of place? I would like to delete them. The only visible issue I am having now is that grub boot option name is dracut. This is after a failed boot and a number of attempted repairs by me so it's likely I messed somethingn up.

    Code:
    generic-release.noarch : Generic release files
    R-BiocGenerics.noarch : Generic functions for Bioconductor
    generic-jms-ra-javadoc.noarch : Javadoc for generic-jms-ra
    collectd-generic-jmx.x86_64 : Generic JMX plugin for collectd
    evas-generic-loaders.x86_64 : Set of generic loaders for Evas
    ghc-newtype-generics.x86_64 : Haskell newtype-generics library
    nodejs-generic-pool.noarch : Generic resource pooling for Node.js
    texlive-collection-genericextra.noarch : Generic additional packages
    generic-jms-ra.noarch : Generic JMS JCA Resource Adapter for JBoss AS
    ghc-generics-sop.x86_64 : Generic Programming using True Sums of Products
    texlive-collection-genericrecommended.noarch : Generic recommended packages
    ghc-generics-sop-devel.x86_64 : Haskell generics-sop library development files
    ghc-deepseq-generics.x86_64 : Generics-based normal form reduction for deepseq
    ghc-generic-deriving.x86_64 : Generic programming library for generalised deriving
    ghc-generic-deriving-devel.x86_64 : Haskell generic-deriving library development files
    ghc-deepseq-generics-devel.x86_64 : Haskell deepseq-generics library development files
    ghc-newtype-generics-devel.x86_64 : Haskell newtype-generics library development files
    lorax-templates-generic.x86_64 : Generic build templates for lorax and livemedia-creator
    ghc-generics-sop-devel-doc.noarch : Haskell generics-sop library development documentation
    ghc-generic-deriving-devel-doc.noarch : Haskell generic-deriving library development documentation
    python2-simplegeneric.noarch : Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)
    python3-simplegeneric.noarch : Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)
    ================================================ Name Matched: generic =================================================
    generic-logos.noarch : Icons and pictures
    generic-logos-httpd.noarch : Fedora-related icons and pictures used by httpd
    perl-Daemon-Generic.noarch : Framework to provide start/stop/reload for a daemon
    dracut-config-generic.x86_64 : dracut configuration to turn off hostonly image generation
    generic-release-notes.noarch : Release Notes
    texlive-tabto-generic.noarch : "Tab" to a measured position in the line
    mingw-binutils-generic.x86_64 : Utilities which are needed for both the Win32 and Win64 toolchains
    =============================================== Summary Matched: generic ===============================================
    tulrich-tuffy-fonts.noarch : Generic sans font
    dmenu.x86_64 : Generic menu for X
    GMT.i686 : Generic Mapping Tools
    GMT.x86_64 : Generic Mapping Tools
    perl-Digest-CRC.x86_64 : Generic CRC functions
    vanessa_logger.i686 : Generic logging layer
    vanessa_logger.x86_64 : Generic logging layer
    xplayer.i686 : A generic Media Player
    xplayer.x86_64 : A generic Media Player
    cswrap.x86_64 : Generic compiler wrapper
    dt.x86_64 : Generic data test program
    mozplugger.x86_64 : A generic mozilla plug-in
    ghc-netlist.x86_64 : A generic netlist for HDLs
    perl-Pipeline.noarch : Generic pipeline interface
    php-geshi.noarch : Generic syntax highlighter
    gtrayicon.x86_64 : Generic tray icon for GNOME
    python2-zope-proxy.x86_64 : Generic Transparent Proxies
    python3-zope-proxy.x86_64 : Generic Transparent Proxies
    scim-tables.x86_64 : SCIM Generic Table IMEngine
    obs-build.noarch : A generic package build script
    ghc-http-types.x86_64 : Generic HTTP types for Haskell
    python2-pyface.noarch : Generic User Interface objects
    python3-pyface.noarch : Generic User Interface objects
    perl-File-Fetch.noarch : Generic file fetching mechanism
    netresolve.i686 : Generic name resolution library
    .......

  7. #7
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    226

    Re: How to re-generate /etc/system-release

    The generic packages are in the official Fedora repos (install and update repos). They should be used whenever a user changes Fedora in such a way that there are non-free packages installed and the user plans on distributing the new OS (it's new because it has non-free packages which are not acceptable to the Fedora rules and regulations for changing the OS).
    Again remove the generic packages as I indicated above; however, I doubt this will solve your booting problem.

    Sorry, I guess "dnf search generic" doesn't tell you if they are installed on your system. Try "dnf info generic-logos". This will tell you whether you have generic-logos installed.
    Last edited by donatom; 28th December 2017 at 10:46 PM.

  8. #8
    Join Date
    Oct 2011
    Posts
    1,678

    Re: How to re-generate /etc/system-release

    *release* packages cannot be simply removed as there are lot of packages depending on it. However following might replace it.
    Code:
    $ sudo dnf install --allowerasing fedora-release fedora-release-workstation
    BTW, Still waiting on that log from `dnf history`, any difficulties with that?

  9. #9
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    The command you listed did not remove any packages. I don't see any reason not to remove generic packages if they don't break dependencies, I just don't want to remove packages that just happen to have the word generic in them.

    Here is the dnf hostory log, it may not go back far enough or maybe it doesn't show hostory from emergency mode/chroot:

    Code:
    [dom@Server ~]$ sudo dnf history
    [sudo] password for dom:
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
       132 | update                   | 2017-12-28 12:00 | E, I, U        |   16 EE
       131 | reinstall grub2-efi      | 2017-12-28 11:44 | Reinstall      |    1
       130 | swap --allowerasing gene | 2017-12-27 11:57 | E, I           |    4 EE
       129 | update                   | 2017-12-22 14:44 | E, I, U        |   22 EE
       128 | reinstall grub2-efi shim | 2017-12-16 18:06 | Reinstall      |    2
       127 | update                   | 2017-12-16 17:38 | E, I, U        |    7
       126 | update                   | 2017-12-15 15:09 | Update         |    3
       125 | update                   | 2017-12-15 00:45 | Update         |    7 EE
       124 | --best --allowerasing up | 2017-12-13 14:53 | E, I, U        |    5 EE
       123 | update                   | 2017-12-13 11:13 | E, I, U        |   88 EE
       122 | install mediainfo        | 2017-12-06 00:07 | Install        |    1
       121 | install libmediainfo     | 2017-12-06 00:04 | Install        |    3
       120 | remove libmediainfo      | 2017-12-06 00:04 | Erase          |    4
       119 | update                   | 2017-12-05 23:36 | E, I, U        |   20
       118 | update                   | 2017-12-01 18:23 | E, I, U        |   73
       117 | install par2cmdline      | 2017-11-30 22:17 | Install        |    1
       116 | install owncloud-client  | 2017-11-24 18:55 | Install        |   27
       115 | remove owncloud-client   | 2017-11-24 18:54 | Erase          |   28
       114 | update                   | 2017-11-23 15:33 | E, I, U        |   30
       113 | update                   | 2017-11-17 19:00 | I, U           |   50
       112 | update                   | 2017-11-15 23:33 | E, I, U        |    7
       111 | install tesseract-osd    | 2017-11-13 16:16 | Install        |    1
       110 | install tesseract        | 2017-11-13 14:39 | Install        |    2
       109 | install pycrypto         | 2017-11-13 14:32 | Install        |    3
       108 | install sqlite           | 2017-11-13 14:28 | Install        |    1
       107 | install pycurl           | 2017-11-13 10:57 | Install        |    1
       106 | update                   | 2017-11-12 19:36 | E, I, U        |   50
       105 | install neofetch         | 2017-11-07 09:49 | Install        |    1 EE
       104 | update                   | 2017-11-05 12:35 | E, I, U        |    9
       103 | install screenfetch      | 2017-11-05 10:25 | Install        |    4
       102 | update                   | 2017-11-02 22:33 | E, I, U        |   62 EE
       101 | install kodi             | 2017-11-02 21:35 | Install        |   46
       100 | remove kodi              | 2017-11-02 21:31 | Erase          |   46
        99 | reinstall kodi           | 2017-11-02 21:14 | Reinstall      |    1
        98 | install owncloud-client  | 2017-10-29 11:54 | Install        |   29
        97 | update                   | 2017-10-25 17:02 | Update         |    6
        96 | update                   | 2017-10-23 16:51 | Update         |   42 EE
        95 | --releasever=26 system-u | 2017-10-13 14:25 | D, E, I, O, U  |  907 EE
        94 | install dnf-plugin-syste | 2017-10-13 14:02 | Install        |    2
        93 | update                   | 2017-10-13 13:46 | E, I, U        |   11
        92 | install lm_sensors       | 2017-10-10 15:43 | Install        |    3
        91 | update                   | 2017-10-10 13:33 | Update         |   16
        90 | update                   | 2017-10-04 13:58 | E, I, U        |   10
        89 | install alsa-plugins-pul | 2017-10-01 12:57 | Install        |    1
        88 | install pulseaudio-utils | 2017-09-30 19:14 | Install        |    1
        87 | install pulseaudio       | 2017-09-30 14:20 | Install        |    4
        86 | remove dbus-x11          | 2017-09-29 14:19 | Erase          |    1
        85 | update                   | 2017-09-29 13:47 | Update         |   24
        84 | install dbus-x11         | 2017-09-29 13:45 | Install        |    1
        83 | remove dbus-x11          | 2017-09-28 15:36 | Erase          |    1
        82 | remove pyOpenSSL         | 2017-09-28 11:35 | Erase          |    9
        81 | remove alsa-plugin-equal | 2017-09-27 20:34 | Erase          |    3
        80 | install http://ftp.nluug | 2017-09-27 20:31 | Install        |    3
        79 | remove alsa-plugin-equal | 2017-09-27 20:28 | Erase          |    3
        78 | install http://ftp.nluug | 2017-09-27 20:16 | Install        |    3
        77 | install alsa-tools       | 2017-09-27 16:43 | Install        |   24
        76 | install alsa-utils       | 2017-09-27 15:47 | Install        |    2
        75 | install kodi             | 2017-09-27 15:39 | Install        |   46
        74 | remove alsa-lib          | 2017-09-27 15:31 | Erase          |   63
        73 | reinstall kodi           | 2017-09-27 15:06 | Reinstall      |    1
        72 | install alsa-utils       | 2017-09-27 14:26 | Install        |    1
        71 | install pyOpenSSL        | 2017-09-27 13:59 | Install        |    9
        70 | remove python3-pyOpenSSL | 2017-09-27 11:06 | Erase          |    7
        69 | remove pyOpenSSL         | 2017-09-27 11:06 | Erase          |    9
        68 | install python2-urllib3  | 2017-09-27 10:57 | Install        |    2
        67 | remove python2-urllib3   | 2017-09-27 10:48 | Erase          |    2
        66 | remove python3-urllib3   | 2017-09-27 10:48 | D, E, I, O, U  |   19
        65 | update                   | 2017-09-27 10:47 | Update         |    1
        64 | install pyOpenSSL        | 2017-09-24 11:49 | Install        |    9
        63 | remove pyOpenSSL pyton3- | 2017-09-24 11:45 | Erase          |    9
        62 | install python2-urllib3  | 2017-09-23 23:57 | Install        |    2
        61 | update                   | 2017-09-23 11:22 | E, I, U        |    9
        60 | install mariadb mariadb- | 2017-09-22 19:25 | Install        |   13
        59 | update                   | 2017-09-22 09:55 | Update         |    1
        58 | install mariadb          | 2017-09-22 00:17 | Install        |    1
        57 | update                   | 2017-09-21 14:43 | Update         |    5
        56 | install python3-pyOpenSS | 2017-09-21 09:36 | Install        |    7
        55 | install dbus-x11         | 2017-09-20 21:51 | Install        |    1
        54 | install kodi             | 2017-09-20 20:16 | Install        |   22
        53 | groupinstall base-x      | 2017-09-20 20:13 | Install        |   51
        52 | install libcomps --allow | 2017-09-16 10:19 | D, E, I, U     |   23
        51 | update                   | 2017-09-15 15:56 | Update         |    3
        50 | update                   | 2017-09-14 19:29 | E, I, U        |   18
        49 | update                   | 2017-09-13 10:25 | Update         |    8
        48 | install mono-locale-extr | 2017-09-08 18:54 | Install        |    1
        47 | update                   | 2017-09-08 18:53 | Update         |   16
        46 | update                   | 2017-09-05 18:29 | E, I, O, U     |   38
        45 | install emby-server      | 2017-08-27 18:33 | Install        |   39 EE
        44 | remove mono-core         | 2017-08-27 18:32 | Erase          |   24
        43 | distro-sync              | 2017-08-27 18:25 | D, U           |    6
        42 | update                   | 2017-08-27 18:18 | E, I, U        |   15
        41 | install iotop            | 2017-08-24 01:11 | Install        |    1
        40 | update                   | 2017-08-18 21:22 | Update         |    1
        39 | update                   | 2017-08-17 10:18 | I, U           |   46
        38 | install snapraid         | 2017-08-16 12:50 | Install        |    1
        37 | install hddtemp          | 2017-08-08 23:32 | Install        |    1
        36 | update                   | 2017-08-07 10:49 | E, I, U        |   32
        35 | update                   | 2017-07-26 12:46 | E, I, U        |   28
        34 | update                   | 2017-07-19 16:10 | E, I, U        |   17
        33 | update                   | 2017-07-16 20:09 | I, U           |   13
        32 | update                   | 2017-07-15 11:12 | Update         |    9
        31 | update                   | 2017-07-13 21:45 | E, I, U        |   31
        30 | update                   | 2017-07-08 10:33 | I, U           |   13 EE
        29 | update                   | 2017-07-05 22:02 | E, I, U        |   20
        28 | install cfv              | 2017-07-02 14:56 | Install        |    1
    ...... deleted to fit 10k character limit ...............................

  10. #10
    Join Date
    Oct 2011
    Posts
    1,678

    Re: How to re-generate /etc/system-release

    Find the transaction id where `generic-release` gets installed using something like the following:
    Code:
    $ sudo dnf history list generic-release
    Then list the transaction info:
    Code:
    $ sudo dnf history info <id>
    Where <id> is an transaction ID from the first column of the previous command.

  11. #11
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    Code:
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
       130 | swap --allowerasing gene | 2017-12-27 11:57 | E, I           |    4 EE
       124 | --best --allowerasing up | 2017-12-13 14:53 | E, I, U        |    5 EE

    Code:
    [dom@Server ~]$ sudo dnf history info 130
    Transaction ID : 130
    Begin time     : Wed 27 Dec 2017 11:57:33 GMT
    Begin rpmdb    : 946:2b122393d2e2ba5b20d3db1b5d1f8ce2956b77a6
    End time       : Wed 27 Dec 2017 11:57:34 GMT (1 seconds)
    End rpmdb      : 944:120dce986ca646c026306ea2fd15dc4db44d95de
    User           : Dominic <dom>
    Return-Code    : Success
    Command Line   : swap --allowerasing generic-release fedora-release
    Transaction performed with:
        Installed     dnf-2.7.5-2.fc26.noarch    @updates
        Installed     rpm-4.13.0.2-1.fc26.x86_64 @updates
    Packages Altered:
        Erase   epel-release-7-11.noarch         @epel
        Install fedora-release-26-1.noarch       @fedora
        Erase   fedora-repos-rawhide-26-1.noarch @fedora
        Erase   generic-release-26-1.noarch      @fedora
    Scriptlet output:
       1 warning: /etc/issue created as /etc/issue.rpmnew
    This seems to be the one that caused all the issues.

    Code:
    [dom@Server ~]$ sudo dnf history info 124
    Transaction ID : 124
    Begin time     : Wed 13 Dec 2017 14:53:06 GMT
    Begin rpmdb    : 946:409c67850aca9cf5dc7257ca744ca7cc4f90b16d
    End time       : Wed 13 Dec 2017 14:53:07 GMT (1 seconds)
    End rpmdb      : 946:fc1dfb7f99e32003a9575321c35349e9f13b4f72
    User           : Dominic <dom>
    Return-Code    : Success
    Command Line   : --best --allowerasing update
    Transaction performed with:
        Installed     dnf-2.7.5-2.fc26.noarch    @updates
        Installed     rpm-4.13.0.2-1.fc26.x86_64 @updates
    Packages Altered:
        Upgraded epel-release-7-10.noarch          @epel/25
        Upgrade               7-11.noarch          @epel
        Erase    fedora-release-26-1.noarch        @fedora
        Erase    fedora-release-server-26-1.noarch @@commandline
        Install  fedora-repos-rawhide-26-1.noarch  @fedora
        Install  generic-release-26-1.noarch       @fedora
    Scriptlet output:
       1 warning: /usr/lib/os-release saved as /usr/lib/os-release.rpmsave

  12. #12
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    Code:
    [dom@Server ~]$ sudo dnf history info 124
    Transaction ID : 124
    Begin time     : Wed 13 Dec 2017 14:53:06 GMT
    Begin rpmdb    : 946:409c67850aca9cf5dc7257ca744ca7cc4f90b16d
    End time       : Wed 13 Dec 2017 14:53:07 GMT (1 seconds)
    End rpmdb      : 946:fc1dfb7f99e32003a9575321c35349e9f13b4f72
    User           : Dominic <dom>
    Return-Code    : Success
    Command Line   : --best --allowerasing update
    Transaction performed with:
        Installed     dnf-2.7.5-2.fc26.noarch    @updates
        Installed     rpm-4.13.0.2-1.fc26.x86_64 @updates
    Packages Altered:
        Upgraded epel-release-7-10.noarch          @epel/25
        Upgrade               7-11.noarch          @epel
        Erase    fedora-release-26-1.noarch        @fedora
        Erase    fedora-release-server-26-1.noarch @@commandline
        Install  fedora-repos-rawhide-26-1.noarch  @fedora
        Install  generic-release-26-1.noarch       @fedora
    Scriptlet output:
       1 warning: /usr/lib/os-release saved as /usr/lib/os-release.rpmsave

  13. #13
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    16

    Re: How to re-generate /etc/system-release

    [dom@Server ~]$ sudo dnf history info 124
    Transaction ID : 124
    Begin time : Wed 13 Dec 2017 14:53:06 GMT
    Begin rpmdb : 946:409c67850aca9cf5dc7257ca744ca7cc4f90b16d
    End time : Wed 13 Dec 2017 14:53:07 GMT (1 seconds)
    End rpmdb : 946:fc1dfb7f99e32003a9575321c35349e9f13b4f72
    User : Dominic <dom>
    Return-Code : Success
    Command Line : --best --allowerasing update
    Transaction performed with:
    Installed dnf-2.7.5-2.fc26.noarch @updates
    Installed rpm-4.13.0.2-1.fc26.x86_64 @updates
    Packages Altered:
    Upgraded epel-release-7-10.noarch @epel/25
    Upgrade 7-11.noarch @epel
    Erase fedora-release-26-1.noarch @fedora
    Erase fedora-release-server-26-1.noarch @@commandline
    Install fedora-repos-rawhide-26-1.noarch @fedora
    Install generic-release-26-1.noarch @fedora
    Scriptlet output:
    1 warning: /usr/lib/os-release saved as /usr/lib/os-release.rpmsave

  14. #14
    Join Date
    Oct 2011
    Posts
    1,678

    Re: How to re-generate /etc/system-release

    Hmm, I guess we'll never find out the culprit. What did require you to use`--best --allowerasing` options to update the system. I see you've installed `fedora-release` package. Are you still having problems booting your machine?

Similar Threads

  1. Replies: 7
    Last Post: 6th November 2010, 10:19 PM
  2. Replies: 7
    Last Post: 21st July 2009, 03:59 AM
  3. Upgrading from pre-release (alpha, beta, snapshot, preview etc) to the final release
    By RahulSundaram in forum Alpha, Beta & Snapshots Discussions (Fedora 11 Only)
    Replies: 4
    Last Post: 23rd April 2009, 01:33 PM
  4. generate anaconda-ks.cfg from a running system?
    By gatrhead in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 16th March 2007, 04:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •