[1.4] Allow for custom shells in bios.lua
#1
Posted 19 March 2012 - 07:04 AM
As it currently stands the best we can do is run our shell in the default shell on startup. It works but has it's problems.
While we're at it being able to replace rednet would be ideal as well. We can load/unload the API but the coroutine is running.
So basically make BIOS no longer determine the startup progams. Load a bootloader instead that has a configuration we can override. This should allow BIOS to by directly run a bootloader in /rom but allow the user to override it in /. Similarly to the way startup works now.
#2
Posted 19 March 2012 - 07:54 AM
#3
Posted 19 March 2012 - 08:05 AM
The is my suggestion. To modify the existing BIOS.lua file to allow that. I could whip up a quick overhaul if needed.
#4
Posted 19 March 2012 - 01:46 PM
#5
Posted 19 March 2012 - 01:49 PM
#6
Posted 19 March 2012 - 01:53 PM
#7
Posted 19 March 2012 - 04:38 PM
So should I just assume that anything in lua is not worth the suggestion? Because while I know I can rewrite that entirely from scratch, but if suggestion to improve the default os are met with such criticism then I think that should be stocked in the rules.
Liraal is correct in what i'd like to do. Os installs on a per machine basis.
#8
Posted 19 March 2012 - 04:38 PM
Sebra, on 19 March 2012 - 01:53 PM, said:
It would be nice out of the box, so that people can write and share scripts without "well you need to hack bios.lua in this very specific way because my software is expecting it to act like the boot loader information is located in ___", I'll probably be hacking my server's OS scripts (simply out of necessity of this sooner rather than later), but it would be much more awesome for players to be able to download full OSes from the site here that aren't just hacked onto the current bios.lua's boot sequence... which leads to a bit of fun securing the OS against dropping the the original shell and a bunch of other nasty behavior with protected variables and "classes" that could be expanded in a larger OS deployment (my current project).
It's like how we have bios in computers now, give us a common entry point for an entire ground up OS, as opposed to "well we can all implement our own firmware so that everyone has a different boot sequence".
Also a lot of complicated software writing is done offline, which requires us shipping custom ROMs to end users, it's an easier request that we have a little tweak in the default BIOS then support for ROM shipping and selection (or basically EEPROM emulation). A huge benefit for minor change (and I'd be willing to make the changes and submit them for review). However it's also tempting to ask for some writable memory for the BIOS so you can fully configure boot devices (so I can't throw a disk at your PC and gain full control), but I can probably actually implement it and the protection for it in BIOS (would be nicer for the ComputerCraft engine to emulate a small chunk of flash memory).
#9
Posted 19 March 2012 - 05:29 PM
Is not startup enough to load different os? If I'm not mistake redworks os installs from external disk on each comp.
If I understand StrangeWill right, some kind of bios rewrite access wanted.
Are you want comp/turtle behaive as disk drive when placed on another comp untill first time turn on? This would allow to rewrite rom directory one time for each comp.
#10
Posted 19 March 2012 - 05:51 PM
Sebra, on 19 March 2012 - 05:29 PM, said:
Is not startup enough to load different os? If I'm not mistake redworks os installs from external disk on each comp.
The problem at least for me is that bios.lua calls shell, which is an entire environment that will wrap whatever you have run, however I'm a bit more paranoid about OS security, any minor tampering can allow you to drop to the base shell and have full OS access around everything. On top of that a lot of my code is spent overriding what was done in the previous scripts.
I currently also just jack into the startup script, but the problems above still plague the software and require basically dirty hacks to (attempt to...) prevent.
On top of that it protects a lot of objects I wish to expand upon (fs and peripherals I've already expanded for additional functionality) are locked down.
Quote
Are you want comp/turtle behaive as disk drive when placed on another comp untill first time turn on? This would allow to rewrite rom directory one time for each comp.
That is correct, I would more shoot for some kind of BIOS rewrite in the sense of how computer BIOSes are like today: ROM/EPPROM firmware (ROM is fine), small flash memory (password/config), small boot menu (disable remote boot, secure BIOS, boot order, boot from device), and the ability to look for a boot sector (look up /boot of the device) and raw peripheral device support, most of the current bios would probably get moved to /rom/boot, and installing custom software to /boot will allow for a custom ground-up OS, and of course /disk/boot for bootable disks.
#11
Posted 19 March 2012 - 05:59 PM
I made 2 boot files, one searches any installed OSes (files with .startup extension), and shows a menu to choose the one you want to load. The other one only loads my OS, so you can't use CraftOS or another one to see it's files (secure version).
This way you can have a normal computer with CraftOS, and other one with the OS you like.
Of course, you should have to load every API (since CraftOS is't loaded, wich loads the APIs), but I think that if you want to make an OS you should write your own (like I did, with some basic APIs copied
If the writable rom is implemented this could be easier, since you just need to change the rom in the computer you want, but it works for now
#12
Posted 19 March 2012 - 06:07 PM
MysticT, on 19 March 2012 - 05:59 PM, said:
MysticT, on 19 March 2012 - 05:59 PM, said:
Of course, you should have to load every API (since CraftOS is't loaded, wich loads the APIs), but I think that if you want to make an OS you should write your own (like I did, with some basic APIs copied
It allows you to also write bare firmware if you don't want to load all those APIs, so it can be very useful to pick and choose (also allows me to not load APIs that may allow users to circumvent security by writing nasty scripts).
MysticT, on 19 March 2012 - 05:59 PM, said:
It doesn't even so much need to be writable, and to be honest I'd probably argue that bios.lua does a lot more than it should emulating BIOS.
#13
Posted 19 March 2012 - 06:11 PM
#14
Posted 19 March 2012 - 06:16 PM
For now startup change os loading in some way. What you want to change?
#15
Posted 19 March 2012 - 06:26 PM
Sebra, on 19 March 2012 - 06:16 PM, said:
My preferred method:
Load config from flash (each computer gets it's own flash, only accessible by BIOS).
Wait 5 seconds on BIOS screen (ctrl enters menu, allows for config editing and securing your configs with a password).
Load boot device order
On each device path, look for existence of /boot
If boot exists, execute.
If not, next boot device.
If out of boot devices, load ROM OS (CraftOS).
I'd have no problem writing this and submitting it.
Just a primary idea, but allows you to load whatever you want and secure boot orders.
#16
Posted 19 March 2012 - 06:31 PM
#17
Posted 19 March 2012 - 06:33 PM
Sebra, on 19 March 2012 - 06:16 PM, said:
For now startup change os loading in some way. What you want to change?
#18
Posted 19 March 2012 - 06:46 PM
StrangeWill, on 19 March 2012 - 06:26 PM, said:
Load config from flash (each computer gets it's own flash, only accessible by BIOS).
Wait 5 seconds on BIOS screen (ctrl enters menu, allows for config editing and securing your configs with a password).
Load boot device order
On each device path, look for existence of /boot
If boot exists, execute.
If not, next boot device.
If out of boot devices, load ROM OS (CraftOS).
I'd have no problem writing this and submitting it.
Just a primary idea, but allows you to load whatever you want and secure boot orders.
Liraal, on 19 March 2012 - 06:33 PM, said:
Sebra, on 19 March 2012 - 06:16 PM, said:
For now startup change os loading in some way. What you want to change?
And how can your bootloader help if hacker can have it?
#19
Posted 19 March 2012 - 06:50 PM
Sebra, on 19 March 2012 - 06:46 PM, said:
StrangeWill, on 19 March 2012 - 06:26 PM, said:
Load config from flash (each computer gets it's own flash, only accessible by BIOS).
Wait 5 seconds on BIOS screen (ctrl enters menu, allows for config editing and securing your configs with a password).
Load boot device order
On each device path, look for existence of /boot
If boot exists, execute.
If not, next boot device.
If out of boot devices, load ROM OS (CraftOS).
I'd have no problem writing this and submitting it.
Just a primary idea, but allows you to load whatever you want and secure boot orders.
In a perfect world, yes. If we wanted just a simple boot sector setup without all the fancy jazz, no... but I'd say "hey, implement the flash memory for BIOS and make the system 1000x better". Mainly: implement BIOS after real world BIOS.
First priority is a better BIOS, everything else is frill.
As for hackable systems:
Hacking eachothers OSes is going to be half the fun.
#20
Posted 19 March 2012 - 07:09 PM
We immediately try to circumvent it.
That is the fun... I'm going to try and secure something... and StrangeWill is going to try to break it...
If that wasn't a fact-of-life in minecraft (people trying to get in) then we wouldn't have a reason to lock doors in the first place...
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











