Getting Grub2 to boot LMDE and two Windows versions
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Getting Grub2 to boot LMDE and two Windows versions
My netbook's HD is partitioned like this:
sda1 ext4 Linux Mint Debian Edition
sda2 NTFS Win7
sda3 NTFS WinXP
sda4 NTFS user data
In the beginning I only had LMDE and Win7, then I installed XP and as expected it screwed up the bootloader, so I had to restore grub2. However, after I did the computer would only boot XP. Then I ran the Win7 restore from the USB installer and told it to repair the startup process. After a further grub2 restore I can now boot LMDE and Win7, but not WinXP.
I then had a go at modifying grub2 manually, so I went in /etc/grub.d, removed os_prober and added the following to 40_custom:
Code:
menuentry “Windows 7” –class windows –class os {
set root=(hd0,1)
insmod ntfs
chainloader +1
}
menuentry “Windows XP” –class windows –class os {
set root=(hd0,2)
insmod ntfs
chainloader +1
}
I now have the relevant entries in grub2, but no matter what Windows version I choose only 7 ever starts.
How on Earth do I get the selection to work properly and boot LMDE, 7 or XP?
Windows bootloaders are backware compatible and the problems you report are a direct result of installing xp after windows 7. If you had reversed that process, all you would have had to do is install Mint to the mbr again. It is possible to boot win 7 from xp but the reverse is much easier.
Your partition information and the menuentries you posted conflict. Grub2 counts drives from zero and partitions from one and according to the partition information you posted, win 7 is on sda2 which would give it a menuentry (hd0,2), xp should be (hd0,3) as suggested. If the suggestion above fails, I'd take a look in the windows partitions to see if the correct boot files are on each.
I thought grub2 counted partitions from hd0,0. I fixed the entries to boot 7 from hd0,2 and xp from hd0,3. Now 7 boots as intended, but XP returns a "NTLDR missing" error. I guess the problem now belongs to another message board... thanks for the help.
No, the original Grub Legacy did but that changed with Grub2. If you get an NTLDR is missing message when booting xp, you should be able to mount its partition from Mint and take a look to see if the file is indeed there. If it's not, you might look on the win 7 partition to see if it and the other xp boot files are there. Should be easy to tell as windows 7 bootloader and boot files are different from xp.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.