modiy xbps-install with -Su

This commit is contained in:
Suikan 2021-07-01 09:30:40 +09:00
parent 9c0e4f47fa
commit 04429da930
3 changed files with 49 additions and 40 deletions

View file

@ -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. 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. The third stage is easy. There is nothing user can do. Everything is automatic.
# Installation # Installation
Follow the steps below. 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 ## 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. 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 export ERASEALL=1
# Logical Volume name for your Linux installation. Keep it unique from other distribution. # 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. # Logical volume size of the Linux installation.
# 30% mean, new logical volume will use 30% of the free space in the LVM volume group. # 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" export LVROOTSIZE="50%FREE"
# Set the size of EFI partition and swap partition. The unit is Byte. you can use M,G... notation. # 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" export LVSWAPSIZE="8G"
# Usually, these names can be left untouched. # 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 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 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. - 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 - 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 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.
## First stage : Setting up the volumes ## 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. 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 ## 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. 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 Target Directory | Host Volume | Comment
-----------------------|------------------|--------------------------------------------------------------- -----------------|------------------------|---------------------------------------------------------------
/dev/sda1 | /boot/efi | BIOS system doesn't need this mapping /boot/efi | /dev/sda1 | BIOS system doesn't need this mapping
/dev/mapper/vg1-ubuntu | / | Host volume name is up to your configuration parameter. / | /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. 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) ![Ubuntu Partitioning](image/ubuntu_partitioning.png)
![Void Partitioning](../image/void_partitioning.png) ![Void Partitioning](image/void_partitioning.png)
## Do not reboot ## 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. 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) ![Ubuntu done](image/ubuntu_done.png)
![Void done](../image/void_done.png) ![Void done](image/void_done.png)
## Third stage : Finalizing ## 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.

View file

@ -1,10 +1,10 @@
# Kaiten-yaki : Yet another Full Disk Encryption for GRUB/Linux # 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. Followings are the list of functionality.
- Ubuntu and Void Linux. - Support Ubuntu and Void Linux.
- Install from LiveCD/USB. - 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. - Automatic detection of BIOS/EFI firmware and create MBR/GPT, respectively.
- Support to install multiple distributions in a LUKS partition. - Support to install multiple distributions in a LUKS partition.
- The "/boot" is located in the same logical volume with the "/". - 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. As depicted the LVM volume group has only one physical volume.
# Test environment # Tested environment
These scripts are tested with following environment. These scripts are tested with following environment.
- VMWare Workstation 15.5.7 ( EFI/BIOS ) - VMWare Workstation 15.5.7 ( EFI/BIOS )
- Ubuntu 20.04.2 amd64 desktop - 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-20210218-mate.iso
- void-live-x86_64-musl-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. Start the PC with the LiveCD/LiveUSB of the distribution to install. Download this repository from github, and expand it.
# Installation Then, go to script directory and follow the procedure in the [INSTALL.md](INSTALL.md)
Go to script directory and follow the procedure in the [INSTALL.md](INSTALL.md)
# Known issues # 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. 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 # 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. 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 # Kaiten-yaki
![](image/i-like-kaiten-yaki.jpg) ![](image/i-like-kaiten-yaki.jpg)

View file

@ -129,7 +129,7 @@ HEREDOC
fi # passphrase validation fi # passphrase validation
# Install essential packages. # Install essential packages.
xbps-install -y gptfdisk xterm xbps-install -y -Su xbps gptfdisk xterm
# ******************************************************************************* # *******************************************************************************