Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: Corrupted Boot partition after upgrade to 24.04

  1. #1
    Join Date
    Oct 2024
    Beans
    55

    Corrupted Boot partition after upgrade to 24.04

    Old user, new poster here looking for some expert advice on an issue with a Dual Boot ubuntu/windows Dell Inspiron system after upgrade to 24.04.

    As for background, I did the upgrade from the online repository, and it's possible I selected an option to use the wrong boot configuration or something to that affect. If I knew what I did, maybe there wouldn't be a problem, but alas, I'm getting old here! Another similar system I upgraded worked fine, so some error on my part is the best guess going for now. Wish I had more specifics. The system is currently running in Live, and I do have a disk image of the corrupted drive on an external HD.

    Now after the bad upgrade, the Gparted shows the EFI system partition and MIcrosoft reserved partition with errors (! mark in red). I did run boot-repair and it gave specific instructions to ensure that the system should boot to sda1/efi/ubuntu/grubx64.efi, which it does, but that results in a boot to 24.04 with no access to any of my data. Just like a clean new boot.

    For EFI system:

    "Unable to read the contents of this file system!
    Because of this some operations may be unavailable.
    The cause might be a missing software package.
    The following list of software packages is required for fat32 file system support: dosfstools, mtools."

    For MS system:

    "Unable to detect file system! Possible reasons are:
    - The file system is damaged
    - The file system is unknown to GParted
    - There is no file system available (unformatted)
    - The device entry /dev/sda2 is missing"

    My impression is that a good way to proceed for a novice would be to use TestDisk in order to attempt a repair of the boot partitions. If that worked, I could copy the repaired image back to my machine HD and press on. This is probably obvious to you all, but the Live boot will not allow me in install TestDisk ... so here I am.

    So the questions:

    - Can I boot my machine into the installed / damaged system, install TestDisk, then do the repair on the external disk?

    - Are there better options for implementing my evil plan?

    - Am I on the wrong path?

    If you need more info, I'd be happy to upload anything that might be helpful. I did start this quest by making another post that didn't go far, but now I have new info and thought a fresh start might be wise.

    I defer to the body, anyone have some wisdom to share?

    Cheers
    Bill

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

    Re: Corrupted Boot partition after upgrade to 24.04

    Microsoft reserved always shows errors as it is unformated. Gparted should check that type GUID is Microsoft reserved and not show as error.

    Error on FAT32 may need chkdsk from Windows or dosfsck from Ubuntu. Partition must be unmounted or use live installer.

    sudo /sbin/fsck.vfat -V <the fat32 device>
    man dosfsck
    sudo fsck.vfat -t -a /dev/sdXY # where X is drive and Y is partition.
    sudo fsck.vfat -t -a /dev/nvme0n1pY # where Y is ESP 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
    Oct 2024
    Beans
    55

    Re: Corrupted Boot partition after upgrade to 24.04

    Thanks, will start reading and report back!

  4. #4
    Join Date
    Oct 2024
    Beans
    55

    Re: Corrupted Boot partition after upgrade to 24.04

    That was a quick failure. You're way over my head on the format of the last two commands. The first two returned:

    ubuntu@ubuntu:~$ sudo /sbin/fsck.vfat -V /dev/sda
    fsck.fat 4.2 (2021-01-31)
    Logical sector size is zero.
    ubuntu@ubuntu:~$ man dosfsck
    ubuntu@ubuntu:~$ sudo fsck.vfat -t -a /dev/sda1
    fsck.fat 4.2 (2021-01-31)
    /dev/sda1: 311 files, 14695/126720 clusters

    The last two returned errors. Are you able to be more specific about the commands seeing what there is above? Still reading UEFI boot install & repair info

  5. #5
    Join Date
    Jun 2014
    Beans
    7,913

    Re: Corrupted Boot partition after upgrade to 24.04

    I did run boot-repair
    You forgot to post the link to the output as suggested on the boot repair home page. That would be a good idea since you don't seem to be familiar with bootloaders.

    that results in a boot to 24.04 with no access to any of my data
    What data? Data on another hard drive? Another partition on the same drive?

    The example command suggested by oldfred (sudo fsck.vfat -t -a /dev/sda1) would do a filesystem check on an unmounted vfat partition that is on /dev/sda1 so if that is not your EFI partition, you need to change it to what your actual EFI partition is.

    The last two returned errors
    What two are you referring to? The man dosfsck just opens the manual pages for that command.

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

    Re: Corrupted Boot partition after upgrade to 24.04

    The examples were for those with HDD like sda or those with NVMe SSD type drives.
    You do not run a command like that on a drive like sda, but on a partition like sda2, but it must be the FAT32 partition.

    You can confirm partitions, my flash drive often becomes sda & internal drive then is sdb.
    sudo parted -l # that is a small el
    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.

  7. #7
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Corrupted Boot partition after upgrade to 24.04

    TestDisk does not repair partitions. It recovers or attempts to recover deleted files. You say this;

    and I do have a disk image of the corrupted drive on an external HD
    If you want to experiment with TestDisk on the external HD then go ahead but that is a separate matter from the failure to boot after an online upgrade from Ubuntu 22.04 to 24.04. You also say this:

    did run boot-repair and it gave specific instructions to ensure that the system should boot to sda1/efi/ubuntu/grubx64.efi, which it does, but that results in a boot to 24.04 with no access to any of my data. Just like a clean new boot.
    So, the booting problem is solved.

    Why is there no data there? This is again a separate matter. Are you sure that you did an online upgrade and not a fresh install which formatted the Ubuntu partition? Where was the Data? Was it on a separate partition or a separate drive? Or, in the Home folder and then in Documents; Downloads; Videos etc.? How are you trying to access the Data?

    The file manager (FILES) should be able to access that external HD. Open FILES - click Other Locations. What do you see there? You should see Ubuntu - that gives access to the OS you are using. You may also see other volumes that represent other partitions or drives. Click on them to mount them and then you can access them. You may be able to copy files to Ubuntu 24.04.

    You can also do this from a TRY/LIVE ubuntu session also.

    Regards
    Last edited by grahammechanical; November 4th, 2024 at 07:01 PM.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  8. #8
    Join Date
    Oct 2024
    Beans
    55

    Re: Corrupted Boot partition after upgrade to 24.04

    Ok, great replies, and yes as Yanek commented, I'm not familiar with boot loaders. here's the boot-repair result:

    Code:
    boot-repair-4ppa2081                                              [20241030_1637]
    
    ============================== Boot Info Summary ===============================
    
     => No boot loader is installed in the MBR of /dev/sda.
    
    sda1: __________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  FAT32
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                           /efi/Boot/fbx64.efi /efi/Boot/mmx64.efi 
                           /efi/ubuntu/fwupdx64.efi /efi/ubuntu/grubx64.efi 
                           /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi 
                           /efi/ubuntu/grub.cfg /efi/Microsoft/Boot/bootmgfw.efi 
                           /efi/Microsoft/Boot/bootmgr.efi
    
    sda2: __________________________________________________________________________
    
        File system:       
        Boot sector type:  -
        Boot sector info: 
    
    sda3: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows 8 or 10
        Boot files:        /Windows/System32/winload.exe
    
    sda4: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        
    
    sda5: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  Ubuntu 24.04.1 LTS
        Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub
    
    sdb: ___________________________________________________________________________
    
        File system:       iso9660
        Boot sector type:  Unknown
        Boot sector info: 
        Mounting failed:   mount: /mnt/BootInfo/FD/sdb: /dev/sdb already mounted or mount point busy.
    
    
    ================================ 2 OS detected =================================
    
    OS#1 (linux):   Ubuntu 24.04.1 LTS on sda5
    OS#2 (windows):   Windows 8 or 10 on sda3
    
    ================================ Host/Hardware =================================
    
    CPU architecture: 64-bit
    Video: UHD Graphics 620 from Intel Corporation
    Live-session OS is Ubuntu 64-bit (Ubuntu 20.04.3 LTS, focal, x86_64)
    
    ===================================== UEFI =====================================
    
    BIOS/UEFI firmware: 1.14.0(1.14) from Dell Inc.
    The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
    SecureBoot disabled (confirmed by mokutil).
    BootCurrent: 0002
    Timeout: 0 seconds
    BootOrder: 0001,0000,0002
    Boot0000* Windows Boot Manager    HD(1,GPT,d091f8d5-b26d-4623-87e5-6864351227bd,0x800,0xf9800)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...r................
    Boot0001* Ubuntu    PciRoot(0x0)/Pci(0x17,0x0)/Sata(1,32768,0)/HD(1,GPT,d091f8d5-b26d-4623-87e5-6864351227bd,0x800,0xf9800)/File(/EFI/Ubuntu)
    Boot0002* UEFI: SanDisk Cruzer 8.02, Partition 1    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x2cf4ba3a,0x506fcc,0x1f40)..BO
    
    66f69798ad23240e43b7ba0044a914c4   sda1/Boot/bkpbootx64.efi
    66f69798ad23240e43b7ba0044a914c4   sda1/Boot/bootx64.efi
    2895d47544fd587b26c7e29be1295c27   sda1/Boot/fbx64.efi
    dc3c47be2f78a78e5e57d097ae6c5c84   sda1/Boot/mmx64.efi
    b79608a8b4b6d20b9434d77fe1b85b3d   sda1/ubuntu/fwupdx64.efi
    66f69798ad23240e43b7ba0044a914c4   sda1/ubuntu/grubx64.efi
    dc3c47be2f78a78e5e57d097ae6c5c84   sda1/ubuntu/mmx64.efi
    78415fb8fb9b909f8029858113f1335f   sda1/ubuntu/shimx64.efi
    ee7c82a82dd0ce765ff8f9515d0dfb55   sda1/Microsoft/Boot/bootmgfw.efi
    86c49eee6e6bf50ddfdd9c62f6ad9e84   sda1/Microsoft/Boot/bootmgr.efi
    
    ============================= Drive/Partition Info =============================
    
    Disks info: ____________________________________________________________________
    
    sda    : is-GPT,    no-BIOSboot,    has---ESP,     not-usb,    not-mmc, has-os,    has-win,    2048 sectors * 512 bytes
    
    Partitions info (1/3): _________________________________________________________
    
    sda1    : no-os,    64, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    not-far
    sda3    : is-os,    64, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    end-after-100GB
    sda4    : no-os,    64, nopakmgr,    no-docgrub,    nogrub,    nogrubinstall,    no-grubenv,    noupdategrub,    end-after-100GB
    sda5    : is-os,    64, apt-get,    signed grub-efi ,    grub2,    grub-install,    grubenv-ok,    update-grub,    end-after-100GB
    
    Partitions info (2/3): _________________________________________________________
    
    sda1    : is---ESP,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot, vfat
    sda3    : isnotESP,    part-has-no-fstab,    no-nt,    haswinload,    no-recov-nor-hid,    no-bmgr,    notwinboot, ntfs
    sda4    : isnotESP,    part-has-no-fstab,    no-nt,    no-winload,    recovery-or-hidden,    no-bmgr,    notwinboot, ntfs
    sda5    : isnotESP,    fstab-has-goodEFI,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot, ext4
    
    Partitions info (3/3): _________________________________________________________
    
    sda1    : not--sepboot,    no---boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    no--grub.d,    sda
    sda3    : not--sepboot,    no---boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    no--grub.d,    sda
    sda4    : not--sepboot,    no---boot,    part-has-no-fstab,    not-sep-usr,    no---usr,    part-has-no-fstab,    no--grub.d,    sda
    sda5    : not--sepboot,    with-boot,    fstab-without-boot,    not-sep-usr,    with--usr,    fstab-without-usr,    std-grub.d,    sda
    
    fdisk -l (filtered): ___________________________________________________________
    
    Disk sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk identifier: E6263EE3-847B-4E08-9B2D-93BF846CD904
              Start        End   Sectors   Size Type
    sda1        2048    1023999   1021952   499M EFI System
    sda2     1024000    1286143    262144   128M Microsoft reserved
    sda3     1286144  929718271 928432128 442.7G Microsoft basic data
    sda4  1952600064 1953521663    921600   450M Windows recovery environment
    sda5  1541400576 1952600063 411199488 196.1G Linux filesystem
    Partition table entries are not in disk order.
    Disk sdb: 3.76 GiB, 4022337024 bytes, 7856127 sectors
    Disk identifier: 0x2cf4ba3a
         Boot   Start     End Sectors  Size Id Type
    sdb1  *          0 5999871 5999872  2.9G  0 Empty
    sdb2       5271500 5279499    8000  3.9M ef EFI (FAT-12/16/32)
    sdb3       6000640 7856126 1855487  906M 83 Linux
    
    parted -lm (filtered): _________________________________________________________
    
    sda:1000GB:scsi:512:4096:gpt:ATA ST1000LM035-1RK1:;
    1:1049kB:524MB:523MB:fat32:EFI system partition:boot, esp;
    2:524MB:659MB:134MB::Microsoft reserved partition:msftres;
    3:659MB:476GB:475GB:ntfs:Basic data partition:msftdata;
    5:789GB:1000GB:211GB:ext4::;
    4:1000GB:1000GB:472MB:ntfs::hidden, diag;
    sdb:4022MB:scsi:512:512:unknown:SanDisk Cruzer:;
    
    Free space >10MiB: ______________________________________________________________
    
    sda: 453964MiB:752637MiB:298673MiB
    
    blkid (filtered): ______________________________________________________________
    
    NAME   FSTYPE   UUID                                 PARTUUID                             LABEL                    PARTLABEL
    sda                                                                                                                
    ├─sda1 vfat     EEDC-1691                            d091f8d5-b26d-4623-87e5-6864351227bd ESP                      EFI system partition
    ├─sda2                                               c3f72f69-12fb-4823-998c-849c888d7b69                          Microsoft reserved partition
    ├─sda3 ntfs     2E38DFD638DF9B63                     d9a742a6-ede8-4cce-878f-d55fe158adcc OS                       Basic data partition
    ├─sda4 ntfs     5C1219C81219A852                     f7cd1e6f-7072-427d-b3f7-d197956be9e5 WINRETOOLS               
    └─sda5 ext4     2e8a4205-058b-44bc-810a-910260e478f3 e3141ef3-8bb9-4441-828a-3a5b6546202f                          
    sdb    iso9660  2021-08-19-11-03-38-00                                                    Ubuntu 20.04.3 LTS amd64 
    ├─sdb1 iso9660  2021-08-19-11-03-38-00               2cf4ba3a-01                          Ubuntu 20.04.3 LTS amd64 
    ├─sdb2 vfat     54C5-9C6C                            2cf4ba3a-02                                                   
    └─sdb3 ext4     e8fbacfc-6eee-46bc-a286-eb39f31c3d19 2cf4ba3a-03                          writable                 
    
    Mount points (filtered): _______________________________________________________
    
                                                                   Avail Use% Mounted on
    /dev/sda1                                                     436.5M  12% /mnt/boot-sav/sda1
    /dev/sda3                                                     406.1G   8% /mnt/boot-sav/sda3
    /dev/sda4                                                       103M  77% /mnt/boot-sav/sda4
    /dev/sda5                                                     139.5G  23% /mnt/boot-sav/sda5
    /dev/sdb1                                                          0 100% /cdrom
    
    Mount options (filtered): ______________________________________________________
    
    /dev/sda1                                                     vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
    /dev/sda3                                                     fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
    /dev/sda4                                                     fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
    /dev/sda5                                                     ext4            rw,relatime
    /dev/sdb1                                                     iso9660         ro,noatime,nojoliet,check=s,map=n,blocksize=2048
    
    ===================== sda1/efi/ubuntu/grub.cfg (filtered) ======================
    
    search.fs_uuid 2e8a4205-058b-44bc-810a-910260e478f3 root hd0,gpt5 
    set prefix=($root)'/boot/grub'
    configfile $prefix/grub.cfg
    
    ====================== sda5/boot/grub/grub.cfg (filtered) ======================
    
    Ubuntu   2e8a4205-058b-44bc-810a-910260e478f3
    Windows Boot Manager (on sda1)   osprober-efi-EEDC-1691
    ### END /etc/grub.d/30_os-prober ###
    UEFI Firmware Settings   uefi-firmware
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ========================== sda5/etc/fstab (filtered) ===========================
    
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda5 during installation
    UUID=2e8a4205-058b-44bc-810a-910260e478f3 /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/sda1 during installation
    UUID=EEDC-1691  /boot/efi       vfat    umask=0077      0       1
    /swapfile                                 none            swap    sw              0       0
    
    ======================= sda5/etc/default/grub (filtered) =======================
    
    GRUB_DEFAULT=0
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    GRUB_DISABLE_OS_PROBER=false
    
    ==================== sda5: Location of files loaded by Grub ====================
    
               GiB - GB             File                                 Fragment(s)
     765.030693054 = 821.445451776  boot/grub/grub.cfg                             1
     854.425060272 = 917.431922688  boot/vmlinuz                                   2
     766.437652588 = 822.956163072  boot/vmlinuz-5.15.0-124-generic                2
     854.425060272 = 917.431922688  boot/vmlinuz-6.8.0-47-generic                  2
     766.437652588 = 822.956163072  boot/vmlinuz.old                               2
     859.747066498 = 923.146383360  boot/initrd.img                                6
     799.864253998 = 858.847703040  boot/initrd.img-5.15.0-124-generic             7
     859.747066498 = 923.146383360  boot/initrd.img-6.8.0-47-generic               6
     799.864253998 = 858.847703040  boot/initrd.img.old                            7
    
    ===================== sda5: ls -l /etc/grub.d/ (filtered) ======================
    
    -rwxr-xr-x 1 root root 18133 Apr  4  2024 10_linux
    -rwxr-xr-x 1 root root 43202 Apr  4  2024 10_linux_zfs
    -rwxr-xr-x 1 root root 14513 Apr  4  2024 20_linux_xen
    -rwxr-xr-x 1 root root   786 Apr  4  2024 25_bli
    -rwxr-xr-x 1 root root 13120 Apr  4  2024 30_os-prober
    -rwxr-xr-x 1 root root  1174 Apr  4  2024 30_uefi-firmware
    -rwxr-xr-x 1 root root   214 Apr  4  2024 40_custom
    -rwxr-xr-x 1 root root   215 Apr  4  2024 41_custom
    
    
    
    Suggested repair: ______________________________________________________________
    
    The default repair of the Boot-Repair utility would reinstall the grub-efi of
    sda5,
    using the following options:  sda1/boot/efi
    Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file restore-efi-backups
    
    Final advice in case of suggested repair: ______________________________________
    
    Please do not forget to make your UEFI firmware boot on the Ubuntu 24.04.1 LTS entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !
    If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.
    If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
    For example you can boot into Windows, then type the following command in an admin command prompt:
    bcdedit /set {bootmgr} path \EFI\****\grub****.efi (**** will be updated in the final message)
    Last edited by oldfred; November 4th, 2024 at 08:14 PM. Reason: Please uuse code tags for text or terminal output

  9. #9
    Join Date
    Oct 2024
    Beans
    55

    Re: Corrupted Boot partition after upgrade to 24.04

    Let me add another request that will demonstrate my lack on knowledge:

    How can I quote your comment inline so I can reply in context? I'm not a social media user or lover of typing, so this hindrance is frustrating. I'm sure any teenage can show me this but ... I read the FAQ, no joy. I want to stay in the Ubuntu world but am losing the fight!!

    Quoted portions of other posts can be put into a Quote box.

    If you are using New Reply you can simply select the text you wish to have within a code box and use the # button on the reply editing toolbar.

    If you are using Quick Reply you can still achieve the same result by typing [c*de] at the beginning and [/c*de] at the end.

    Where is the "reply editing toolbar?

    The third line makes less sense ...
    Last edited by wcalvert; November 4th, 2024 at 07:59 PM.

  10. #10
    Join Date
    Oct 2024
    Beans
    55

    Re: Corrupted Boot partition after upgrade to 24.04

    Can anyone give me a quick tutorial so we can press on with the issue? Thanks

Page 1 of 5 123 ... LastLast

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
  •