Menu

Issue finding kernel files and initramfs on Manjaro

2020-06-04
2020-06-10
  • Cateanu Mihnea

    Cateanu Mihnea - 2020-06-04

    Hi,

    Trying to use Grub2Win to regain access to my Manjaro installation whose bootloading was somehow messed up by Win10.
    I tried running kernset.sh by chroot-ing into my Manjaro installation from a Live USB session, but it does not find the necessary files. I'm not familiar with PERL, but looking at the script...it seems it's not searching for the appropiate filenames?
    These are my kernel files, not sure the script is looking for them in the necessary folders?

    ./usr/lib/modules/5.5.19-1-MANJARO/vmlinuz
    ./usr/lib/modules/5.6.10-3-MANJARO/vmlinuz
    ./usr/lib/modules/5.4.38-1-MANJARO/vmlinuz
    

    And I can't find any initramfs archive, instead I have these files, which I assume take its place:

    ./usr/share/man/man4/initrd.4.gz
    ./usr/lib/systemd/system/initrd-root-fs.target
    ./usr/lib/systemd/system/initrd-udevadm-cleanup-db.service
    ./usr/lib/systemd/system/initrd-root-device.target
    ./usr/lib/systemd/system/initrd-fs.target
    ./usr/lib/systemd/system/initrd-cleanup.service
    ./usr/lib/systemd/system/initrd-switch-root.service
    ./usr/lib/systemd/system/initrd-switch-root.target
    ./usr/lib/systemd/system/initrd-parse-etc.service
    ./usr/lib/systemd/system/initrd.target
    

    My installation is a bit unusual, I have an SSD with 3 partitions:
    1. boot partition (EFI)
    2. partition for Win10 installation
    3. partition for Manjaro installation.

    I've also attached a text file with the contents of my boot partition. Hopefully this info is enough for a solution. Not sure how to edit the script so it finds what it needs to...
    //edit: ok, I just realised the program has a neat diagnostics tool, I've attached the result of that.

     

    Last edit: Cateanu Mihnea 2020-06-04
  • Drummer

    Drummer - 2020-06-04

    Hi,

    The standard Manjaro setup has the kernel files in the linux partition's /boot directory.
    This is also the location for most other linux distributions.

    The kernset.sh script looks for the kernel files in the standard Manjaro /boot directory

    Not the EFI partition.

    If you have moved things around, you will need to customize the kernset.sh code for your setup.

    Hope this helps,

    Dave

     
  • Cateanu Mihnea

    Cateanu Mihnea - 2020-06-04

    Thanks for the fast response Dave!
    I was actually mounting the contents of the boot partition into the /boot folder of the Linux installation, so of course I couldn't see any kernels or .img's there.
    That sorted out, I managed to run the script as root (some errors but it said the links were created succesfully). But now on attempting to boot into Manjaro I get an error stating:

    Failed to open file: intel_ucode.img. 
    

    And I just noticed another issue (maybe related?)...in Grub2Win I cannot set Partition layout to Root+Boot for the Manjaro entry. I see the option in the drop-down list but selecting it doesn't register....

     
  • Drummer

    Drummer - 2020-06-04

    Hi again,

    I note that your processor is AMD not Intel. You may need to set up this machine as "Custom Code" so that you can edit the initrd loads. Check your /boot directory to see if there is a file called amd_ucode.img or something like it. I have only used Intel machines with Manjaro.

    Since you only have a single Linux partition on your machine, the only possible Grub2Win partition layout is "Root Partition Only". I will correct this GUI display glitch in the next release.

    Thanks,

    Dave

     
    • Cateanu Mihnea

      Cateanu Mihnea - 2020-06-05

      Yes, I have a file called amd-ucode.img (with a dash).
      I don't know what the Custom Code should contain to point the boot manager to this file though.

      //edit: never mind, I found a simpler solution. I created a Manjaro boot entry and then manually edited grub.cfg, replacing

      initrd  $pathprefix/intel-ucode.img
      

      with

      initrd  $pathprefix/amd-ucode.img
      

      and it works!

      Cheers,
      Mihnea

       

      Last edit: Cateanu Mihnea 2020-06-05
  • Ed  P

    Ed P - 2020-06-05

    Does Grub2Win support grub2's grub2-mkconfig command?

     
  • Drummer

    Drummer - 2020-06-05

    Hi Mihnea,

    I just uploaded a minor refresh of version 2.1.3.9 which should properly handle the amd microcode issue.

    Please download, install and give it a try. Manually editing C:\grub2\grub.cfg can cause other problems.

    Please let me know if this works for you.

    Thanks,

    Dave

     
    • Cateanu Mihnea

      Cateanu Mihnea - 2020-06-09

      Hi, sorry for the delay in responding...
      I did the update, re-created the boot entries and it worked like a charm.

      Thanks so much,
      Mihnea

       
      • Ed  P

        Ed P - 2020-06-10

        Thank you Cateanu. It's always good to hear happy endings. :-)

         
  • Drummer

    Drummer - 2020-06-05

    Hey Ed,

    The grub2-mkconfig command is a Linux shell script. It can only be run in a Linux environment.

    Grub2Win is a Windows application and cannot run Linux shell scripts.

    Dave

     
  • Drummer

    Drummer - 2020-06-06

    Hey Ed,

    Yeah, from a command line, if you have the Linux feature installed (not the default). It cannot be invoked in an application call from a WinApp program.

    grub-mkconfig also requires access to files in the Linux ext4 filesystem to run. Linux filesystems are not accessible from Windows apps unless you install special drivers or software.

    So no, grub-mkconfig will not work in vanilla Windows. Grub2Win is designed such that it does not require additional software or drivers. Just the programs that are included in a normal Windows install.

    Dave

     
  • Ed  P

    Ed P - 2020-06-06

    Dave,

    From what I have read grub-mkconfig is a part of grub2 and I was under the impression Grub2Win included all of grub2. Since that doesn't appear to be the case do you have any suggestions where one can download a copy of a complete grub2 system?

    -update-

    Never mind, I think I found the download. https://www.aioboot.com/en/install-grub2-from-windows/

    Ed

     

    Last edit: Ed P 2020-06-06
  • Drummer

    Drummer - 2020-06-06

    Hey again Ed,

    I'm a little surprised you didn't find the official GNU Grub download page. It's found with a simple Google search of "gnu grub download".

    Here's the download page

    https://ftp.gnu.org/gnu/grub/

    Note there are two versions of GNU Grub available for download:

    grub-2.04-for-windows.zip
    This runs under Windows and does not contain grub-mkconfig or any other commands that require Linux filesystems, software or libraries. It is the Windows package used to build Grub2Win.

    grub-2.04-tar.gz
    This is the full GNU Grub Linux source code. It must be assembled under Linux and will only run under Linux, not Windows. It is the package used by the various Linux distributions to build GNU Grub for Linux.

    Hope this helps,

    Dave

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.