How can I change default OS on grub system?
Hi I installed both Windows XP and Linux Debian in my mother notebook and i setted linux as default as i wanted to learn to use it.
Now she got it back, but even if I tried I cannot change default OS; I looked for help in forums and online guides, but nothing I tried worked: it says "Permission Denied", and I was logged as root.
I also tried to reinstall XP, but obviously it doesn't change grub's settings...
Can u help me change it, or solve it someway?
Thanks a lot for attention
I know that you can select which linux version you boot to in your grub.conf file. That file is located in /boot/grub. I'm not sure if this works with windows though.
Once you're in the grub.conf file I think it's as simple as changing the default=0 line.
Good luck, and let us know if that works out for you.
There are two ways to change the default; both involve editing /boot/grub/menu.lst.
Near the top of the file, there is a line: default 0. Since grub numbering begins with 0, that means that the first OS listed is the default. To change that default,
a) count down to the OS you want to be the default (counting from zero) and change the default line to that number.
b) cut and paste the one you want as default to the top of the list, and leave the default at 0.
You must be root to edit menu.lst, and the write permission bit must be set.
permission denied... :(
Thx a lot for your answers :), I already tried to change in /boot/grub/menu.lst, after "su root" and psw, it changes user but then it says "permission denied"... maybe I did something wrong with command line?
How must I set write permission? Sorry for ignorance :confused: :)
and thx again!
use "su -l root"
for further info on su "man su" :)
I tried, but "Permission denied" again...
I would really hate to be a simple minded person, but couldn't you just chmod the grub.conf file? since there is a link from the /boot/grub/menu.lst to the grub.conf file.
depending on the distro you use....
I will usuall run
$sudo cp /boot/grub/menu.lst /home/*USERNAME*/Destop
this moves it to the desktop so you can edit it easily with gedit. Once your done run
$sudo cp /home/*USERNAME*/Destop/menu.lst /boot/grub/menu.lst
Note that if you are running fedora you will need add yourself to the sudoers list
thx a lot anyway :)
I did as you suggested, it opened for me a *menu.lst [sola lettura] ( /Desktop) - gedit , reading only....
What should I do?
--rw-r--r 1 root root 4135 1988-01-02 21:26 /boot/grub/menu.lst
Either your /boot partition (do you have separate /boot partition?) is mounted read-only or immutable flag is set.
Please show us output of 'lsattr /boot/grub/menu.lst'
edit the menu.lst file you have on the desktop, (hightlight the operating system you want the system to default to first as well as all of its settings, cut and paste it to the top of the list)
For example, if I wanted Windows on top, the section might look like this >
(It might look different, just make sure to get the whole thing)
Once it looks the way you want, run >
sudo cp /home/*USERNAME*/Desktop/menu.lst /boot/grub/menu.lst
reboot to test.
boot partitions should be separated, partion magic when I installed...
I have after ## ## End Default Options ##
title Debian GNU/Linux, kernel 2.6.18-4-686
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/hda2 ro
again for single user, then
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below
from the Debian
title Other Operating Systems:
# This ebtry automatically added by the Debian installer for
a non-linux OS
# on /dev/hdal
title Microsoft Windows XP Home Edition
Please tell me exactly what I should modify, could I copy and paste something so clearly set apart?
thx for the help...
|All times are GMT -5. The time now is 01:07 PM.|