Skip to content
Snippets Groups Projects
Commit e8d9f8ac authored by Timmy Chan's avatar Timmy Chan
Browse files

Fix debian image setup for arch amd64

Debian repo uses "amd64" instead of the general term "x86_64"
parent cd9173cd
No related branches found
No related tags found
1 merge request!5Feat/cve linux kernel
......@@ -33,7 +33,7 @@ function download_debian {
# Create a debian image inside DL_DIR, inside a new vm dir
verbose_log "VM directory is created at path ${DL_DIR}"
cd "${DL_DIR}" || exit
cd "${DL_DIR}" || exit 1
# Create a directory for the src
mkdir -p src
......@@ -99,9 +99,9 @@ EOF
tune2fs -O ^has_journal "${DISK_NAME}"
verbose_log "Configured Debian disk image"
cd "${WORKING_DIR}" || exit
cd "${WORKING_DIR}" || exit 1
}
download_debian "$ARCH"
download_debian "${ARCH}"
exit
......@@ -119,7 +119,13 @@ def create_vm_directory():
def setup_vm_disk_image(vm_directory, **kwargs):
args = f"{str(vm_directory)} {kwargs['arch']}"
"""
Setup VM disk image using debootstrap and dd
The file system will be ext2 for backwards compatibility
"""
# Debian repo uses amd64 instead of the general term "x86_64"
arch_name = kwargs['arch'] if not kwargs['arch'] == "x86_64" else "amd64"
args = f"{str(vm_directory)} {arch_name}"
try:
simple_call_shell_command("bash debian_image_setup.sh " + args)
except (FileNotFoundError, subprocess.CalledProcessError) as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment