Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at "bad root" and blinking _ while running at bare metal from BIOS #1

Closed
informer2016 opened this issue Jun 6, 2019 · 1 comment

Comments

@informer2016
Copy link

Good day Piotr ! ( @p-durlej ) I put Xenus inside my coreboot+SeaBIOS image ( like a Vanadium here - p-durlej/newsys#2 ), but while booting I get this screen:

pg_init lpg 16384 maxpg 16384
XENUS 5.1 May 20 2019 19:07:35
(C) Piotr Durlej

mem = 66128128
fpu = 1
root = 2,0
read blk 1 err 20 dv 2,0
root sb 20
bad root
_ <--- blinking _

It could be related to this problem I got with Vanadium OS - p-durlej/newsys#4

Do you have any idea about these problems? If you could create some debug builds I will happily test them and could retype the detailed debug info from a screen

@p-durlej
Copy link
Owner

p-durlej commented Jun 8, 2019

Hello,

Judging from the console messages, the kernel panicked while trying to read the root filesystem superblock from the floppy.

When you are booting from an emulated floppy, please keep in mind that XENUS kernel accesses the floppy disk controller directly (whereas the boot code uses BIOS calls to load the kernel).

Therefore, either a real FDC or an emulator able to trap I/O port accesses is needed to access floppies under XENUS.

A solution for this problem might include implementing a new floppy disk driver. The new driver would call the BIOS in V86 mode in order to access the floppy (much like the "last resort" hard disk driver in Vanadium works). This solution would involve adding V86 support to the XENUS kernel. Additionally IRQ 0 and IRQ 6 may need to be passed to the BIOS.

While implementing this solution is possible, it contradicts with the small and simple design of the system.

An alternative approach might be to load a ramdisk at boot time and implement a ramdisk driver. XENUS used to boot this way in the past, but this feature was removed as it was not needed for normal operation and it contributed to the memory footprint of the system. A 1.44 megabyte ramdisk would prevent the system from booting on a machine with 2 megs of RAM.

I do not plan to extend the XENUS system with the ability to use emulated floppies. However, the system is BSD-licensed. Anyone is welcome to fork and modify the system.

@p-durlej p-durlej closed this as completed Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants