From 0bb94de864ddb9a6d43b3e9148cb5535d84349f5 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 28 Jun 2014 00:35:50 -0300 Subject: [archiso] Drop aitab support Always create one filesystem of a fixed size (32G), format (ext4) and know name "airootfs". Simplify logic a lot. --- docs/README.bootparams | 6 ------ hooks/archiso | 29 +++-------------------------- hooks/archiso_pxe_http | 16 +--------------- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/docs/README.bootparams b/docs/README.bootparams index 755cc0d..caee0c2 100644 --- a/docs/README.bootparams +++ b/docs/README.bootparams @@ -23,8 +23,6 @@ INDEX Default: "/dev/disk/by-label/${archisolabel}" * archisobasedir= Set the base directory where all files reside. Default: "arch" -* aitab= Set the path for "aitab" file. - Default: ${archisobasedir}/aitab * copytoram= If set to "y" or just "copytoram" without arguments, all SquashFS are copied to "RAM". Default: (unset) @@ -59,10 +57,6 @@ INDEX Default: "75%" * dm_snap_prefix= Set a prefix for device-mapper snapshot node names. Default: "arch" -* arch= Force an architecture type (i686 | x86_64). - Do not set it for normal operations. - Useful for running a 64 bit kernel / 32 bit userspace. - Default: (architecture of running kernel) ** hooks/archiso_pxe_common diff --git a/hooks/archiso b/hooks/archiso index 66a6273..d6ca443 100644 --- a/hooks/archiso +++ b/hooks/archiso @@ -101,7 +101,7 @@ _verify_checksum() { } run_hook() { - [[ -z "${arch}" ]] && arch="$(uname -m)" + arch="$(uname -m)" [[ -z "${cowspace_size}" ]] && cowspace_size="75%" [[ -z "${copytoram_size}" ]] && copytoram_size="75%" [[ -z "${archisobasedir}" ]] && archisobasedir="arch" @@ -113,12 +113,6 @@ run_hook() { cowfile_size=${cowfile_size/%} fi - if [[ -z "${aitab}" ]]; then - aitab="/run/archiso/bootmnt/${archisobasedir}/aitab" - else - aitab="/run/archiso/bootmnt/${archisobasedir}/${aitab}" - fi - if [[ -n "${cow_label}" ]]; then cow_device="/dev/disk/by-label/${cow_label}" [[ -z "${cow_persistent}" ]] && cow_persistent="P" @@ -147,14 +141,6 @@ archiso_mount_handler() { fi fi - - if [[ ! -f "${aitab}" ]]; then - echo "ERROR: '${aitab}' file does not exist." - echo " Falling back to interactive prompt" - echo " You can try to fix the problem manually, log out when you are finished" - launch_interactive_shell - fi - if [[ "${checksum}" == "y" ]]; then if [[ -f "/run/archiso/bootmnt/${archisobasedir}/checksum.${arch}.md5" ]]; then msg -n ":: Self-test requested, please wait..." @@ -188,17 +174,8 @@ archiso_mount_handler() { fi mkdir -p "/run/archiso/cowspace/${cow_directory}" - local aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size - while read aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size; do - [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue - [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue - if [[ "${aitab_fs_type}" != "none" ]]; then - _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/run/archiso/sfs/${aitab_img}" - _mnt_fs "/run/archiso/sfs/${aitab_img}/${aitab_img}.fs" "${newroot}" "${aitab_mnt}" - else - _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${newroot}${aitab_mnt}" - fi - done < "${aitab}" + _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.fs.sfs" "/run/archiso/sfs/airootfs" + _mnt_fs "/run/archiso/sfs/airootfs/airootfs.fs" "${newroot}" "/" if [[ "${copytoram}" == "y" ]]; then umount /run/archiso/bootmnt diff --git a/hooks/archiso_pxe_http b/hooks/archiso_pxe_http index 32e8ab0..001b486 100644 --- a/hooks/archiso_pxe_http +++ b/hooks/archiso_pxe_http @@ -34,21 +34,7 @@ archiso_pxe_http_mount_handler () { mkdir -p "/run/archiso/httpspace" mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 httpspace "/run/archiso/httpspace" - local _aitab_url="${archiso_http_srv}${aitab#/run/archiso/bootmnt/}" - local _aitab_file="/run/archiso/httpspace/${aitab#/run/archiso/bootmnt/}" - - _curl_get "${_aitab_url}" "/" - - local aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size - while read aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size; do - [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue - [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue - if [[ "${aitab_fs_type}" != "none" ]]; then - _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/${aitab_arch}" - else - _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "/${aitab_arch}" - fi - done < "${_aitab_file}" + _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.fs.sfs" "/${arch}" if [[ "${checksum}" == "y" ]]; then _curl_get "${archiso_http_srv}${archisobasedir}/checksum.${arch}.md5" "/" -- cgit v1.2.3-70-g09d2