Results 1 to 6 of 6

Thread: Grub corrupted on shutdown

  1. #1
    Join Date
    Mar 2021
    Beans
    4

    Unhappy Grub corrupted on shutdown

    Ubuntu 20.04 crashed badly and then grub booted on a minimal text interface. I likely can boot Windows partition changing the bios startup sequence (yes, I've two disks for any OS) but I can't get Ubuntu partition back. It happened as I was cleaning the system with Bleachbit (never more!) … maybe a screen saver while cleaner processing caused the system freeze in the wrong moment.
    Using a live usb I made a file system check on every partition (sdb1 and sdb5) and got an undamaged system partitions feedback message.

    I also run Grub Repair tool but I had things getting worst, because I had two error message: the first is about partition mapper/vgubuntu-root (Ubuntu 20.04.2 LTS) quite full, but there’s no way to solve the issue deleting files for having more space (I always get recursive message about “at least 128 Mega needed”, and seemed to me that such location is aleatory), so I ignored it, went to the next step and got second error message:
    “Please enable a repository containing the [grub-efi-amd64-signed] packages in the software sources of Ubuntu 20.04.2 LTS (mapper/vgubuntu-root)”
    I found a patch to this issue (never been able to google it again on further attempts, so I can't link it just now) and to go ahead until the “Boot successfully repaired” message.


    But since I write here down the subsequent link generated by Grub Repair :

    http://paste.ubuntu.com/p/pvQCYbjdXw/

    it has not been that successful!

    I also tried with Grub Customizer but I have the message
    “grub-mkconfig wrong execution
    /usr/sbin/grub-probe:error:failed to get canonical path of /-cow”
    https://askubuntu.com/questions/2544...al-path-of-cow

    I chased this “cow” around its path for a couple of hours also trying to setting up a chroot environment
    but no way.

    I also post here some mount attempts over sdb partition the SSD Ubuntu is installed on

    Code:
    ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt
    
    mount: /mnt: /dev/sdb1 already mounted on /mnt.
    ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt/boot/efi
    mount: /mnt/boot/efi: mount point does not exist.
    ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt/efi
    ubuntu@ubuntu:~$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    mount: /mnt/dev: mount point does not exist.
    mount: /mnt/dev/pts: mount point does not exist.
    mount: /mnt/proc: mount point does not exist.
    mount: /mnt/sys: mount point does not exist.
    mount: /mnt/run: mount point does not exist.
    ubuntu@ubuntu:~$ sudo mount /dev/sdb5 /mnt
    mount: /mnt: unknown filesystem type 'LVM2_member'.
    Thanks in advance for any help (my Ubuntu optimized installation, the upgrades, add-ons, selected software is still there)

  2. #2
    tea for one is offline Chocolate-Covered Ubuntu Beans
    Join Date
    May 2008
    Beans
    1,405
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Grub corrupted on shutdown

    Zero replies after one day does not bode well.

    A system freeze/crash while using bleachbit is undoubtedly impossible to diagnose because there are too many files in an unknown variable state
    On top of that, add in LVM and I would doubt if any user has experience of this combination.

    Include me in the above.

    Nevertheless, onwards and upwards.

    Boot repair line 170 – 1 OS detected Windows 8 or 10 on sda5
    It would be impossible for boot-repair to re-install grub to an undetected Ubuntu OS

    However, you mentioned that sdb1 to sdb5 are undamaged.
    The file system may be OK but there still could be missing files which prevent booting.

    Do you have back-ups of both your Windows data and Ubuntu data?
    If not, please create back-ups.

    I imagine that trying to boot from UEFI one-time boot menu does not work due to missing grub?

    It appears that you tried to add grub via a live session but I think that you did not run the commands correctly:-

    According to boot-repair lines 349 -353
    sdb5 is your Ubuntu system partition
    sdb1 is your Ubuntu EFI partition
    sdb is your Ubuntu disk

    Perhaps, try again in a live session:-
    Code:
    sudo mount /dev/sdb5 /mnt
    sudo mount /dev/sdb1 /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    sudo chroot /mnt
    grub-install /dev/sdb
    update-grub
    It may work, it may not – fingers crossed.

  3. #3
    Join Date
    Mar 2021
    Beans
    4

    Re: Grub corrupted on shutdown

    This is what I got by placing the suggested commands; suddenly the first one returns no mount point for lvm partition
    sudo mount /dev/sdb5 /mnt
    mount: /mnt: unknown filesystem type 'LVM2_member'.
    seems that lvm does not follow the traditional mount rules (of e.g. fat 32 or ext4). I do not know if it makes sense but gparted describes lvm partition as "activated - deactivated" instead of mounted ... maybe the "mount" command shold be replaced with another one? Anyway I was able to "activate" the partition via gparted (by the way, what is LVM2_"member"?).

    So I went to subsequent command, attempting to mount the boot F32 partition efi, (sdb1) I have the result:

    sudo mount /dev/sdb1 /mnt/boot/efi
    mount: /mnt/boot/efi: mount point does not exist.
    Only if I omit the boot/efi parameters I can mount sdb1 partition

    sudo mount /dev/sdb1 /mnt/
    ubuntu@ubuntu:~$
    moving on the sequent command
    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    I have:

    mount: /mnt/dev: mount point does not exist.
    mount: /mnt/dev/pts: mount point does not exist.
    mount: /mnt/proc: mount point does not exist.
    mount: /mnt/sys: mount point does not exist.
    mount: /mnt/run: mount point does not exist.
    then,
    sudo chroot /mnt
    gives back:
    chroot: failed to run command ‘/bin/bash’: No such file or directory
    and
    grub-install /dev/sdb
    gives:
    installazione per la piattaforma x86_64-efi.
    grub-install: errore: impossibile trovare la directory EFI.
    (I guess italian here is quite understandeable, anyway: "install for x86_64-efi board / grub-install: error: impossible to find the directory EFI.")

    finally with:

    sudo update-grub
    the result is:
    /usr/sbin/grub-probe: errore: recupero del percorso canonico di "/cow" non riuscito
    (I am back to the canonical path for "/cow" error)

    All these command have been placed running a live.
    I can add that I had two crashes, from the first one I still was able to launch ubuntu with grub option for recovery mode. But then I made an attempt with Grub Repair and I had a worst result: the bootloader was quite wiped down to the minimal grub command line from which I'm only able to reboot

    Seems the repair attempts do not find efi partition and I suspect it is only on sda disk, which hosts windows OS, the one I'd prefer to do not touch in any way (during the many attempts after a reboot I also got a Windows Restore screen alert).

    Surely I need more finger to cross

  4. #4
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,912

    Re: Grub corrupted on shutdown

    A small bit of help:

    Your Ubuntu is an LVM installation.

    You can't mount a disk partition that's used for LVM (like sdb5). There is no traditional file system. Instead, if you want to mount Ubuntu's root file system, you mount the logical volume it's installed on:

    Code:
    sudo mount /dev/vgubuntu/root /mnt/tmp
    would mount Ubuntu's root file system at /mnt/tmp (if that directory has been created).

    Then you can do whatever chroot procedures you have in mind.

  5. #5
    Join Date
    Mar 2021
    Beans
    4

    Question Re: Grub corrupted on shutdown

    I went very close now ... at first the command Dennis give to me won't work but in some way I could mount combining Denni's instructions with mount instances of "Disk" application in Ubuntu (do not ask the sequence ...) seems me to remember I first mounted the sdb partitions using "Disk" GUI and THEN the above command get working. So I had the Zero's commands working ... except the last one (grub-install) because a phantom "lupin-support" is missing and can't be installed

    ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt/boot/efi
    ubuntu@ubuntu:~$
    ubuntu@ubuntu:~$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    ubuntu@ubuntu:~$ sudo chroot /mnt
    root@ubuntu:/#
    root@ubuntu:/# grub-install /dev/sdb

    Command «grub-install» not found but can be installed with:

    apt install lupin-support # version 0.57build1, or
    apt install grub2-common # version 2.04-1ubuntu26.11

    root@ubuntu:/# apt install lupin-support
    Reading dependencies tree ... done
    Generating dependencies tree ... done
    Reading status information ... done
    E: Impossible to find packet lupin-support
    the same for grub-install command (grub-common required but can't install)

    root@ubuntu:/# apt install grub2-common
    Reading dependencies tree ... done
    Generating dependencies tree ... done
    Reading status information ... done
    E: Impossible to find packet grub2-common
    less finger to cross, ... some other help needed, though

  6. #6
    Join Date
    Mar 2021
    Beans
    4

    Re: Grub corrupted on shutdown

    I append a screen shoot of my system disks running on a Ubuntu live (another usb key for data is mounted too).

    So, the command

    Code:
    sudo mount /dev/vgubuntu/root /mnt/tmp
    won't work anymore and gives back

    Code:
    mount: /mnt/tmp: mount point does not exist.
    The command sequence spotted above by Zero cannot be performed.
    The sdb5 partition formatted with lvm format cannot be mounted also if "Disk" and "Gparted" seemed able to mount / activate it. I can't fix anyway the root partition.
    So I think I'm going to install a new instance of Ubuntu over the former. I read somewhere that if one keeps t he /home partition his data are served, but I'm not sure how to do that considering the 'damned' lvm format levels out everything.
    I'll keep attempting some solution for few day then I restart with a new installation, hoping to do not miss other OS.
    Any idea?

    1.jpg

    2.jpg
    Last edited by QIII; 3 Weeks Ago at 10:28 PM. Reason: Thumbnailed large images

Tags for this Thread

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
  •