Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Boot repair and broken grub

  1. #1
    Join Date
    Feb 2022
    Beans
    9

    Boot repair and broken grub

    I'm trying to fix grub from a USB drive. I am not sure why the problem happened. I was running Ubuntu 20.04 and restarted normally and on the restart, I get grub-rescue screen. I don't have windows installed, just the Ubuntu. I am currently using usb to fix it. I ran Boot-repair but got below error

    Error detected in grub_mkconfig

    After rebooting, I was taken to grub screen. I am trying solutions of
    https://unix.stackexchange.com/quest...nt/52790#52790, https://unix.stackexchange.com/quest...al-path-of-cow, https://askubuntu.com/questions/2544...al-path-of-cow and https://askubuntu.com/questions/1262...ted-filesystem, but nothing worked. I run the following:

    sudo mount /dev/sda1 /mnt
    sudo grub-install --root-directory=/mnt /dev/sda
    I get the following error:

    grub-probe: error: failed to get canonical path of /cow.
    Even when running

    sudo grub-mkconfig > /boot/grub/grub.cfg

    or

    update-grub

    in chroot, I get the same error. Pastebin link: https://paste.ubuntu.com/p/sT23JKdBr8/. Can someone explain the error, and explain how to solve it?

    This is the result of running sudo fdisk /dev/sda command

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 * 2048 1901873141 1901871094 906.9G 83 Linux
    /dev/sda2 1901875198 1953523711 51648514 24.6G 5 Extended
    /dev/sda5 1901875200 1937033215 35158016 16.8G 82 Linux swap / Solaris
    /dev/sda6 1937035264 1953523711 16488448 7.9G 83 Linux

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Boot repair and broken grub

    Cow is copy on write or the live installer.
    You were attempting to update grub on live installer.

    On my system a sdf flash drive on reboot of system becomes the sda drive.
    So you need to know which drive is live installer & which drive is your install.

    Your fstab has a comment on a /boot partition, but no entry.
    Did you have a separate /boot partition? And first attempt at reinstall removed /boot from fstab?

    From Boot-Repair you can use advanced mode & do a full reinstall of grub & include the latest kernel.
    That would in-effect revert to /boot as a folder in / not a separate partition. A /boot partition is not normally required for desktop type installs.
    If server install oo LVM with full drive encryption you may need a /boot partition.
    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.

  3. #3
    Join Date
    Feb 2022
    Beans
    9

    Re: Boot repair and broken grub

    I did reinstall grub and kernel and it returned with an error -recheck exit code 1. Here is the pastebin of the result: https://paste.ubuntu.com/p/nRf4Q29pfv/

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Boot repair and broken grub

    Not sure if Boot-Repair issue or your system.
    You had 5.11.0.27.29~20.04.11 Kernel but it reinstalled 5.4.0-99.
    The 5.4 is from original 20.04 or 20.04.1 which I have and have the -99 kernel.
    But if you more recently installed or if you installed the enablement stack, you get newer kernels.

    Not sure why it dumped all the kernels.

    It is as if you changed permissions of / (root) and now nothing is working?

    I might try a full chroot where you manually mount your partitions and do the kernel install, update system, houseclean old kernels, and reinstall grub.

    To chroot, you need the same 32bit or 64 bit kernel. Best to use same version.
    https://ubuntuforums.org/showthread....62#post9226662
    https://help.ubuntu.com/community/BasicChroot
    drs305 chroot to purge & reinstall grub2
    http://ubuntuforums.org/showthread.php?t=1581099
    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.

  5. #5
    Join Date
    Feb 2022
    Beans
    9

    Re: Boot repair and broken grub

    I am not sure how it happened. I followed the suggested links but when I run update-grub, I get grub-probe: error: failed to get canonical path of /cow. When I restarted my laptop, I was taken to grub-rescue screen.

  6. #6
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

  7. #7
    Join Date
    Jan 2008
    Location
    France
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Boot repair and broken grub

    hi dushyantsahoo,
    there are several 'Read-only file system' in your boot-repair log, ie permissions on sda1 are incorrect. This aligns with the /cow error you had previously with grub-probe.
    Also, you have used boot-repair after having done several manual operations (eg sda1 was already manually mounted on /mnt).
    Please can you run boot-repair recommended repair from a fresh live session and indicate the new URL ? this will show us if the permission error is permanent or was due to your initial repair attempts.

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

    Re: Boot repair and broken grub

    The meaning of a "fresh live session" is that you would need to reboot with the LiveCD and start over, so that nothing you have done in the previous session is remaining in memory... To let the scripts decide how to handle things without distractions...

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  9. #9
    Join Date
    Feb 2022
    Beans
    9

    Re: Boot repair and broken grub

    Yes, I tried that and got error "failed to get canonical path of /cow.". I wish everything went smoothly

  10. #10
    Join Date
    Feb 2022
    Beans
    9

    Re: Boot repair and broken grub

    Hi, thanks for helping. Below is the pastebin of fresh attempt

    https://paste.ubuntu.com/p/TrvjRRTxqh/

Page 1 of 2 12 LastLast

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
  •