This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
gaec's profile picture

change bios.lua into a real BIOS

Started by gaec, 06 February 2016 - 09:38 AM
gaec #1
Posted 06 February 2016 - 10:38 AM
The Idea is to change bios.lua into a real bios which looks for Operating Systems in /os /rom/os /disk/os so the current /rom/bios.lua gets split into /rom/bios.lua and /rom/os

and /rom/os should be overrideable by resource packs

and in a config file per Computer (p.e. /.bios) the boot order should be configurable

the idea is, that the ones who want to create real CC OSes don´t have to do this for the whole Server or whatever, they also may be able to install them on only one computer and those OSes would also be installable on Servers by non-Admins
wilcomega #2
Posted 11 February 2016 - 08:50 AM
I guess this would be nice, but this is already possible with resourcepacks
Lupus590 #3
Posted 11 February 2016 - 10:00 AM
I guess this would be nice, but this is already possible with resourcepacks

bios.lua is the only file which a resource pack can't change.
wilcomega #4
Posted 11 February 2016 - 01:25 PM
I guess this would be nice, but this is already possible with resourcepacks

bios.lua is the only file which a resource pack can't change.

nvm i guess
Cloud Ninja #5
Posted 01 March 2016 - 11:33 AM
I guess this would be nice, but this is already possible with resourcepacks

bios.lua is the only file which a resource pack can't change.
While this is true, a server owner could modify the server bios to check for writes to a file in the rom or even outside the rom for changes and boots off of those, wouldnt that be possible?
ry00000 #6
Posted 02 March 2016 - 12:43 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
Anavrins #7
Posted 02 March 2016 - 03:19 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.
Cloud Ninja #8
Posted 02 March 2016 - 10:19 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.
Yes but on a server you could modify the jar if you really wanted.
wilcomega #9
Posted 05 March 2016 - 04:23 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.
Yes but on a server you could modify the jar if you really wanted.
I think the suggestion is to get a non hacky way
Cloud Ninja #10
Posted 05 March 2016 - 04:25 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.
Yes but on a server you could modify the jar if you really wanted.
I think the suggestion is to get a non hacky way
There isnt one then. Without modification to the jar you cant really have a custom bios. You might be able to do some hackery with a TLCO and overwriting rednet, but other than that, you're out of luck.
ry00000 #11
Posted 05 March 2016 - 06:17 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.

When this thing finally gets implemented, we could. In a way similar to abusing OC's flash command.
Cloud Ninja #12
Posted 05 March 2016 - 10:06 PM
Or somebody could install a virus that over-writes bios.lua with malicious code. That spreads on floppies. (HINT HINT: I'm developing a virus…)
HINT HINT: you can't modify the bios even with a resourcepack, let alone from in-game.

When this thing finally gets implemented, we could. In a way similar to abusing OC's flash command.
Not really. If Bios editing was enabled with a resource pack it would be a bad idea. A change in the bios.lua would apply to all computers in the game, not just a specific computer. Now, if a bios was edited and allowed for things to be passed in via a file in the root directory, then it would do per computer.
manu_03 #13
Posted 06 March 2016 - 11:07 AM
I agree, but there must be some restrictions (string metatable). I accidentaly crashed a server trying to use the new exploit. So, the bios.lua inside jar restricts that and don't allow per-computer BIOS to edit the restriction.

Also stuff like shutdown with Ctrl+S would be better being allowed to be editable. I was on a server with a CC School, so you put the user and the password and it clones files that were on the server to the computer. On shutdown with os.shutdown() it saved files on the server, but Ctrl+S uses raw shutdown, that can't be edited.
Sxw #14
Posted 07 March 2016 - 11:48 PM
You cannot edit bios.lua via resource pack IIRC, but you can add a autorun file, which runs before the shell calls any startup programs. If you wanted to, you could do a top level coroutine override (Still possible? Not sure) and do your own stuff.
Cloud Ninja #15
Posted 08 March 2016 - 01:15 AM
You cannot edit bios.lua via resource pack IIRC, but you can add a autorun file, which runs before the shell calls any startup programs. If you wanted to, you could do a top level coroutine override (Still possible? Not sure) and do your own stuff.
Yes, a TLCO is still possible, very much so. I'm using one in my program to root the currently popular CC OS called 'O'. The closest without a resource pack to getting a custom bios, but features that could be created with a bios overwrite would be immense.
gaec #16
Posted 10 March 2016 - 04:07 PM
I think you didn´t get it, the things with the metatable and so on stay in an unmodifyable bios.lua And Resourcepacks modify every Computer
Edited on 10 March 2016 - 03:09 PM
ry00000 #17
Posted 15 June 2016 - 02:08 PM
so if you name a file "autorun" it will run BEFORE anything else? So I could potentially brick a computer by making an autorun with os.shutdown() in it?
H4X0RZ #18
Posted 15 June 2016 - 03:05 PM
so if you name a file "autorun" it will run BEFORE anything else? So I could potentially brick a computer by making an autorun with os.shutdown() in it?

Autorin files can only be added using a resourcepack so you can't use it for any malicious stuff. Sorry ;D