• Re: Stuck at grub rescue after upgrade

    From Patok@crazy.div.patok@gmail.com to alt.os.linux.ubuntu on Thu May 6 22:18:47 2021
    From Newsgroup: alt.os.linux.ubuntu

    Jonathan N. Little wrote:

    Live Session:

    sudo mount /dev/sda1 /mnt

    sudo grub-install --boot-directory=/mnt/boot /dev/sda
    |
    # note: no partition number-------------------------+

    Do you think this method will fix my issue?

    Issue: error: symbol 'grub_file_filters' not found.

    Setup: This is system with a HDD and a SSD. The HDD was booting 18.04. I added the SSD and did a TimeShift restore of the HDD to the SSD. Then I changed the boot order and the SSD booted 18.04. /Then/ I did an upgrade to 20.04 while booted from the SSD. Everything went well (apparently) until it rebooted, when grub dumped me in the rescue screen with above message. When I changed the boot
    order to HDD, then it booted fine and into 20.04 (it can boot into 18.04 too if
    I decide). So it kinda works and loads 20.04 from the SSD, only it uses grub on
    the HDD. This is ridiculous.

    Will reinstalling grub when booted into 20.04 fix it? Wasn't the upgrade supposed to do just that?

    I found an utility boot-repair, but it didn't notice anything wrong and its repair action would have been to reinstall the grub of the SSD into the other drive. Yeah, right. When using its log function to list the current boot configurations, the only untoward thing I noticed was that on the HDD it had:

    => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    for /boot/grub. It also embeds following components:

    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_msdos biosdisk search_fs_uuid
    ---------------------------------------------------------------------------

    config script
    ---------------------------------------------------------------------------
    search.fs_uuid e7a26435-5f92-469a-8ea6-918adc64f6a3 root hd1,msdos5
    set prefix=($root)'/boot/grub'

    while on the SSD it is significantly different:

    => Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    for (,msdos5)/boot/grub. It also embeds following components:

    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_msdos biosdisk
    ---------------------------------------------------------------------------


    As you can see, on the SSD search_fs_uuid is missing and it seems there's no config script? (the uuid xxx6fa3 is the SSD).

    --
    You'd be crazy to e-mail me with the crazy. But leave the div alone.
    *
    Whoever bans a book, shall be banished. Whoever burns a book, shall burn.
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Paul@nospam@needed.invalid to alt.os.linux.ubuntu on Thu May 6 16:21:41 2021
    From Newsgroup: alt.os.linux.ubuntu

    Patok wrote:
    Jonathan N. Little wrote:

    Live Session:

    sudo mount /dev/sda1 /mnt

    sudo grub-install --boot-directory=/mnt/boot /dev/sda
    |
    # note: no partition number-------------------------+

    Do you think this method will fix my issue?

    Issue: error: symbol 'grub_file_filters' not found.

    This indicates some changes were made to the
    GRUB design, when the latest distro came out.

    Reinstalling GRUB, should freshen the GRUB file set
    that did not get fixed during the Upgrade.

    You can chroot in and fix it. Boot with a 20.04 USB stick.

    https://askubuntu.com/questions/1183951/grub-file-filters-not-found-after-ubuntu-19-10-upgrade

    *******

    Best practice, is not to have too many hard drives in the
    computer, when repairing GRUB the first time. This avoids
    the problem of using /dev/sda instead of /dev/sdb and vice
    versa. With only one hard drive present "you can't miss".

    You can update-grub later and rebuild a more complicated
    boot menu if you want. But during grub-install, it pays to
    keep things simple.

    Paul
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Jonathan N. Little@lws4art@gmail.com to alt.os.linux.ubuntu on Thu May 6 16:37:27 2021
    From Newsgroup: alt.os.linux.ubuntu

    Patok wrote:
    Jonathan N. Little wrote:

    Live Session:

    sudo mount /dev/sda1 /mnt

    sudo grub-install --boot-directory=/mnt/boot /dev/sda
                                                        |
    # note: no partition number-------------------------+

    Do you think this method will fix my issue?

    Issue: error: symbol 'grub_file_filters' not found.

    Setup: This is system with a HDD and a SSD. The HDD was booting 18.04. I added the SSD and did a TimeShift restore of the HDD to the SSD. Then I changed the boot order and the SSD booted 18.04. /Then/ I did an upgrade
    to 20.04 while booted from the SSD. Everything went well (apparently)
    until it rebooted, when grub dumped me in the rescue screen with above message. When I changed the boot order to HDD, then it booted fine and
    into 20.04 (it can boot into 18.04 too if I decide). So it kinda works
    and loads 20.04 from the SSD, only it uses grub on the HDD. This is ridiculous.

    Will reinstalling grub when booted into 20.04 fix it? Wasn't the upgrade supposed to do just that?

    I found an utility boot-repair, but it didn't notice anything wrong and
    its repair action would have been to reinstall the grub of the SSD into
    the other drive. Yeah, right. When using its log function to list the
    current boot configurations, the only untoward thing I noticed was that
    on the HDD it had:

    Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at
    sector 1 of
        the same hard drive for core.img. core.img is at this location and looks
        for /boot/grub. It also embeds following components:

        modules
        ---------------------------------------------------------------------------     fshelp ext2 part_msdos biosdisk search_fs_uuid
        ---------------------------------------------------------------------------

        config script
        ---------------------------------------------------------------------------     search.fs_uuid e7a26435-5f92-469a-8ea6-918adc64f6a3 root hd1,msdos5     set prefix=($root)'/boot/grub'

    while on the SSD it is significantly different:

    Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at
    sector 1 of
        the same hard drive for core.img. core.img is at this location and looks
        for (,msdos5)/boot/grub. It also embeds following components:

        modules
        ---------------------------------------------------------------------------     fshelp ext2 part_msdos biosdisk
        ---------------------------------------------------------------------------


    As you can see, on the SSD search_fs_uuid is missing and it seems
    there's no config script? (the uuid xxx6fa3 is the SSD).

    Okay first and foremost you need to determine what partitions are on
    which drive...you have have grub installed on more than one drive
    confusing you.

    I would advise boot with a live session thumbdrive and use gparted
    command lsblk and fdisk to list all drives, partitions, and filesystems.
    Here is a sample of one of my systems with an ssd and a std hard drive.
    I am filtering out snap virtual partitions...

    lsblk -ip | grep -v loop
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    /dev/sda 8:0 0 111.8G 0 disk
    `-/dev/sda1 8:1 0 111.8G 0 part /
    /dev/sdb 8:16 0 372.6G 0 disk
    |-/dev/sdb1 8:17 0 71.3G 0 part /mnt/reserve
    |-/dev/sdb2 8:18 0 1K 0 part
    |-/dev/sdb5 8:21 0 291.1G 0 part /home
    `-/dev/sdb6 8:22 0 10.3G 0 part [SWAP]
    /dev/sr0 11:0 1 1024M 0 rom

    In this setup "/" is on sda1, I do not use a separate /boot partition so
    I install grub of the drive where /boot is locate, not the partition but
    the MBR, i.e. / is on /dev/sda1 so I install grub to /dev/sda <=no # and
    the grub files will install to /dev/sda1 under /boot



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    --- Synchronet 3.18a-Linux NewsLink 1.113