mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
commit
f1323b4673
5 changed files with 44 additions and 44 deletions
|
|
@ -5,7 +5,7 @@ The followings are the list of functionalities:
|
||||||
- Ubuntu and Void Linux support.
|
- Ubuntu and Void Linux support.
|
||||||
- Help to install from LiveCD/USB.
|
- Help to install from LiveCD/USB.
|
||||||
- Invoke GUI/TUI installer automatically at the middle of script execution, for the ease of installation.
|
- Invoke GUI/TUI installer automatically at the middle of script execution, for the ease of installation.
|
||||||
- Automatic detection of EFI firmware and create GPT (The BIOS detection and MBR creation function exist. But they are not test from v1.3.0).
|
- Automatic detection of EFI firmware and create GPT (The BIOS detection and MBR creation function exist. But they are not tested from v1.3.0).
|
||||||
- Create an EFI partition, if needed.
|
- Create an EFI partition, if needed.
|
||||||
- Support multiple boot in a LUKS partition.
|
- Support multiple boot in a LUKS partition.
|
||||||
- Support btrfs in addition to the major file systems.
|
- Support btrfs in addition to the major file systems.
|
||||||
|
|
@ -59,7 +59,7 @@ These scripts are based on the script by [myn's diary](https://myn.hatenablog.jp
|
||||||
|
|
||||||
Also, the following documents were very important to study how Void Linux installation works.
|
Also, the following documents were very important to study how Void Linux installation works.
|
||||||
- [Full Disk Encryption](https://docs.voidlinux.org/installation/guides/fde.html) in the Void Handbook.
|
- [Full Disk Encryption](https://docs.voidlinux.org/installation/guides/fde.html) in the Void Handbook.
|
||||||
- [Install LVM LUKS](https://wiki.voidlinux.org/Install_LVM_LUKS) (deprecated)
|
- [Install LVM LUKS](https://wiki.voidlinux.org/Install_LVM_LUKS) (deprecated)[[archive](https://web.archive.org/web/20201112031114/https://wiki.voidlinux.org/Install_LVM_LUKS)].
|
||||||
# Kaiten-yaki
|
# Kaiten-yaki
|
||||||

|

|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Configuration parameters for Kaiten-Yaki
|
# Configuration parameters for Kaiten-Yaki
|
||||||
|
|
||||||
# Storage device to install the linux.
|
# Storage device to install Linux.
|
||||||
export DEV="/dev/sda"
|
export DEV="/dev/sda"
|
||||||
|
|
||||||
# Whether you want to erase all contents of the storage device or not.
|
# Whether you want to erase all contents of the storage device or not.
|
||||||
|
|
@ -26,7 +26,7 @@ export LVROOTNAME="anko"
|
||||||
# You will have
|
# You will have
|
||||||
# anko
|
# anko
|
||||||
# anko_home
|
# anko_home
|
||||||
# You will not have anko_var because the USELVEXT2=0.
|
# You will not have anko_var because of the USELVEXT2=0.
|
||||||
export USELVEXT1=0
|
export USELVEXT1=0
|
||||||
export LVEXT1SUFFIX="_home"
|
export LVEXT1SUFFIX="_home"
|
||||||
export USELVEXT2=0
|
export USELVEXT2=0
|
||||||
|
|
@ -50,10 +50,10 @@ export EFISIZE="200M"
|
||||||
export LVSWAPSIZE="8G"
|
export LVSWAPSIZE="8G"
|
||||||
|
|
||||||
# Logical volume size of the Linux installation.
|
# Logical volume size of the Linux installation.
|
||||||
# There are four posibble way to specify the volume.
|
# There are four posibble ways to specify the volume.
|
||||||
# nnnM, nnnG, nnnT : Absolute size speicification. nnnMbyte, nnnGByte, nnnT byte.
|
# nnnM, nnnG, nnnT : Absolute size specification. nnnMbyte, nnnGByte, nnnT byte.
|
||||||
# mm%VG : Use mm% of the entire volume group.
|
# mm%VG : Use mm% of the entire volume group.
|
||||||
# mm%FREE : Use mm% of the avairable storage are in the volume group.
|
# mm%FREE : Use mm% of the available storage in the volume group.
|
||||||
export LVROOTSIZE="10G"
|
export LVROOTSIZE="10G"
|
||||||
|
|
||||||
# Logical volume size of the optional volumes.
|
# Logical volume size of the optional volumes.
|
||||||
|
|
@ -85,7 +85,7 @@ if [ -d /sys/firmware/efi ]; then
|
||||||
export ISEFI=1 # Yes, EFI
|
export ISEFI=1 # Yes, EFI
|
||||||
else
|
else
|
||||||
export ISEFI=0 # No, BIOS
|
export ISEFI=0 # No, BIOS
|
||||||
fi # is EFI firmaare?
|
fi # is it EFI firmware?
|
||||||
|
|
||||||
# Set partition number based on the firmware type
|
# Set partition number based on the firmware type
|
||||||
if [ ${ISEFI} -ne 0 ] ; then
|
if [ ${ISEFI} -ne 0 ] ; then
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ function confirmation(){
|
||||||
return 1 # with error status
|
return 1 # with error status
|
||||||
fi # "-" is found in the volume name.
|
fi # "-" is found in the volume name.
|
||||||
|
|
||||||
# For surre ask the your config.sh is edited
|
# Make sure config.sh is edited
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
|
|
||||||
LUKS volume partition : ${DEV}${CRYPTPARTITION}
|
LUKS volume partition : ${DEV}${CRYPTPARTITION}
|
||||||
|
|
@ -149,7 +149,7 @@ function confirmation(){
|
||||||
# -l ###%[FREE|VG|PVS|ORIGIN] : Size by relative value.
|
# -l ###%[FREE|VG|PVS|ORIGIN] : Size by relative value.
|
||||||
# -L ###[M|G|T|m|g|t] : Size by absolute value.
|
# -L ###[M|G|T|m|g|t] : Size by absolute value.
|
||||||
# Too preven the duplicated match, awk exists the process after it match the /%/ pattern.
|
# Too preven the duplicated match, awk exists the process after it match the /%/ pattern.
|
||||||
# If Unit is not specified, installation will fail.
|
# If the unit is not specified, installation will fail.
|
||||||
|
|
||||||
LVSWAPSIZE=$(echo "${LVSWAPSIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
LVSWAPSIZE=$(echo "${LVSWAPSIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
||||||
export LVSWAPSIZE
|
export LVSWAPSIZE
|
||||||
|
|
@ -180,7 +180,7 @@ function pre_install() {
|
||||||
IS_LVEXT1_CREATED=0
|
IS_LVEXT1_CREATED=0
|
||||||
IS_LVEXT2_CREATED=0
|
IS_LVEXT2_CREATED=0
|
||||||
|
|
||||||
# ----- Erase entire disk, create partitions, format them and encrypt the LUKS partition -----
|
# ----- Erase entire disk, create partitions, format them and encrypt the LUKS partition -----
|
||||||
if [ "${ERASEALL}" -ne 0 ] ; then
|
if [ "${ERASEALL}" -ne 0 ] ; then
|
||||||
|
|
||||||
# Assign specified space and rest of disk to the EFI and LUKS partition, respectively.
|
# Assign specified space and rest of disk to the EFI and LUKS partition, respectively.
|
||||||
|
|
@ -228,7 +228,7 @@ function pre_install() {
|
||||||
echo "[Kaiten-Yaki] Opening a crypt partition \"${DEV}${CRYPTPARTITION}\" as \"${CRYPTPARTNAME}\""
|
echo "[Kaiten-Yaki] Opening a crypt partition \"${DEV}${CRYPTPARTITION}\" as \"${CRYPTPARTNAME}\""
|
||||||
printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" "${CRYPTPARTNAME}"
|
printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" "${CRYPTPARTNAME}"
|
||||||
|
|
||||||
# Check whether successful open. If mapped, it is successful.
|
# Check whether it successfully opens. If mapped, it is successful.
|
||||||
if [ ! -e /dev/mapper/"${CRYPTPARTNAME}" ] ; then
|
if [ ! -e /dev/mapper/"${CRYPTPARTNAME}" ] ; then
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
***** ERROR : Cannot open LUKS volume "${CRYPTPARTNAME}" on "${DEV}${CRYPTPARTITION}". *****
|
***** ERROR : Cannot open LUKS volume "${CRYPTPARTNAME}" on "${DEV}${CRYPTPARTITION}". *****
|
||||||
|
|
@ -240,7 +240,7 @@ function pre_install() {
|
||||||
fi # if crypt volume is unable to open
|
fi # if crypt volume is unable to open
|
||||||
|
|
||||||
# ----- Configure the LVM in LUKS volume -----
|
# ----- Configure the LVM in LUKS volume -----
|
||||||
# Check volume group ${VGNAME} exist or not
|
# Check if volume group ${VGNAME} exist or not
|
||||||
if vgdisplay -s "${VGNAME}" &> /dev/null ; then # if exist
|
if vgdisplay -s "${VGNAME}" &> /dev/null ; then # if exist
|
||||||
echo "[Kaiten-Yaki] Volume group \"${VGNAME}\" already exist. Skipped to create. No problem."
|
echo "[Kaiten-Yaki] Volume group \"${VGNAME}\" already exist. Skipped to create. No problem."
|
||||||
echo "[Kaiten-Yaki] Activating all logical volumes in volume group \"${VGNAME}\"."
|
echo "[Kaiten-Yaki] Activating all logical volumes in volume group \"${VGNAME}\"."
|
||||||
|
|
@ -275,7 +275,7 @@ function pre_install() {
|
||||||
create_ext_lv
|
create_ext_lv
|
||||||
if [ $? -ne 0 ] ; then deactivate_and_close; return 1 ; fi;
|
if [ $? -ne 0 ] ; then deactivate_and_close; return 1 ; fi;
|
||||||
|
|
||||||
else # exist and not overwriteinstall
|
else # exist and not overwrite install
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. *****
|
***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. *****
|
||||||
[Kaiten-Yaki] Check LVROOTNAME environment variable in your config.txt.
|
[Kaiten-Yaki] Check LVROOTNAME environment variable in your config.txt.
|
||||||
|
|
@ -360,17 +360,17 @@ function para_install_msg() {
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# Common post-install stage
|
# Common post-install stage
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# In side this script, the chrooted job is parameterrized as by evn variable TARGETCHROOTEDJOB
|
# Inside this script, the chrooted job is parameterized as by evn variable TARGETCHROOTEDJOB
|
||||||
function post_install() {
|
function post_install() {
|
||||||
## Mount the target file system
|
## Mount the target file system
|
||||||
# ${TARGETMOUNTPOINT} is created by the GUI/TUI installer
|
# ${TARGETMOUNTPOINT} is created by the GUI/TUI installer.
|
||||||
# ${BTRFSOPTION} is defined by the caller of this function for BTRFS formated volume.
|
# ${BTRFSOPTION} is defined by the caller of this function for BTRFS formated volume.
|
||||||
# ${BTRFSOPTION} have to be NOT quoted. Otherwise, mount will receive an empty
|
# ${BTRFSOPTION} have to be NOT quoted. Otherwise, mount will receive an empty.
|
||||||
# string as first option, when the veraible is empty.
|
# string as first option, when the veraible is empty.
|
||||||
echo "[Kaiten-Yaki] Mounting /dev/mapper/${VGNAME}-${LVROOTNAME} on ${TARGETMOUNTPOINT}."
|
echo "[Kaiten-Yaki] Mounting /dev/mapper/${VGNAME}-${LVROOTNAME} on ${TARGETMOUNTPOINT}."
|
||||||
mount ${BTRFSOPTION} /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"
|
mount ${BTRFSOPTION} /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"
|
||||||
|
|
||||||
# And mount other directories
|
# And mount other directories.
|
||||||
echo "[Kaiten-Yaki] Mounting all other dirs."
|
echo "[Kaiten-Yaki] Mounting all other dirs."
|
||||||
for n in proc sys dev tmp etc/resolv.conf; do mount --rbind "/$n" "${TARGETMOUNTPOINT}/$n"; done
|
for n in proc sys dev tmp etc/resolv.conf; do mount --rbind "/$n" "${TARGETMOUNTPOINT}/$n"; done
|
||||||
|
|
||||||
|
|
@ -401,7 +401,7 @@ function post_install() {
|
||||||
echo "[Kaiten-Yaki] Disabling swap to release the LUKS volume."
|
echo "[Kaiten-Yaki] Disabling swap to release the LUKS volume."
|
||||||
swapoff -a
|
swapoff -a
|
||||||
|
|
||||||
# Close LUKS
|
# Close LUKS.
|
||||||
echo "[Kaiten-Yaki] Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
echo "[Kaiten-Yaki] Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
||||||
vgchange -a n "${VGNAME}"
|
vgchange -a n "${VGNAME}"
|
||||||
echo "[Kaiten-Yaki] Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
echo "[Kaiten-Yaki] Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
||||||
|
|
@ -412,7 +412,7 @@ function post_install() {
|
||||||
PASSPHRASE=""
|
PASSPHRASE=""
|
||||||
export PASSPHRASE
|
export PASSPHRASE
|
||||||
|
|
||||||
# Finishing message
|
# Finishing message.
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
****************** Install process finished ******************
|
****************** Install process finished ******************
|
||||||
|
|
||||||
|
|
@ -464,7 +464,7 @@ function deactivate_and_close(){
|
||||||
}
|
}
|
||||||
|
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# Delete the nwe volume if overwrite install, and close all
|
# Delete the new volume if overwrite install, and close all
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
function on_unexpected_installer_quit(){
|
function on_unexpected_installer_quit(){
|
||||||
echo "***** ERROR : The GUI/TUI installer terminated unexpectedly. *****"
|
echo "***** ERROR : The GUI/TUI installer terminated unexpectedly. *****"
|
||||||
|
|
@ -478,7 +478,7 @@ function on_unexpected_installer_quit(){
|
||||||
|
|
||||||
|
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# Check whether given signaure is in the system information
|
# Check whether given signature is in the system information
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
function distribution_check(){
|
function distribution_check(){
|
||||||
if ! uname -a | grep "${DISTRIBUTIONSIGNATURE}" -i > /dev/null ; then # Signature is not found in the OS name.
|
if ! uname -a | grep "${DISTRIBUTIONSIGNATURE}" -i > /dev/null ; then # Signature is not found in the OS name.
|
||||||
|
|
@ -537,7 +537,7 @@ function create_ext_lv() {
|
||||||
echo "***** ERROR : failed to create "${VGNAME}-${LVROOTNAME}${LVEXT1SUFFIX}" . *****"
|
echo "***** ERROR : failed to create "${VGNAME}-${LVROOTNAME}${LVEXT1SUFFIX}" . *****"
|
||||||
return 1 ;
|
return 1 ;
|
||||||
else # if success
|
else # if success
|
||||||
IS_LVEXT2_CREATED=1 # Mark this volume is created
|
IS_LVEXT2_CREATED=1 # Mark this volume as created
|
||||||
fi;
|
fi;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function main() {
|
||||||
export DISTRIBUTIONSIGNATURE="ubuntu"
|
export DISTRIBUTIONSIGNATURE="ubuntu"
|
||||||
export DISTRIBUTIONNAME="Ubuntu"
|
export DISTRIBUTIONNAME="Ubuntu"
|
||||||
|
|
||||||
# Check whetehr given signature exist or not
|
# Check whether given signature exist or not
|
||||||
if ! distribution_check ; then
|
if ! distribution_check ; then
|
||||||
return 1 # with error status
|
return 1 # with error status
|
||||||
fi
|
fi
|
||||||
|
|
@ -62,7 +62,7 @@ function main() {
|
||||||
export BTRFSOPTION=""
|
export BTRFSOPTION=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
|
# Distribution dependent finalizing. Embed encryption key into the ramfs image.
|
||||||
# The script is parameterized by env-variable to fit to the distribution
|
# The script is parameterized by env-variable to fit to the distribution
|
||||||
post_install
|
post_install
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ function para_install_local() {
|
||||||
# Show common message to let the operator focus on the critical part
|
# Show common message to let the operator focus on the critical part
|
||||||
para_install_msg
|
para_install_msg
|
||||||
|
|
||||||
# Distrobution dependent message
|
# Distribution dependent message
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
|
|
||||||
**************** CAUTION! CAUTION! CAUTION! ********************
|
**************** CAUTION! CAUTION! CAUTION! ********************
|
||||||
|
|
@ -90,7 +90,7 @@ function para_install_local() {
|
||||||
[Kaiten-Yaki] Type return key to start Ubiquity.
|
[Kaiten-Yaki] Type return key to start Ubiquity.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
||||||
# waiting for a console input
|
# Waiting for a console input
|
||||||
read -r
|
read -r
|
||||||
|
|
||||||
# Start Ubiquity installer
|
# Start Ubiquity installer
|
||||||
|
|
@ -112,7 +112,7 @@ function para_install_local() {
|
||||||
|
|
||||||
|
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# This function will be executed in the foreguround context, to watch the GUI installer.
|
# This function will be executed in the foreground context, to watch the GUI installer.
|
||||||
function grub_check_and_modify_local() {
|
function grub_check_and_modify_local() {
|
||||||
|
|
||||||
# While the /etc/default/grub in the install target is NOT existing, keep sleeping.
|
# While the /etc/default/grub in the install target is NOT existing, keep sleeping.
|
||||||
|
|
@ -123,16 +123,16 @@ function grub_check_and_modify_local() {
|
||||||
|
|
||||||
# Check if installer quit unexpectedly
|
# Check if installer quit unexpectedly
|
||||||
if ! ps $INSTALLER_PID > /dev/null ; then # If not exists
|
if ! ps $INSTALLER_PID > /dev/null ; then # If not exists
|
||||||
# Delete the nwe volume if overwrite install, and close all
|
# Delete the new volume if overwrite install, and close all
|
||||||
on_unexpected_installer_quit
|
on_unexpected_installer_quit
|
||||||
return 1 # with error status
|
return 1 # with error status
|
||||||
fi
|
fi
|
||||||
done # while
|
done # while
|
||||||
|
|
||||||
# Perhaps, too neuvous. Wait 1 more sectond to avoid the rece condition.
|
# Perhaps, too nervous. Wait 1 more second to avoid the rece condition.
|
||||||
sleep 1 # 1sec.
|
sleep 1 # 1sec.
|
||||||
|
|
||||||
# Make target GRUB aware to the crypt partition
|
# Make target GRUB aware of the crypt partition
|
||||||
# This must do it after start of the file copy by installer, but before the end of the file copy.
|
# This must do it after start of the file copy by installer, but before the end of the file copy.
|
||||||
echo "[Kaiten-Yaki] Adding GRUB_ENABLE_CRYPTODISK entry to ${TARGETMOUNTPOINT}/etc/default/grub "
|
echo "[Kaiten-Yaki] Adding GRUB_ENABLE_CRYPTODISK entry to ${TARGETMOUNTPOINT}/etc/default/grub "
|
||||||
echo "GRUB_ENABLE_CRYPTODISK=y" >> ${TARGETMOUNTPOINT}/etc/default/grub
|
echo "GRUB_ENABLE_CRYPTODISK=y" >> ${TARGETMOUNTPOINT}/etc/default/grub
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function main() {
|
||||||
export DISTRIBUTIONSIGNATURE="void"
|
export DISTRIBUTIONSIGNATURE="void"
|
||||||
export DISTRIBUTIONNAME="Void Linux"
|
export DISTRIBUTIONNAME="Void Linux"
|
||||||
|
|
||||||
# Check whetehr given signature exist or not
|
# Check whether given signature exist or not
|
||||||
if ! distribution_check ; then
|
if ! distribution_check ; then
|
||||||
return 1 # with error status
|
return 1 # with error status
|
||||||
fi
|
fi
|
||||||
|
|
@ -41,7 +41,7 @@ function main() {
|
||||||
# This is magical part. I have not understood why this is required.
|
# This is magical part. I have not understood why this is required.
|
||||||
# Anyway, without this modification, Void Linux doesn't boot.
|
# Anyway, without this modification, Void Linux doesn't boot.
|
||||||
# Refer https://wiki.voidlinux.org/Install_LVM_LUKS#Installation_using_void-installer
|
# Refer https://wiki.voidlinux.org/Install_LVM_LUKS#Installation_using_void-installer
|
||||||
# This modification is guaratnteed once only. To allow re-trying the installation after unexpected GUI/TUI installer quit.
|
# This modification is guaranteed once only. To allow re-trying the installation after unexpected GUI/TUI installer quit.
|
||||||
export GRUB_ADDITIONAL_PARAMETERS="rd.auto=1 cryptdevice=${DEV}${CRYPTPARTITION}:${CRYPTPARTNAME} root=/dev/mapper/${VGNAME}-${LVROOTNAME}"
|
export GRUB_ADDITIONAL_PARAMETERS="rd.auto=1 cryptdevice=${DEV}${CRYPTPARTITION}:${CRYPTPARTNAME} root=/dev/mapper/${VGNAME}-${LVROOTNAME}"
|
||||||
if grep "$GRUB_ADDITIONAL_PARAMETERS" /etc/default/grub ; then # Is additonal parameter already added?
|
if grep "$GRUB_ADDITIONAL_PARAMETERS" /etc/default/grub ; then # Is additonal parameter already added?
|
||||||
# Yes
|
# Yes
|
||||||
|
|
@ -77,7 +77,7 @@ function main() {
|
||||||
# We don't need special option for BTRFSOPTION.
|
# We don't need special option for BTRFSOPTION.
|
||||||
export BTRFSOPTION=""
|
export BTRFSOPTION=""
|
||||||
|
|
||||||
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
|
# Distribution dependent finalizing. Embed encryption key into the ramfs image.
|
||||||
# The script is parameterized by env-variable to fit to the distribution
|
# The script is parameterized by env-variable to fit to the distribution
|
||||||
post_install
|
post_install
|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ function para_install_local() {
|
||||||
# Show common message to let the operator focus on the critical part
|
# Show common message to let the operator focus on the critical part
|
||||||
para_install_msg
|
para_install_msg
|
||||||
|
|
||||||
# Distrobution dependent message
|
# Distribution dependent message
|
||||||
cat <<- HEREDOC
|
cat <<- HEREDOC
|
||||||
|
|
||||||
******************** CAUTION! CAUTION! CAUTION! ************************
|
******************** CAUTION! CAUTION! CAUTION! ************************
|
||||||
|
|
@ -105,10 +105,10 @@ function para_install_local() {
|
||||||
[Kaiten-Yaki] Type return key to start void-installer.
|
[Kaiten-Yaki] Type return key to start void-installer.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
||||||
# waiting for a console input
|
# Waiting for a console input
|
||||||
read -r
|
read -r
|
||||||
|
|
||||||
# Start the background target/etc/default/grub cheker.
|
# Start the background target/etc/default/grub checker.
|
||||||
# The definition of this function is down below.
|
# The definition of this function is down below.
|
||||||
grub_check_and_modify_local &
|
grub_check_and_modify_local &
|
||||||
|
|
||||||
|
|
@ -120,8 +120,8 @@ function para_install_local() {
|
||||||
|
|
||||||
# Check if background checker still exist
|
# Check if background checker still exist
|
||||||
if ps $grub_check_and_modify_id > /dev/null ; then # If exists
|
if ps $grub_check_and_modify_id > /dev/null ; then # If exists
|
||||||
# If exist, the grub was not modifyed -> void-installer termianted unexpectedly
|
# If exist, the grub was not modifyed -> void-installer terminated unexpectedly
|
||||||
# Delete the nwe volume if overwrite install, and close all
|
# Delete the new volume if overwrite install, and close all
|
||||||
on_unexpected_installer_quit
|
on_unexpected_installer_quit
|
||||||
echo "[Kaiten-Yaki] restoring modified /etc/default/grub."
|
echo "[Kaiten-Yaki] restoring modified /etc/default/grub."
|
||||||
sed -i "s#loglevel=4 ${GRUB_ADDITIONAL_PARAMETERS}#loglevel=4#" /etc/default/grub
|
sed -i "s#loglevel=4 ${GRUB_ADDITIONAL_PARAMETERS}#loglevel=4#" /etc/default/grub
|
||||||
|
|
@ -144,10 +144,10 @@ function grub_check_and_modify_local() {
|
||||||
sleep 1 # 1sec.
|
sleep 1 # 1sec.
|
||||||
done # while
|
done # while
|
||||||
|
|
||||||
# Perhaps, too neuvous. Wait 1 more sectond to avoid the rece condition.
|
# Perhaps, too nervous. Wait 1 more second to avoid the rece condition.
|
||||||
sleep 1 # 1sec.
|
sleep 1 # 1sec.
|
||||||
|
|
||||||
# Make target GRUB aware to the crypt partition
|
# Make target GRUB aware of the crypt partition
|
||||||
# This must do it after start of the file copy by installer, but before the end of the file copy.
|
# This must do it after start of the file copy by installer, but before the end of the file copy.
|
||||||
echo "[Kaiten-Yaki] Adding GRUB_ENABLE_CRYPTODISK entry to ${TARGETMOUNTPOINT}/etc/default/grub "
|
echo "[Kaiten-Yaki] Adding GRUB_ENABLE_CRYPTODISK entry to ${TARGETMOUNTPOINT}/etc/default/grub "
|
||||||
echo "GRUB_ENABLE_CRYPTODISK=y" >> ${TARGETMOUNTPOINT}/etc/default/grub
|
echo "GRUB_ENABLE_CRYPTODISK=y" >> ${TARGETMOUNTPOINT}/etc/default/grub
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue