/r/bedrocklinux
Bedrock Linux is a meta Linux distribution which allows users to utilize features from other, typically mutually exclusive distributions.
/r/bedrocklinux
I finally finished the nixos after hardworks as (beta)
Although there are unused codes that were transferred to another project and replacing something led to the explosion of science again, that is why I published this code before launching my own git.
This is part of the code, not the complete code, but specific only to nixOS
also this maybe will helps fetch nixos with my code, without my code it's like useless
https://www.reddit.com/r/bedrocklinux/comments/ak0xwu/nixos_on_poki_or_later_documentation
But there are conditions before this present :
It must be grub and support uefi/bios according to what I tried
Also, it should only be slash, boot, and store, not tmpfs in slash, according to your config
if you want use sudo inside strat you need type this
export PATH=$(echo $PATH | awk -v RS=: -v ORS=: '$0 != "/run/wrappers/bin" {print}' | sed 's/:$//')
also you need add paths for nixos in /bedrock/etc/bedrock.conf
as i trying with github pull request to brl-userland
#
# A list of directories searched by various programs to find executables.
#
PREFIX:PATH = /bedrock/cross/pin/bin:/bedrock/bin
INFIX:PATH = /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:/nix/var/nix/profiles/system/sw/bin:/nix/var/nix/profiles/system/sw/sbin
SUFFIX:PATH = /bedrock/cross/bin
#
# A list of directories searched by the man executable to find documentation.
#
PREFIX:MANPATH = /bedrock/cross/pin/man:/bedrock/share/man
INFIX:MANPATH = /usr/local/share/man:/usr/share/man:/bedrock/cross/man:/nix/var/nix/profiles/system/sw/share/man
SUFFIX:MANPATH = /bedrock/cross/man
#
# A list of directories searched by the info executable to find documentation.
#
PREFIX:INFOPATH = /bedrock/cross/pin/info:/bedrock/share/info
INFIX:INFOPATH = /usr/local/share/info:/usr/share/info/nix/var/nix/profiles/system/sw/share/info
SUFFIX:INFOPATH = /bedrock/cross/info
#
# A list of directories used by the freedesktop.org standard containing things
# such as icons and application descriptions.
#
PREFIX:XDG_DATA_DIRS = /bedrock/cross/pin
INFIX:XDG_DATA_DIRS = /usr/local/share:/usr/share:/nix/var/nix/profiles/system/sw/share
SUFFIX:XDG_DATA_DIRS = /bedrock/cross
#
# Terminfo file locations
#
PREFIX:TERMINFO_DIRS = /bedrock/cross/pin/terminfo
INFIX:TERMINFO_DIRS = /usr/local/share/terminfo:/usr/share/terminfo:/nix/var/nix/profiles/system/sw/share/terminfo
SUFFIX:TERMINFO_DIRS = /bedrock/cross/terminfo
brl must fix the error in /bedrock/share/common-code as i posted (before publishing)
This is one of the enthusiasts :
u/ZeStig2409
u/MitchellMarquez42
I'm the same u/GeneralPotential7471. Before I shared the email with my brother.
There may be problems, but I want to focus on projects such as stratOS-Linux and snowXOS.
I also tried guix, but seriously, this is worse than nixOS, chromeOS, and android. Just do it yourself without brl. And good luck to all projects and people.
# nixOS + brlOS by (@AsCuteSnow) and for all
# if you want use sudo inside strat you need type this # export PATH=$(echo $PATH | awk -v RS=: -v ORS=: '$0 != "/run/wrappers/bin" {print}' | sed 's/:$//')
{ config, pkgs, lib, ... }:
{
boot.initrd.kernelModules = [ "fuse" ];
boot.kernelParams = [ "init=/sbin/init" ];
#boot.loader.grub.enable = true; # you need replace bootloader with grub
#boot.loader.grub.device = "nodev"; # add your partiton current
boot.loader.grub.copyKernels = true;
environment.systemPackages = with pkgs; [
busybox
];
systemd.services."bedrock-fix-mounts.service".enable = false;
systemd.services."bedrock-fix-resolv.service".enable = false;
users.groups = {
nogroup = lib.mkForce {
gid = 65533;
};
nobody = {
gid = 65534;
};
};
environment.etc = {
"login.defs".enable = false;
"hosts".enable = false;
"hostname".enable = false;
"fstab".enable = false;
};
system.activationScripts.groupbrl = lib.stringAfter [ "users" "groups" ] ''
${pkgs.shadow}/bin/groupmod -g 65533 nogroup 2>/dev/null || true
${pkgs.shadow}/bin/groupmod -g 65534 nobody 2>/dev/null || true
'';
system.activationScripts.binsh = lib.mkForce ''
# Ensure /bin exists and has the correct permissions
mkdir -p /bin
chmod 0755 /bin
# Create atomic replacements for /bin/sh and /bin/udevadm
ln -sfn ${pkgs.bashInteractive}/bin/sh /bin/.sh.tmp
ln -sfn ${pkgs.systemd}/bin/udevadm /bin/.udevadm.tmp
ln -sfn /nix/var/nix/profiles/system/firmware /lib/.firmware.tmp
mv /bin/.sh.tmp /bin/sh
mv /bin/.udevadm.tmp /bin/udevadm
mv /lib/.firmware.tmp /lib/firmware
cat > "/sbin/init" << 'EOF'
#!/bin/sh
snow_sideMenu() {
local current=$1
local items=$2
$On clear
echo
local count=0
for item in $items; do
if [ $count -eq $current ]; then
echo " ( < ( $item ) > ) "
echo " $MENU_HELP_0 "
echo " $MENU_HELP_1 "
echo " $MENU_HELP_2 "
break
fi
count=$((count + 1))
done
}
snow_mainMenu() {
MENU_ITEMS="Startup Rollback Update-KernelModules"
MENU_HELP_0="(Left Arrow) Previous"
MENU_HELP_1="(Right Arrow) Next"
MENU_HELP_2="(Up Arrow) Enter"
local current=0
while true; do
snow_sideMenu $current "$MENU_ITEMS"
read -n 3 input
case $input in
$'\x1b[D')
current=$((current - 1))
[ $current -lt 0 ] && current=$(($(echo "$MENU_ITEMS" | $On wc -w) - 1))
;;
$'\x1b[C')
current=$((current + 1))
[ $current -ge $(echo "$MENU_ITEMS" | $On wc -w) ] && current=0
;;
$'\x1b[A'|"")
local selected=$(echo "$MENU_ITEMS" | $On sed 's/ /\n/g' | $On sed -n "$((current + 1))p")
current=0
if [ "$selected" = "#Back" ]; then
snow_mainMenu
elif [ "$selected" = "Startup" ]; then
if [ -r "/nix/var/nix/profiles/system/init" ]; then
snow_auto
else
snow_mainMenu
fi
elif [ "$selected" = "Rollback" ]; then
MENU_ITEMS="#Back $($On ls -d /nix/var/nix/profiles/system-*link 2>/dev/null)"
MODE=RB
elif [ "$MODE" = "RB" ]; then
exec $selected/init
elif [ "$selected" = "Update-KernelModules" ]; then
MENU_ITEMS="#Back $($On ls -d /nix/var/nix/profiles/system-*link 2>/dev/null)"
MODE=UKM
elif [ "$MODE" = "UKM" ]; then
if [ -r "$selected/kernel-modules/lib/modules/$(uname -r)" ]; then
cp -r "$selected/kernel-modules/lib/modules/$(uname -r)" "/lib/modules"
elif [ -r "/lib/modules/$(uname -r)" ]; then
echo " kernel modules not find on nix"
echo " but it's found on lib, that's mean you already supported ;)"
current=0
sleep 2
else
echo " kernel modules not find on nix"
echo " and also not find on lib, so you no longer bootable :("
current=0
sleep 2
fi
fi
;;
esac
done
}
snow_auto() {
exec /nix/var/nix/profiles/system/init
}
snow_made() {
$On stty -echo
echo -e "\033[?25l"
$On clear
while true; do
read -n 3 -t "2" input || input=""""
case $input in
$'\x1b[D'|$'\x1b[C'|$'\x1b[A')
snow_mainMenu
;;
"")
if [ -r "/nix/var/nix/profiles/system/init" ]; then
snow_auto
else
snow_mainMenu
fi
;;
esac
done
stty "$old_settings"
echo -e "\033[?25h"
}
export PATH="/nix/var/nix/profiles/system/sw/bin:/nix/var/nix/profiles/system/sw/sbin"
On="busybox"
snow_made
EOF
chmod +x "/sbin/init"
'';
#system.activationScripts.etc = lib.mkForce ''
#echo "setting up /etc..."
#{pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl ${./setup-etc.pl} ${etc}/etc
#'';
system.activationScripts.usrbinenv = lib.mkForce ''
mkdir -p /usr/bin
chmod 0755 /usr/bin
ln -sfn ${pkgs.coreutils}/bin/env /usr/bin/.env.tmp
# Function to convert symlinks to actual files
convert_symlinks() {
local file="$1"
if [ -L "$file" ]; then
# Resolve the symlink target
local target
target=$(readlink -f "$file")
if [ -e "$target" ]; then
rm "$file"
cp -a "$target" "$file"
else
sleep 0
fi
else
sleep 0
fi
}
# Convert symlinks for specific configuration files
for file in /etc/login.defs /etc/hosts /etc/hostname /etc/fstab /etc/profile /etc/services /etc/protocols /etc/set-environment; do
convert_symlinks "$file"
done
'';
boot.loader.grub.extraInstallCommands = ''
${pkgs.gnused}/bin/sed -i 's|//|/boot/|g' /boot/grub/grub.cfg
'';
environment.sessionVariables = {
PATH = "/bedrock/cross/pin/bin:/bedrock/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:/bedrock/cross/bin";
MANPATH = "/bedrock/cross/pin/man:/bedrock/share/man:/usr/local/share/man:/usr/share/man:/bedrock/cross/man:/bedrock/cross/man";
INFOPATH = "INFOPATH=/bedrock/cross/pin/info:/bedrock/share/info:/usr/local/share/info:/bedrock/cross/info";
TERMINFO_DIRS = "/bedrock/cross/pin/terminfo:/usr/local/share/terminfo:/usr/share/terminfo:/bedrock/cross/terminfo";
XDG_DATA_DIRS = lib.mkForce "/bedrock/cross/pin:/usr/local/share:/usr/share:/bedrock/cross";
};
}
I fully supported nixOS with brlOS although there are bugs but just reboot the device and the issue is over
This means that it now supports xos, formerly called nixos-sox and snownix
There is another part, the bedrock-installer for nixos, but I will post it here soon. What do you think
And add this code to fix the problem when enabling nixOS from /bedrock/share/common-code
so i think it's no need add support nixos to brl-8
yeah you can remove codes with if was /etc/NIXOS
but i fear other strata will be unstable so that's why i add (#)
cfg_etcsh() {
$brl_runit -c '
# Define the symlink targets as a single string
files="profile fstab services protocols set-environment hosts hostname login.defs"
# Loop through the files string
for file in $files; do
symlink="/etc/$file"
if [ ! -L "$symlink" ]; then
continue
fi
target=$(readlink -f "$symlink")
if [ -e "$target" ]; then
rm "$symlink"
cp -a "$target" "$symlink"
else
#echo "error: target file $target does not exist for $symlink"
continue
fi
done
'
}
# Configure etcfs mount point per bedrock.conf configuration.
cfg_etcfs() {
mount="${1}"
if [ "$root" == "/bedrock/strata/bedrock" ]; then
sleep 0
elif [ -r "$root/etc/NIXOS" ]; then
brl_runit="sh"
cfg_etcsh
elif [ -r "$root/etc/NIXOS" ]; then
brl_runit="chroot "$root" /bedrock/libexec/busybox sh"
cfg_etcsh
#elif [ "$root" == "" ]; then
#brl_runit="sh"
#cfg_etcsh
#else
#brl_runit="chroot "$root" /bedrock/libexec/busybox sh"
#cfg_etcsh
fi
so, I have a secondary SSD that I am able to write too and it has been mounted to a permanent directory, however steam is refusing to use the drive
so I installed bedrock ontop of endeavor os and im trying to use the fedora version of discord but it doesn't launch
Why does the endeavor os version have no fetch support or maintainer if the arch version does?
I really want losetup by busybox in beta or 7.31 updates and maybe other people want this
Oops I mean of title ( Losetup Support)
I use gentoo with openrc and have tried(and most of the times failed) to use distrobox to supply the lack of some packages. Should I use distrobox for it or wold it be overkill?
Hi I was working on a project but found myself editing bedrock stuff For example, CrossFS was replaced with sh scripts,
and bedrock.conf was also closed. For every strata, it has bedrock.conf or init.conf, and this reduces clutter, as people claim about brl, and this applies to init, and support for zfs, btrfs, tmpfs.
Is it okay to publish a project with brl or do you have a suggestion
I am curious about Bedrock Linux. What do you use the different layers for? Do most users use it mostly to have multiple package managers available on their system? Are there other good use cases?
I'm trying to start an artix-dinit strata but for whatever reason it keeps throwing errors related to pacman?
It stops at ``:: Synchronizing package databases...
error: failed to synchronize all databases (unexpected error)
==> ERROR: Failed to install packages to new root ``
I could boot into a devuan strata, and try installing it from there since I am currently in my Arch strata (I want to migrate *away* from systemd)
Hello.
I'm making an experiment. I've installed bedrock inside a virtual machine adding 4 stratus inside the system (ubuntu,debian,devuan,alpine).
At this point I've copied all the files of the bedrock linux system in FreeBSD and I've used it with the Linuxulator. The idea is to have the chance to use more linux distros simultaneously. It would be very comfortable.
Unfortunately it didn't work. This is what happened :
marietto# ./start-noble-bash-no-jail
access control disabled, clients can connect from any host
G-DRIVE USB UFS ; da1
G-DRIVE USB UFS ; da1
G-DRIVE USB UFS ; da1
egrep: warning: egrep is obsolescent; using /usr/local/bin/ggrep -E
egrep: warning: egrep is obsolescent; using /usr/local/bin/ggrep -E
compat.linux.emul_path: /mnt/da1p2/Backup/compat/noble -> /mnt/da1p2/Backup/compat/noble
mount: devfs: Device busy
Ethernet rules cleared
rules cleared
nat cleared
0 tables deleted.
0 states cleared
source tracking entries cleared
pf: statistics cleared
pf: interface flags reset
no IP address found for tap18:network
/etc/pf.conf:24: could not parse host specification
pfctl: Syntax error in config file: pf rules not loaded
zsh-5.2# cd bedrock/bin
zsh-5.2# ./brl list
zsh-5.2# ./brl status
zsh-5.2# ./brl enable tut-ubuntu
strat: unable to find stratum "init"
ERROR: Unexpected error occurred.
zsh-5.2# find / -name init
/bedrock/strata/init
/bedrock/strata/endeavouros/usr/bin/init
zsh-5.2# init
/sbin/init: exec: line 372: /sbin/init-bedrock-backup: not found
zsh-5.2# find / -name init-bedrock-backup
nothing.
Is there something to do to fix that error ?
Hello.
Im trying to add the stratum centos to my bedrock system but it does not work. This is what I did :
[marietto@mario-bhyve ~]$ sudo brl fetch -n tut-centos centos --mirror
it1.mirror.vhosting-it.com
[ 1/19 ( 5%)] Determining name
* Using tut-centos
[ 2/19 ( 10%)] Determining CPU architecture
* Using x86_64
[ 3/19 ( 15%)] Determining release
* Using 8-stream
[ 4/19 ( 21%)] Determining mirror
* Using
it1.mirror.vhosting-it.com
[ 5/19 ( 26%)] Making bootstrap directory structure
[ 6/19 ( 31%)] Downloading package information database
Looking for file matching: primary.xml.gz
at:
it1.mirror.vhosting-it.com/8-stream/BaseOS/x86_64/os//repodata/
ERROR: Unable to find file. Try manually specifying a known good mirror with \
--mirror`.ERROR: Unexpected error occurred.This is commonly due to distro mirror layout changes breaking \
brl fetch`. Possible solutions:- If you did not, consider manually providing a mirror with --mirror- Check for a Bedrock Linux update with `brl update`- Check for a Bedrock Linux beta which may contain a fix- Try `brl import` which does not rely on mirror layout``
Also tried different mirrors gotten from here :
https://mirrormanager.fedoraproject.org/mirrors/CentOS
but none worked. How to fix it ?
i just installed bl on debian
i tried to install discord through pacman it did installed but i saw no executable file so i thought it maybe a pacman problem, i tried flatpak but it did same i cannot see any executable file the only way i can run discord is by typing it in terminal
also this happens with every software i install eg- ghostty
Hi, it's me again, i've tried to install zen-browser-bin via the AUR using YAY. when i try to running it globally it says this
XPCOMGlueLoad error for file /opt/zen-browser-bin/libxul.so:
libasound.so.2: cannot open shared object file: No such file or directory
Couldn't load XPCOM
Hi guys, i have a problem when i try to run fedora with
sudo strat -r fedora
and i try to run fastfetch, it shows the Bedrock logo and all, however on Arch and Gentoo, it shows up as their respective logos
How to I get the tutorial to continue?
I have already added the 2 strata,
I have rebooted, and restarted the tutorial and its still not recognizing that the other strata are there.
I have this running on my proxmox server, I've tried it both through the qemu browser "console" and through ssh and it still just sits here. Am I missing something obvious?
Sometimes packages from some distros don't work, or need to be updated.
By having to update the Makepkg file in arch for example.
Could there be problems when I use the arch kernel, but install packages from other stratums?
I want to run a file/ davinci installer that cannot be installed by a package manager through a stratum.
Running:
strat Fedora /bedrock/strata/Fedora/home/file
does not work and returns due to: unable to find file (ENOENT)
Even though:brl which
/bedrock/strata/Fedora/home/file
does return Fedora
I have a PinePhone running UBports (Ubuntu Touch) and am interested in trying to hijack it with Bedrock Linux. I know Bedrock works with Ubuntu Desktop and UBports is closely related, but it uses some special tweaks under the hood.
Has anyone here successfully used Bedrock to hijack UBports? Any special steps involved in the process?
I recently installed Bedrock on top of Void Linux. I've been using Linux itself for roughly a decade, but I'm brand-new to Bedrock. My goal is simple: install yay so I can easily use the AUR. However, that's given me a bunch of dependency and conflicting package errors, something Bedrock is supposed to solve, which is why I'm decently sure this is a me problem. I heard pmm can set up yay (or something like that), but I was able to find barely any documentation. Can someone help me out with this? Thanks!
when I try to use brl strat [distro] [command] with any distro and any command, it always spits out an error of an ENOENT file missing. After some reserch I tried running npm init -y in several places, but nothing worked. here as an example, I did "brl strat ubuntu tilix" and this is the output:
.
-------------------------------------------------------------------------------
strat: warning: unable to set cwd to
/bedrock/strata/ubuntu/home/Toasti
for stratum
ubuntu
due to: no such directory (ENOENT).
falling back to root directory
strat: could not run
tilix
from stratum
ubuntu
due to: unable to find file (ENOENT)
---------------------------------------------------------------------------
what do I do now??? Does anyone have any idea? :)
In bedrock, across different strata and init systems, sometimes systemctl suspends fails and the laptop hangs for around 20 seconds. Other times it works but it's unreliable. This is the journalctl -b -k log part about the suspend fail (I think):
Oct 29 19:17:18 arch kernel: PM: suspend entry (deep)
Oct 29 19:17:18 arch kernel: Filesystems sync: 0.003 seconds
Oct 29 19:17:18 arch kernel: Freezing user space processes
Oct 29 19:17:38 arch kernel: Freezing user space processes failed after 20.003 seconds (1 tasks refusing to freeze, wq_busy=0):
Oct 29 19:17:38 arch kernel: task:20-chrony-onoff state:D stack:0 pid:23127 tgid:23127 ppid:23093 flags:0x00004004
//some stuff in between
Oct 29 19:17:38 arch kernel: OOM killer enabled.
Oct 29 19:17:38 arch kernel: Restarting tasks ... done.
Oct 29 19:17:38 arch kernel: random: crng reseeded on system resumption
Oct 29 19:17:38 arch kernel: PM: suspend exit
Oct 29 19:17:38 arch kernel: PM: suspend entry (s2idle)
Oct 29 19:17:38 arch kernel: Filesystems sync: 0.036 seconds
Oct 29 19:17:58 arch kernel: Freezing user space processes
Oct 29 19:17:58 arch kernel: Freezing user space processes failed after 20.004 seconds (3 tasks refusing to freeze, wq_busy=0):
Oct 29 19:17:58 arch kernel: task:etcfs state:D stack:0 pid:12166 tgid:3257 ppid:1 flags:0x00004004
I am running a pi zero 2 with raspbian -> bedrock. I only have the options for: alpine, debian, devuan, gentoo.
So I tried every possible way to make grub be compatible with bedrock and so I made this btrfs partition as / and rxt4 as /boot when I installed and run bedrock it showed some problem with btrfs with grub when I checked I found out that the boot file in btrfs has all the grub , init etc .files and when I click on boot it switches me to /boot , idk how that is linked as it should not be anyways I thought to remove grub files and install bedrock after that I will reinstall grub I did and it worked but after grub reinstall and reboot I saw nothing but grub rescue I tried chrooting through netinstall img of Debian but it just don't want to chroot now I am thinking the problem is specific to btrfs with grub what if I use limine (another bootloader) in that way I will be able to install bedrock with btrfs . Pls can someone tell me is it possible as I don't want to waste my time anymore 😭🙏
i am on fedora workstation and bedrock do not let me install
I posted videos so that no one would doubt my work and you could suggest or help me
1 I made /etc binds so that it doesn't destroy them all
2 I used vmlinuz from stratOSL-ArchLinux
3 I repaired the networks and am still repairing the ecosystem with brlOS
i'm using brl import, not brl fetch UwU
i forget, i'm using blender on debian
I still don't know how to solve apt or steam, even though I did more than I could, and yet I'm trying to release it without problems
What do you think
I have a report of files causing nixos and bedrock to freeze together
If you ask how I was able to run Nixos on brl, in short, make init and config nixos compatible with brl,
But the Snownix project is undergoing significant change and ambition nonetheless,
so with these changes I will delete my discord work account with problems and support stratOS-Linux behind the scene, anyway
These are possible files because they are links and need to be read as chroot
# /etc/services
# /etc/profile
# /etc/protocols
# /etc/set-environment