From 04429da930dd202f9b909adfaf5e17b6224cb9fe Mon Sep 17 00:00:00 2001 From: Suikan <26223147+suikan4github@users.noreply.github.com> Date: Thu, 1 Jul 2021 09:30:40 +0900 Subject: [PATCH] modiy xbps-install with -Su --- INSTALL.md | 64 ++++++++++++++++++++------------------ README.md | 23 +++++++++----- script/void-kaiten-yaki.sh | 2 +- 3 files changed, 49 insertions(+), 40 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index aa8215c..114c81a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,12 +13,30 @@ If you execute these script as independent command style, it will show an error The first stage of the script is preparation like : erasing disk, format partition, and encryption. This is most critical stage of the entire installation process. This part is controlled by the configuration parameter. Thus, you have to edit the config.txt carefully. -In the second stage, the distribution dependent installer is invoked. That is the Ubiquity of Ubuntu and the void-installer of Void linux. +In the second stage, the distribution dependent installer is invoked. That is the Ubiquity/void-installer of Ubuntu/Void linux, respectively. The third stage is easy. There is nothing user can do. Everything is automatic. # Installation Follow the steps below. +## Shell preparation +First of all, promote the shell to root. Almost of the procedure requires root privilege. Note that the scripts requires Bash. + +In case of Ubuntu : +```bash +# Promote to the root user +sudo -i +``` +In case of Void-Linux : +```bash +sudo -i +bash +xbps-install -Su xbps nano +``` +The nano is editor package to configure the config.txt. The editor choice is up to you. Kaiten-yaki script doesn't use any editor during execution. + +Then, edit the config.txt. + ## Configuration parameters This is very critical part of the installation. The configuration parameters are in the top of the config.sh. Edit these parameters before the installation. @@ -40,7 +58,7 @@ export DEV="/dev/sda" export ERASEALL=1 # Logical Volume name for your Linux installation. Keep it unique from other distribution. -export LVROOTNAME="ubuntu" +export LVROOTNAME="anko" # Logical volume size of the Linux installation. # 30% mean, new logical volume will use 30% of the free space in the LVM volume group. @@ -48,7 +66,7 @@ export LVROOTNAME="ubuntu" export LVROOTSIZE="50%FREE" # Set the size of EFI partition and swap partition. The unit is Byte. you can use M,G... notation. -export EFISIZE="100M" +export EFISIZE="200M" export LVSWAPSIZE="8G" # Usually, these names can be left untouched. @@ -68,23 +86,7 @@ There are several restrictions : - The LVSWAPNAME must be unique among all installations in a computer. Otherwise, Kaiten-yaki creates an unnecessary logical volume. This is waste of storage resource. - The EFISIZE and the LVSWAPSIZE are refereed during the first distribution installation only. - The LVROOTSIZE is the size of a logical volume to create. This is a relative value to the existing free space in the volume group. If you want to install 3 distributions in a computer, you may want to set 33%FREE, 50%FREE, and 100%FREE for the first, second, and third distribution installation, respectively. -## Shell preparation -First of all, promote the shell to root. Almost of the procedure requires root privilege. Note that the scripts requires Bash. - -In case of Ubuntu : -```bash -# Promote to the root user -sudo -i -``` -In case of Void-Linux : -```bash -sudo -i -bash -xbps-install -Su xbps nano -``` -The nano is editor package to configure the config.txt. The editor choice is up to you. Kaiten-yaki scripts doesn't use editor. - -Then, edit the config.txt as explained above. +- The name with "-" is not allowed for the VGNAME, LVROOTNAME, and LVSWAPNAME. I saw some installed doesn't work if "-" in in the name. ## First stage : Setting up the volumes After you set the configuration parameters correctly, execute the following command from the shell. Again, you have to be promoted as root user, and you have to use Bash. @@ -101,23 +103,23 @@ After the several interactive confirmations, Kaiten-yaki will ask you to input a ## Second stage : GUI/TUI installer After the first script finishes, the GUI/TUI installer starts automatically. Configure it as usual and run it. Ensure you map the followings correctly. -Host Volume | Target Directory | Comment ------------------------|------------------|--------------------------------------------------------------- -/dev/sda1 | /boot/efi | BIOS system doesn't need this mapping -/dev/mapper/vg1-ubuntu | / | Host volume name is up to your configuration parameter. -/dev/mapper/swap | swap | Only the first distribution installation requires this mapping. +Target Directory | Host Volume | Comment +-----------------|------------------------|--------------------------------------------------------------- +/boot/efi | /dev/sda1 | BIOS system doesn't need this mapping +/ | /dev/mapper/vg1-ubuntu | Host volume name is up to your configuration parameter. +swap | /dev/mapper/swap | Only the first distribution installation requires this mapping. -During the GUI/TUI installer copying files, Kaiten-yaki modifies the /etc/default/grub of target system. This is pretty dirty way. If we don't modify this file, GUI/TUI installer fails at last. +During the GUI/TUI installer copying files, Kaiten-yaki modifies the /etc/default/grub of target system. This is pretty dirty way. But if we don't modify this file, GUI/TUI installer fails at last. -![Ubuntu Partitioning](../image/ubuntu_partitioning.png) -![Void Partitioning](../image/void_partitioning.png) +![Ubuntu Partitioning](image/ubuntu_partitioning.png) +![Void Partitioning](image/void_partitioning.png) ## Do not reboot At the end of the GUI/TUI installing, do not reboot the system. Click "Continue" and just exit the GUI/TUI installer without rebooting. Otherwise, we cannot finalize the entire installation process. -![Ubuntu done](../image/ubuntu_done.png) -![Void done](../image/void_done.png) +![Ubuntu done](image/ubuntu_done.png) +![Void done](image/void_done.png) ## Third stage : Finalizing -After GUI/TUI installer window is closed, final part of the install process automatically starts. You can reboot the system, if you see the completion message on the console. +After GUI/TUI installer quit without rebooting, final part of the install process automatically starts. You can reboot the system, if you see the "Ready to reboot" message on the console. diff --git a/README.md b/README.md index 52997b1..1b0adc6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Kaiten-yaki : Yet another Full Disk Encryption for GRUB/Linux -Helpful scripts of the full disk encryption for the Linux distribution +Kaiten-yaki is a script set to help you to make a full disk encryption install to your desktop system. -This is a script correction to help the installation of Linux distribution with the full disc encryption. Followings are the list of functionality. -- Ubuntu and Void Linux. +Followings are the list of functionality. +- Support Ubuntu and Void Linux. - Install from LiveCD/USB. -- Use GUI installer, for the ease of installation. +- Invoke GUI/TUI installer at the middle of script execution, for the ease of installation. - Automatic detection of BIOS/EFI firmware and create MBR/GPT, respectively. - Support to install multiple distributions in a LUKS partition. - The "/boot" is located in the same logical volume with the "/". @@ -21,7 +21,7 @@ The logical volume size of each Linux distribution (LVROOTSIZE) can be customize As depicted the LVM volume group has only one physical volume. -# Test environment +# Tested environment These scripts are tested with following environment. - VMWare Workstation 15.5.7 ( EFI/BIOS ) - Ubuntu 20.04.2 amd64 desktop @@ -29,18 +29,25 @@ These scripts are tested with following environment. - void-live-x86_64-20210218-mate.iso - void-live-x86_64-musl-20210218-mate.iso -# Preparation +# Installation Start the PC with the LiveCD/LiveUSB of the distribution to install. Download this repository from github, and expand it. -# Installation -Go to script directory and follow the procedure in the [INSTALL.md](INSTALL.md) +Then, go to script directory and follow the procedure in the [INSTALL.md](INSTALL.md) # Known issues If you install two ore more Void Linux in to the EFI system, only the last one can boot without trouble. This is not the problem of Kaiten-yaki. +# Variants considerations +Ubuntu has several variants ( flavors ). While I have tested only MATE flavor, other flavor may work correctly as far as it uses Ubiquity installer. + +Void Linux has "base" variant which doesn't have GUI. Kaiten-yaki can't run correctly without GUI. + # Acknowledgments These scripts are based on the script shared on the [myn's diary](https://myn.hatenablog.jp/entry/install-ubuntu-focal-with-lvm-on-luks). That page contains rich information, hint and techniques around the encrypted volume and Ubiquity installer. +Also, 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. +- [Install LVM LUKS](https://wiki.voidlinux.org/Install_LVM_LUKS) (deprecated) # Kaiten-yaki ![](image/i-like-kaiten-yaki.jpg) diff --git a/script/void-kaiten-yaki.sh b/script/void-kaiten-yaki.sh index 0d79864..b840c0b 100644 --- a/script/void-kaiten-yaki.sh +++ b/script/void-kaiten-yaki.sh @@ -129,7 +129,7 @@ HEREDOC fi # passphrase validation # Install essential packages. -xbps-install -y gptfdisk xterm +xbps-install -y -Su xbps gptfdisk xterm # *******************************************************************************