WIP: can get iso, boot and install
Needs instructions, re-factoring/tidying and checking
This commit is contained in:
parent
8ee0d3a207
commit
338a914b89
13
quickemu
13
quickemu
@ -468,7 +468,7 @@ function vm_boot() {
|
|||||||
|
|
||||||
# Make any OS specific adjustments
|
# Make any OS specific adjustments
|
||||||
case ${guest_os} in
|
case ${guest_os} in
|
||||||
batocera|*bsd|freedos|haiku|linux|*solaris)
|
arosone|batocera|*bsd|freedos|haiku|linux|*solaris)
|
||||||
CPU="-cpu host,kvm=on"
|
CPU="-cpu host,kvm=on"
|
||||||
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
|
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
|
||||||
CPU="${CPU},topoext"
|
CPU="${CPU},topoext"
|
||||||
@ -476,11 +476,15 @@ function vm_boot() {
|
|||||||
|
|
||||||
if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then
|
if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then
|
||||||
MOUSE="usb"
|
MOUSE="usb"
|
||||||
elif [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ]; then
|
elif [ "${guest_os}" == "arosone" ] || [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ]; then
|
||||||
MACHINE_TYPE="pc"
|
MACHINE_TYPE="pc"
|
||||||
NET_DEVICE="rtl8139"
|
NET_DEVICE="rtl8139"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if [ "${guest_os}" == "arosone" ] ; then
|
||||||
|
# #MAC_DISK_DEV="ide-hd,bus=ahci.0,drive=0"
|
||||||
|
# fi
|
||||||
|
|
||||||
if [ "${guest_os}" == "freedos" ] ; then
|
if [ "${guest_os}" == "freedos" ] ; then
|
||||||
# fix for #382
|
# fix for #382
|
||||||
SMM="on"
|
SMM="on"
|
||||||
@ -1099,6 +1103,11 @@ function vm_boot() {
|
|||||||
args+=(-device ahci,id=ahci
|
args+=(-device ahci,id=ahci
|
||||||
-device ide-hd,bus=ahci.0,drive=SystemDisk
|
-device ide-hd,bus=ahci.0,drive=SystemDisk
|
||||||
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
||||||
|
elif [ "${guest_os}" == "arosone" ]; then
|
||||||
|
# shellcheck disable=SC2054,SC2206
|
||||||
|
args+=(-device ahci,id=ahci
|
||||||
|
#-device ide-hd,bus=ahci.0,drive=SystemDisk
|
||||||
|
-drive id=SystemDisk,if=ide,index=1,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
||||||
|
|
||||||
elif [ "${guest_os}" == "batocera" ] ; then
|
elif [ "${guest_os}" == "batocera" ] ; then
|
||||||
# shellcheck disable=SC2054,SC2206
|
# shellcheck disable=SC2054,SC2206
|
||||||
|
75
quickget
75
quickget
@ -36,6 +36,7 @@ function pretty_name() {
|
|||||||
archlinux) PRETTY_NAME="Arch Linux";;
|
archlinux) PRETTY_NAME="Arch Linux";;
|
||||||
archcraft) PRETTY_NAME="Archcraft";;
|
archcraft) PRETTY_NAME="Archcraft";;
|
||||||
arcolinux) PRETTY_NAME="Arco Linux";;
|
arcolinux) PRETTY_NAME="Arco Linux";;
|
||||||
|
arosone) PRETTY_NAME="AROS One";;
|
||||||
blendos) PRETTY_NAME="BlendOS";;
|
blendos) PRETTY_NAME="BlendOS";;
|
||||||
cachyos) PRETTY_NAME="CachyOS";;
|
cachyos) PRETTY_NAME="CachyOS";;
|
||||||
centos-stream) PRETTY_NAME="CentOS Stream";;
|
centos-stream) PRETTY_NAME="CentOS Stream";;
|
||||||
@ -177,6 +178,7 @@ function os_support() {
|
|||||||
archlinux \
|
archlinux \
|
||||||
archcraft \
|
archcraft \
|
||||||
arcolinux \
|
arcolinux \
|
||||||
|
arosone \
|
||||||
batocera \
|
batocera \
|
||||||
blendos \
|
blendos \
|
||||||
cachyos \
|
cachyos \
|
||||||
@ -275,6 +277,10 @@ function editions_arcolinux() {
|
|||||||
echo large small
|
echo large small
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function releases_arosone() {
|
||||||
|
echo 2.0
|
||||||
|
}
|
||||||
|
|
||||||
function releases_blendos() {
|
function releases_blendos() {
|
||||||
local RLIST
|
local RLIST
|
||||||
RLIST=$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep tag_name | grep -o -E '[[:digit:]]+\.[[:digit:]]+' | tr ' \r\n' ' ')
|
RLIST=$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep tag_name | grep -o -E '[[:digit:]]+\.[[:digit:]]+' | tr ' \r\n' ' ')
|
||||||
@ -774,19 +780,37 @@ function web_get() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v aria2c &>/dev/null; then
|
# if [[ "${URL}" =~ drive.google.com ]]; then
|
||||||
if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
|
# ## Google Drive needs special handling for large files
|
||||||
|
# # FILEID="FILEIDENTIFIER"
|
||||||
|
# # FILENAME="FILENAME"
|
||||||
|
# FILEID="1ARgQSsxFxHWF7orcZvX27eBUY9mERPH2"
|
||||||
|
# #FILENAME="ArosOne-x86-v2.0-ISO-DVD.zip"
|
||||||
|
# echo "DEBUG: Downloading ${URL} to ${DIR}/${FILE} from Google Drive"
|
||||||
|
# local GDRESPONSE
|
||||||
|
# GDRESPONSE=$(curl -c /tmp/qggdcookie -s -L "https://drive.google.com/uc?export=download&id=${FILEID}")
|
||||||
|
|
||||||
|
# if ! curl -Lb /tmp/qggdcookie "https://drive.google.com/uc?export=download&$(echo ${GDRESPONSE}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)')&id=${FILEID}" -o "${ISO}" --output-dir "${DIR}"; then
|
||||||
|
# echo "ERROR! Failed to download ${URL} with curl. Try running 'quickget' again."
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
|
# else
|
||||||
|
if command -v aria2c &>/dev/null; then
|
||||||
|
if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
|
||||||
|
echo #Necessary as aria2c in suppressed mode does not have new lines
|
||||||
|
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo #Necessary as aria2c in suppressed mode does not have new lines
|
echo #Necessary as aria2c in suppressed mode does not have new lines
|
||||||
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
|
else
|
||||||
exit 1
|
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
||||||
fi
|
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
|
||||||
echo #Necessary as aria2c in suppressed mode does not have new lines
|
exit 1
|
||||||
else
|
fi
|
||||||
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
fi
|
||||||
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
|
# fi
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function zsync_get() {
|
function zsync_get() {
|
||||||
@ -837,6 +861,9 @@ function make_vm_config() {
|
|||||||
IMAGE_FILE="${1}"
|
IMAGE_FILE="${1}"
|
||||||
ISO_FILE="${2}"
|
ISO_FILE="${2}"
|
||||||
case "${OS}" in
|
case "${OS}" in
|
||||||
|
arosone)
|
||||||
|
GUEST="arosone"
|
||||||
|
IMAGE_TYPE="iso";;
|
||||||
batocera)
|
batocera)
|
||||||
GUEST="batocera"
|
GUEST="batocera"
|
||||||
IMAGE_TYPE="img";;
|
IMAGE_TYPE="img";;
|
||||||
@ -948,6 +975,9 @@ EOF
|
|||||||
echo "disk_size=\"12G\"" >> "${CONF_FILE}"
|
echo "disk_size=\"12G\"" >> "${CONF_FILE}"
|
||||||
echo "ram=\"2048M\"" >> "${CONF_FILE}"
|
echo "ram=\"2048M\"" >> "${CONF_FILE}"
|
||||||
;;
|
;;
|
||||||
|
arosone|icaros)
|
||||||
|
echo "boot=\"legacy\"" >> "${CONF_FILE}"
|
||||||
|
;;
|
||||||
macos)
|
macos)
|
||||||
echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}"
|
echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}"
|
||||||
# https://github.com/quickemu-project/quickemu/issues/438
|
# https://github.com/quickemu-project/quickemu/issues/438
|
||||||
@ -1051,6 +1081,20 @@ function get_arcolinux() {
|
|||||||
echo "${URL}/${ISO} ${HASH}"
|
echo "${URL}/${ISO} ${HASH}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_arosone() {
|
||||||
|
local ISO=""
|
||||||
|
local URL=""
|
||||||
|
FILEID="1ARgQSsxFxHWF7orcZvX27eBUY9mERPH2"
|
||||||
|
FILENAME="ArosOne-x86-v2.0-ISO-DVD.zip"
|
||||||
|
#ISO=${FILENAME}
|
||||||
|
ISO="ArosOne-x86-v2.0-ISO-DVD.zip"
|
||||||
|
URL="https://drive.google.com/uc?export=download&id=${FILEID}"
|
||||||
|
local GDRESPONSE=$(curl -c /tmp/gdcookie -s -L "https://drive.google.com/uc?export=download&id=${FILEID}")
|
||||||
|
curl -s -Lb /tmp/gdcookie "https://drive.google.com/uc?export=download&$(echo ${GDRESPONSE}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)')&id=${FILEID}" -o "${FILENAME}" --output-dir "${DIR}"
|
||||||
|
#echo "${URL}"/"${ISO}"
|
||||||
|
#make_vm_config "${FILENAME}"
|
||||||
|
}
|
||||||
|
|
||||||
function get_blendos() {
|
function get_blendos() {
|
||||||
local EDITION="${1:-}"
|
local EDITION="${1:-}"
|
||||||
local HASH=""
|
local HASH=""
|
||||||
@ -2246,6 +2290,13 @@ create_vm() {
|
|||||||
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
|
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${OS} == "arosone" ] && [[ $ISO =~ ".zip" ]]; then
|
||||||
|
unzip ${VM_PATH}/${ISO} -d ${VM_PATH}
|
||||||
|
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
|
||||||
|
mv "${VM_PATH}/${ISO}" "${VM_PATH}/${ISO// /_}" # remove spaces
|
||||||
|
ISO=${ISO// /_}
|
||||||
|
fi
|
||||||
|
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user