Skip to content

Instantly share code, notes, and snippets.

@PedroHLC
Created September 13, 2016 18:46
Show Gist options
  • Save PedroHLC/3b185aaf2bdce05b132274604ac25a7b to your computer and use it in GitHub Desktop.
Save PedroHLC/3b185aaf2bdce05b132274604ac25a7b to your computer and use it in GitHub Desktop.
PlugInAnyOS
[THIS IS JUST THE HELL OF AN IDEIA I GOT, BUT PROBABLY WILL NEVER IMPLEMENT]
What is PlugInAnyOS?
+ First of all, it isn't an OS.
+ It's actual job is to create, manage and run multiple SOs.
What it can do?
+ Create and manage any OS rootfs using what it calls layers and enviroments.
+ Create and manage pseudo enviroments (in case you want to chroot in a different env, or sandbox some app).
+ Capable of running multiple OSs simulteneously using HVM
Behavious notes:
+ Doesn't show anything on screen, cause it doesn't allocate any device for it own use. One must use UEFI parameters and BIOS options to select what run option it will follow.
Real Filesystem:
system
init
# files required starting
supreme
_confg
# Required for decoding '.conf' files syntax
_hvm
# Required for HVM capabilities
# mods that it can't live without
mods
psd_rootfs
# Create virtual rootfs for Unix-based OSs
psd_disk
# Create virtual disks
psd_eth
# Creates virtual ethernet devices
psd_{pci, sata, ide, scsi, bus}
# Create virtual PCI\SATA\IDE\SCSI\USB Bus\Controller
disk_{mbr,gpt}
# Gives pseudo_disk hability to manage MBR\GPT partition-tables
part_{fat32,ntfs}
# Gives pseudo_disk hability to manage FAT32\NTFS partitions
conn_{bridge,nat}
# Gives psd_eth hability to create Bridge\NAT connections
driver_eth
# Ethernet host drivers required by conn_bridge and conn_nat
driver_{pci,sata, usb}
# PCI\SATA\USB Bus\Controller host drivers required to passthrough the entire bus or a few devices connected to it
init_linux
# Intialize Linux (without boot managers)
init_windows
# Intialize Windows (ms default boot manager)
layers
mono
<package>-<targetso>
[<provider>_]<version>
root.conf
layer: <layername>
links: {
<in_layerpath>: <srcpath>
}
user.conf
generic
<targethw>
# eg: ./jre-linux/oracle_8u40/x86_64
# eg: ./steam-windows/20160913/i686
stereo
<targetso>-<critic>[_<critic-ver>]-[<servo-provider>_]<servo>[_<servo-ver>]-<utility>-<comb-version>
<targethw>
# eg: If one has a "openrc" and "emacs" then ./linux-openrc_1-emacs-daemon-1.0/any
etc
<prefix>
<file>
win10
x86_64-boot-cfg
linux
locale-cfg
fstab-cfg
openrc-services-clean
openrc-services-plasma
networkmngr-profiles
network-bridge0-dhcp
sshd-cfg
users
100
emacs
firefox
pulseaudio
200
firefox
steam
msoffice
wpsoffice
config
users
passwd
100
generics_folders.conf
'documents': {
part: 6EEE2370EE23302F
path: '100/Documents'
}
'pictures': {
part: 6EEE2370EE23302F
path: '100/Pictures'
}
sits
<name.conf>
physical: <list(phydev)>
virtual: <list(psddev)>
memory: <memsize>
# Hardware distribution
dummy.conf
cpu: host
virtual: eth0_bridge0
memory: 2G
nvidia_usb.conf
cpu: host
physical: pci:ven:10de.* usb:bus:*
virtual: eth0_bridge1 hd_audio
memory: flex
dummy_arm.conf
cpu: armv8
envs
linux_cli.conf
mono: linux-lts openrc dhcpd openssh
etc: linux/ locale-cfg fstab-cfg openrc-services-clean network-bridge0-dhcp sshd-cfg
rootfs_plugiaos: /plugiaos
linux_plasma.conf
mono: linux openrc networkmanager alsa pulseaudio nvidia xorg-server sddm plasma firefox-developer cadence qbittorrent emacs qterminal audacious-qt
stereo: openrc-emacs-daemon pulseaudio-alsa openrc-pulseaudio
etc: linux/ locale-cfg fstab-cfg openrc-services-plasma networkmngr-profiles sddm-theme-config
rootfs_plugiaos: '/plugiaos'
pseudo_env {
linux_cli: '/psdenv_linux_cli'
}
windows_10clean.conf
windows_10full.conf
vrtdevs
<name>.conf
type: <type>
<others_cfgs>
# Virtual devices
eth0_bridge0.conf
type: eth
conn: bridge
bridge_src: eth0
mac: 000000000000
eth0_bridge1.conf
type: net_bridge
src: eth0
mac: 000000000001
others_hdd.conf
type: sata_bus
devices: {
0: {
type: phydisk
addr: usb:dev:40bb.30cc.1
# external harddrive
}
1: {
type: part2disk
addr: uuid:6EEE2370EE23302F
# games partition
},
}
run.conf
<option_id>: {<sit>: <env>, ...}
# or baremetal: <id>/'<option_title>': <env>
0: {
dummy: linux_cli
nvidia_usb: windows_10clean
}
1: windows_10clean
2: linux_games
run
phydevs
<...>
# Physical devices
vrtdevs
<...>
# Virtual devices
envs
1..INF
<...>
# /*
in case of Unixes, here you'll find the rootfs contents
in case of Windows, here you'll find something similar to wine's dosdevices
# */
Device addresses:
<driver>:<selector>:<selection>
e.g.:
usb:bus:* # every USB controller
pci:bus:0.3.0 # whatever is in 00:03.0
pci:bus:0.{2,3}.0 # everything in 00:02.0 and 00:03.0
pci:ven:40bb.30cc.* # every device with VEN 0x40BB and DEV 0x30CC
pci:ven:40aa.30dd.1 # first device with VEN 0x40AA and DEV 0x30DD
pci:dev:30ee.40ff.* # every device with DEV 0x30EE and VEN 0x40FF
sata:bus:0.0 # the entire first disk connected on the fist SATA bus
part:uuid:6EEE2370EE23302F # one NTFS partition in whatever place its
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment