The post has been translated automatically. Original language: Russian
To demonstrate the capabilities in this article, we will modify the ULFS Demo 0.3 Live DVD Kazakhstan Edition distribution to support NCALayer.
NCALayer enables the use of the NUC RK's digital signature in web applications and supports Java in browsers. NCALayer's functionality can be expanded by installing additional modules from third-party developers.
Since NCALayer support requires blobs (closed binary components), and the entire distribution is transparent and built from source code, adding blobs to the distribution is unacceptable. Furthermore, the distribution developer cannot be held liable for any damage caused by blobs or other distribution components. We offer end users the ability to modify the distribution to support NCALayer at their own risk in a virtual environment.
In this article, it is assumed that access to the network is carried out through a direct network connection with automatic assignment of an IP address via the DHCP protocol. The instructions for setting up the network are described in the books Linux From Scratch.
It is assumed that you already have experience working with the Linux virtualization stack-QEMU-Libvirt-VirtManager, if not, contact someone who has such experience.
Uploading files
Find and download followed files:
- ncalayer.zip (version 1.4)
- google-chrome-stable_137.0.7151.119-1_amd64.deb (version 137)
Attention: New versions of google chrome do not work with ncalayer 1.4. We use version 137 because it really works.
Preparation of the virtual machine
Create an image of an additional hard drive:
qemu-img create -f raw ulfs-kz-hdd-extra.img 1GCreate a file system on an additional hard disk (the entire disk, without the partition table):
mkfs.ext4 ulfs-kz-hdd-extra.imgCreate a directory '/mnt/tmp' to be used as a mount point:
mkdir -v /mnt/tmpMount the secondary hard drive to the mount point:
mount ulfs-kz-hdd-extra.img /mnt/tmpCopy the downloaded files to the mount current.
Unmount the secondary hard drive from the mount point:
umount /mnt/tmpCreate an image of the main hard drive:
qemu-img create -f qcow2 ulfs-kz-hdd.qcow2 40GUse 'virt-manager' to create a VM with the following parameters:
- CDROM: ulfs-kz-0.3-qemu64-2026-08-31.iso
- HDD1: ulfs-kz-hdd.qcow2 (IDE/SATA interface)
- HDD2: ulfs-kz-hdd-extra.qcow2 (IDE/SATA interface)
- CPU: 2 or more (model 'qemu64' for transfer to other devices)
- RAM: 4 or more
- Download device: CDROM
Installing on a virtual hard drive
Start the VM. A welcome screen should appear after downloading.
Go to the 'Serial 1' text console.
Log in as 'root' to do this, type 'root' and press 'Enter'.The '#' prompt should appear.
Check the connected disks using the lsblk program. You should get an output output of the following type:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 6,4G 1 loop /run/initramfs/memory/bundles/01-core.sb
sda 8:0 0 40G 0 disk
sdb 8:16 0 1G 0 disk
sr0 11:0 1 6,4G 1 rom /run/initramfs/memory/dataInstall the system on the main hard drive by running the commands (copy and paste the entire block into the console):
#create partition table
#units: sectors
echo "label: mbr" | sfdisk /dev/sda
echo ",,L" | sfdisk -a /dev/sda
sfdisk -A /dev/sda 1
#format partition
mkfs.ext4 /dev/sda1
#make mount point
mkdir /mnt/tmp
#mount
mount /dev/sda1 /mnt/tmp
#create directories
mkdir -v /mnt/tmp/{dev,media,mnt,proc,run,sources,tmp,sys}
#create symlinks
ln -sv /usr/bin /mnt/tmp/bin
ln -sv /usr/lib /mnt/tmp/lib
ln -sv /usr/sbin /mnt/tmp/sbin
#copy directories (preserving mode, ownership, timestamps)
time cp -rpv /{boot,etc,home,lib64,opt,usr,var} /mnt/tmp
cat > /mnt/tmp/etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sda1 / ext4 defaults 1 1
#/dev/<yyy> swap swap pri=1 0 0
# End /etc/fstab
EOF
grub-install --boot-directory=/mnt/tmp/boot /dev/sda
umount /mnt/tmpInstallation takes a long time. You should receive more messages at the exit. The last one should be a message like:
real 34m6,432s
user 0m6,144s
sys 26m46,055s
Installing for i386-pc platform.
Installation finished. No error reported.Turn off the VM. If possible, make a backup or a snapshot to roll back in case of errors.
mv ulfs-kz-hdd.qcow2 ulfs-kz-hdd-base.qcow2
qemu-img create -f qcow2 -F qcow2 -b ulfs-kz-hdd-base.qcow2 ulfs-kz-hdd.qcow2Switch the download to boot from the main hard drive.
Starting from a virtual hard disk
Start the VM. Switch to the graphics console. The login window should open.
Switch to the text console.
Log in as 'root' to do this, type 'root' and press 'Enter'.The '#' prompt should appear.
Mount the second disk in '/mnt/tmp':
mkdir /mnt/tmp
mount /dev/sdb /mnt/tmp
chmod 777 /mnt/tmpGo to the directory '/mnt/tmp':
cd /mnt/tmpView its contents:
lsThe files must be present.
Installing Google Chrome
Create and navigate to a temporary folder:
mkdir chrome
cd chromeUnpack Google Chrome using the command:
ar x ../google-chrome-stable_137.0.7151.119-1_amd64.debUnpack data.tar.xz:
tar -xf data.tar.xzCopy the files from the catalog to the '/opt' directory:
cp -rv opt/* /opt
cp -rv usr/* /usrThe installation of Google Chrome is complete, but you need to delete the temporary files to enable the installation of ncalayer.
Go to the /mnt/tmp directory:
cd /mnt/tmpDelete the temporary unpacked files:
rm -rfv chromeUnpacking ncalayer
Unpack ncalayer.zip using the command:
unzip ncalayer.zip -d ncalayerChange the folder owner to user:
chown -R user:user /mnt/tmp/ncalayerChecking Google Chrome
To continue, you need to run Google Chrome.
Switch to the graphics console. From the menu, select the screen manager that suits your configuration and your taste (KDE is used by default, but it is very resource-intensive and does not display the ncalayer menu) and log in as the user.
Launch Google Chrome through the menu and do not close it.
Installing ncalayer
Open the console in the graphical console
Create the 'apps' directory in your home folder:
mkdir -p /home/user/apps/ncalayerGo to the ncalayer catalog:
cd /mnt/tmp/ncalayerPerform the installation using the command:
./ncalayer.sh --noguiSpecify the path during installation:
/home/user/apps/ncalayerThe output should look like this:
Specify the path where NCALayer will be installed > /home/user/apps/ncalayer
NCALayer will be installed in /home/user/apps/ncalayer.
Directory ~/.local/share/icons/ created. Icon created.
NCALayer added to auto-upload
The root certificates have been installed in the browser
Congratulations, you have successfully installed NCALayer!The main thing is that the messages "you have successfully installed NCALayer" and "Root certificates have been installed in the browser" appear.
Ignore the message "grep: warning: stray before -".
Make sure that the certificates are installed in Google Chrome
If the certificates are not installed, repeat the installation.
If the certificates installed, end the session and log in again.
ncalayer should load, and the corresponding icon should appear on the taskbar.
Turn off the VM. If possible, make a backup or a snapshot to roll back in case of errors.
mv ulfs-kz-hdd.qcow2 ulfs-kz-hdd-ncalayer.qcow2
qemu-img create -f qcow2 -F qcow2 -b ulfs-kz-hdd-ncalayer.qcow2 ulfs-kz-hdd.qcow2Conclusion
This article covered the procedure for installing the distribution on a virtual hard disk and installing additional software to provide support for NCALayer.
Screenshots

XFCE

LXDE

KDE

The installed certificates should be displayed in the browser.
Чтобы продемострировать возможности в данной статье мы доработаем дистрибутив ULFS Demo 0.3 Live DVD Kazakhstan Edition для поддержки NCALayer.
NCALayer предоставляет возможность использовать средства ЭЦП НУЦ РК в веб-приложениях, обеспечивает работу Java в браузерах. Функционал NCALayer может быть расширен установкой дополнительных модулей, предоставляемых сторонними разработчиками.
Так как для поддержки NCALayer потребуются блобы (закрытые компоненты в бинарном виде), а весь дистрибутив прозрачен, собран из исходного кода, добавление блобов в дистрибутив недопустимо. Так же разработчик дистрибутива не имеет возможности нести ответственность за любой ущерб который может быть вызван блобами и другими компонентами дистрибутива. Представляем конечным пользователям возможность самостоятельно модифицировать дистрибутив для обеспечения поддержки NCALayer на свой страх и риск в виртуальной среде.
В рамках данной статьи предполагается, что досуп к сети осуществляется через прямое сетевое соединение с автоматическим присвоением IP-адреса через протокол DHCP. Инструкции по настройке сети изложены в книгах Linux From Scratch.
Предполагается, что у Вас уже имеется опыт работы со стеком виртуализации Linux-QEMU-Libvirt-VirtManager, если нет, обратитесть к тому у кого такой опыт имеется.
Загрузка файлов
Найдите и загрузите следующие файлы:
- ncalayer.zip (версия 1.4)
- google-chrome-stable_137.0.7151.119-1_amd64.deb (версия 137)
Внимание: Новые версии google-chrome не работают с ncalayer 1.4 используем версию 137 потому, что она действительно работает.
Подготовка виртальной машины
Создайте образ дополнительного жесткого диска:
qemu-img create -f raw ulfs-kz-hdd-extra.img 1GСоздайте файловую систему на дополнительном жестком диске (весь диск целиком, без таблицы разделов):
mkfs.ext4 ulfs-kz-hdd-extra.imgСоздайте каталог '/mnt/tmp', который будет использоваться как точка монтирования:
mkdir -v /mnt/tmpСмонтируйте дополнительный жесткий диск в точку монтирования:
mount ulfs-kz-hdd-extra.img /mnt/tmpСкопируйте загруженные файлы в току монтирования.
Размонтируйте дополнительный жесткий диск из точки монтирования:
umount /mnt/tmpСоздайте образ основного жесткого диска:
qemu-img create -f qcow2 ulfs-kz-hdd.qcow2 40GС помощью 'virt-manager'создайте виртуальную машину со следующими параметрами:
- CDROM: ulfs-kz-0.3-qemu64-2026-08-31.iso
- HDD1: ulfs-kz-hdd.qcow2 (интерфейс IDE/SATA)
- HDD2: ulfs-kz-hdd-extra.qcow2 (интерфейс IDE/SATA)
- CPU: 2 или больше (модель 'qemu64' для переноса на другие устройства)
- RAM: 4 или больше
- Устройство загрузки: CDROM
Установка на виртуальный жесткий диск
Запустите виртуальную машину. После загрузки должен появится экран приветствия.
Перейдите в текстовую консоль 'Serial 1'.
Войдите под пользователем 'root' для этого введите 'root'и нажмите 'Enter'.Должно появиться приглашение '#'.
Проверьте подключенные диски с помощью программы 'lsblk'. Вы должны получить вывод вывод следующего вида:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 6,4G 1 loop /run/initramfs/memory/bundles/01-core.sb
sda 8:0 0 40G 0 disk
sdb 8:16 0 1G 0 disk
sr0 11:0 1 6,4G 1 rom /run/initramfs/memory/dataУстановим систему на основной жесткий диск выполнив команды (скопируйте и вствьте в консоль весь блок целиком):
#create partition table
#units: sectors
echo "label: mbr" | sfdisk /dev/sda
echo ",,L" | sfdisk -a /dev/sda
sfdisk -A /dev/sda 1
#format partition
mkfs.ext4 /dev/sda1
#make mount point
mkdir /mnt/tmp
#mount
mount /dev/sda1 /mnt/tmp
#create directories
mkdir -v /mnt/tmp/{dev,media,mnt,proc,run,sources,tmp,sys}
#create symlinks
ln -sv /usr/bin /mnt/tmp/bin
ln -sv /usr/lib /mnt/tmp/lib
ln -sv /usr/sbin /mnt/tmp/sbin
#copy directories (preserving mode, ownership, timestamps)
time cp -rpv /{boot,etc,home,lib64,opt,usr,var} /mnt/tmp
cat > /mnt/tmp/etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sda1 / ext4 defaults 1 1
#/dev/<yyy> swap swap pri=1 0 0
# End /etc/fstab
EOF
grub-install --boot-directory=/mnt/tmp/boot /dev/sda
umount /mnt/tmpУстановка занимает большое количество времени. На выходе вы должны получить больше количество сообщений. Последним должно быть сообщение вида:
real 34m6,432s
user 0m6,144s
sys 26m46,055s
Installing for i386-pc platform.
Installation finished. No error reported.Выключите виртуальную машину. По возможности сделайте резервную копию или снапшот для отката в случае ошибок.
mv ulfs-kz-hdd.qcow2 ulfs-kz-hdd-base.qcow2
qemu-img create -f qcow2 -F qcow2 -b ulfs-kz-hdd-base.qcow2 ulfs-kz-hdd.qcow2Переключите загрузку на загрузку с основного жесткого диска.
Запуск с виртуального жесткого диска
Запустите виртуальную машину. Переключитесь в графическую консоль. Должно открыться окно входа.
Переключитесь в текстовую консоль.
Войдите под пользователем 'root' для этого введите 'root'и нажмите 'Enter'.Должно появиться приглашение '#'.
Смонтируйте второй диск в '/mnt/tmp':
mkdir /mnt/tmp
mount /dev/sdb /mnt/tmp
chmod 777 /mnt/tmpПерейдите в каталог '/mnt/tmp':
cd /mnt/tmpПросмотрите его содержимое:
lsФайлы должны присутствовать.
Установка Google Chrome
Создайте и перейдите во временную папку:
mkdir chrome
cd chromeРаспакуйте Google Chrome с помощь команды:
ar x ../google-chrome-stable_137.0.7151.119-1_amd64.debРаспакуйте data.tar.xz:
tar -xf data.tar.xzСкопируйте фалы из каталога в каталог '/opt':
cp -rv opt/* /opt
cp -rv usr/* /usrУстановка Google Chrome завершена, но требуется удалить временные файлы для обеспечения возможности установки ncalayer.
Перейдите в каталог /mnt/tmp:
cd /mnt/tmpУдалите временные распакованные файлы:
rm -rfv chromeРаспаковка ncalayer
Распакуйте ncalayer.zip с помощью команды:
unzip ncalayer.zip -d ncalayerСмените владельца каталога на user:
chown -R user:user /mnt/tmp/ncalayerПроверка Google Chrome
Для продолжения необходимо запустить Google Chrome.
Переключитесь в графическую консоль. Из меню выберите подходящий вашей конфигурации и вашему вкусу менеджер экрана (по умолчанию используется KDE, но он очень требователен к ресурсам и неотображает меню ncalayer) и осуществите вход пользователем 'user'.
Осуществите запуск Google Chrome через меню и не закрывайте его.
Установка ncalayer
Откройте консоль в графической консоли
В домашней папке создайте каталог 'apps':
mkdir -p /home/user/apps/ncalayerПерейдите в каталог ncalayer:
cd /mnt/tmp/ncalayerОсуществите установку с помощью команды:
./ncalayer.sh --noguiВо время установки укажие путь:
/home/user/apps/ncalayerДолжен быть вывод следующего вида:
Укажите путь, куда будет установлен NCALayer > /home/user/apps/ncalayer
NCALayer будет установлен в /home/user/apps/ncalayer.
Directory ~/.local/share/icons/ created. Icon created.
NCALayer добавлен в автозагрузки
Корневые сертификаты были установлены в браузер
Поздравляем, вы успешно установили NCALayer!Главное - то, чтобы появились сообщения " вы успешно установили NCALayer" и "Корневые сертификаты были установлены в браузер".
На сообщение "grep: warning: stray before -" не обращайте внимания.
Проверте, что сертификаты установились в Google Chrome
Если сертификаты не установлены повторите установку.
Если сертификаты установлены, завершите сеанс и снова зайдите.
ncalayer должен загрузиться, на панели задач должен появиться соответсвующий значок.
Выключите виртуальную машину. По возможности сделайте резервную копию или снапшот для отката в случае ошибок.
mv ulfs-kz-hdd.qcow2 ulfs-kz-hdd-ncalayer.qcow2
qemu-img create -f qcow2 -F qcow2 -b ulfs-kz-hdd-ncalayer.qcow2 ulfs-kz-hdd.qcow2Заключение
В данной статье была рассмотрена процедура установки дистрибутива на виртуальный жесткий диск, установка дополнительного программного обеспечения для обеспечения поддержки NCALayer.
Скриншоты

XFCE

LXDE

KDE

Установленные сертификаты должны отображаться в браузере