Create a new codespace:

1
gh codespace create

Generate SSH config:

1
2
gh codespace ssh --config > ~/.ssh/codespaces
printf 'Match all\nInclude ~/.ssh/codespaces\n' >> ~/.ssh/config

Connect to the codespace:

1
ssh cs.<codespace name>.<branch>

Run these commands in your codespace:

1
2
3
4
5
# Install QEMU
sudo apt install qemu-system-x86
# Set up kvm group
sudo groupadd -rg 109 kvm
sudo adduser codespace kvm

Relogin(or you will get permission denied on /dev/kvm) and run QEMU on the codespace:

1
qemu-system-x86_64 -enable-kvm -display vnc=:0 <other parameters>

Open SSH tunnel in a new terminal:

1
ssh cs.<codespace name>.<branch> -L <local port>:localhost:5900 -N

Finally, use a VNC client to connect to 127.0.0.1:<local port>.

在方块的世界里,梦的国度,
那是地荒,心灵的归宿。
绿草茵茵,山川绵延,
在虚拟的天空下,我们共度许多时光。

初入地荒,陌生又新奇,
一步步,筑起家园的奇迹。
熔岩流淌,瀑布飞泻,
在这方块的天地,我们的心在跳动。

月光下,篝火旁,
你我共话,夜色微凉。
伙伴们的欢笑,萤火虫的舞姿,
在地荒的每一个角落,都是爱的印记。

岁月如梭,时光易逝,
地荒依旧,心却难平。
多少个夜晚,梦回那时,
那是心中的净土,不舍的记忆。

如今人人跑路,心头难忍,
挥手告别,泪已满襟。
但愿有朝一日,再次重逢,
地荒的天空下,重拾旧梦。

为什么地荒服务器没了?因为它善。 –HOStudio123

By @HOStudio123, released under CC0.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
powershell start cmd -Verb runAs
mkdir %TEMP%\lingmo
cd %TEMP%\lingmo
set PATH=%PATH%;%TEMP%\lingmo

powershell Invoke-WebRequest -Uri "https://7-zip.org/a/7zr.exe" -OutFile "7zr.exe"
powershell Invoke-WebRequest -Uri "https://7-zip.org/a/7z2301-extra.7z" -OutFile "7z.7z"
powershell Invoke-WebRequest -Uri "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip" -OutFile "aria2.zip"
7zr e 7z.7z 7za.exe
7za e aria2.zip "aria2-*\aria2c.exe"
aria2c -x16 -j16 -s16 -k1M https://ftp.gnu.org/gnu/grub/grub-2.06-for-windows.zip -o grub.zip
aria2c -x16 -j16 -s16 -k1M https://jaist.dl.sourceforge.net/project/lingmo-os/release/iso/polaris/beta3.6/LingmoOS-2.0-Polaris-202404151043-Beta-desktop-amd64.iso -o lingmo.iso

diskpart
DISKPART> sel dis 0
DISKPART> sel vol=c
DISKPART> shr desired=20480
DISKPART> cre par pri size=4096
DISKPART> for fs=fat32 label="boot" quick
DISKPART> ass letter=D
DISKPART> cre par pri
DISKPART> for fs=ntfs label="lingmo" quick
DISKPART> exit

pushd D:\
7za x %temp%\lingmo\lingmo.iso
popd

bcdedit /enum | find "winload.exe"
set EFI=%ERRORLEVEL%
if %EFI% equ 1 (
mountvol S: /S
grub-install --target=x86_64-efi --efi-directory=S: --boot-directory=D:\boot
) else (
grub-install --target=i386-pc --boot-directory=D:\boot \\.\PHYSICALDRIVE0
)
shutdown -r -t 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sudo -i
apt update
apt install -y debootstrap
mkfs.ext4 /dev/disk/by-label/lingmo -L lingmo
mount /dev/disk/by-label/lingmo /mnt
debootstrap polaris /mnt https://packages.lingmo.org
cd /mnt
mount --bind /dev dev
mount --bind /proc proc
mount --bind /sys sys
mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars
mkdir -p boot/efi
mount /dev/disk/by-diskseq/1-part1 boot/efi
chroot .
apt install locales tzdata linux-image-amd64 grub-common grub-efi-amd64-bin grub-pc-bin
[ -e /sys/firmware/efi/fw_platform_size ]&&grub-install||grub-install /dev/disk/by-diskseq/1
echo "lingmo" > /etc/hostname
dpkg-reconfigure locales
dpkg-reconfigure tzdata
adduser lingmo
apt install xorg lingmo-*
systemctl enable sddm
exit
reboot

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

0%