LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 03-25-2016, 07:49 AM   #1
LankyLad
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Rep: Reputation: Disabled
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

http://paste2.org/Is850xAJ

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.

Last edited by LankyLad; 03-25-2016 at 07:54 AM.
 
Old 03-25-2016, 08:51 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,131
Blog Entries: 21

Rep: Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478
I keep this live iso on cd like a wrench in a tool box for situations like yours.
So far it has not failed to fix multi-boot mistakes.

https://sourceforge.net/projects/boot-repair-cd/

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.

Happy Trailz and good luck with it, rok

Last edited by rokytnji; 03-25-2016 at 08:56 AM.
 
1 members found this post helpful.
Old 03-25-2016, 09:12 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 03-25-2016, 09:15 AM   #4
LankyLad
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,

Here is the info requested

Code:
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?

Code:
sudo blkid

/dev/sda1: LABEL="WIN10" UUID="E4A889D8A889A99E" TYPE="ntfs" 
/dev/sda2: UUID="54663A75663A5846" TYPE="ntfs" 
/dev/sda3: LABEL="WIN10_BACKUP" UUID="F2D40FD2D40F97CD" TYPE="ntfs" 
/dev/sdb1: LABEL="WIN7" UUID="56E0352CE035142A" TYPE="ntfs" 
/dev/sdb2: LABEL="WIN7_BACKUP" UUID="F2D40FD2D40F97CF" TYPE="ntfs" 
/dev/sdb5: UUID="c80346ce-8990-4b33-a08a-de630c198b3e" TYPE="ext4" 
/dev/sdb6: UUID="d2ee88e2-75b4-4803-a7ed-4c72ae161d93" TYPE="swap"
I'm guessing the result above answers my question about which is which?

So is this as simple as putting the correct UUID from the above result into this code (or something like it?)

Code:
menuentry "Windows" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set=root 14445AFA445ADE54
    chainloader +1
}
I hope I'm getting closer to a solution? Thanks.
 
Old 03-25-2016, 09:22 AM   #5
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi. +1^

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.
 
Old 03-25-2016, 10:19 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.
 
Old 03-27-2016, 06:17 AM   #7
LankyLad
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-27-2016, 06:41 AM   #8
LankyLad
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Just downloaded and installed Grub Customizer and will give it a try and let you all know how I get on. Thanks.
 
Old 03-27-2016, 07:07 AM   #9
LankyLad
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Or is it better to follow the instructions on this page

https://help.ubuntu.com/community/Grub2/CustomMenus

Thanks.
 
Old 03-27-2016, 08:26 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.
 
Old 03-27-2016, 10:51 AM   #11
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
I personally would clean microcoughed off and install two other distros.
 
1 members found this post helpful.
Old 03-27-2016, 11:13 AM   #12
un1x
Member
 
Registered: Oct 2015
Posts: 645

Rep: Reputation: Disabled
Quote:
Originally Posted by jamison20000e View Post
I personally would clean microcoughed off and install two other distros
^

ditto !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux Mint, Windows 7 and Windows 10 triple boot Mightyena Linux - Newbie 4 12-11-2015 06:45 AM
[SOLVED] Grub won't load windows - Dual booting Windows 8 and Linux Mint Canas Linux - Laptop and Netbook 7 01-26-2014 12:12 PM
Edit GRUB bootloader to booting to windows as primary OS & RedHat as secondary kalpapathum Red Hat 1 08-10-2009 05:51 AM
LXer: Triple-booting with GRUB, LILO, and Windows XP LXer Syndicated Linux News 0 04-13-2006 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration