Ensure to define grub's default entry with grub-
This commit is contained in:
		
							parent
							
								
									631ff1687f
								
							
						
					
					
						commit
						18ea24d85e
					
				|  | @ -151,6 +151,7 @@ Be sure to set the correct value to **WIN_GRUB** variable which must be the numb | |||
| 
 | ||||
| * The script will also modify the grub configuration : | ||||
|   * Set Grub in "saved" mode. | ||||
|   * Ensure to set the previous default entry with `grub-set-default`. | ||||
| * Then for the reboot : | ||||
|   * Choose the grub entry for the next reboot. | ||||
| 	* Reboot the system with ``systemctl``. | ||||
|  |  | |||
							
								
								
									
										2
									
								
								winboot
								
								
								
								
							
							
						
						
									
										2
									
								
								winboot
								
								
								
								
							|  | @ -11,6 +11,8 @@ then | |||
| else | ||||
| 	printf '%b' "GRUB_DEFAULT is not set in 'saved' mode\n" | ||||
| 	sudo sed -i 's/\(^GRUB_DEFAULT.*\)/#\1\nGRUB_DEFAULT=saved/' "${GRUB_DEFAULT_PATH}" | ||||
| 	GRUB_DEFAULT_ENTRY=$(grep -E -- "#GRUB_DEFAULT=" "${GRUB_DEFAULT_PATH}" | cut -d"=" -f2) | ||||
| 	sudo grub-set-default "${GRUB_DEFAULT_ENTRY}" | ||||
| 	sudo update-grub | ||||
| 	printf '%b' "Please launch this script once again.\n" | ||||
| fi | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue