Jump to content




LuaGRUB2 - An OS Bootloader for CC - Version 3.3

utility

39 replies to this topic

#21 !!!!!!!!!!ExclaimationMark

  • Members
  • 30 posts

Posted 14 August 2014 - 06:13 AM

View PostROFLCopter64bit, on 14 August 2014 - 03:43 AM, said:

Thanks guys for all the input, I've updated the program and the OP to include what you've wanted. You can sandbox OSes from HTTP and Rednet now by changing this in the BIOS SETUP (Press 's' when the boot screen displays), and a skeleton version called PocketGRUB is available. More requests for features are more than welcome.

View Post!!!!!!!!!!ExclaimationMark, on 13 August 2014 - 04:09 AM, said:

Quick question: HOW ON EARTH DID YOU SANDBOX?
I have overridden the fs functions with my own that prevent accessing anything outside it's own folder. The only other sandbox is HTTP and Rednet, but that is user-changeable.
so... you made custom fs apis but how do you overwrite it?

EDIT: PAGECLAIM :D

Edited by !!!!!!!!!!ExclaimationMark, 14 August 2014 - 06:13 AM.


#22 willwac

  • Members
  • 182 posts

Posted 22 August 2014 - 12:58 AM

What emulator are you using?

KilOS screwes up your boot loader.
This is the pastebin code: sP9WXu8n

Edited by willwac (NewCoolPC), 22 August 2014 - 01:06 AM.


#23 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 22 August 2014 - 05:50 AM

View Postwillwac (NewCoolPC), on 22 August 2014 - 12:58 AM, said:

What emulator are you using?

KilOS screwes up your boot loader.
This is the pastebin code: sP9WXu8n
The emulator is CCEmuRedux.
I'll have a look at that OS later and work on a patch.

#24 Mc Fow1er

  • Members
  • 21 posts

Posted 22 August 2014 - 02:24 PM

Hey could I possibly try to make the booter see weather or not your using a pocket and make it select the appropreate code? I think that it might work, even though I'm not that skilled in lua I have a strong it will still work. With some testing and debugging of course but I'm sure it will work.

Edited by Mc Fow1er, 22 August 2014 - 02:28 PM.


#25 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 22 August 2014 - 11:18 PM

View PostMc Fow1er, on 22 August 2014 - 02:24 PM, said:

Hey could I possibly try to make the booter see weather or not your using a pocket and make it select the appropreate code? I think that it might work, even though I'm not that skilled in lua I have a strong it will still work. With some testing and debugging of course but I'm sure it will work.
I could do it, but I'd need to increase the size of the program by at least 50%, since the pocket version uses different APIs and most of the code is changed. I'll have a go at it.

#26 Mc Fow1er

  • Members
  • 21 posts

Posted 23 August 2014 - 07:08 AM

View PostROFLCopter64bit, on 22 August 2014 - 11:18 PM, said:

View PostMc Fow1er, on 22 August 2014 - 02:24 PM, said:

Hey could I possibly try to make the booter see weather or not your using a pocket and make it select the appropreate code? I think that it might work, even though I'm not that skilled in lua I have a strong it will still work. With some testing and debugging of course but I'm sure it will work.
I could do it, but I'd need to increase the size of the program by at least 50%, since the pocket version uses different APIs and most of the code is changed. I'll have a go at it.
Well, by default the maximum amount of space your allowed to have on a computer is exactly 2MB down to the byte, I set mine to 5MB (5242880 bytes). My currently installed OSes only take up about 1.41MB of which OneOS(464KB) and DeltaOS(402KB) take up the most space, lbrub.sys and the startup how ever only take up about 52ish KB so it wouldn't really bother the user size wise. As most advanced programs take up about ~100 - 300 KB

Edited by Mc Fow1er, 23 August 2014 - 07:17 AM.


#27 tenshae

  • Members
  • 66 posts

Posted 28 August 2014 - 08:08 PM

