Add a 2G loop device for emergency swap
This commit is contained in:
		
							
								
								
									
										7
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								setup.sh
									
									
									
									
									
								
							| @@ -1300,6 +1300,10 @@ function get_disks_with_one_efipart () { | |||||||
|  |  | ||||||
| function install_os_in_chroot () { | function install_os_in_chroot () { | ||||||
|     #2.2 |     #2.2 | ||||||
|  |     dd if='/dev/zero' of='/swapfile' bs='1M' count='2048' | ||||||
|  |     losetup '/dev/loop9' '/swapfile' | ||||||
|  |     mkswap '/dev/loop9' | ||||||
|  |     swapon '/dev/loop9' | ||||||
|     ### Reinit keyring |     ### Reinit keyring | ||||||
|     # As keyring is initialized at boot, and copied to the install dir with pacstrap, and ntp is running |     # As keyring is initialized at boot, and copied to the install dir with pacstrap, and ntp is running | ||||||
|     # Time changed after keyring initialization, it leads to malfunction |     # Time changed after keyring initialization, it leads to malfunction | ||||||
| @@ -1346,6 +1350,9 @@ function install_os_in_chroot () { | |||||||
|         add_syslinux_pacman_hook |         add_syslinux_pacman_hook | ||||||
|     fi |     fi | ||||||
|     add_zbm_pacman_hook |     add_zbm_pacman_hook | ||||||
|  |     swapoff '/dev/loop9' | ||||||
|  |     losetup -d '/dev/loop9' | ||||||
|  |     rm '/swapfile' | ||||||
| } | } | ||||||
|  |  | ||||||
| function set_root_pw () { | function set_root_pw () { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user