| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -42,21 +42,15 @@ if [ -d /sys/firmware/efi ]; then
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					else
 | 
					 | 
					 | 
					 | 
					else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    apt-get -y install grub-pc
 | 
					 | 
					 | 
					 | 
					    apt-get -y install grub-pc
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    root_disk="/dev/$(lsblk -no pkname $(cryptsetup status root-unlocked | grep device | perl -pe 's#.*device.* (.*)#$1#') | sort | head -n1)"
 | 
					 | 
					 | 
					 | 
					    boot_disk=$(mount | grep ' on /boot ' | cut -d' ' -f1)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    grub-install "$root_disk"
 | 
					 | 
					 | 
					 | 
					    grub-install "$boot_disk"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					fi
 | 
					 | 
					 | 
					 | 
					fi
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# edit uuids in fstab
 | 
					 | 
					 | 
					 | 
					# edit uuids in fstab
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					root_uuid=$(blkid --output value "$(cryptsetup status root-unlocked | grep device | perl -pe 's#.*device.* (.*)#$1#')" | head -n1)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					boot_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/boot" | head -n1)
 | 
					 | 
					 | 
					 | 
					boot_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/boot" | head -n1)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					esp_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/esp" | head -n1)
 | 
					 | 
					 | 
					 | 
					esp_uuid=$(blkid --output value "/hardware-setup/hardware/${1}/esp" | head -n1)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					disk1_uuid=$(blkid --output value "/dev/nvme1n1p1" | head -n1)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					disk2_uuid=$(blkid --output value "/dev/nvme2n1p1" | head -n1)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					sed -i "s/%root_uuid%/${root_uuid}/" /etc/crypttab
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					sed -i "s/%boot_uuid%/${boot_uuid}/" /etc/fstab
 | 
					 | 
					 | 
					 | 
					sed -i "s/%boot_uuid%/${boot_uuid}/" /etc/fstab
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					sed -i "s/%esp_uuid%/${esp_uuid}/" /etc/fstab
 | 
					 | 
					 | 
					 | 
					sed -i "s/%esp_uuid%/${esp_uuid}/" /etc/fstab
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					sed -i "s/%disk1_uuid%/${disk1_uuid}/" /etc/fstab
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					sed -i "s/%disk2_uuid%/${disk2_uuid}/" /etc/fstab
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# install longhorn dependencies
 | 
					 | 
					 | 
					 | 
					# install longhorn dependencies
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					apt-get -y install open-iscsi nfs-common
 | 
					 | 
					 | 
					 | 
					apt-get -y install open-iscsi nfs-common
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |