how to edit grub.cfg to boot win 7?

I can boot win7 when my laptop is on the start menu,by changing "insmod ldm" into "insmod part_msdos" in grub.cfg to boot window 7.

Before I update the kernel to 4.4.0-42, I can save the change. Now I can't save the file because it is read only.

Any suggestions?

2 Answers

You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.

If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.

To do this, make these changes to your /etc/default/grub files:

File Edit Options Buffers Tools Conf Help
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration' GRUB_DEFAULT="saved"GRUB_SAVEDEFAULT="true"#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="15"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obt

The changes from the default is highlighted by bold letters.

Alternatively you can use the GUI application GRUB Customizer. It's available via a the ppa:

$ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
$ sudo apt-get update
$ sudo apt-get install grub-customizer

After installing the PPA you can run it from the Ubuntu Dash search (grub-customizer).

This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.

2

If the file permissions is your only problem, just change it.

sudo chmod 777 "whateverfile"

or if you want to be able to edit the entire directory.

sudo chmod 777 "directory" -R

*as a note 777 gives r/w access to every user so keep that in mind.

Best, BoB

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like