Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...
Transcript of Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...
![Page 1: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/1.jpg)
Bedrock Linux (1.0beta2 Nyla)
Daniel “paradigm” ThauBedrock Linux founder/lead developer
Columbus Linux User Group2014-11-19
![Page 2: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/2.jpg)
Bedrock Linux (1.0beta2 Nyla)
Table of Contents
MotivationReal-world examplesTerminology
General usagePlanned for NylaPlanned for future
![Page 3: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/3.jpg)
Notice
I The content here describes the as yet unreleased BedrockLinux 1.0beta2 Nyla.
I Everything is subject to change.
![Page 4: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/4.jpg)
Motivation
![Page 5: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/5.jpg)
Motivation — Debian/RHEL clones
I Debian and RHEL clones are stable.
![Page 6: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/6.jpg)
Motivation — Arch Linux
I Arch Linux provides cutting-edgepackages.
![Page 7: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/7.jpg)
Motivation — Ubuntu
I Ubuntu is very popular.I Very commonly supported/targeted by
third parties such as Valve.
![Page 8: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/8.jpg)
Motivation — Gentoo
I Gentoo can automatically compilepackages from source with variouspreferences set.
![Page 9: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/9.jpg)
Motivation — OpenSUSE
I OpenSUSE has great out-of-the-box KDEsupport.
![Page 10: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/10.jpg)
Motivation — Rebecca Black OS
I Rebecca Black OS has/had early supportfor Wayland.
![Page 11: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/11.jpg)
Motivation — Bedrock Linux
Bedrock Linux can use software from other distros such that mostof it “just works”.
X Debian/RHEL rock solid stable base?X Arch’s cutting edge packages? AUR?X Gentoo’s compilation automation options?X Ubuntu’s Unity? Mint’s Cinnamon? OpenSuSE’s KDE?X Your-favorite-distro’s your-favorite-feature?
All at the same time, transparently, cohesively.
![Page 12: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/12.jpg)
Real-world examples
![Page 13: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/13.jpg)
Real-world examples — Compiz/Xorg
I Debian’s compiz works, but xorg is to old for new laptopI Arch’s xorg is good, but compiz is broken?I So get compiz from Debian, xorg from ArchI Yes, that just works under Bedrock Linux
![Page 14: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/14.jpg)
Real-world examples — Easy Update
I New printer, old CUPSI Get new CUPS
I # apt-get remove cups && pacman -S cups
![Page 15: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/15.jpg)
Real-world examples — Easy Fallback
I GNU info 5.2 broke pipingI Stick with 5.1I # printf ’#!/bin/sh\nbrc heisenbug info\n’ >
/bedrock/bin/info && chmod a+rx /bedrock/bin/info
![Page 16: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/16.jpg)
Real-world examples — Rare packages
I The sage mathematics package is only in the repos for onedistro - Arch
I So get it from Arch.
![Page 17: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/17.jpg)
Terminology
![Page 18: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/18.jpg)
Terminology — Stratum
I All of the files and processes are categorized into strata.I Strata are often one-to-one with distro releases
I Debian Wheezy stratumI Arch stratumI Fedora Heisenbug stratumI Slackware 14.1 stratum
![Page 19: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/19.jpg)
Terminology — Stratum
I There are four strata attributes:I local stratum
I The stratum providing a given file or processes.I pid1 stratum
I The stratum providing the PID 1 process.I global stratum
I The stratum providing the global filesI root stratum
I The stratum providing the /bedrock filesI These are not mutually exclusive - one stratum could have all
of these attributes.
![Page 20: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/20.jpg)
Terminology — Local Files
I Files which could potentially conflictI /etc/apt/sources.listI libc.so.6
I Bedrock Linux avoids conflicts by having multiple instances ofpotentially conflicting local files.
I The instances are differentiated by strataI wheezy /etc/apt/sources.listI trusty /etc/apt/sources.list
![Page 21: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/21.jpg)
Terminology — Explicit Local Access
I Explicitly specify desired stratumI Execute:
I $ brc <stratum> <command>I Read/Write:
I /bedrock/strata/<stratum>/<file path>
I /bedrock/clients/︸ ︷︷ ︸explicit access
which stratum︷ ︸︸ ︷wheezy /etc/apt/sources.list︸ ︷︷ ︸
which file/filepath
![Page 22: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/22.jpg)
Terminology — Direct Local Access
I Specify local stratumI Normal file path
![Page 23: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/23.jpg)
Terminology — Implicit Local Access
I Any stratum which can provide local fileI /bedrock/brpath/<class>/<file name>
I /bedrock/brpath/︸ ︷︷ ︸implicit access
class︷ ︸︸ ︷bin/pacman︸ ︷︷ ︸
file nameI Optionally specify priority in /bedrock/etc/brp.conf
![Page 24: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/24.jpg)
Terminology — Access local graph
access
explicit (specified stratum)
direct (local stratum)
implicit (priority stratum)
normal file path/bedrock/strata/<stratum>
/bedrock/brpath/<class>
$PATH order
![Page 25: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/25.jpg)
Terminology — Global Files
I Files which need to be accessible everywhere for things to“just work”.
I /etc/passwdI /var/run/I /home/
![Page 26: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/26.jpg)
Terminology — Access global graph
access
global
global
global
normal file path/bedrock/strata/<stratum>
/bedrock/brpath/<class>
$PATH order
![Page 27: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/27.jpg)
Terminology — Singletons
I Singletons are things which you can only have one of at atime.
I Examples:I kernelI PID 1 (init)I bootloader
I Can use a singleton from any stratum, but only one at a time.I Switch with a reboot.
![Page 28: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/28.jpg)
Terminology — Singletons
I Don’t like systemd?I openrc straight from GentooI bsd-style init straight from Slackware.I Or runit, s6-init, cinit, uselessd, nosh, etc
I Like systemd?I Use a cutting-edge one from Arch or FedoraI If it breaks, reboot into a more proven release from Debian or
CentOSI while keeping everything but the init the same - same home
files, same DE, same everything.
![Page 29: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/29.jpg)
General usage
![Page 30: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/30.jpg)
General usage
I Day-to-day usage “feels” like every other distro.I Run commands, edit files. Don’t have to do anything
differently for Bedrock Linux.I However, there are Bedrock Linux-specific things every so
often.
![Page 31: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/31.jpg)
General usage — Managing strata
To add a stratum <foo>1. Get stratum’s files into: /bedrock/strata/<foo>
I Install distro in a VM or bare metal, then copy or move ormount over.
I Use something likedebootstrap/pacstrap/febootstrap/gentoo-stage3.
I Use brg utility (planned for future release).2. Create stratum’s configuration file.
I Create default: # echo "framework = default" >/bedrock/etc/strata.d/foo.conf.disabled
I Don’t have to use default, can configure as desired.3. Enable stratum
I # brs up <foo>
Can now use files commands from stratum.
![Page 32: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/32.jpg)
General usage — Managing strata
Removing a stratum <foo>.1. Disable stratum.
I # brs down <foo>
2. Remove stratum’s files.I # rm -r /bedrock/strata/<foo>
![Page 33: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/33.jpg)
General usage — Managing strata
What are the enabled strata?I $ bri -l
I archI heisenbugI jessieI sidI trustyI trusty32I wheezy
![Page 34: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/34.jpg)
General usage — Managing strata
Which stratum’s executable will run if I just run the executable?I $ bri -w vim (or just $ brw vim)
I wheezy (direct) → running directly, will run DebianWheezy’s version (i.e. calling process is also from DebianWheezy).
![Page 35: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/35.jpg)
General usage — Managing strata
Which stratum is providing current process?I $ bri -n (or just $ brw)
I wheezy → calling process is from Wheezy stratum.I Bedrock Linux users often put this in their shell prompt.
![Page 36: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/36.jpg)
General usage — Managing strata
Which stratum is providing the running process 3944?I $ bri -p 3944
I 3944 xterm (wheezy) → Wheezy is providing process withpid 3944, which is xterm.
I Can also give executable name (will use pidofbehind-the-scenes).
I $ bri -p xtermI 1679 xterm (wheezy)I 3944 xterm (wheezy)I 4810 xterm (wheezy)
![Page 37: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/37.jpg)
General usage — Managing strata
What processes are provided by the Arch stratum?I $ bri -P arch
I 2237 dbus-launch (arch)I 2239 dbus-daemon (arch)I 2900 firefox (arch)
![Page 38: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/38.jpg)
General usage — Managing strata
Lots of other things available, see $ bri -h
![Page 39: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/39.jpg)
General usage — Managing strata
Run command in/from all strata: use brl
I e.g.: $ brl
brl-implied explicit︷ ︸︸ ︷sha1sum /path/to/file︸ ︷︷ ︸
direct accessI Check for file duplication across strata
I e.g.: # brl -c "bri -w apt-get|grep \"(direct)\$\""apt-get update
I Has every available version of apt-get run with updateoption.
I e.g.:# bri -c "[ -e /var/lib/dpkg/statoverride ]" sh-c "echo -n \"\" > /var/lib/dpkg/statoverride"
I Empties the contents of /var/lib/dpkg/statoverrideassociated with every stratum that has one.
![Page 40: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/40.jpg)
Planned for Nyla
![Page 41: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/41.jpg)
Planned for Nyla — init
I Get init from any distroI openrcI systemdI upstartI bsd-styleI runitI s6-initI cinitI etc
I Functional proof-of-concept done.
![Page 42: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/42.jpg)
Planned for Nyla — Hijack install
I Convert a pre-existing traditional distro install into BedrockLinux
I Will turn original install into a stratumI Will probably support reverting to original install.I Or drop original install’s files and continue with Bedrock
LinuxI not installed “onto” pre-existing install
![Page 43: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/43.jpg)
Planned for future
![Page 44: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/44.jpg)
Planned for future — tab-completion
I Bedrock Linux comes with numerous (≈ 8) utilities whichcurrently do not have tab completion support.
I We’re working on tab completion for bash and zsh.I Should be quite possible to add support for other shells (e.g.:
fish) if there is interest.
![Page 45: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/45.jpg)
Planned for future — brg
brg: “BedRock linux Get stratum”I Acquiring files for a stratum a bit of work.I brg will automate the process.I Ideally, one command to acquire stratum, setup, and enable
stratum. Next command can then be command from stratum.
![Page 46: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/46.jpg)
Planned for future — pmm
pmm: “package manager manager”I Will abstract away differences between package managers.I Examples:
I $ pmm install arch firefoxI Install firefox from Arch stratum.
I $ pmm install any sage-mathematicsI Install sage-mathematics from first stratum found which
provides sage-mathematics.I $ pmm install newest libreoffice
I Install libreoffice from stratum which provides newestversion of libreoffice.
![Page 47: Bedrock Linux (1.0beta2 Nyla) [1em] [scale=.3]bedrocklogothick.png ...](https://reader034.fdocuments.us/reader034/viewer/2022042619/586698021a28abaf408b8910/html5/thumbnails/47.jpg)
More information
I Website: http://bedrocklinux.orgI IRC: #bedrock on freenode