Grub2 – How to Disable Recovery Mode/Single User Mode

grub2

I am making installation for school computers. I would like to remove single user mode booting, which can make student root user. How to permanently remove single user / recovery mode from GRUB? I am also concerned with updating kernel (update-grub)

I DO need GRUB for booting into Windows installation.

Best Answer

  1. Open a terminal with Ctrl+Alt+T shortcut and type this command and then hit Enter.

    gksu gedit /etc/default/grub
    
  2. The above command will open GRUB default file in gedit text editor. Search for a section like this one:

    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_RECOVERY="true"
    
  3. Remove the # mark from the line #GRUB_DISABLE_RECOVERY="true". The changed section should look like this:

    # Uncomment to disable generation of recovery mode menu entries
    GRUB_DISABLE_RECOVERY="true"
    

    Save the file by pressing Ctrl+S, then exit gedit.

  4. Then again going to the terminal, execute the below command:

    sudo update-grub
    

Restart to see that the recovery option has gone.