Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: Development of the [Boot-Repair] and [Boot-Info] utilities

  1. #21
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Quote Originally Posted by YannBuntu View Post
    Thx MAF for your feedback. wow, that's challenging configs!

    1st case: l.11 bootinfoscript doesn't list the partitions
    l.15 partition missing
    l.26 output of df -Th / is empty !! how can this be?
    l.400: errors code 32 , shouldn't try to mount these.

    2nd case:
    l20: bootinfoscript doesn't list the LVM volumes
    l66: the ESP is not recognized correctly, with the consequence you mention on the suggested repair.

    You gave me work for several weeks
    On 1st Case, Line 26, compare that with it's system-info report, under the heading "---------- File system specs from 'df -h':"

    Would it help if I share an early-version mount/chroot script I have in the Ama-Gi Project for ZFS file manager systems? I identify ZFS from the results from fdisk where both "Solaris_root" and "Solaris_boot" types exist... As you can see in it's system-info report under the heading "---------- Disk/Partition Information From 'fdisk':".

    This was early work, that I haven't gotten back to yet, but should give you some ideas:
    Code:
    #!/bin/bash
    # MAFoElffen <mafoelffen@ubuntu.com> 2021.08.18
    # This should work for a LiveCD that has a read-only filesystem
    # This will only work if we have already confirmed that Solaris_root and Solaris_boot exists.
    #
    #########################################################################
    #  Copyright (c) 2012, 2021
    #
    #  GNU General Public Llicense (GPL-3.0-or-later)
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    #
    
    echo "This LiveCD already has OpenSSH Server installed, With a default user and password. 
        Reminder: Use the \"ubuntu\" user and the \"ubuntu\" as password."
    
    # View and display IP Adresss
    ip addr show scope global  | grep -E 'inet ' | grep -v br0
    echo "You can use the address shown above to ssh remotely into this machine"
    pause = input -p "Press any key to continue..."
    
    echo "Configuring Temporary ZFS Environment"
    echo "Becoming root"
    sudo -i
    
    echo "Installing ZFS in the Live CD environment"
    apt-add-repository universe
    echo "Ignore any errors on the following, about moving an old database out of the way..."
    apt update
    apt install --yes debootstrap gdisk zfs-initramfs
    
    # Check if it has existing datasets or "no datasets available" 
    test1 = zpool lists | grep -q 'no datasets'    # If output, then export
    test2 = zfs list | grep -q 'no datasets'       # If output, then export
    if [ $test1 ]; then
        echo "Existing Datasets found. Exporting rpool."
        zpool export rpool
        elfi [ $test2 ]; then
            echo "Existing Datasets found. Exporting rpool."
            zpool export rpool
        else
            echo "No existing Datasets found."
    fi
        
    # Chroot into ZFS pool. Import pool to non-default location. The -N flag means 'don’t automatically mount' and is necessary,
    #     otherwise the rpool root, and the rpool/root/UBUNTU pool, will both try to mount on /mnt.
    echo "Importing the Pools"
    zpool import -N -R /mnt rpool
    
    echo "Mounting the root system"
    zfs mount rpool/ROOT/ubuntu
    
    echo "Mounting the remaining file systems"
    zfs mount -a
    
    # Bind the virtual filesystems from the LiveCD environment to the new system and chroot into it:
    echo "Mounting the virtual filesystems"
    mount --rbind /dev  /mnt/dev
    mount --rbind /proc /mnt/proc
    mount --rbind /sys  /mnt/sys
    echo "chrooting into the mounted system"
    chroot /mnt /bin/bash --login
    
    # After exiting chroot, shutdown ZFS filesystems cleanly, unmount all ZFS pools, unmount all mounts and reboot
    zfs umount rpool/ROOT/ubuntu
    zpool export rpool
    umount /mnt
    reboot
    Last edited by MAFoElffen; 2 Days Ago at 09:51 AM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  2. #22
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    @ everybody,

    Please describe a couple of typical corruptions (that happen to end users), where Boot-Repair should work, and I can create such corruptions (and variations around them) and test if I can make Boot-Repair see them and make Boot-Repair fix them.

  3. #23
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    I think where I see most of the problem with boot-info and boot-repair is when the system has multiple operating systems and multiple disks.

    I think some of the common issues "lately", don't specifically have to do with Ubuntu or Linux... But that in conjunction "with" the installation of Ubuntu or other Linux, that Windows 10 or Windows 11 is installed... of those, that splits off to where Windows does not want to boot, or where Windows wants to be the only booted... Some of these occur when there is a Windows Update...

    Next is where there are multiple versions of a Linux Distribution, where those distributions both/all use Grub... So there are multiple versions of Grub installed. Most of the time for those, the challenge is trying to figure out which of the OS'es installations was installed last, and has taken over being the primary boot of Grub. Because that one it the one that will update the Grub Boot Menu, in that case, if there are special boot parameters needed for the Other OS, then we usually recommend (as oldfred mentioned) that it be split off in the menu as a 40_ Custom menu item so those boot parameters are honored. A lot of those sometimes get hosed when there is an update of one or the other.

    I think next is where, there was in the past, one of the disks was MBR/CSM, then later moved to another computer as GPT/UEFI.... Then it shows a leftover MBR record that is still there, but booting off of EFI, and sometimes gets confused on what to recommend to solve...

    There are more... But those are the ones that stand out in my memory, off the top of my head... oldfred probably can relate many more to add to that list...

    And Yann probably has a lot e has in mind, from users emaillng the boot-info support email address, right?
    Last edited by MAFoElffen; 2 Days Ago at 08:54 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  4. #24
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Thanks MAFoElffen

  5. #25
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    I see this a lot:
    Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
    In beginning I was not sure what it was. I believe it is how many USB flash drives are written, so not really an issue.
    Recent example From this pastebin before it expires.
    https://ubuntuforums.org/showthread.php?t=2470854
    https://paste.ubuntu.com/p/7MhrSH2xtB/

    Above also has this, but user has 20.04 :
    Warning: this will install necessary packages from Ubuntu-22.04 repositories. Please backup your data before this operation.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #26
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Quote Originally Posted by oldfred View Post

    Above also has this, but user has 20.04 :
    Warning: this will install necessary packages from Ubuntu-22.04 repositories. Please backup your data before this operation.
    ???
    Code:
    User settings: _________________________________________________________________
    
    Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
    Warning: this will install necessary packages from Ubuntu-22.04 repositories. Please backup your data before this operation.
    The settings chosen by the user will reinstall the grub-efi-amd64-signed of
    sda2,
    using the following options:        sda1/boot/efi,
    Additional repair will be performed: unhide-bootmenu-10s  use-standard-efi-file
    
    
    /boot/efi added in sda2/fstab
    Mount sda1 on /mnt/boot-sav/sda2/boot/efi
    
    Unhide GRUB boot menu in sda2/etc/default/grub
    I have a bunch of test machines on 22.04... And I am trying to get the Ama-Gi Project LiveCD ready for it... But why would it say that on a 20.04 machine? That "is" just... "odd".

    I did find this on the first "Warning" message, which like oldfred said, is about the USB thumb drive used to boot the machine:
    https://bugs.launchpad.net/ubuntu/+s...r/+bug/1708881
    To fix that (is located in #2) wipes out whatever is there, but fixes the erroneous descriptor on the thumb drive...

    The fix for the thumb drive is:
    Code:
    sudo wipefs --all /dev/sdX
    Which would wipe out all data on that thumb drive... Is the second "warning" message also related to a fix of that thumb drive? (Which is not related to a fix of the installed system it is trying to diagnose...) I can see where that would confuse, worry and scare the User...

    EDIT:
    I think and feel, that maybe what the system is booted "from" should be ID'ed and isolated in the report of problems... It can still be reported, but I think that if it is ID'ed as being "from where," that it reflects higher on the script to ID that that as a sideline issue. I think that would reflect higher confidence in the script, to point that out as such. So that if there is a problem with the boot media, that it doesn't confuse the User and any Helpers, that it is related to the installed system's problems. That would be more clear and give the User more confidence in what is going on, and in the recommendations being made... Instead of something that might be confused is a sideline issue with the diagnostic tool itself. This has nothing to do with the boot-info script or the Boot-Repair ISO, but rather in some media creation tools that the User used to create the bootable media.

    Note: Even if the ID of the booted media was a one-liner saying something like: "The system was temporarily booted from USB Media identified as /dev/sdX." and using that to isolate that in later recommendations(?)

    Just an idea...
    Last edited by MAFoElffen; 1 Day Ago at 10:39 PM. Reason: To include message that is on a timed expiry pastebin.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  7. #27
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Okay... I have a live test, with a User... boot-info results are on this post:
    https://ubuntuforums.org/showthread....3#post14075663

    Is UEFI. It keeps booting an old kernel. update-grub does not change the booted Grub Menu... Has both the files menu.lst and grub.cfg within /boot/grub/. I was thinking that maybe it had both Grub and Grub2 installed and that is was confused... The repsence of one or the other file used to be how to identify Grub or Grub2, right? It prints out the menu.lst file in the boot-info report... It was installed as Server 18.04 and release-upgraded to 20.04.

    I thought this was odd and definitive, but... When I was looking at that Arm64 Server that I posted a few posts back. It was also installed as Server 18.04, and was release-upgraded to 20.04. It also has both files menu.lst and grub.cfg in /boot/grub/... But it is working fine. And in the boot-info report I posted for it, it did not include the menu.lst file in that report(?) Hmmm.
    Last edited by MAFoElffen; 16 Hours Ago at 01:04 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  8. #28
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Can I ask a dumb question? Where do we find the alpha versions of the updated tools? Is there a link that I missed?

    Quote Originally Posted by oldfred View Post
    I really wish MBR would go away.
    Me too. The last time I installed 20.04 with LVM, it still was using MBR by default, not GPT, so we need to get the Ubuntu installers to stop pushing MBR partition tables. The parted -lm from that system.
    Code:
    BYT;
    /dev/vda:32.2GB:virtblk:512:512:msdos:Virtio Block Device:;
    1:1049kB:538MB:537MB:fat32::boot;
    2:539MB:32.2GB:31.7GB:::;
    5:539MB:32.2GB:31.7GB:::lvm;
    I do recall an install after that time, 21.04 perhaps, that used GPT. I cried tears of joy when I saw it. I was soooooo happy.
    I have a number of older systems - new is an enemy to me and my data. Happy to run boot-info on them all.

  9. #29
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Development of the [Boot-Repair] and [Boot-Info] utilities

    Quote Originally Posted by TheFu View Post
    Can I ask a dumb question? Where do we find the alpha versions of the updated tools? Is there a link that I missed?
    Through the instructions pointing to the PPA here:
    https://help.ubuntu.com/community/Boot-Info

    Which points to Yann's PPA:
    https://launchpad.net/~yannubuntu/+a...tu/boot-repair

    Which is what we are testing, and where Yann is making the changes to...

    -------------------------------------------------------------------------------------------------
    I am still finding that a lot on CSM systems. It's almost like install scripts (Both Linux and Windows) assume that if not booted EFI, then people should use MBR. I have a disk here now, that I have to get around to converting for someone... I've tried to use GPT exclusively for my own for almost 12 years now... I still get caught sometimes, forgetting or assuming.
    Last edited by MAFoElffen; 6 Hours Ago at 11:34 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

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