3 ms·
It should just be a matter of producing a kernel and, if necessary, RAM disk that can be booted the same way as Linux.
by eschaton 9mo ago
It should just be a matter of producing a kernel and, if necessary, RAM disk that can be booted the same way as Linux.
- cpach 9mo agoThen one needs to launch it. Not sure if there are any lancher UIs out there, or if one has to write custom code for that.
- eschaton 9mo agoMy point is that as long as OpenBSD can boot like Linux, you just have to tell whatever VM front-end you’re using that you’re booting a Linux but give it an OpenBSD kernel and RAM disk. Traditionally BSD has booted very differently than Linux, because Linus adopted the same boot process as MINIX when he first developed it (since he was actually using the MINIX boot blocks at first). BSD has historically used a bootstrap that understands V7FS/FFS and can load a kernel from a path on it. MINIX takes the actual kernel and RAM disk images as parameters so it doesn’t need to know about filesystems, and that tradition continued with Linux bootstraps once it was standalone.
- Rediscover 9mo agoWho else was rdev'ing the Linux kernel to tell it where the root ext2(?) partition was long before they were using RAM disks? Like with SLS or MCC?
- fragmede 9mo agoOriginally Linux had Minix FS, followed by ext. Ext2 wouldn't make an appearance until 1993 by Rémy Card, so it depends on when you were using it.
- deleted 9mo ago[deleted]
- fragmede 9mo agoParallels will run a VM that can (manually) boot bsd.rd from the EFI shell if you stick BOOTAA64.EFI and bsd.rd on a FAT32 GUID formatted.dmg, connect it to the VM, then boot EFI shell. Type: connect -r map -r fs0: bootaa64.efi boot bin.rd Then you'll be in the OpenBSD installer, having booted an OpenBSD kernel. You can grab the files from: https://ftp.openbsd.org/pub/OpenBSD/snapshots/arm64/ https://ftp.openbsd.org/pub/OpenBSD/snapshots/arm64/ Actually installing the system is left as an exercise for the reader.
- jonhohle 9mo ago“just” is doing a lot of work in that sentence.
- eschaton 9mo agoYes and no; kernels aren’t magic, and “change how this kernel is loaded to match how Linux does it” is actually a reasonable first assignment for an Operating Systems class at a top-tier school. (You’re basically just creating an alternative `main()` if you don’t need a RAM disk image from which to load drivers.)
- fooker 9mo agoIt's a first assignment if you are talking about a computer from 1990.
- eschaton 9mo agoWhat, pray tell, would you do for a first assignment in an Operating Systems class at a top-tier school that actually involves making changes to on realistic operating system code?
- fooker 9mo agoI had to implement system calls in xv6. You can look up which top tier schools use it for OS classes.
- eschaton 9mo agoOh, is that what MIT’s using these days?
- glhaynes 9mo agoAt the risk of getting further off-topic: what sort of system calls did they have you implement? I’ve never done but a tiny bit of kernel hacking and that sounds like a good exercise, but I’m not sure what would be a good first syscall to add.