mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
Add AN04 partition
Add a considration of more flexible partitionning Issue #19
This commit is contained in:
parent
aaa5609a9a
commit
f6033433ad
3 changed files with 47 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ Installation requires mainly 2 steps.
|
||||||
- Run the kaiten-yaki script
|
- Run the kaiten-yaki script
|
||||||
|
|
||||||
You can execute the install script without the command line parameter. For example :
|
You can execute the install script without the command line parameter. For example :
|
||||||
```shell
|
```sh
|
||||||
source ubuntu-kaiten-yaki.sh
|
source ubuntu-kaiten-yaki.sh
|
||||||
```
|
```
|
||||||
The first stage of the script is preparation like: erasing a disk, format partition, and encryption. This is the 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 a disk, format partition, and encryption. This is the 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.
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ Key Slot 7: DISABLED
|
||||||
If there is still a vacant LUKS key slot, the user can install another distribution without deleting the existing slot. But if there is not vacant LUKS key slot at all, the user must delete an occupied but unused slot. To know such a slot, the user must mark all the occupied and used slots.
|
If there is still a vacant LUKS key slot, the user can install another distribution without deleting the existing slot. But if there is not vacant LUKS key slot at all, the user must delete an occupied but unused slot. To know such a slot, the user must mark all the occupied and used slots.
|
||||||
|
|
||||||
First of all, check the LUKS key slot for the user passphrase. Run the followings command.
|
First of all, check the LUKS key slot for the user passphrase. Run the followings command.
|
||||||
```shell
|
```sh
|
||||||
cryptsetup -v --test-passphrase luksOpen /dev/sdXN
|
cryptsetup -v --test-passphrase luksOpen /dev/sdXN
|
||||||
```
|
```
|
||||||
Where X is a, b, c..., N is 1, 2, 3...
|
Where X is a, b, c..., N is 1, 2, 3...
|
||||||
|
|
@ -63,7 +63,7 @@ We can see the slot 0 is used.
|
||||||
|
|
||||||
Next, run the following command **for each** installation of distribution. This command shows the slot number which stores the key of the passphrase file passing to the kernel. /etc/luks/boot_os.keyfile is created by Kaiten-yaki, during the installation
|
Next, run the following command **for each** installation of distribution. This command shows the slot number which stores the key of the passphrase file passing to the kernel. /etc/luks/boot_os.keyfile is created by Kaiten-yaki, during the installation
|
||||||
|
|
||||||
```shell
|
```sh
|
||||||
sudo cryptsetup -v --test-passphrase luksOpen /dev/sdXN --key-file /etc/luks/boot_os.keyfile
|
sudo cryptsetup -v --test-passphrase luksOpen /dev/sdXN --key-file /etc/luks/boot_os.keyfile
|
||||||
```
|
```
|
||||||
Followings are the sample execution :
|
Followings are the sample execution :
|
||||||
|
|
@ -75,7 +75,7 @@ Command successful.
|
||||||
By repeating this command inside all installations, the user can list up the occupied and used slots. The other slots are occupied but not used.
|
By repeating this command inside all installations, the user can list up the occupied and used slots. The other slots are occupied but not used.
|
||||||
|
|
||||||
Finally, the user can delete the appropriate occupied but not used LUKS key slot by the following command.
|
Finally, the user can delete the appropriate occupied but not used LUKS key slot by the following command.
|
||||||
```shell
|
```sh
|
||||||
sudo cryptsetup luksKillSlot /dev/sdXN key_slot_number_to_delete
|
sudo cryptsetup luksKillSlot /dev/sdXN key_slot_number_to_delete
|
||||||
```
|
```
|
||||||
# Conclusion
|
# Conclusion
|
||||||
|
|
|
||||||
43
appnote/an04_favoritepartition.md
Normal file
43
appnote/an04_favoritepartition.md
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
# AN04 How to make LUKS volume to the favorite partition
|
||||||
|
Kaiten-yaki creates the LUKS volume on the 1st partition for the BIOS system ( 2nd partition for the UEFI system ) by default. Also, Kaiten-yaki assigns all space for the LUKS volume, except the space for the EFI partition.
|
||||||
|
|
||||||
|
This application note explains how to use the favorite partition with favorite size for LUKS volume.
|
||||||
|
|
||||||
|
## Step 1: Making partitions
|
||||||
|
To use custom partitioning, the user must create all partitions by themselves. The user can do it with the popular partitioning tool like gparted. It is recommended to set the partition table as MBR and GPT for BIOS and UEFI systems, respectively.
|
||||||
|
|
||||||
|
In this documentation, we assume the user wants to use /dev/sdb3 as LUKS partition to install Ubuntu.
|
||||||
|
## Step 2: Configuration
|
||||||
|
Next user must configure the config.sh.
|
||||||
|
|
||||||
|
The first parameter to edit is **DEV** parameter which represents the target device. In this example, it must be set as /dev/sdb.
|
||||||
|
```sh
|
||||||
|
export DEV="/dev/sdb"
|
||||||
|
```
|
||||||
|
The second parameter to edit is **CRYPTPARTITION**. By default, this parameter is set automatically according to the firmware type. The EFIPARTITION parameter can be left untouched. This parameter is not used.
|
||||||
|
```sh
|
||||||
|
if [ ${ISEFI} -ne 0 ] ; then
|
||||||
|
# EFI firmware
|
||||||
|
export EFIPARTITION=1
|
||||||
|
export CRYPTPARTITION=3
|
||||||
|
else
|
||||||
|
# BIOS firmware
|
||||||
|
export CRYPTPARTITION=3
|
||||||
|
fi # EFI firmware
|
||||||
|
```
|
||||||
|
Makes sure the **ERASEALL** and **OVERWRITEINSTALL** are 0.
|
||||||
|
## Step 3: Make LUKS partition
|
||||||
|
After saving the customer config.sh, run the following command to set the environment variable.
|
||||||
|
```sh
|
||||||
|
source config.sh
|
||||||
|
```
|
||||||
|
Then, run the following command to create a LUKS volume.
|
||||||
|
```sh
|
||||||
|
cryptsetup luksFormat --iter-time "${ITERTIME}" --type=luks1 --key-file "${DEV}${CRYPTPARTITION}"
|
||||||
|
```
|
||||||
|
This command sets up the LUKS volume on the specified partition. This command also asks for the passphrase of this LUKS volume.
|
||||||
|
## Step 4: Run Kaiten-yaki
|
||||||
|
Now, it's a time to run Kaiten-yaki
|
||||||
|
```sh
|
||||||
|
kaiten-yaki-ubuntu
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue