Code Monkey home page Code Monkey logo

hiveos-pxe-diskless's People

Contributors

88plug avatar burningsunrise avatar halogenius avatar heaje avatar lexandr0s avatar villos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hiveos-pxe-diskless's Issues

no nginx-lua module

Your script does not install the http-lua module and breaks nginx with it
image

./deploy_pxe ubuntu20 --build error

Hi

I encounter an error when i try to execute this command: ./deploy_pxe ubuntu20 --build

This is the answar from cli: [19/03/2024 20:41:13][DEPLOY_PXE] Create Root Filesystem........................[FAIL]

I have tried different linux distros.
I wide search online for finding information, but no luck.

This is a lxc container in proxmox. - Could this have an affect?

  • The client sees the PXE server and tries to boot. But there is no such image..

Any help would be appreciated.

Upgrade kernel

How does one go about to get an upgraded kernel/initramfs to support newer GPU drivers in recent HiveOS?

uefi booting fails

I think the grub got updated and I get a missing symbol when trying to netboot with uefi.
I had to add

grub-mknetdir --net-directory="$mydir"/tftp/ --subdir=/efi/ -d /usr/lib/grub/x86_64-efi/
to get it to work

wrong message after upgrade

After running an upgrade today after I noticed you committed some changes, I was asked if I want to upgrade.

Server ready to work

Do you want to upgrade HiveOS [Y/n]?
Upgrade FS is deprecated!
To upgrade fs after 6.4 version use command './deploy_pxe ubuntu18 --create' to create new image and then './deploy_pxe ubuntu18 --upgrade' to upgrade him
This script will be remove in future!

which I tried to run ./deploy_pxe ubuntu18 --create and it failed because I guess it's supposed to be --build

grub-mkimage incorrect

Looks like the grub-mkimage line in pxe-config.sh got incorrectly changed

grub-mkimage -d $mydir/tftp/efi/x86_64-efi/ -O x86_64-efi -o $mydir/tftp/efi/grubnetx64.efi --prefix="(tftp,$IP)/efi" efinet tftp efi_uga efi_gop http

Don't think the first $mydir path is supposed to be there. I copied the old line back in place and could start the boot (still have no network though with this version)

grub-mkimage -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi -o $mydir/tftp/efi/grubnetx64.efi --prefix="(tftp,$IP)/efi" efinet tftp efi_uga efi_gop http

BC-250 not working on latest release

I can't get AMD BC-250 working with the current version. I have tested this using a standard installation with and SSD and upgraded to the HIveOS Ubuntu 20 beta. The BC-250 works just fine on that system but not on diskless. The only difference I see is a slight version change in the AMD/OpenCL drivers.

The working disk systems uses: A5.4.6 (6.1.2307)
The non-working diskless system uses: A5.4.6 (6.2.2311.1)

Using TRM it gives me errors ranging from no OpenCL device list found to can't init GPU 0.
Using BZminer I get init gpu and hangs on building DAG.
Using Lolminer I get GPU detection thread timeout.

Is Ubuntu20 fresh install working ?

Hello,
Thanks for hard work,
I've follow installation guidelines,

PXE boot working as expected (It start ubuntu 20 image).
During image build, i've notice error, probably related to issue:

[17/02/2024 11:11:35][DEPLOY_PXE] Install Hiveon package........................chroot: failed to run command ‘/hive/bin/repover-touch’: No such file or directory
[OK]

After pxe boot done, i seem have an empty fresh ubuntu 20 server with no hive reated binaries.

I think, there is issue regarding non present /hive/bin/repover-touch

root@ubuntuserver:/pxeserver# ./deploy_pxe ubuntu20 --build


