Compare commits

...

11 commits

Author SHA1 Message Date
Tobias Powalowski
a43e130b1b source profile on ttyd 2023-07-07 12:14:41 +02:00
Tobias Powalowski
839dcd0df6 update homepage 2023-07-07 11:58:22 +02:00
Tobias Powalowski
15acb8ab04 update CHANGELOG 2023-07-07 11:42:04 +02:00
Tobias Powalowski
cc3c4c0e3a add ttyd support 2023-07-07 11:26:56 +02:00
Tobias Powalowski
762df37e61 add ttyd support 2023-07-07 11:11:12 +02:00
Tobias Powalowski
3609a59f7a add ttyd support 2023-07-07 10:44:11 +02:00
Tobias Powalowski
0cb9db8072 add ttyd support 2023-07-07 10:19:09 +02:00
Tobias Powalowski
3abd5ababe add ttyd support 2023-07-07 09:04:39 +02:00
Tobias Powalowski
ba4d18cfd5 add ttyd support 2023-07-07 08:31:24 +02:00
Tobias Powalowski
f4068249ec add ttyd support 2023-07-07 08:13:27 +02:00
Tobias Powalowski
27be74bc19 add ttyd support 2023-07-07 08:08:15 +02:00
6 changed files with 82 additions and 23 deletions

View file

@ -1,7 +1,6 @@
On the road to 2023.07:
- kernel 6.4.x
- grub 2.06.r591.g6425c12cd-1
- use BLAKE2b/b2sum instead of sha256sum
Environment Changes:
- renamed initramfs to initrd
- stripped off archboot from kernel name
@ -9,6 +8,8 @@ Environment Changes:
- removed custom grub package
- removed uninstalled packages
- added grub bli efi module
- added ttyd remote http terminal support
- use BLAKE2b/b2sum instead of sha256sum
locale:
- fixed abort dialog
update:

View file

@ -6,34 +6,39 @@ build ()
{
map add_binary findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd \
exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount \
sm-notify start-statd rpcbind rpcinfo rpc.gssd \
nfsdcltrack gssproxy screen tmux rsync
map add_file "/etc/screenrc" "/etc/ssh/ssh_config" "/etc/ssh/sshd_config" "/etc/ssh/moduli" \
"/etc/rsyncd.conf" "/etc/exports" "/usr/lib/ssh/sftp-server" "/usr/lib/ssh/ssh-keysign" \
"/usr/lib/ssh/ssh-pkcs11-helper" "/etc/conf.d/rpcbind" \
"/etc/netconfig"
add_file "/etc/ssh/sshd_config"
sm-notify start-statd rpcbind rpcinfo rpc.gssd \
nfsdcltrack gssproxy screen tmux rsync ttyd
map add_file /etc/screenrc /etc/ssh/ssh_config /etc/ssh/sshd_config /etc/ssh/moduli \
/etc/rsyncd.conf /etc/exports /usr/lib/ssh/sftp-server /usr/lib/ssh/ssh-keysign \
/usr/lib/ssh/ssh-pkcs11-helper /etc/conf.d/rpcbind \
/etc/netconfig
add_file /etc/ssh/sshd_config
# allow root login and empty passwords
echo "PermitRootLogin yes" >> "${BUILDROOT}/etc/ssh/sshd_config"
echo "PermitEmptyPasswords yes" >> "${BUILDROOT}/etc/ssh/sshd_config"
add_full_dir "/usr/lib/libnfsidmap/"
map add_dir "/var/empty" "/var/lib/nfs/sm" "/var/lib/nfs/sm.bak" "/var/lib/nfs/v4recovery" \
"/var/lib/nfs/rpc_pipefs" "/var/lib/rpcbind" "/var/log/gssproxy"
add_full_dir /usr/lib/libnfsidmap
map add_dir /var/empty /var/lib/nfs/sm /var/lib/nfs/sm.bak /var/lib/nfs/v4recovery \
/var/lib/nfs/rpc_pipefs /var/lib/rpcbind /var/log/gssproxy
chmod 700 "${BUILDROOT}/var/lib/rpcbind"
chown 32:32 "${BUILDROOT}/var/lib/rpcbind"
# mask nfs3 systemd
for i in rpcbind.service rpcbind.socket rpcbind.target nfs-server.service; do
add_symlink "/etc/systemd/system/${i}" "/dev/null"
done
map add_full_dir "/etc/gss" "/etc/gssproxy" "/var/lib/gssproxy"
add_dir "/var/lib/openldap"
map add_full_dir /etc/gss /etc/gssproxy /var/lib/gssproxy
add_dir /var/lib/openldap
chmod 700 "${BUILDROOT}/var/lib/openldap"
chown 439:439 "${BUILDROOT}/var/lib/openldap"
# start sshd on startup
add_symlink "/etc/systemd/system/multi-user.target.wants/sshd.service" "/usr/lib/systemd/system/sshd.service"
add_symlink /etc/systemd/system/multi-user.target.wants/sshd.service /usr/lib/systemd/system/sshd.service
# start ttyd on startup
add_file /usr/lib/libwebsockets-evlib_uv.so
add_file /usr/share/archboot/remote/usr/bin/ttyd.sh /usr/bin/ttyd.sh
add_file /usr/share/archboot/remote/etc/systemd/system/ttyd.service /etc/systemd/system/ttyd.service
add_symlink /etc/systemd/system/multi-user.target.wants/ttyd.service /etc/systemd/system/ttyd.service
# fix licenses
map add_file "/usr/share/licenses/rpcbind/COPYING" "/usr/share/licenses/nfsidmap/LICENSE" \
"/usr/share/licenses/tmux/LICENSE"
map add_file /usr/share/licenses/rpcbind/COPYING /usr/share/licenses/nfsidmap/LICENSE \
/usr/share/licenses/tmux/LICENSE /usr/share/licenses/ttyd/LICENSE
}
help ()