I think this is too advanced looking for a bootloader. Most EFI are just text and "1. bleh, 2. blehbleh," options and stuff. Something simpler looking with the same amount of power would be more realistic.
EDIT: Wow, I really should have tried it out before posting. It's nice! I'm using this as the default bootloader for an OS i'm making. Is that alright? I have my own custom one I can switch back to if you have problems with this.

Edited by Utopastoo, 29 August 2014 - 01:09 AM.


#28 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 29 August 2014 - 10:19 PM

View PostUtopastoo, on 28 August 2014 - 08:08 PM, said:

I think this is too advanced looking for a bootloader. Most EFI are just text and "1. bleh, 2. blehbleh," options and stuff. Something simpler looking with the same amount of power would be more realistic.
Right now in the update I'm making you get to choose the boot screen you want to appear, so that will basically fix any problems that anyone has like yourself, while allowing people to choose what they want.

View PostUtopastoo, on 28 August 2014 - 08:08 PM, said:

EDIT: Wow, I really should have tried it out before posting. It's nice! I'm using this as the default bootloader for an OS i'm making. Is that alright? I have my own custom one I can switch back to if you have problems with this.
Sure, go right ahead. Just make sure they install the bootloader first just to make sure there aren't any issues.

#29 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 29 August 2014 - 11:16 PM

Version 3.0 changelog:
Merged desktop and pocket versions, added new bootscreen options, improved sandboxing and slight improvements all round.
Pretty much everything that has been suggested has been added.

#30 tenshae

  • Members
  • 66 posts

Posted 03 September 2014 - 05:04 AM

View PostMr. Bateman, on 29 August 2014 - 10:19 PM, said:

-snip-
Right now in the update I'm making you get to choose the boot screen you want to appear, so that will basically fix any problems that anyone has like yourself, while allowing people to choose what they want.
-snip-
Sure, go right ahead. Just make sure they install the bootloader first just to make sure there aren't any issues.
I think I've settled on a simpler, sandboxing startup file approach. But thanks for your help!

#31 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 26 September 2014 - 02:45 AM

View Postwillwac (NewCoolPC), on 22 August 2014 - 12:58 AM, said:

What emulator are you using?

KilOS screwes up your boot loader.
This is the pastebin code: sP9WXu8n
I seem to have forgotten this, but I've addressed the issue that causes your installer to override the LUAGrub installation method. But, it breaks the ability to patch HTTP and Rednet, so I won't be releasing it via the stable channel until I fix these issues too. But, if you're still interested, I can link it to you to test it to make sure I haven't broken too many things.

Edited by Mr. Bateman, 26 September 2014 - 02:45 AM.


#32 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 11 October 2014 - 12:39 AM

No screenshots unfortunately, but I've been working on v3.1. I'm releasing a program soon that allows you to set a computer as a database over Rednet, so you can access it on a wired or wireless network. I'm still playing around with protocols and data saving methods, so it's still going to be a while away. It's going to address the issues above, and you will be able to boot using files from another computer, creating a sort of cloud network in CC.
Just a heads up since I haven't made an update for well over a month.

#33 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 12 October 2014 - 01:08 PM

Version 3.1.1 has been released, which primarily adds working capability to OneOS and KilOS, and also fixes the issue with http/rednet sandboxing.
FTP (cloud) bootloading is on its way.

#34 LDDestroier

  • Members
  • 1,095 posts
  • LocationACDC Town

Posted 07 November 2014 - 02:32 PM

I absolutely love what you're doing! LuaGRUB2 seems to work well, except the operating system "Nova" (link) does not work when using 'install via pastebin'.

#35 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 09 November 2014 - 07:26 AM

View PostLDDestroier, on 07 November 2014 - 02:32 PM, said:

I absolutely love what you're doing! LuaGRUB2 seems to work well, except the operating system "Nova" (link) does not work when using 'install via pastebin'.
We have discovered the error that causes the incompatibility, and a fix is in the works as we speak.

In other news, LuaGRUB2 has been updated to v3.2, which benefits both users and developers. It now handles errors properly, and can display what went wrong. Users can use this feature to report bugs, and developers can use it to help fix the bug, or even help developers of OSes that haven't been released yet to find out issues when the computer restarts too fast to find out what the error was.