`Do you want to config Hiveos PXE server package? [Y/n] y
Install  build-essential packages.
Please wait...
Done

Workers config
Type FARM_HASH: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
New FARM_HASH: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hive server URL: http://api.hiveos.farm
Press ENTER to continue with this URL or type a new one

++++++++++++++++++
Server config
Hive repo URL: http://download.hiveos.farm/repo/binary/
Press ENTER to continue with this URL or type a new one

Current server IP-address: 192.168.2.232
Press ENTER to continue with this IP-address or type a new one

TMPFS size: 3000 MB
Press ENTER to continue with this TMPFS size or type a new one (in MB)
5000
New TMPFS size: 5000 MB
Default dist: ubuntu20

Config complete
++++++++++++++++++
net.core.somaxconn = 65535
> Restart DNSMASQ server. OK
> Restart Nginx server. 
OK
> Restart Atftp server. OK
Netboot directory for x86_64-efi created. Configure your DHCP server to point to /pxeserver/tftp/efi/x86_64-efi/core.efi

Server ready to work

root@ubuntuserver:~# wget https://raw.githubusercontent.com/minershive/hiveos-pxe-diskless/master/pxe-setup.sh && sudo bash pxe-setup.sh^C
root@ubuntuserver:~# cd /pxeserver/
root@ubuntuserver:/pxeserver# ./deploy_pxe ubuntu20 --build


[17/02/2024 11:07:02][DEPLOY_PXE] Create Root Filesystem........................[OK]
[17/02/2024 11:09:35][DEPLOY_PXE] Mount needed folders (dev|proc|run|sys).......[OK]
[17/02/2024 11:09:35][DEPLOY_PXE] Add repo source.list..........................[OK]
[17/02/2024 11:09:35][DEPLOY_PXE] Upgrade FS....................................[OK]
[17/02/2024 11:11:10][DEPLOY_PXE] Install additional packages...................[OK]
[17/02/2024 11:11:32][DEPLOY_PXE] Compile locales...............................[OK]
[17/02/2024 11:11:34][DEPLOY_PXE] Install rtl_nic firmwares ....................[OK]
[17/02/2024 11:11:34][DEPLOY_PXE] Configure FS..................................[OK]
[17/02/2024 11:11:35][DEPLOY_PXE] Install Hiveon package........................chroot: failed to run command ‘/hive/bin/repover-touch’: No such file or directory
[OK]
[17/02/2024 11:11:36][DEPLOY_PXE] Install linux kernel..........................[OK]
[17/02/2024 11:12:45][DEPLOY_PXE] Copy initramfs config.........................[OK]
[17/02/2024 11:12:45][DEPLOY_PXE] Create initramfs image........................[OK]
[17/02/2024 11:13:46][DEPLOY_PXE] Create symlink................................[OK]
[17/02/2024 11:13:46][DEPLOY_PXE] Clean FS......................................[OK]
[17/02/2024 11:13:47][DEPLOY_PXE] Umount needed folders (dev|proc|run|sys)......[OK]
[17/02/2024 11:13:47][DEPLOY_PXE] Directory size: 1131M.........................[OK]
[17/02/2024 11:13:47][DEPLOY_PXE] Saving to build/ubuntu20/ubuntu20.tar.xz .....[OK]
[17/02/2024 11:24:36][DEPLOY_PXE] Create symlink ...............................[OK]
root@ubuntuserver:/pxeserver# 

Latest release can't create file system

In the new 6.5.4 release the create root file system fails
I used set -x to turn on some commands in the bash script.

[07/01/2024 18:53:01][DEPLOY_PXE] Create Root Filesystem........................++ grep -iE '^country:'
++ awk '{print tolower($2)}'
+++ curl -s ifconfig.me
++ tr -d '\n'
++ whois 71.56.xxx.16
+ cc=us
+ [[ ! -z us ]]
+ url=http://us.archive.ubuntu.com/ubuntu/
+ debootstrap --arch=amd64 --include=sudo,curl,wget,systemd,initramfs-tools,net-tools,pv,tar,xz-utils focal /pxeserver/build/ubuntu20/_fs http://us.archive.ubuntu.com/ubuntu/
+ [[ 0 -ne 0 ]]
+ touch /pxeserver/build/ubuntu20/_fs/boot/debootstrap
+ echo_ok
+ echo -e '\033[0;32m[OK]\033[0m'
[OK]
+ set +x
[07/01/2024 18:55:01][DEPLOY_PXE] Mount needed folders (dev|proc|run|sys).......[OK]
[07/01/2024 18:55:01][DEPLOY_PXE] Add repo source.list..........................[OK]
[07/01/2024 18:55:01][DEPLOY_PXE] Upgrade FS....................................+ chroot /pxeserver/build/ubuntu20/_fs apt -y update
+ [[ 0 -ne 0 ]]
++ chroot /pxeserver/build/ubuntu20/_fs apt list --upgradable
++ grep '^hive' -c
+ pkg=0
+ chroot /pxeserver/build/ubuntu20/_fs apt -y upgrade
+ [[ 100 -ne 0 ]]
+ echo_fail
+ echo -e '\033[0;31m[FAIL]\033[0m'
[FAIL]
+ exit 1

So then i tried to run the commands myself

root@remote1:/pxeserver# chroot /pxeserver/build/ubuntu20/_fs apt -y upgrade
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  distro-info python-apt-common python3-apt
The following packages will be upgraded:
  apt apt-utils base-files bash bsdutils busybox-initramfs ca-certificates cpio curl dbus distro-info-data dpkg e2fsprogs fdisk gcc-10-base gir1.2-glib-2.0 gpgv gzip initramfs-tools initramfs-tools-bin initramfs-tools-core isc-dhcp-client
  isc-dhcp-common klibc-utils kmod less libapparmor1 libapt-pkg6.0 libasn1-8-heimdal libblkid1 libbrotli1 libc-bin libc6 libcap2 libcap2-bin libcom-err2 libcryptsetup12 libcurl4 libdbus-1-3 libdns-export1109 libelf1 libexpat1 libext2fs2 libfdisk1
  libfribidi0 libgcc-s1 libgcrypt20 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed5 libhx509-5-heimdal libicu66
  libip4tc2 libisc-export1105 libjson-c4 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblz4-1 liblzma5 libmount1 libncurses6 libncursesw6 libnetplan0 libnettle7 libnghttp2-14
  libnss-systemd libp11-kit0 libpam-cap libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpcre2-8-0 libpcre3 libprocps8 libpython3.8-minimal libpython3.8-stdlib libroken18-heimdal libsasl2-2 libsasl2-modules-db libseccomp2
  libsepol1 libsmartcols1 libsqlite3-0 libss2 libssh-4 libssl1.1 libstdc++6 libsystemd0 libtinfo6 libudev1 libuuid1 libwind0-heimdal libxml2 libxtables12 libzstd1 linux-base locales login logsave lz4 mount ncurses-base ncurses-bin netplan.io
  networkd-dispatcher openssl passwd perl-base procps python3-pkg-resources python3-yaml python3.8 python3.8-minimal rsyslog sudo systemd systemd-sysv systemd-timesyncd tar tzdata ubuntu-advantage-tools ubuntu-keyring ubuntu-minimal udev util-linux
  vim-common vim-tiny wget xxd xz-utils zlib1g
148 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 151 kB/54.9 MB of archives.
After this operation, 3111 kB of additional disk space will be used.
Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [3408 B]
Get:2 http://mirrors.accretive-networks.net/ubuntu focal-updates/main amd64 dbus amd64 1.12.16-2ubuntu2.3 [151 kB]
Fetched 155 kB in 1s (143 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),

So i think in the chroot that locale is not being set

root@remote1:~# chroot /pxeserver/build/ubuntu20/_fs/ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

So i went in and in the chroot i set LANG to en_US.UTF-8 in /etc/locale.gen then generated the files. wiht locale-gen

Even after all that upgrading the FS failed.

root@remote1:/pxeserver# ./deploy_pxe ubuntu20 --upgrade
dpkg-deb: error: failed to read archive 'kernel/linux-image-*.deb': No such file or directory


[08/01/2024 17:52:23][DEPLOY_PXE] Mount needed folders (dev|proc|run|sys).......[OK]
[08/01/2024 17:52:23][DEPLOY_PXE] Upgrade FS....................................[FAIL]
[08/01/2024 17:54:30][DEPLOY_PXE] Upgrade FS....................................+ chroot /pxeserver/build/ubuntu20/_fs apt -y update
+ [[ 0 -ne 0 ]]
++ chroot /pxeserver/build/ubuntu20/_fs apt list --upgradable
++ grep '^hive' -c
+ pkg=0
+ chroot /pxeserver/build/ubuntu20/_fs apt -y upgrade
+ [[ 0 -ne 0 ]]
+ [[ 0 -gt 0 ]]
+ [[ 1 -ne 0 ]]
+ echo_fail
+ echo -e '\033[0;31m[FAIL]\033[0m'
[FAIL]
+ exit 1

selfupgrade functionality

I updated the settings to build the ubuntu20 image and have it being served properly to a client. I would like to be able to have all updates be available with a selfupgrade. However running the command ./deploy_pxe ubuntu20 --selfupgrade followed by ./deploy_pxe ubuntu20 --upgrade , does NOT install the updated packages…

When i try to run hive-upgrade.sh i’m told this is deprecated and it exits. What is the proper way to get the hive packages updated?

Error during Install

Getting the following error during install.

Server ready to work

Do you want to upgrade HiveOS [Y/n]?Y
> Upgrading HiveOS FS

> Extract Hive FS to tmp dir
 441MiB 0:00:37 [11.8MiB/s] [==============================================>] 100%
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

Looks like I get no IP address when booting with the latest 6.5 release

I get dropped to busybox shell after
mount: mounting http on /root failed: No such device
I can type ip addr and it has no address anymore
Testing with virtualized e1000 nic in proxmox. Tested both uefi (after running fix in previous issue) and legacy netboot.
This was also after running
./deploy_pxe ubuntu18 --build
and
./deploy_pxe ubuntu18 --upgrade
successfully

File path need to be updated

In the hiveos-pxe-diskless/pxeserver/pxe-config.sh script I need to update lines 245-251. The filenames were being hardcode to a fixed location but my installation was in a different directory. Below is how a changed the file to get the install to work.

`#making uefi

grub-mkimage -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi -o $mydir/tftp/efi/grubnetx64.efi --prefix="(tftp,$IP)/efi" efinet tftp efi_uga efi_gop http

chmod -R 777 $mydir/

#make sed /pxeserver/tftp/efi/grub.cfg

sed -i "/set net_default_server=/c set net_default_server=$IP" $mydir/tftp/efi/grub.cfg

sed -i "/set fs_size=/c set fs_size=${FS_SIZE}M" $mydir/tftp/efi/grub.cfg

sed -i "/set arch_name=/c set arch_name=$ARCH_NAME" $mydir/tftp/efi/grub.cfg `

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.