WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Boot vmlinuz without core.gz - root drive?  (Read 842 times)

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Boot vmlinuz without core.gz - root drive?
« on: April 09, 2019, 02:56:10 PM »
Hi,
This question is for the same overall project I already posted about 2 threads down, except that I found coreboot supports direct booting of Linux kernels. So instead of the floppy image, I'm trying this method.

My initial attempt at building coreboot with the TC kernel embedded in it sort of worked; it starts booting and I see kernel output, devices are found etc, but it crashes after complaining that it can't find the root drive:
Code: [Select]
"VFS: Cannot open root device "(null)" or unknown-block(8,3)
Please append a correct "root=" option; here are the available partitions:
1600       4194302  hdc driver: ide-cdrom

Note that at this point I did not provide core.gz but as far as I know it should be possible to boot SOMETHING without that, right?

I'm not sure what I should be providing here a a root device, since it's technically booting from a ROM flash image. Since the boot does not complete, I also don't know how to query from what it THINKS it loaded, unless the quote above is sufficient for this information or adding the core.gz image would solve the problem.

This may be a generic kernel question, but I figure since I"m trying to boot this distro asking here wouldn't hurt.

Thanks in advance for any other pointers,
Rafael

Online andyj

  • Hero Member
  • *****
  • Posts: 735
Re: Boot vmlinuz without core.gz - root drive?
« Reply #1 on: April 09, 2019, 03:37:18 PM »
Maybe try it the other way around? Linux has an initial ramfs as part of it's build. Maybe try using core.gz as that initial ramfs and see if you could just boot straight into it?

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #2 on: April 09, 2019, 04:04:49 PM »
So you're saying pass both the kernel and the core.gz, or use core.gz as the kernel ?

I'm not sure what you mean by "the other way around"...

R

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6587
Re: Boot vmlinuz without core.gz - root drive?
« Reply #3 on: April 09, 2019, 04:46:00 PM »
Hi flyingfishfinger
At the very least you probably need  rootfs.gz  in addition to the kernel.  core.gz = rootfs.gz + modules.gz.  See:
http://tinycorelinux.net/9.x/x86/release/distribution_files/

Offline core-user

  • Full Member
  • ***
  • Posts: 161
  • Linux since 1999
Re: Boot vmlinuz without core.gz - root drive?
« Reply #4 on: April 10, 2019, 02:27:51 AM »
As above, you need something for the kernel to operate on, even if it is only a shell.
AMD, ARM, & Intel.

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #5 on: April 10, 2019, 01:36:18 PM »
Ah, got it working!

Not sure what I changed, but I can provide either core.gz or rootfs.gz. Now I at least get a prompt and can install further extensions.

However, I cannot start x. This fails with "failed in waitforX". Both XVesa and Xfbdev give the same result.

I provided the cirrus-vga blob to coreboot so technically this should work,  but I'm not sure how to get more information on this new error.

R

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6587
Re: Boot vmlinuz without core.gz - root drive?
« Reply #6 on: April 10, 2019, 01:51:00 PM »
Hi flyingfishfinger
It's possible you are missing some drivers. I would suggest using  core.gz  since it includes a bunch of drivers. Execute the
first line of your  ,xsession  file and see what error messages are reported. The output of  dmesg  can sometimes provide
clues to problems. If you use the  syslog  boot code, then  /var/log/messages  might provide additional clues.


Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #7 on: April 10, 2019, 02:29:12 PM »
I did use core.gz for this run. Howecer, there doesn't seem to be an Xsession file. I installed the following extensions:

Xvesa.tcz
Xlibs.tcz
Xprogs.tcz
aterm.tcz
flwm_topside.tcz
wbar.tcz

and then did "startx" which results in the error.

In dmesg, I see several messages relating to the VGA device:

Console: colour VGA+ 80x25
pci 0000:00:02.0 vgaarb: setting as boot VGA device
pci 0000:00:02.0 vgaarb: VGA device added: decodes=io+mem,owns=io+mem, locks=none

Where should th .xsession file live, assuming it's not in usr/ ?

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #8 on: April 10, 2019, 03:42:43 PM »
Nvm, found it. The first line consists of:

Code: [Select]
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1
Executing the first part results in:

Code: [Select]
Interrupt pointer (seg 0 off 0) doesn't point at ROM
Interrupt pointer (seg 0 off 0) doesn't point at ROM
Interrupt pointer (seg 0 off 0) doesn't point at ROM
Interrupt pointer (seg 0 off 0) doesn't point at ROM

Fatal server error:
no screens found

Interrupt pointer (seg 0 off 0) doesn't point at ROM

If I use Xfbdev instead, I get:

 
Code: [Select]
  Error opening framebuffer /dev/fb0: No such device

    Fatal server error
    no screens found

Why would there not be a frame buffer device?

R
« Last Edit: April 10, 2019, 04:01:05 PM by flyingfishfinger »

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6587
Re: Boot vmlinuz without core.gz - root drive?
« Reply #9 on: April 10, 2019, 07:21:23 PM »
Hi flyingfishfinger
Maybe you also need  graphics-KERNEL.tcz  installed. Place that entry at the beginning of  onboot.lst.

... I installed the following extensions:

Xvesa.tcz
Xlibs.tcz
Xprogs.tcz
aterm.tcz
flwm_topside.tcz
wbar.tcz ...
Did you install them using  tce-load  or just download them? If you just downloaded them, did also fetch all their dependencies?

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #10 on: April 11, 2019, 10:47:13 AM »
Ah, that was it!

I installed graphics-Kernel along with Xfbdev (all using tce-load -wi by the way), and then startx works.

I don't have an "onboot.lst" at the moment since I'm directly loading the kernel from the BIOS flash image so I guess I need to remaster it with what I need.

Thanks for all the pointers,
Rafael


Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6587
Re: Boot vmlinuz without core.gz - root drive?
« Reply #11 on: April 11, 2019, 11:04:27 AM »
Hi flyingfishfinger
If you have a script that calls  tce-load  to load extensions that will work as well. That's what  /etc/init.d/tc-config  does as it reads
onboot.lst.

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 59
Re: Boot vmlinuz without core.gz - root drive?
« Reply #12 on: April 11, 2019, 03:27:04 PM »
I'll poke at this.

Sidebar, where can I find the actual graphics-KERNEL.tcz? I can't find it listed here:

ftp://ftp.vim.org/pub/os/Linux/distr/tinycorelinux/10.x/x86/tcz/


R


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9997
Re: Boot vmlinuz without core.gz - root drive?
« Reply #14 on: April 11, 2019, 11:52:56 PM »
The /tmp/builtin remaster method is meant for such cases. You can embed extensions there, into core.gz.
The only barriers that can stop you are the ones you create yourself.