MichielDerhaeg / build-linux

A short tutorial about building Linux based operating systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kernel Panic on real hardware. (not a dupe)

SamHep0803 opened this issue · comments

I keep getting the same error as with the other issue, but the only difference is that I'm trying it on real hardware.

To be specific a PC with windows installed on it. However, I'm having trouble getting it to even boot as I'm getting a kernel panic. Also, I'm using the Makefile provided.

To be honest, I have no clue what to do.

Thanks, Sam.

As I said, it's the same error as the last kernel panic issue. However, It works in qemu, just not my test system.

kernel panic - not syncing vfs unable to mount root fs on unknown-block (0 0)

There.

I'm using a custom build system

Would be grateful for a reply?

As issued in #8 .

I'm currently using Ubuntu 18.04 LTS and fdisk shows:

Disk build-linux/image: 100 MiB, 104857600 bytes, 204800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb8e75e52

Device             Boot Start    End Sectors Size Id Type
build-linux/image1       2048 204799  202752  99M 83 Linux

It might not be able to interpret PARTUUIDs, i suggest editting gen_image.sh to set root=PARTUUID=..
to root=/dev/sda1 or root=/dev/sdb1, whatever works, and trying again.

Or just by mounting, and manually editting /boot/grub/grub.cfg, whatever floats your boat.

So should I set it to what my USB drive is mounted at now?

If you're using the same system to boot it, yes. It might be slightly non-deterministic but it's probably right.

No, I'm not using the same system. It's a different system with a windows SSD in it.

In that case you'll have to do some trial and error.

i seem to be getting the same error o
in vbox now.

It's hardware specific, so trying it first in vbox has no use.

the only reason im trying it in vbox is bc it was working before

So, I booted it up on my machine again only to find out I have another kernel panic. Buuut it's a different error. I can't see the whole error but the last line reads.

[ 0.989140] ---[end trace efb985e050e98130 ]---

Have you tried other options? You might have selected the Windows disk. Also, it just occurred to me that the kernel configuration you used might not have the required components enabled to boot from your particular system and USB drive. Configuring that correctly might be difficult for someone who hasn't done that before.

Usually kernels are built to support all sorts of hardware, but in this case it's mainly to support VM's.

Hmm I’m sure I didn’t select my windows drive and even after changing the gen-image.sh file my vm still didn’t work. I’m stumped at this point.

Well, so am I, I'm guessing it's a kernel configuration issue. And those sorts of things are way to hard to diagnose like this :S

Ugh... Well I’ll have to call it a day till I get back to my PC, do you have discord?

Yep, send me a mail about it when you want to get in touch.
I'm going to close this issue for now.