View file

@ -4,7 +4,7 @@
[[ -n "${BASH_VERSION:-}" ]] || return
# Not an interactive shell?
[[ $- == *i* ]] || return
if [[ "${UID}" == 0 ]]; then
if [[ "${UID}" == 0 ]]; then
# red for root user, host green, print full working dir
PS1='[\[\e[1;31m\]\u\[\e[m\]@\[\e[1;32m\]\h\[\e[m\] \w]\$ '
else
@ -19,3 +19,7 @@ if command -v nvim >/dev/null; then
alias vim='nvim'
alias edit='nvim'
fi
# show MOTD on ttyd login
if [[ -z "${TTY}" && -z "${SSH_TTY}" ]]; then
[[ "${SHLVL}" == "2" ]] && cat /etc/motd
fi

View file

@ -14,7 +14,7 @@
<body>
<p><span><img src="/web/logo.png" alt="Logo"></span></p>
<h1>Archboot Project | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=Z7GXKW4MKHK7C"><img src="/web/donate.png" alt="Donate"></a></h1>
<p><strong>&copy; 2006 - 2023 | <a href=mailto:tpowa@archlinux.org>Tobias Powalowski</a></strong><br>Arch Linux Developer <strong><a href="https://archlinux.org/people/developers/#tpowa">tpowa</a><br>Last update: 06.07.2023 08:21</strong></p>
<p><strong>&copy; 2006 - 2023 | <a href=mailto:tpowa@archlinux.org>Tobias Powalowski</a></strong><br>Arch Linux Developer <strong><a href="https://archlinux.org/people/developers/#tpowa">tpowa</a><br>Last update: 07.07.2023 11:57</strong></p>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#introduction" id="toc-introduction"><strong><span class="toc-section-number">1.</span> Introduction</strong></a></li>
@ -30,7 +30,7 @@
<li><a href="#archboot-in-a-nutshell" id="toc-archboot-in-a-nutshell"><strong><span class="toc-section-number">3.</span> Features In A Nutshell</strong></a></li>
<li><ul>
<li><a href="#graphical-environment-vnc" id="toc-graphical-environment-vnc"><span class="toc-section-number">3.1</span> Graphical Environments / VNC</a></li>
<li><a href="#remote-installation-with-openssh" id="toc-remote-installation-with-openssh"><span class="toc-section-number">3.2</span> Remote Access With OpenSSH</a></li>
<li><a href="#remote-access" id="toc-remote-access"><span class="toc-section-number">3.2</span> Remote Access</a></li>
<li><a href="#secure-boot-support" id="toc-secure-boot-support"><span class="toc-section-number">3.3</span> Secure Boot - MOK / Machine Owner Key</a></li>
<li><a href="#switch-to-complete-arch-linux-system" id="toc-switch-to-complete-arch-linux-system"><span class="toc-section-number">3.4</span> Switch To Complete Arch Linux System</a></li>
<li><a href="#interactive-setup" id="toc-interactive-setup"><span class="toc-section-number">3.5</span> Interactive Setup</a></li>
@ -432,7 +432,8 @@
</tr>
</tbody>
</table>
<h3 data-number="3.2" id="remote-installation-with-openssh"><span class="header-section-number">3.2</span> <strong>Remote Access With OpenSSH</strong></h3>
<h3 data-number="3.2" id="remote-access"><span class="header-section-number">3.2</span> <strong>Remote Access</strong></h3>
<h4 data-number="3.2.1" id="remote-access-openssh"><span class="header-section-number">3.2.1</span> <strong>OpenSSH</strong></h4>
<p>root <a href="https://wiki.archlinux.org/title/Password" title="Password"><strong>password</strong></a> is <strong>not</strong> set by default! If you need security during installation set a <a href="https://wiki.archlinux.org/title/Password" title="Password"><strong>password</strong></a>.</p>
<table>
<thead>
@ -442,7 +443,21 @@
</thead>
<tbody>
<tr class="odd">
<td><code>$ ssh root@&lt;ipadress&gt;</code></td>
<td><code>$ ssh root@&lt;ipaddress&gt;</code></td>
</tr>
</tbody>
</table>
<h4 data-number="3.2.2" id="remote-access-ttyd"><span class="header-section-number">3.2.2</span> <strong>HTTP Browser Terminal - TTYD</strong></h4>
<p>Get a <a href="https://github.com/tsl0922/ttyd" title="ttyd"><strong>ttyd terminal</strong></a> in your browser window.</p>
<table>
<thead>
<tr class="header">
<th>Connect with your favourite browser to archboot:</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>http://&lt;ipaddress&gt;:7681</td>
</tr>
</tbody>
</table>
@ -789,6 +804,10 @@ The calculated size to boot the image follows the formula:<br>
<td class="MyNo">&#10006;</td>
</tr>
<tr class="odd">
<td>HTTP Browser Terminal - <a href="https://github.com/tsl0922/ttyd" title="ttyd"><strong>TTYD</strong></a></td>
<td class="MyYes">&#10004;</td>
<td class="MyNo">&#10006;</td>
</tr>
<td>Offline installation support<sup>1</sup></td>
<td class="MyYes">&#10004;</td>
<td class="MyNo">&#10006;</td>
@ -850,12 +869,12 @@ The calculated size to boot the image follows the formula:<br>
</tr>
<tr class="even">
<td>ROOTFS size in MiB</td>
<td class="MyYes">389</td>
<td class="MyYes">386</td>
<td class="MyNo">1700</td>
</tr>
<tr class="odd">
<td>ROOTFS packages</td>
<td class="MyYes">193</td>
<td class="MyYes">196</td>
<td class="MyNo">392</td>
</tr>
<tr class="even">

View file

@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-only
# Created by Tobias Powalowski <tpowa@archlinux.org>
[Unit]
Description=TTYD
After=syslog.target
After=network.target
[Service]
ExecStart=/usr/bin/ttyd ttyd.sh
Type=simple
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
# Created by Tobias Powalowski <tpowa@archlinux.org>
# simulate login from tty
if ! [[ -e /tmp/.ttyd ]]; then
cat /etc/motd
echo -e "Hit \e[1m\e[92mENTER\e[m for \e[1mshell\e[m login."
read -r
: >/tmp/.ttyd
fi
. /etc/profile
screen -q -R