<---- template headericclude ----->
F38 Upgrade -- "Can't Open Blockdev" After Upgrade
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Location
    London, UK
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    F38 Upgrade -- "Can't Open Blockdev" After Upgrade

    I'm running a F36 installation on ext4 with LVM.

    I decided to upgrade using https://docs.fedoraproject.org/en-US...ystem-upgrade/ to go to F38

    I chose to go via the commandline steps using dnf so I could approve the import of gpg keys.

    It went smoothly, no error other than on VirtualBox keys (but that's a known issue)

    I rebooted, let the system upgrade happen then it rebooted again

    This time it hung. I removed the `quiet` switch from the kernel startup switches so I could see the startup messages. Don't have a picture to hand, but the message was something like

    Code:
    Can't open blockdev /dev/mapper/fedora-root-localhost
    EDIT: Have got a picture now
    Click image for larger version. 

Name:	IMG20230430102856.jpg 
Views:	37 
Size:	259.2 KB 
ID:	32961

    Now I recognised the blockdevice it mentioned as being the LVM volume for my main root partition, but I don't understand why it can't see it now, since it's an upgrade not a repartition (at least I hope the upgrade didn't repartition my drive...)

    The upgrade did keep my previous kernel config setup so I can still boot into F36 (without the blockdev error), but all the dnf repos are now pointing to F38 instead of F36.

    I've reimaged my device back to its preupgrade state, but I would like to know what happened and if it's possible to fix this before I try the upgrade again.

    I could, I guess do a clean installation from scratch on F38 but that would mean I'd have to copy my files off my F36, onto an external drive, then copy them back on after the clean install.

    Could anyone provide some guidance?
    Last edited by blenderfox; 30th April 2023 at 10:34 AM. Reason: Add image

  2. #2
    Join Date
    Jun 2009
    Location
    Alkmaar The Netherlands
    Posts
    947
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: F38 Upgrade -- "Can't Open Blockdev" After Upgrade

    It looks like a mistake by grub. Can you compare in either /boot/grub2/grub.cfg or in /boot/loader/entries the F36 and F38 files whether there is
    root=/dev/mapper/fedora_localhost--live-root or root=mapper/fedora_localhost--live-root.
    Anyhow, I'm pretty confident that if you correct the F38 "root=" parameter to be the same as the F36 "root=" the system will work.
    The parameter should of course point to the real name of your lvm with the updated root.
    H.Janssen
    Alkmaar
    The Netherlands

  3. #3
    Join Date
    Sep 2013
    Location
    London, UK
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F38 Upgrade -- "Can't Open Blockdev" After Upgrade

    Quote Originally Posted by hmmsjan
    It looks like a mistake by grub. Can you compare in either /boot/grub2/grub.cfg or in /boot/loader/entries the F36 and F38 files whether there is
    root=/dev/mapper/fedora_localhost--live-root or root=mapper/fedora_localhost--live-root.
    Anyhow, I'm pretty confident that if you correct the F38 "root=" parameter to be the same as the F36 "root=" the system will work.
    The parameter should of course point to the real name of your lvm with the updated root.
    Ah, very good spot, I didn't see the missing `/dev/` bit. I will check that the next time I do the upgrade

    Should I file a bug somewhere for this?

  4. #4
    Join Date
    Sep 2013
    Location
    London, UK
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F38 Upgrade -- "Can't Open Blockdev" After Upgrade

    Okay, I have managed to fix this.

    After trying again, it looks like they fixed the issue with the blockdev -- that error no longer appears and the root value is indeed correct. It still got stuck loading -- but no kernel panic, just a hang at "Loading Linux..."
    Click image for larger version. 

Name:	IMG20230430211023.jpg 
Views:	28 
Size:	127.3 KB 
ID:	32962

    However, I noticed the generated config for F38 is missing the initrd line. For reference, here's the FC36 version
    Click image for larger version. 

Name:	IMG20230430211114.jpg 
Views:	18 
Size:	133.8 KB 
ID:	32963

    Since the F38 version didn't work, I booted into the F36 kernel and then regenerated the grub config

    Code:
    grub2-mkconfig -o /etc/grub2.cfg
    grub2-mkconfig -o /etc/grub2-efi.cfg
    That added the initrd line back in
    Click image for larger version. 

Name:	IMG20230430211500.jpg 
Views:	17 
Size:	129.4 KB 
ID:	32964

    And now it boots successfully into F38.

Similar Threads

  1. Replies: 10
    Last Post: 25th June 2020, 05:39 AM
  2. Replies: 4
    Last Post: 5th June 2016, 11:55 PM
  3. Upgrade to F21 breaks "open with"
    By MichaelClerx in forum Using Fedora
    Replies: 7
    Last Post: 12th June 2015, 08:22 AM
  4. Why did my "yum upgrade" result in "emergency mode"?
    By OS9Barry in forum Using Fedora
    Replies: 9
    Last Post: 3rd August 2014, 02:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]