Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had debian squeeze already installed, then installed win 7. Windows overwrote by MBR, as I expected it to, so I used an ubuntu live cd to reinstall grub2 to debian root.
I rebooted, and sure enough I had grub back. The boot menu has debian on it. Just debian (crunchbang actually, but its the same thing).
So I added a script in /etc/grub.d (called Windows_11) to create a windows chainloader entry in grub.cfg, and ran update-grub.
Update-grub picks up my /etc/grub.d/Windows_11 script, and adds an appropriate chainloader entry to /boot/grub/grub.cfg.
So I would expect this new chainloader entry to show up in my boot menu when I boot up. But it doesn't; on booting I only have the option to select debian.
Here is my /boot/grub/grub.cfg -
Code:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'CrunchBang Linux, with Linux 2.6.32-5-686' --class crunchbang --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set b3c06cb6-5520-404a-af49-8fd2940d7673
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=b3c06cb6-5520-404a-af49-8fd2940d7673 ro selinux=1 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'CrunchBang Linux, with Linux 2.6.32-5-686 (recovery mode)' --class crunchbang --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set b3c06cb6-5520-404a-af49-8fd2940d7673
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=b3c06cb6-5520-404a-af49-8fd2940d7673 ro single selinux=1
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'CrunchBang Linux, with Linux 2.6.32-3-686' --class crunchbang --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set b3c06cb6-5520-404a-af49-8fd2940d7673
echo 'Loading Linux 2.6.32-3-686 ...'
linux /boot/vmlinuz-2.6.32-3-686 root=UUID=b3c06cb6-5520-404a-af49-8fd2940d7673 ro selinux=1 quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-3-686
}
menuentry 'CrunchBang Linux, with Linux 2.6.32-3-686 (recovery mode)' --class crunchbang --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set b3c06cb6-5520-404a-af49-8fd2940d7673
echo 'Loading Linux 2.6.32-3-686 ...'
linux /boot/vmlinuz-2.6.32-3-686 root=UUID=b3c06cb6-5520-404a-af49-8fd2940d7673 ro single selinux=1
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-3-686
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/Windows_11 ###
menuentry “Windows 7″ {
set root=(hd0,3)
chainloader +1
}
### END /etc/grub.d/Windows_11 ###
So the boot menu is not reflecting the content of grub.cfg. I tried moving the chainloader section into the same section as the debian entries but it still didn't show up in the boot menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.