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

Boot #4

Open
AlessandroSangiuliano opened this issue Nov 9, 2022 · 18 comments
Open

Boot #4

AlessandroSangiuliano opened this issue Nov 9, 2022 · 18 comments

Comments

@AlessandroSangiuliano
Copy link

Hello finally i find the time to build it, and i had success.

The problem is that Mach boots but the bootstrapserver never finds lites also if i give the path and the right drive. This happens probably because lites resides on ext2 fs ( i managed to build all from an old woody debian), i don't know if it is really able to read from extfs.

I saw on the blog a link with a preinstalle version of netbsd1.1 with the old ufs (UFS1), the filesytem that mach should be able to read. Unfortunately the link is dead.

@neozeed
Copy link
Owner

neozeed commented Nov 11, 2022

I had a catastrophic failure with my storage.. I had essentials backed up, but yeah things were lost.

it should be easy enough to re-create a root file system by installing NetBSD 1.1

@neozeed neozeed closed this as completed Nov 11, 2022
@neozeed neozeed reopened this Nov 11, 2022
@neozeed neozeed closed this as completed Nov 11, 2022
@neozeed neozeed reopened this Nov 11, 2022
@AlessandroSangiuliano
Copy link
Author

Yeah, i was searching NetBSD1.1 not easy right now.

@neozeed
Copy link
Owner

neozeed commented Nov 11, 2022

I found a copy here:
https://archive.netbsd.org/pub/NetBSD-archive/NetBSD-1.1/i386/
I'm downloading it, so I can do an install soooon...

sorry I keep somehow hitting the close button!

It should run on ext2 although I'm imagining it'll need some static ext2fsck among other things, I am thinking it should be able to run static linux binaries, so it may be all fun to mess with.

@neozeed
Copy link
Owner

neozeed commented Nov 11, 2022

netbsd11-clean.zip

I just installed NetBSD on Qemu 1.6 (yeah I know its old but whatever) I didn't configure networking or anything else, just touched and made directory paths so it'll boot without complaining. I didn't install or prep mach at all.

@neozeed
Copy link
Owner

neozeed commented Nov 11, 2022

Here is my disk & grub ISO... I'm using qemu..

qemu.exe -L pc-bios -hda net11.vmdk -no-fd-bootchk -M isapc -m 16 -fda net11\kcadp11.fs -cdrom super_grub2_disk_i386_pc_2.04s1.iso -boot d

I don't know why but init is always dying :|

xmach-try2.zip
init dying on mach

@neozeed
Copy link
Owner

neozeed commented Nov 11, 2022

i586-linux2.tar.gz
I assume you already have a cross GCC I use this under Linux (under wslv2!)..

@AlessandroSangiuliano
Copy link
Author

Yes i'm using that compiler but on linux without any problem, i'm also trying to get openmach compiled. The nice thing is that xMach builds without problems so i have a starting point to look and play with the code :)

@AlessandroSangiuliano
Copy link
Author

Yes with the actual xMach we have, the kernel seems unable to read ext2fs, so UFS is neded, but in lites there is support for ext2, the problem is that i could not boot lites from linux because mach could not read ext2

@neozeed
Copy link
Owner

neozeed commented Nov 12, 2022

I think it may have been NetBSD 1.3 that worked? I’ll have to mess around more I think the 1.1 may be relevant to a stock Lites

@neozeed
Copy link
Owner

neozeed commented Nov 12, 2022

I was wrong, it's 1.0

@neozeed
Copy link
Owner

neozeed commented Nov 12, 2022

Mach+ext2.zip

qemu.exe -L pc-bios -hda netbsd-1.0.vmdk -cdrom ..\super_grub2_disk_i386_pc_2.04s1.iso -boot d -net none -device ne2k_isa,iobase=0x300,irq=5,netdev=ne -netdev user,id=ne,hostfwd=tcp::42323-:23 -serial none -parallel none -hdb ..\linux-500.vmdk -boot d

So yeah, boot off the grub CD...

hit escape on grub

kfreebsd (hd0,bsd1)/Mach
boot

tell mach it's root is:
/dev/hd0a/mach_servers

xMach booted with NetBSD 1 0 root

And it'll pick up the network and you can telnet in even.

telnet into xMach

The ext2fs wasn't building as the configure script has it pulling from some weird variable...

if test -z "$LITES_CONFIG"; then
#       LITES_CONFIG="STD+WS"
        LITES_CONFIG="STD+WS+ext2fs+msdosfs+slice"
fi

So I had just manually added it in. I'm not sure what to do about the slice/partitioning scheme but it's compiled in at least.

the zip has a stored 7z as it compressed far better.

@AlessandroSangiuliano
Copy link
Author

AlessandroSangiuliano commented Nov 13, 2022

Yes thank you, in the while installing an ubuntu 14.10 on a VM iwas able to build OpenMach. I just have to fix the mkbsdimage that creates a weird assembly file Mach.mods.S with some error/ancient assembly syntax; it is used to build a bootable bsd image

@neozeed
Copy link
Owner

neozeed commented Nov 13, 2022

Can you post in what it was exactly? I’m terrible at assembly. I’ve been experimenting with using newer GCC on the source and turning on O2 as well

@AlessandroSangiuliano
Copy link
Author

Yes sure:

Mach.mods.S.txt

I added the .txt extension for the upload.

This is generated when you run the make command, afdter the kernel build with success, it tries to create a BSD bootable image. This file is necessary for that and is generated all the time, probalby due fo the more recent tools than the ones used at the times, something goes wrong. If you look there are ' " ' that are not closed in the right way so the compiler cries about junk at the end of file:

line 12: Error, junk at the end of line. First urecognized character is '.'

This is quite obvious because at line 6 there is another ' " ' that is opening a string adn gets not closed.

The problem is finding who and how this .S is generated and fix the string generation because all the time you run make the file gets deleted and regenerated.

@AlessandroSangiuliano
Copy link
Author

However i alsod found this to play with:

https://github.com/slp/osfmk-mklinux

This dude, i remember, is inside the Hurd developmnet or at least he was.

I found the ode4Linux too here:

https://github.com/andreiw/ode4linux

This should build with gcc 4.8 and probably with 4.9 too or at least i hope, other wise i need to install anothe ubuntu this time the 14.04 that had gcc-4.8.

Why installing all these VMs, well is faster than messy up trying to install old compilers on new OSes.

@neozeed
Copy link
Owner

neozeed commented Nov 13, 2022

I'm messing with a gcc 4.12 ..

cc1: note: obsolete option -I- used, please use -iquote instead
In file included from ../../../kernel/libmach/c/proc_reg.c:25:
../../../kernel/include/mach/machine/proc_reg.h: In function ‘get_eflags’:

And yeah seems everything with quotes and assembly inline or other is all messed up

@AlessandroSangiuliano
Copy link
Author

Well, when i checked for the documentation of -iquote i found nothing, if you have some reference please help me, fixing that would be a good starting point.

@AlessandroSangiuliano
Copy link
Author

Again here.

I found where the .S is generated. If you want i started a discord server called mach Revival.

https://discord.gg/UBsxMftGEk

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