Triple booting Linux Mint 17.3,Windows 10 and Windows 7-How do I edit GRUB to do this?
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.
Triple booting Linux Mint 17.3,Windows 10 and Windows 7-How do I edit GRUB to do this?
Hi,
For some reason my first post became invalid. So here goes again. I have just installed Windows 10 and Linux Mint 17.3 and would like to be able to boot my already existing Windows 7 partition.
Here is the Bootinfo summary output of Boot repair
I have tried boot info and I only have 2 Windows 10 entries on the Grub menu (below the mint 17.3 entries).One entry boots into Windows 10 proper and the other boots into a recovery options page. I want to be able to boot into Windows 7 as I use this the most. How do I print out the commands from GRUB and how do I edit GRUB so that I can get Windows 7 and Windows 10 to boot? If you need any more info please let me know and I would very much appreciate any help on this. Thank you.
David.
PS. I am using a non efi bios and 2 hard drives. Win10 and Win7 are on different drives. If there is anything else you need to know please ask. Thanks.
Up to you from here. If not wanting to follow my advice.
I guess other members will need from you
Code:
sudo update-grub
readout in code tags.
plus copy and paste terminal readout in code tags of
Code:
apt search os-prober
Code:
cat /etc/default/grub
Code:
cat /boot/grub/grub.config
and
Code:
sudo fdisk -l
and
Code:
sudo blkid
Edit. I know your bootinfo script already shows a lot of that. Maybe some other member can work with just that. I know of a couple of members who are good with just the info script.
The "multi-boot mistake" in this case is M$oft.
Back in the day, they prostituted "dual-boot" such that they always replaced the boot-loader code of a previous version when a later version was installed. So a Win7 install after Vista used the Vista boot partition but replaced the boot code from Vista with Win7, and you got two entries in the BCD, but only one lot of boot code for os-prober to find.
Given that M$oft now mandate Win10 as the "one-and-only", I wouldn't be surprised if it completely ignored previous Win versions. This is not a grub and/or Linux problem - it's a M$oft problem.
It's possible there is still Win7 boot-loader code there that you can chainload, but I refuse to buy Win10, so I haven't tested any configurations.
Sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
No volume groups found
Found Windows 10 (loader) on /dev/sda1
Found Windows 10 (loader) on /dev/sdb1
done
Code:
apt search os-prober
i os-prober - utility to detect other OSes on a set of d
p os-prober:i386 - utility to detect other OSes on a set of d
Code:
cat /etc/default/grub
# 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=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
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 obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Code:
cat /boot/grub/grub.config
david@david-122-CK-NF68 ~ $ sudo cat /boot/grub/grub.config
[sudo] password for david:
cat: /boot/grub/grub.config: No such file or directory
david@david-122-CK-NF68 ~ $
Code:
sudo fdisk -l
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xedf0edf0
Device Boot Start End Blocks Id System
/dev/sda1 * 63 1009422314 504711126 7 HPFS/NTFS/exFAT
/dev/sda2 1009422336 1010341887 459776 27 Hidden NTFS WinRE
/dev/sda3 1010343915 1112742224 51199155 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0cdd892c
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 1347130574 673565256 7 HPFS/NTFS/exFAT
/dev/sdb2 1347130575 1483667009 68268217+ 7 HPFS/NTFS/exFAT
/dev/sdb3 1483667454 1953523711 234928129 5 Extended
/dev/sdb5 1483667456 1940946943 228639744 83 Linux
/dev/sdb6 1940948992 1953523711 6287360 82 Linux swap / Solaris
Which of the above is Windows 7 and which one is Windows 10?
If you can't DL that.iso your Linux Mint should run live or a rescue mode with those tools as well? If you get stuck look through /etc/grub.d/ have fun!
Edit\Add: slow typer...
Last edited by jamison20000e; 03-25-2016 at 09:26 AM.
When you installed windows 10, you should have not had the 1TB drive with Mint and windows 7 attached. That might have worked and then you could have run sudo update-grub from Mint to get the windows 7 entry on the same drive and left the 750GB drive with windows 10 boot code to boot it.
You can see that windows 10 boot files are on both windows partitions as suggested above. The the quote below from the grub.cfg file for those entries.
Quote:
menuentry 'Windows 10 (loader) (on /dev/sda1)'
menuentry 'Windows 10 (loader) (on /dev/sdb1)
If you still have your windows 7 installation DVD, you could try booting it and selecting the repair option and write over the code in the MBR of that (1TB) drive (sdb) to enable you to boot windows 7. Do not have the 750GB drive attached if you do this. You have the Grub core.img file on both drives and on the 1TB drive it is point to the Mint partition, sdb5. No indication where it is pointing from sda so you might have to reinstall Grub again to the MBR of sda from Mint. Probably best to do this before repairing with the windows 7 DVD.
You might be better off going to a windows forum to find out how to dual boot 10 and 7 on different drives.
Thanks everyone for replying to my topic. After following Yancek's advice I finally got Windows 7 and Windows 10 and Mint 17.3 installed after 3 days work. Now I just have to edit the grub menu (GNU Grub version 2.02~beta2-9)
From
Windows recovery environment(loader) (on /dev/sda1)
Which boots Windows 10 Pro (64 bit)
and
Windows 7(loader) (on /dev/sdb1)
Which boots Windows 7 Pro (32 Bit)
To
Windows 10 Pro (64 bit) and Windows 7 Pro (32 Bit) respectively
Could someone please describe the steps I need to take in order to edit these menu labels? Thanks.
I've never used Grub Customizer so can't say how well it works. I just saw a post at the Ubuntu forums from a new user a few days ago who used it and ended up with an unbootable system. In all likelihood, it was a user error but I would go with the link you posted to edit 40_custom as you will get an understanding of what is happening and the page gives you some details on how Grub works. If you are new to this, you might bookmark that page.
You would simply copy each entry from /boot/grub/grub.cfg into the /etc/grub.d/40_custom file. Make sure you don't mess with the few top lines, read it first. You need to use sudo to open a text editor as it is a system file. The menuentry line with the part in quotes or double quotes is what you change to what you want. This line (menuentry) is what you see on screen and doesn't have any effect on the actual booting so don't mess with anything below that line. After changing the menuentry lines, save the file and run sudo update-grub and you should see the changes the next time you boot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.