flowchart LR
subgraph Host[Host - Windows 10]
subgraph Container[Client - x86_64-Ubuntu 20.04]
end
end
2.1. Download Ubuntu 20.04.4 LTS (Focal Fossa)
Ubuntu 22.04 already uses OpenSSL 3.0 and gcc is too brand new to compile.
2.2. VirtualBox
A.1. Windows hosts
- ubuntu-20.04.4-desktop-amd64.iso
- ubuntu.vdi
- work_curr.vdi - please create by yourself ! about 500GB.
- opt_curr.vdi - please create by yourself ! about 128GB.
- please install Ubuntu step by step !!!
- work_curr.vdi - Mounted at /work.
- opt_curr.vdi - Mounted at /opt.
sudo vi /etc/hostname
sudo hostname -F /etc/hostname
sudo vi /etc/hosts
sudo apt-get --yes update
sudo apt-get --yes upgrade
cd /bin && sudo rm sh; sudo ln -s bash sh
sudo chmod 777 /work
sudo chmod 777 /opt
sudo apt-get --yes install openssh-server
sudo apt-get --yes install samba
sudo apt-get --yes install cifs-utils
sudo usermod -a -G sambashare `whoami`
sudo pdbedit -a -u `whoami` # 設定密碼
sudo mkdir -p /etc/samba
sudo nano /etc/samba/smb.conf
sudo service smbd restart
- /etc/samba/smb.conf
[work]
path = /work
vfs object = recycle
recycle: keeptree = yes
recycle: versions = yes
recycle: repository = ../work/recycle/%u
write list = @sambashare
browseable = yes
writeable = yes
read only = no
[recycle]
path=/work/recycle/%u
comment = Recycle Bin
browseable = no
writable = yes
sudo apt-get --yes install nfs-common
sudo apt-get --yes install nfs-kernel-server
sudo nano /etc/exports
sudo /etc/init.d/nfs-kernel-server restart
- /etc/exports
/work *(rw,sync,no_root_squash,no_subtree_check)
mkdir -p /work/tftpboot
sudo apt-get --yes install xinetd
sudo apt-get --yes install tftpd-hpa
sudo nano /etc/default/tftpd-hpa
- /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/work/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
sudo nano /etc/rsyslog.conf
sudo systemctl restart rsyslog
- /etc/rsyslog.conf
# add the below lines
$EscapeControlCharactersOnReceive off
F. dbus - dbusX.conf
# to register com.github.lankahsu520, com.github
sudo cp dbusX.conf /etc/dbus-1/system.d
sudo reboot
#!/bin/sh
telinit 1
MOUNT_DISK="work"
PURGE_DISK=`mount | grep $MOUNT_DISK | cut -d" " -f1`
mount -o remount,ro $PURGE_DISK
zerofree -v $PURGE_DISK
$ "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd work_curr.vdi --compact
$ "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list hdds
UUID: 8f57809e-9a5e-4160-9b08-7c42e80ec070
Parent UUID: base
State: locked write
Type: normal (base)
Location: D:\work\VirtualBox\opt_curr.vdi
Storage format: VDI
Capacity: 131072 MBytes
Encryption: disabled
UUID: 35af928b-87c3-43a7-ab61-4f5f76e57c7e
Parent UUID: base
State: locked write
Type: normal (base)
Location: D:\work\VirtualBox\work_curr.vdi
Storage format: VDI
Capacity: 524288 MBytes
Encryption: disabled
UUID: 9edd1810-e0a9-497c-a400-75fa2b706bdf
Parent UUID: base
State: locked write
Type: normal (base)
Location: D:\work\VirtualBox\Ubuntu2004_buildX_curr.vdi
Storage format: VDI
Capacity: 131072 MBytes
Encryption: disabled
載入現有的 Disk Image。
建立新的 Disk Image。
複製選定的 Disk Image。如果你是用 win10 的檔案總管複製,會同時複製內部的 uuid。但是使用此工具會建立新的uuid。
B. Android-x86
Created and designed by Lanka Hsu.
HelperX is available under the BSD-3-Clause license. See the LICENSE file for more info.