FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 25
  1. #1
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Grub2-mkconfig problem

    Last week, on my computer, grub2-mkconfig was working correctly, it would detect and create a grub.cfg that included /dev/sdc (my Fedora KDE version) and /dev/sde, my default Gnome version. Note: /dev/sde is my SSD, so I want to create grub.cfg from it.

    However, the past few days, from my SSD (/dev/sde drive), when I execute
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg it only includes itself, the Gnome system installed on /dev/sde.

    Any way to trace what is happening.

    As a work around, in the bios I could change the boot drive to /dev/sdc and use that grub.cfg. It includes the /dev/sde. Further, I could tell grub to use the SDE entry.

    Any ideas about running a trace or ideas about what to look for? The same verson of kernel is on both installations.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  2. #2
    Join Date
    Nov 2017
    Location
    Havant
    Posts
    100

    Re: Grub2-mkconfig problem

    Try mounting the other root partitions (use nautilus or any other file-manager) before running the grub command.
    https://src.fedoraproject.org/user/leigh123linux
    https://github.com/leigh123linux
    https://admin.rpmfusion.org/pkgdb/packager/leigh123linux/

  3. #3
    Join Date
    Nov 2008
    Posts
    346

    Re: Grub2-mkconfig problem

    Did some upgrade change the setting for GRUB_DISABLE_OS_PROBER?

  4. #4
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    I looked at 30_* in /etc/grub.d, and added an echo of the GRUB_DISABLE_OPROBER* to /tmp/prober. Value is "",
    GRUB_DISABLE_OS_PROBER is not changed. Also which os-osprober shows /usr/bin

    I will run diff against two /etc/grub.d (KDE one that works, vs Gnome one that stopped working).
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  5. #5
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    How do I phrase my finding below to report a Grub bug?
    I have 5 disks on my desktop system. Ignore for now /dev/sda, /dev/sdb (data disks)
    At one time, I had various F27 betas on my system For example:
    Fedora27betaKDE on /dev/sdc,
    Fedora27betaTestGnome on /dev/sdd and
    Fedora27betaGnome on SDE.

    With Go live, to have clean systems, I re-installed Fedora as follows:
    Fedora27KDE on /dev/sdc,
    New empty clean GPT/2 partitioned disk on /dev/sdd with 2 ext4 partitions defined.
    Fedora27Gnome on /dev/sde

    I then created this issue, because the KDE system was not showing up on my Fedora27GnomeSDE' grub boot menu.
    but from SDC's boot menu, it showed SDC's KDE and SDE's Gnome.

    In attempt to discover if the problem was due to SDC's setup or SDE's setup, I installed a F27Gnome on the spare SDD (the empty disk is in-between).
    Surprise.
    The SDE's grub menu now shows the missing SDC's KDE, the newly installed SDD(Gnome) and itself in the boot menu. (all three systems).

    How do I write this up for Grubs support?
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  6. #6
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    447

    Re: Grub2-mkconfig problem

    my $0.02

    since the creation of I guess HAL and UDEV , the /dev/sdN have become rather obsolete, as they constantly change based on udev's "will". So, we have entered into the age of the partition=UUID=nnnnnnnnnnnnnnn ,
    and maybe this should be the way you address these devices instead of /dev/sdN

    however, since I use grub2-mkconfig once every blue moon, mainly to get my laptops to suspend / hibernate properly, for which I was semi-forced to use the resume=UUID=nnnnnnnnnnnn in the grub.cfg, I am no expert

    however, I suggest you look into it.
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

  7. #7
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    Hi Bob

    Here is the fstab from /dev/sde

    Code:
    #
    # /etc/fstab
    # Created by anaconda on Tue Nov 28 20:47:31 2017
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    #<file system>                             <mount>    <type>   <options>         <dmp fsck> <xref>       <label>
    UUID=58d670b9-6ac4-4069-87b5-ab060056f1c8  /          xfs      defaults,noatime    0  0     #/dev/sde4  sde4Slash
    UUID=c46affc9-618d-43c3-bd8f-92b47ecc529c  /backup    xfs      defaults,noatime    0  0     #/dev/sdb1  sdb1backup
    UUID=9156b44c-c22c-44f0-8974-a41cb15e8776  /boot      ext4     defaults,noatime    1  2     #/dev/sde3  sde3Boot
    UUID=75004a31-0342-4355-9e2c-b154a5bf5fe6  /home      xfs      defaults,noatime    0  0     #/dev/sde6  sde6home
    UUID=16ec4d08-cc8a-410e-8150-b26e9552dee9  /scratch   xfs      defaults,noatime    0  0     #/dev/sdb2  sdb2Scratch
    UUID=0e0554c5-403e-49d4-8b23-8ab6c8e5cfad  swap       swap     defaults,noatime    0  0     #/dev/sde5  sde5Swap
    FYI, I analyze the /etc/fstab and build the cross reference. I can cross reference LABEL=... UUID==,
    /dev/sdx ... Tempdisk.
    That program is available for free for the asking. I wrote it as a convenience to myself. It cannot write to /etc/fstab or overwrite it's own input. I've been using it since Fedora 23.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  8. #8
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Grub2-mkconfig problem

    Out of the blue, my 4 Fedora distributions (4 separate disks) are each not picking up the other 3 Fedora installations. I am using xfs for two distributions and ext4 for the other two.

    In other words, where a grub2-mkconfig would list the alternates Fedora distributions, not one of the grub.cfg had other than it's own boot information.

    A few messages went zooming past me during the boot process for one of installed messages, about a disk integrity check. Is it being run because the normal Fedora termination did not occur? Running fdisk on the / partition of that other installation fixed the problem with that partition and distribution.
    Retrying grub2-mkconfig after the fdisk fixup now included that distribution in the /boot/grub2/grub.cfg.

    Since fdisk on root worked for that distribution, I switched to the next one that did not show up. When I tried to run fdisk on it, it failed, even though I could boot that distribution by using the bios to select it. I checked and noted that the file system was xfs. Is it possible that a fdisk on xfs is not as able to fix up many the file system problems, even if all the files are readable? Is the only strong repair action to be a backup and a restore?

    I did the next best thing. I backed up the xfs partition, reformatted it as ext4. Running grub2-mkconfig was successful. By the way reformatting a partition changes the UUID. One has to fix up /etc/fstab.

    My thoughts are these, If a system is shutdown before any root(/) partition is marked as clean, grub will not access that partition, even though grub will not be writing to it. fdisk is not assured to work as well as it does for ext4 than for xfs file systems.
    Last edited by lsatenstein; 6th December 2017 at 04:03 AM.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  9. #9
    Join Date
    Nov 2016
    Location
    Germany
    Posts
    16

    Re: Grub2-mkconfig problem

    Hi,

    if writing about grub, you should always mention if your system is MBR or UEFI boot, if it has GPT partition tables or not.

    You can invoke
    Code:
    # os-prober
    to check if the partitions are recognized.

    You should also reinstall grub
    Code:
    # grub2-install /dev/sdX
    to see any error messages, followed by
    Code:
    # grub2-mkconfig -o ...
    I don't agree with your guesses about xfs. If a filesystem is shutdown uncleanly, it will be cleaned automatically with next remount, or else there would be an error message.
    The tool for xfs repairs I use is
    Code:
    # xfs_repair <partition name>
    or check only
    Code:
    # xfs_repair -n <partition name>
    Best regards,
    Bequimão

  10. #10
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,399

    Re: Grub2-mkconfig problem

    duplicate thread merged

  11. #11
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    Antikythera, thanks for the merge. Sometimes when I search for my previous entry, it fails.

    Hi Bequimao,

    I invoked xfs_repair via gparted, and it setup that command line. But step two of the repair crashed, and not able to complete. I tried the xfs_repair with several other options. It was not successful.

    A backup/format/restore worked just fine.

    Topic change: I am sure that the IBM VSAM (1982) file system served as a model for the xfs file system.

    The VSAM file system was organized as Access Groups (intervals), and worked as a B+tree. It also used disk rotational positional sensing (RPS) and disk access arm location" to perform out of order shortest I/O time to read/write a group of sectors.
    Last edited by lsatenstein; 7th December 2017 at 04:08 AM.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  12. #12
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,399

    Re: Grub2-mkconfig problem

    to save searching, subscribe to threads. the option is in the Thread Tools drop down menu at the top of the thread pages then use the View all subscribed threads tool on your profile page. it's in the format of a topic list, but you can create sub-folders if you wish as well.

  13. #13
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    548

    Re: Grub2-mkconfig problem

    If you issue "os-prober" from a terminal as root, do you get a complete listing of all your installed os's? ( should show all other than your currently booted OS )
    Last edited by Kobuck; 7th December 2017 at 04:38 AM.
    Laptop: ASUS K61IC/ Intel T6600 2.20Ghz x2/ 4GB/ 320GB SataII/ NVidia G96M/ fc27.x86_64
    Tower: GigaByte (990FXA)/ AMD 1100T 3.3Ghz x6/ 16GB/ 7.5TB Sata III/ AMD 6770HD/ fc27.x86_64
    Bookshelf: Shuttle DS61 (H61)/ i3-3225 3.3Ghz x2/ 16GB/ 320GB Sata II/ Intel HD 4000/ fc26.x86_64
    Embedded: BeagleBone Blk / ARM AM3358 1 GHz x1/ 512MB/ 2GB eMMC/ PowerVR SGX530/ fc27.armv7hl

  14. #14
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    Hi Kobuck

    After detecting the problems I ran os-prober to try to understand what was happening. Initially, os-prober was telling me the / of the other faulty systems was write protected????. Why should that matter, as I only read from them. As I wrote, in an earlier response, xfs_repair fixed one problem, but not the other. A backup/restore corrected the second problem.

    All is well that ends well.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  15. #15
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,606

    Re: Grub2-mkconfig problem

    If an OS did not shut down properly, then root (/ on ext4) is deemed to not be clean. os-prober will skip over that OS.
    I proved it by doing a fdisk check/recovery over the skipped OS, and immediately thereafter, os-prober recognized it.
    For the second OS with root (/ on xfs), the xfs_repair was not able to do it's thing. retesting with os-prober failed.
    A backup, reformat partition and restore corrected the problem.

    Summary. The file system has to be clean before os-prober will work on it. It will always work on the OS from which it was initiated.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Page 1 of 2 1 2 LastLast

Similar Threads

  1. grub2-mkconfig not completing.
    By lsatenstein in forum F27 Development Forum
    Replies: 1
    Last Post: 13th November 2017, 08:36 AM
  2. [SOLVED] grub2-mkconfig problem
    By lsatenstein in forum Using Fedora
    Replies: 8
    Last Post: 31st July 2017, 03:54 AM
  3. grub2-mkconfig error
    By Pedroski in forum Using Fedora
    Replies: 2
    Last Post: 19th March 2014, 12:39 AM
  4. Why do I have to manually run grub2-mkconfig
    By hmaarrfk in forum Using Fedora
    Replies: 5
    Last Post: 11th February 2013, 08:32 AM
  5. Replies: 0
    Last Post: 27th January 2013, 09:34 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
  •