This is an example error of Nova when you try to run it (which is incompatible as of writing), instead of just shutting down before it can be read.
Posted Image

Edited by Mr. Bateman, 09 November 2014 - 07:26 AM.


#36 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 10 November 2014 - 12:56 AM

Version 3.3 has been released, support for Nova has been added, and preparation for a developer API is in the works.

#37 LDDestroier

  • Members
  • 1,095 posts
  • LocationACDC Town

Posted 16 March 2015 - 10:45 PM

It appears the nova beta isn't showing up on the menu, despite the '/os/Nova' folder existing. Please fix?

#38 biggest yikes

  • Members
  • 573 posts

Posted 18 March 2015 - 12:41 AM

View PostLDDestroier, on 16 March 2015 - 10:45 PM, said:

It appears the nova beta isn't showing up on the menu, despite the '/os/Nova' folder existing. Please fix?
Chances are the "startup" file doesn't exist in that folder.
If an OS doesn't set itself to boot on startup, the OS won't be detected. (Or rather, detected but ignored)
EDIT: Just tried it, it's because the "Nova" folder is placed in the sandbox folder; so '/os/Nova/Nova'. Just extract the contents from '/os/Nova/Nova' to '/os/Nova' and it should boot.
EDIT 2: Ignore what I said with the first edit, you need the Nova folder, it's just the startup file isn't stored! Yes, you're right, fixing is needed.. Maybe an option to store the main file aswell? That would be nice.

Also, to the author, operating systems with "advanced shell" will crash if you type ".." because it tries to auto-complete the directory.. in which case it crashes because you can't access files outside the sandbox directory. Wonderful.

I also find a glitch where with fs.list and fs.isDir, fs.isDir executes based off the sandboxed directory, and fs.list is based off the main directory. So, when you type "ls" into the shell, it lists the contents of the root directory (it should list the contents of the sandboxed directory), and it lists all the directories (excluding rom, I think that's hardcoded) as files (because with fs.isDir if a file doesn't exist it's reported as a file), returning a wonky result:
Posted Image
Either fs.list should default to the sandboxed directory, or fs.isDir should execute based off the root, preferably the former (considering you can't cd to these directories, which is even wonkier)

Either way, this program is really cool and very well done, a few bugs patched around and I would use it on my main (main-main; I get the image in the screenshot says "Main", that's just Main for my session) computer.

Edited by Atenefyr, 18 March 2015 - 01:00 AM.


#39 Mr. Bateman

  • Members
  • 98 posts
  • LocationAustralia

Posted 18 March 2015 - 01:18 AM

View PostAtenefyr, on 18 March 2015 - 12:41 AM, said:

Also, to the author, operating systems with "advanced shell" will crash if you type ".." because it tries to auto-complete the directory.. in which case it crashes because you can't access files outside the sandbox directory. Wonderful.

...

Either fs.list should default to the sandboxed directory, or fs.isDir should execute based off the root, preferably the former (considering you can't cd to these directories, which is even wonkier)
It sandboxes the filesystem by adding '/os/[os name]/' in front of paths. If everyone and everything used absolute paths 100% of the time, everything would be working perfectly. But that isn't the case, so we have some wonky mechanics going on here.

I've revised the sandbox enough times to get relative paths to (partially) work, but I think I can explain why '..' causes it to crash.
Simply put, it thinks '..' is a relative path since it doesn't have a '/' at the very start, so it tries to append '..' at the end, and since shell isn't involved to interpret that to go up a level, the sandbox freaks out and I'm not sure what happens after that.

I'll look into those fs.list issues, but I don't believe I'll get a fix out soon since I don't really have much time on me.

#40 biggest yikes

  • Members
  • 573 posts

Posted 18 March 2015 - 01:34 PM

View PostMr. Bateman, on 18 March 2015 - 01:18 AM, said:

I'll look into those fs.list issues, but I don't believe I'll get a fix out soon since I don't really have much time on me.
Okay, thanks anyway!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users