Я хочу установить Oasis Linux, я предоставил вики раздел “Install”, если нужно…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Я хочу установить Oasis Linux, я предоставил вики раздел “Install”, если нужно предоставлю остальные разделы. Вводная информация о моем пк: UEFI, RX 590, Ryzen 5 2600, 16 GB ram, nvme0n1 — на нем установлен Debian 12, полностью пустой диск без таблицы разделов xvdi — на него я хочу установить oasis. При разбиении я предпочитаю использовать “parted”. Мне нужен последовательный гайд. Вот .md файл вики oasis lilnux:
To build oasis, you need a POSIX system with following tools:
#include_nextOn a Debian-based system, you'll need to install a few packages.
sudo apt install bison curl git ninja-build lua5.2 pax
If you plan to build desktop and multimedia components as well, you'll need a few more.
sudo apt install libwayland-dev libpng-dev nasm
You'll also need a toolchain targeting musl libc. I recommend musl-cross-make if you want to build your own. If not, you can grab one from musl.cc.
curl -O http://musl.cc/x86_64-linux-musl-cross.tgz
zcat x86_64-linux-musl-cross.tgz | pax -r
PATH=$PATH:$PWD/x86_64-linux-musl-cross/bin
You should make sure that your git config has a set user and email (for applying patches).
git config --global user.name $MYNAME
git config --global user.email $MYEMAIL
These instructions use some references to environment variables. You are meant to replace those with appropriate values for your system.
EDITOR: Your text editor (e.g. vim).DRIVE: Your target disk device (e.g. sda).ROOTPART: Your / partition device (e.g. sda2).BOOTPART: Your /boot partition device (e.g. sda1).TIMEZONE: Your timezone (e.g. US/Pacific).ROOT: Mounted root filesystem for target.First, prepare a root directory for oasis at $ROOT. You should
mount any sub-filesystems you want at this time (for example, /boot).
cd $ROOT
git clone -c 'core.sharedRepository=group' https://github.com/oasislinux/oasis.git src/oasis
git init --template src/oasis/template
cd src/oasis
Next, configure config.lua to your liking.
cp config.def.lua config.lua
$EDITOR config.lua
A typical install involves writing filesystem objects to your / repository, so
make sure to update the repo table in config.lua accordingly.
repo={
path='../..',
flags='',
tag='tree',
branch='oasis',
}
Generate the ninja build files.
lua setup.lua
Build oasis.
ninja commit
Merge built system into root repository.
cd $ROOT
git config branch.master.remote .
git config branch.master.merge oasis
git merge
./libexec/applyperms
You may want to include a toolchain.
git remote add toolchain https://github.com/oasislinux/toolchain.git
git fetch toolchain '--depth=1'
git config --add branch.master.merge toolchain/master
git merge --allow-unrelated-histories
Prepare your /etc directory.
(cd /tmp && curl -LO https://github.com/oasislinux/etc/archive/master.tar.gz)
zcat /tmp/master.tar.gz | pax -r -s ',^etc-[^/]*,etc,'
./libexec/applyperms -d etc
rm etc/.perms
It is possible to maintain your /etc directory with git just as /
(set oasis.root=..), but this is not recommended since perp uses the
VTX bit to keep track of active services, and merge conflicts or
permission errors could have disastrous side-effects.
Set up your system configuration.
ln -s ../share/zoneinfo/$TIMEZONE etc/localtime
cat >>etc/fstab <<EOF
/dev/$ROOTPART / ext4 rw,relatime 0 1
/dev/$BOOTPART /boot ext2 rw,relatime,noauto 0 0
EOF
touch var/log/lastlog
Configure /etc/rc.local to do any necessary initialization for your
system (e.g. keymap, networking). This script runs during boot before
starting perp. You may also want to make changes to /etc/profile.
$EDITOR etc/rc.local
$EDITOR etc/profile
The default root password is oasis. If you would like to choose
something else before booting into the system, you should chroot into
the new filesystem and run passwd.
Build/obtain a kernel. By convention, install it at /boot/linux.
For an oasis-specific kernel build procedure, see [[Kernel]].
Feel free to install any bootloader you want.
syslinux is one option that is easy and convenient. On Debian-based
systems, you can install extlinux.
sudo apt install extlinux
For a BIOS system:
mkdir $ROOT/boot/syslinux
extlinux --install $ROOT/boot/syslinux
dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/$DRIVE bs=440
cat >$ROOT/boot/syslinux/syslinux.cfg <<EOF
PROMPT 1
TIMEOUT 50
DEFAULT oasis
LABEL oasis
LINUX ../linux
APPEND root=/dev/$ROOTPART init=/bin/sinit ro
EOF
On an oasis system, if installed, mbr.bin can be found at
/lib/syslinux/bios/mbr.bin.
Don't forget to make sure your boot partition is marked bootable!
If your system uses UEFI and you built your kernel with
CONFIG_EFI_STUB=y, you can use efibootmgr to set up a new boot
entry.
efibootmgr -c -d /dev/$DRIVE -p $BOOTPARTNUM -l /linux -L oasis "root=/dev/$ROOTPART init=/bin/sinit ro"
You might also want to enable efibootmgr in your config.lua.
Some common administration tasks are described in [[Administration]].
Based on the information provided, here is a sequential guide to install Oasis Linux on your system:
Prepare the target disk (xvdi) for installation:
Open a terminal and run parted /dev/xvdi to launch the partition editor.
Create a new partition table with the command mklabel gpt.
Create a new boot partition with the command mkpart primary 0% 100M.
Set the boot flag for the new partition with the command set 1 boot on.
Create a new root partition with the command mkpart primary 101M 100%.
Exit the partition editor with the command quit.
Install the required packages on your Debian system:
Run the command sudo apt install bison curl git ninja-build lua5.2 pax.
Download the toolchain targeting musl libc:
Run the command curl -O http://musl.cc/x86_64-linux-musl-cross.tgz.
Extract the toolchain with the command zcat x86_64-linux-musl-cross.tgz | pax -r.
Add the toolchain to your PATH with the command export PATH=$PATH:$PWD/x86_64-linux-musl-cross/bin.
Clone the Oasis Linux repository:
Create a directory for the Oasis root filesystem with the command mkdir -p /mnt/oasis.
Change to the new directory with the command cd /mnt/oasis.
Clone the Oasis Linux repository with the command git clone -c 'core.sharedRepository=group' https://github.com/oasislinux/oasis.git src/oasis.
Configure the Oasis Linux build:
Change to the Oasis Linux directory with the command cd src/oasis.
Copy the default configuration file with the command cp config.def.lua config.lua.
Open the configuration file with your preferred text editor and make any necessary changes.
Build Oasis Linux:
Generate the Ninja build files with the command lua setup.lua.
Build Oasis Linux with the command ninja commit.
Merge the built system into the Oasis root filesystem:
Change to the Oasis root filesystem directory with the command cd /mnt/oasis.
Merge the built system with the command git merge.
Apply permissions to the new files with the command ./libexec/applyperms.
Install the toolchain (optional):
Add the toolchain repository with the command git remote add toolchain https://github.com/oasislinux/toolchain.git.
Fetch the latest toolchain with the command .
Merge the toolchain with the command .
git fetch toolchain --depth=1git merge --allow-unrelated-historiesPrepare the Oasis /etc directory:
Download the Oasis /etc directory template with the command (cd /tmp && curl -LO https://github.com/oasislinux/etc/archive/master.tar.gz).
Extract the template with the command zcat /tmp/master.tar.gz | pax -r -s ',^etc-[^/]*,etc,'.
Apply permissions to the new files with the command ./libexec/applyperms -d etc.
Remove the .perms file with the command rm etc/.perms.
Set up your system configuration:
Create a symbolic link to your timezone with the command ln -s ../share/zoneinfo/$TIMEZONE etc/localtime.
Create the /etc/fstab file with the command cat >etc/fstab <<EOF and paste the following contents into the file:
/dev/$ROOTPART / ext4 rw,relatime 0 1
/dev/$BOOTPART /boot ext2 rw,relatime,noauto 0 0
Close the file with the command `EOF`.
Create the `/var/log/lastlog` file with the command `touch var/log/lastlog`.
11. Configure your system initialization:
Open the `/etc/rc.local` file with your preferred text editor and make any necessary changes.
Open the `/etc/profile` file with your preferred text editor and make any necessary changes.
12. Build and install the kernel:
Follow the instructions in the [[Kernel]] section of the Oasis Linux documentation.
13. Install the bootloader:
Follow the instructions in the Bootloader section of the Oasis Linux documentation.
14. Reboot your system and enjoy Oasis Linux!