From 873a8614ad25bcc15f994abfacc7dabbe766b2b4 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Sun, 28 Jul 2024 01:27:47 +0900 Subject: [PATCH] =?UTF-8?q?btrfs=E3=81=B8=E3=81=AE=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E6=99=82=E3=81=AB=E3=82=B5?= =?UTF-8?q?=E3=83=96=E3=83=9C=E3=83=AA=E3=83=A5=E3=83=BC=E3=83=A0=E3=81=AB?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/linux/linux.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/install/linux/linux.sh b/install/linux/linux.sh index 06fc9ab..5ce5b64 100644 --- a/install/linux/linux.sh +++ b/install/linux/linux.sh @@ -1,23 +1,23 @@ #!/bin/bash loadkeys jp106 #キーボードを日本語配列へ変更 -printf "Please enter your username\n\n" +printf "\nPlease enter your username\n" read -r home_username -printf "Please enter your password\n\n" +printf "Please enter your password\n" read -sr home_password -printf "Please enter Hostname\n\n" +printf "Please enter Hostname\n" read -r hostname1 fdisk -l #ディスク一覧表示 -printf "\nWhat disk do you want to install to? example:/dev/sda \n\n" +printf "\nWhat disk do you want to install to? example:/dev/sda \n" read -r installdisk -printf "\nChoose the file system to use for your root partition. (ext4, btrfs)\n\n" +printf "Choose the file system to use for your root partition. (ext4, btrfs)\n" read -r filesystem -printf "\nChoose the kernel you want to use. (linux, zen, lts)\n\n" +printf "Choose the kernel you want to use. (linux, zen, lts)\n" read -r kernel #インストールするディスクを入力 -printf "%s (%s) is selected as the disk to install. Are you sure you want to perform the partition operation? (yes or no) \n\n" "$installdisk" "$filesystem" +printf "%s (%s) is selected as the disk to install. Are you sure you want to perform the partition operation? (yes or no) \n" "$installdisk" "$filesystem" read -r check1 #インストールするディスクを確認 if [ "$check1" == "yes" ]; then @@ -40,13 +40,24 @@ if [ "$check1" == "yes" ]; then mkfs.vfat -F32 "$d1" if [ "$filesystem" == "ext4" ]; then mkfs.ext4 "$d2" + mount "$d2" /mnt elif [ "$filesystem" == "btrfs" ]; then mkfs.btrfs -f "$d2" + mount "$d2" /mnt + btrfs subvolume create /mnt/@ + btrfs subvolume create /mnt/@home + btrfs subvolume create /mnt/@swap + umount "$d2" + mount "$d2" /mnt -o subvol=@ + mkdir /mnt/home + mkdir /mnt/swap + mount "$d2" /mnt/home -o subvol=@home + mount "$d2" /mnt/swap -o subvol=@swap else mkfs.ext4 "$d2" + mount "$d2" /mnt fi #フォーマット - mount "$d2" /mnt mkdir /mnt/boot mount "$d1" /mnt/boot #マウント @@ -98,4 +109,4 @@ if [ "$check1" == "yes" ]; then printf "\n\nInstallation is complete. Please reboot.\n" else printf "Installation canceled. \n" -fi +fi \ No newline at end of file