Tomas-M/linux-live

Rocky 9 - Fatal error occured - Could not locate linux data

anoskar opened this issue · 7 comments

Hi !
Firt it's firt time for me that i laugh seeing an error :)

There's my problem, i make my live usb key and i have this error "This image is ugly intentionnaly, to force you make a better one"
I wish to make an usb live key on rocky linux 9.

here are the steps i followed :

  • Installation Rocky Linux 9 (core) on my desktop

  • Check the aufs or overlayfs kernel module support
    uname -r 5.14.0-70.22.1.e19_0.x86_64
    For me it's ok on this part

  • I edit the .config like this

#!/bin/bash LIVEKITNAME="anoskar" VMLINUZ=/boot/vmlinuz-5.14.0-70.22.1.el9_0.x86_64 KERNEL=$(uname -r) MKMOD="bin etc home lib lib64 opt root sbin srv usr var" NETWORK=false LIVEKITDATA=/live/$LIVEKITNAME-data-$$ BEXT=sb LMK="lib/modules/$KERNEL"
I change the destination of my vmlinuz, on rocky 9, he's located on /boot/vmlinuz-5.14.0-70.22.1.el9_0.x86_64

  • I run the ./build script ( i change the destination on /live that I created before )
  • i copied the folder "anoskar-data-id/anoskar/" on my usb key
  • On my usb key location, i run the bootinst.sh.
  • umount and plug on another machine and the error you have at the beginning of the post

I choose "run" menu but nothing is happening.
what did i do wrong ? Can u help me please ?

Thx for read me,

have a good day

Hi

I check the syslinux.cfg in /boot on my usb key.
it was referring to the kernel name "vmlinuz" and my kernel name was vmlinuz-5.14.0-70.22.1.el9_0.x86_64.
I target the good name file and it started.
However, i have this error

Run /init as init process
switch root from initranfs to ranfs
input: Chicony USB Keyboard Consumer Control as devices/pci0000:00/0000:00:1
/usb4/4-3/4-3:1.1/0003:04F2:0408.0003/input/input5
hid-generic 0003:04F2:0408.0003: input.hiddev96, hidraw2: USB HID U1 Device"Y SE tEuboard1 on usb-0000:00:13.0-3/-Imput1 http://www.linux-live.org/›
* Setting dynamic RAM compression using ZRAM if available
* Probing for hardware
* Looking for anoskarlive data in /anoskarlive ..................................................................
..................................................................

Fatal error occured - Could not locate anoskarlive data
Something went wrong and went wrong and we can' t continue. This should never happen.
Please reboot your computer with Ctrl+Alt+Delete`

here is the tree structure of my usb key :

  • modules
  • boot
  • changes
  • 01-core.sb

modules and changes are empty and this is probably the cause

Something escapes me

I will tryed with ubuntu server core 22.04 LTS. I follow step by step the process and ii work.
However, i wish to understand the problem with Rocky 9.

There's my usb key content :
Root:
image

EFI
image

Syslinux.cfg content :

UI vesamenu.c32

TIMEOUT 140
MENU ROWS 4

MENU CLEAR
MENU BACKGROUND /rocky9/boot/bootlogo.png

LABEL default
MENU LABEL Run Linux
KERNEL /rocky9/boot/vmlinuz-5.14.0-70.13.1.el9_0.x86_64
APPEND vga=769 initrd=/rocky9/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 perch

#/rocky9/boot/vmlinuz-5.14.0-70.13.1.el9_0.x86_64

And boot
image
The syslinux.cfg file in boot directory

UI /rocky9/boot/vesamenu.c32

TIMEOUT 140
MENU ROWS 4

MENU CLEAR
MENU BACKGROUND /rocky9/boot/bootlogo.png

LABEL default
MENU LABEL Run Linux
KERNEL /rocky9/boot/vmlinuz-5.14.0-70.13.1.el9_0.x86_64
APPEND vga=769 initrd=/rocky9/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 perch

#/rocky9/boot/vmlinuz-5.14.0-70.13.1.el9_0.x86_64

Is there a solution please ?

And I tried with Rocky 8.6 with same issue :

Run /init as init process
switch root from initranfs to ranfs
input: Chicony USB Keyboard Consumer Control as devices/pci0000:00/0000:00:1
/usb4/4-3/4-3:1.1/0003:04F2:0408.0003/input/input5
hid-generic 0003:04F2:0408.0003: input.hiddev96, hidraw2: USB HID U1 Device"Y SE tEuboard1 on usb-0000:00:13.0-3/-Imput1 http://www.linux-live.org/›
* Setting dynamic RAM compression using ZRAM if available
* Probing for hardware
* Looking for anoskarlive data in /rocky86 ..................................................................
..................................................................
Fatal error occured - Could not locate rocky86 data

So if I understand it correctly, it works for you with Ubuntu, but does not work with Rocky.
Well, the difference may be in kernel drivers.
It looks like your Rocky live OS cannot read your USB drive with data.

When you run the build script, it also creates initramfs image file (initrfs.img). This is a compressed cpio archive with the initial root filesystem, which includes kernel drivers (.ko modules) from your distribution's directory, most likely /lib/modules/$KERNEL_VERSION.

Linux Live kit copies only specific kernel drivers to initramfs.
It is possible that your Rocky OS uses some other drivers which LiveKit does not know so it does not copy them to initial root filesystem.

It is possible that your ubuntu kernel has the drivers built in (bundled inside vmlinuz file), so it works. But Rocky does not have this built in, it probably has it only as separaet .ko kernel modules, and in this case LiveKit probably does not know which files to copy to initramfs, thus it cannot use the driver during boot.

To fix this, you can try 'lsmod' command while running your Rocky OS, to see which drivers are loaded when your device is in use. Then, you can manually edit initramfs_create script in livekit, find lines like
copy_including_deps /$LMK/kernel/drivers/block/loop.*
and add there new lines similar to this, to copy your desired drivers too.

Hello, Thank you for your reply !
I will apply this solution tomorrow and I will give you the feed back

Have a good day / night :)

Hi !

I check the loaded module with lsmod, i have not found yet.
If fou want, close the issue and if I still have other worries about rocky I will come back here

Thx again for help ! :)

I have the same issue with Debian.