sergio_educacionit

kernel_rollback.sh

Aug 9th, 2025
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4.  
  5. grub_cfg=/etc/default/grub
  6.  
  7. kernel_selection=$(grep "menuentry" /boot/grub/grub.cfg | cut -d "'" -f 2 | grep Debian | grep 6.1.0-29-amd64 | grep -v "Debian GNU/Linux, with Linux 6.1.0-29-amd64 (recovery mode)")
  8.  
  9.  
  10.  
  11. echo $kernel_selection
  12.  
  13.  
  14. echo "GRUB_DEFAULT=\"Advanced options for Debian GNU/Linux>$kernel_selection\"" >> $grub_cfg
Advertisement
Add Comment
Please, Sign In to add comment