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?
dual-boot 16.04 grub2
add a comment |
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?
dual-boot 16.04 grub2
add a comment |
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?
dual-boot 16.04 grub2
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?
dual-boot 16.04 grub2
dual-boot 16.04 grub2
asked Oct 15 '16 at 9:30
larrylarry
614
614
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
Do 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.
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked onanswer
when I meant to click oncomment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.
– L. D. James
Oct 15 '16 at 23:30
add a comment |
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
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
Bob. Changing system files to777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just usesudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f837393%2fhow-to-edit-grub-cfg-to-boot-win-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Do 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.
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked onanswer
when I meant to click oncomment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.
– L. D. James
Oct 15 '16 at 23:30
add a comment |
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.
Do 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.
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked onanswer
when I meant to click oncomment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.
– L. D. James
Oct 15 '16 at 23:30
add a comment |
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.
Do 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.
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.
Do 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.
edited Oct 15 '16 at 23:38
answered Oct 15 '16 at 9:44
L. D. JamesL. D. James
18.2k43686
18.2k43686
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked onanswer
when I meant to click oncomment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.
– L. D. James
Oct 15 '16 at 23:30
add a comment |
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked onanswer
when I meant to click oncomment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.
– L. D. James
Oct 15 '16 at 23:30
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Some applications were installed on windows. Ubuntu is just for study.
– larry
Oct 15 '16 at 22:47
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on
answer
when I meant to click on comment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.– L. D. James
Oct 15 '16 at 23:30
Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on
answer
when I meant to click on comment
. Anyway, based on your question and comment, I have provided what it appears you are looking for.– L. D. James
Oct 15 '16 at 23:30
add a comment |
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
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
Bob. Changing system files to777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just usesudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
add a comment |
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
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
Bob. Changing system files to777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just usesudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
add a comment |
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
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
answered Oct 15 '16 at 11:46
BoBBoB
191
191
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
Bob. Changing system files to777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just usesudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
add a comment |
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
Bob. Changing system files to777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just usesudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
– larry
Oct 15 '16 at 22:50
1
1
Bob. Changing system files to
777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.– L. D. James
Oct 15 '16 at 23:48
Bob. Changing system files to
777
is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo
edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.– L. D. James
Oct 15 '16 at 23:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
I agree with @L.D.James, in case are really necessary modify a RO file you can override the RO option (in vim) by open the file as root then to exit type :wq! this will save the modification also in RO files.
– AtomiX84
Jan 2 at 14:48
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f837393%2fhow-to-edit-grub-cfg-to-boot-win-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown