1

I have found excellent solution to dual boot configuration selection of default OS to be last saved OS (great for update restarts). Editing and update of grub file went without any problems, but after reboot, right after unchanged grub menu selection

error: Diskfilter writes are not supported

is reported and OS selected in grub menu (or default OS) is booted (not the last saved).

I have Ubuntu 20.04 LTS as default on /dev/sda1 in Linux LVM (Bootable) partition and Windows 10 on separate disk /dev/sdb1 with NTFS/exFAT/HPFS (Bootable) partition. How to make it work as descibed in original post?

1 Answers1

1

You didn't make it clear as to which GRUB file you edited, and what changes that you made. Revert whatever edits you made.

You never should edit /boot/grub/grub.cfg.

You do want to edit /etc/default/grub. Making the following changes...

GRUB_DEFAULT=saved    <- edit this existing line
GRUB_SAVEDEFAULT=true <- add this line

This will allow GRUB to remember the last OS that you booted, until such time you select a different OS to boot.

sudo update-grub # write changes to disk

reboot # reboot the computer

Update #1:

This won't work on LVM.

See here and here for more info about this.

heynnema
  • 68,647
  • 15
  • 124
  • 180
  • I did exactly the changes you are suggesting with command: `sudo nano -B /etc/default/grub` It might be problem related to LVM partition (I do not have RAID) as in this [8 years old bug report.](https://askubuntu.com/a/498281/852151) – Josef Švenda Jul 20 '20 at 16:18
  • @JosefŠvenda Is /etc/default/grub the only file that you edited? – heynnema Jul 20 '20 at 16:20
  • @JosefŠvenda You may have to revert your GRUB_DEFAULT and GRUB_SAVEDEFAULT parameters. – heynnema Jul 21 '20 at 09:17
  • Yes, I've edited only /etc/default/grub and went back to old value at GRUB_DEFAULT and commented out GRUB_SAVEDEFAULT. Error then disappeared, but "saved method" booting is not working. – Josef Švenda Jul 21 '20 at 17:32