Beta Inferno Operating System


Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
Hi @levi :)

Thanks for your feedback, it's really appreciated !

I wonder why this is happening, since your /usr/$USER is basically a clone of /usr/inferno... Unfortunately, I don't know (yet) how to set permissions and roles properly with Inferno...

Maybe some more experienced users ( @Linux-SWAT , @Cloudef ) could shed some light on this issue ?

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,022
Location
Somewhere off the coast of the EU
I think it's because when you log in as inferno, it creates boot time processes under a user named as your linux user, and your processes get started as user 'inferno' (or whatever /usr/ folder you create). If you create one called your linux user, the system can't distinguish between you and the boot processes owner, so ends up giving you the rights to do stupid stuff, like killing the init process itself.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
@levi : I just came to the same conclusions after killing PID 1 here ;)

What would be an elegant solution to this issue in your opinion ? Do you think appending / prepending something to $USER would do ?

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,022
Location
Somewhere off the coast of the EU
Well, the nicest thing to have would be for boot time processes to be put under some user that's not named after your linux user, but that would mean modifying how inferno boots up. The official arrangement is to log in as user 'inferno' and I was okay with that personally, and you could tell a user that if they weren't happy with that, they could copy the /usr directory to whatever they wanted (as long as it wasn't their linux name) and login as that.

Of course, if their linux name is 'inferno' then you'll probably have the same trouble. Unless it has some mechanism to detect that and change the name it uses. But I can't be bothered to test that just yet.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
Hi all :)

@levi : the issue with the "inferno" user is that the appdata/inferno-magicsam/usr/inferno directory is created by $USER in the runscript, and all the files within that directory belong to $USER, not to "inferno".

I can't "chown -R inferno:inferno appdata/inferno-magicsam/usr/inferno" from the runscript, because "inferno" doesn't exist as a GNU / Linux user.

I can "chmod -R a+rwx appdata/inferno-magicsam/usr/inferno" though, but this only applies to existing files, not to files you could create as "inferno" in the future.

"Inferno" is not $USER, and doesn't belong to its group, thus it falls in the "other" category of the UNIX permissions (AFAIK), which lacks the right to write files by default.

This is bringing us back to the fifth post in this thread, where I suggested to use umasks to circumvent this issue :p

I'll see what I can do about it ASAP (on Sunday if time permits) :)

Cheers, Magic Sam
[doublepost=1478291931,1478290380][/doublepost]Hi again !

New interesting test regarding Charon: start @notaz ' Live System Info, then start "Inferno". Try to launch "Charon", either from the shell or from the menu, and watch the CPU usage sky rocket to 100% ...

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,022
Location
Somewhere off the coast of the EU
Hmm, I was able to create a file in my home directory using the text editor with a name I don't remember just now in the first release. I'll see if I can repeat that and see what permissions it has in my appdata folder.

Edit: Oh, I see. The problem is you can't modify files you created. That seems to be because they're created under your linux user (which I'll call 'root' from here on in), whether you use the edit app or create a file by piping echo into a file. I was able to chmod it with o+w to make it writable by all, and then I was able to modify it, I was unable to create a shell under my 'inferno' user, because it doesn't have 'su' or anything I could find in the manual to let me do that. If this were a linux, it appears files are created as root, but you only have the logged in permissions to access them.

I guess for the time being, before we understand what's going wrong exactly, logging in as root is probably the only thing that can be done, and we'll just have to be careful not to kill init or do anything else daft with the system.

According to 'ps' your shell and any the menu are running under user inferno (or whatever you logged in as), but when they create files they're owned by root. That doesn't feel right, as a linux user.
 
Last edited:

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
Hi all :)

I made a small mistake in build #3 (not uploaded yet), will have to recompile it with good CFLAGS this time...

In inferno-magicsam/inferno/mkfiles/mkfile-Linux-arm :
CC= arm-gcc -c
CFLAGS= $CFLAGS -O\
-Wuninitialized -Wunused-variable -Wreturn-type -Wimplicit\
-I$ROOT/Linux/arm/include\
-I$ROOT/include\
-DLINUX_ARM

-O appears twice: a first time in the CFLAGS from @ptitSeb 's Code::Blocks as -Ofast, and a second time in the file itself as -O.

According to GCC 6.2 manual:
If you use multiple -O options, with or without level numbers, the last such option is the one that is effective.

Meaning that optimizations turned on by -Ofast didn't make it to build #3 :(

@levi : regarding the file permissions issues we have, what about using two different accounts ?

- "inferno" (with umask giving o+w permissions by default so that you can edit your own files) as an unprivileged user.

- $USER as a kind of "root" user, in case you'd want to do something silly with PIDs ;)

Opinions ?

Cheers, Magic Sam
 
Last edited:

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,022
Location
Somewhere off the coast of the EU
Yes, that would work. I haven't seen how the runscript creates usr/inferno, but if you set those files as o+w on the linux side, they'll probably be o+w on the inferno side, thus writable even though they're owned by root. I'm not sure that the root usr account as any real use once that's done, but I guess you may as well leave it in. Just advise people to log in as inferno, and to chmod any files they create so that they can modify them. Maybe also chmod them from the runscript, so anyone who forgets will be able to modify them after restarting inferno at least, although that would break anyone's attempt to make files non-writable, so maybe test if it's writable as both user and group before setting other as writable. No idea off the top of my head how to do that from a shell script mind you!

Edit: 'find usr/inferno -perm -ug+w -print0|xargs -0 chmod o+w' should do it in one, if I've read the man page correctly. Beware all of the hyphens in there - they're all important, and some of them will silently do the wrong thing if you ignore them, and the difference between '0' (zero) and 'o' (lower case O)
 
Last edited:

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
Hi all :)

I'm uploading build #3 to the Repo ! EDIT: I've been uploading this ~150MB file for hours now, still nothing... I'll try again tomorrow from work... EDIT: done
Changelog:

New in build #3

- Rebuilt with @ptitSeb 's latest beta Code::Blocks + default CFLAGS
- Better documentation from Vita Nuova
- Actual screenshots from the Pandora port
- Removed the ability to log in as $USER, prefer "inferno" instead
- Fixed file permission issues as "inferno" (chmod -R o+w and umask 0000 on /usr/inferno)

As always, feel free to give this new version a try and report any bugs you may find :)

EDIT: don't forget to remove the old appdata/inferno-magicsam directory before using this new version

Cheers, Magic Sam
 
Last edited:

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,333
Age
38
Location
Innsmouth, MA
Hi all :)

@levi : some good news at last ! Charon is now working !

Have a look here for more details.

I'll upload this new build ASAP (this evening if time permits) !

Cheers, Magic Sam
[doublepost=1478632961,1478617263][/doublepost]Hi again,

I've uploaded build #4 to the repo !
Changelog:

New in build #4

- Updated sources (latest commits from November the 6th)
- Charon is now working !
- Compiled "emu" with "-g" flag for easier debugging
- Added a new screenshot featuring the Web browser



Many thanks to Dr Charles Forsyth from Vita Nuova for his help :)

Cheers, Magic Sam
 
Last edited:
Top