Let's try this one again.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 9:43 am

Hi all

Well it has been about 4 months since I posted this,

viewtopic.php?f=46&t=256013&e=1&view=unread#unread

We went around and around for a while and couldn't get it fixed. A brief summary of the problem is that I have a dual boot Linux Mint/Windows 10 setup, where a Microsoft patch change the boot from (hd0,gpt4) and prefix from (hd0,gpt4)/boot/grub to (hd0,gpt6). So I start up with the grub prompt, set the boot and prefix, insmod normal, normal. And I get right into Linux. I had a 'reinstall' answer, which I just haven't wanted to do yet, because I just believe the fix must be easier than that. All that needs to happen is to change the setting that the stupid Microsoft patch messed up back from gpt6 to gpt4. I did google this and I am not the only one to have this problem. But I just don't see the easy fix that I am looking for to correct the issue. Thanks for your help.

Jim

User avatar
kc1di
Level 13
Level 13
Posts: 4587
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Let's try this one again.

Post by kc1di » Thu Feb 08, 2018 10:04 am

you may want to download and run a copy of super grub2 found here:
https://www.supergrubdisk.org/super-grub2-disk/
It will boot almost anything.
Easy tips : https://sites.google.com/site/easylinuxtipsproject/
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 10:07 am

Hi kc1di

Thanks for your response. I can boot the computer, by changing the boot and prefix, then insmod normal and normal. I am just looking for the thing to change so that it boot by itself without my intervention every time.

JIm

User avatar
kc1di
Level 13
Level 13
Posts: 4587
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Let's try this one again.

Post by kc1di » Thu Feb 08, 2018 10:29 am

Are you using grub or the windows boot loader to get to grub?
Easy tips : https://sites.google.com/site/easylinuxtipsproject/
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 10:35 am

Hi kc1di.

Definitely grub. I have to press f12 and choose the Windows bootloader to get into Windows 10. I rarely use Windows 10. But somehow a 'developers update' changed something and I can't seem to find out what or how to change it back. Thanks.

Jim

fabien85
Level 6
Level 6
Posts: 1332
Joined: Tue Mar 11, 2014 4:30 pm

Re: Let's try this one again.

Post by fabien85 » Thu Feb 08, 2018 10:38 am

What's the output of

Code: Select all

$ cat /boot/efi/EFI/ubuntu/grub.cfg
?

(this is the file that tells the UEFI grub where to look for its config file.)

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 10:40 am

Hi fabien85.

Thanks for your response. Not very much, but here it is

jimmmac1@jimmmac1-Inspiron-3650 ~ $ cat /boot/efi/EFI/ubuntu/grub.cfg
cat: /boot/efi/EFI/ubuntu/grub.cfg: No such file or directory
jimmmac1@jimmmac1-Inspiron-3650 ~ $

Oh well.

JIm

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 10:44 am

Hi fabien85.

I found it, but there is no efi folder. Here is the output from grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 18.3 MATE 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-68c488cb-7737-4005-a8f5-84250aaa4170' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
linux /boot/vmlinuz-4.4.0-21-generic root=UUID=68c488cb-7737-4005-a8f5-84250aaa4170 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.4.0-21-generic
}
submenu 'Advanced options for Linux Mint 18.3 MATE 64-bit' $menuentry_id_option 'gnulinux-advanced-68c488cb-7737-4005-a8f5-84250aaa4170' {
menuentry 'Linux Mint 18.3 MATE 64-bit, with Linux 4.4.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-advanced-68c488cb-7737-4005-a8f5-84250aaa4170' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
echo 'Loading Linux 4.4.0-21-generic ...'
linux /boot/vmlinuz-4.4.0-21-generic root=UUID=68c488cb-7737-4005-a8f5-84250aaa4170 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-21-generic
}
menuentry 'Linux Mint 18.3 MATE 64-bit, with Linux 4.4.0-21-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-init-upstart-68c488cb-7737-4005-a8f5-84250aaa4170' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
echo 'Loading Linux 4.4.0-21-generic ...'
linux /boot/vmlinuz-4.4.0-21-generic root=UUID=68c488cb-7737-4005-a8f5-84250aaa4170 ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-21-generic
}
menuentry 'Linux Mint 18.3 MATE 64-bit, with Linux 4.4.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-21-generic-recovery-68c488cb-7737-4005-a8f5-84250aaa4170' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
echo 'Loading Linux 4.4.0-21-generic ...'
linux /boot/vmlinuz-4.4.0-21-generic root=UUID=68c488cb-7737-4005-a8f5-84250aaa4170 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.4.0-21-generic
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 68c488cb-7737-4005-a8f5-84250aaa4170
else
search --no-floppy --fs-uuid --set=root 68c488cb-7737-4005-a8f5-84250aaa4170
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Sorry for the long post.

Jim

User avatar
michael louwe
Level 9
Level 9
Posts: 2615
Joined: Sun Sep 11, 2016 11:18 pm

Re: Let's try this one again.

Post by michael louwe » Thu Feb 08, 2018 11:00 am

@ Jimmmac1, .......
Jimmmac1 wrote:...
.
From your OP link, you have Win 10 installed in UEFI mode and LM installed in Legacy BIOS mode. For Grub to dual-boot, both OS should be installed in the same mode.

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 11:07 am

Hi Michael

Thanks for your response. I remember something about that from the last time we were discussing this. Is there any way that I can change this without a reinstall? Before the Windows update, it worked very well, bringing me directly into Linux. I don't need a pop-up screen asking me which O/S to go to, since I rarely use Windows. If there was only some way to tell grub to look to gpt4 rather than gpt6.

Jim

User avatar
trytip
Level 7
Level 7
Posts: 1867
Joined: Tue Jul 05, 2016 1:20 pm

Re: Let's try this one again.

Post by trytip » Thu Feb 08, 2018 11:15 am

did you disable secure boot and enable legacy boot in bios?
Image

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 11:21 am

Hi trytip.

Thanks for your response. I do remember something about that. I will be rebooting in a little while and will try re-enabling secure boot. I think I remember that when that was done, it booted right into Windows. I will get back as soon as I get it back up.

Jim

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 12:01 pm

Hi all

I created a /boot/efi/EFI/ubuntu/ and copied the grub.cfg file to there. I also rebooted and changed the mode from legacy to UEFI. For boot all it gave me was the Windows boot manager and a couple of network options. Now if I could only find a way to add the grub boot manager to the list and change it to grub, I would be all set. I changed it back to legacy and am back in Linux now by setting the boot and prefix, and doing insmod normal, normal. Ii don't know if there is a way to add to/change the boot options in the bios. If there was a way to add grub to it. Thanks.

Jim

fabien85
Level 6
Level 6
Posts: 1332
Joined: Tue Mar 11, 2014 4:30 pm

Re: Let's try this one again.

Post by fabien85 » Thu Feb 08, 2018 1:46 pm

Jimmmac1 wrote:
Thu Feb 08, 2018 12:01 pm
I created a /boot/efi/EFI/ubuntu/ and copied the grub.cfg file to there.
Oh no, undo that !

This is not the same grub.cfg that I was talking about. (that's an unfortunate behaviour of grub in UEFI mode that it needs two different grub.cfg files with different purposes and different locations)
I thought you had Linux installed in UEFI mode (like your windows), but I was wrong. I'm realising that now, reading the previous posts and the previous thread. The file /boot/efi/EFI/ubuntu/grub.cfg would be present if you had installed Linux in UEFI mode, which is not the case.

I think the simplest for you is to install refind from windows.
- leave uefi enabled in the firmware/bios, but disable secure boot
- your computer should now boot straight to windows, ok.
- download refind (choose the option "A binary zip file" and after download decompress the zip)
- install refind through the manual windows instructions

User avatar
kc1di
Level 13
Level 13
Posts: 4587
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Let's try this one again.

Post by kc1di » Thu Feb 08, 2018 2:59 pm

Refind as suggested will work or supergrub2 also. other than that you'll need to reinstall mint in uefi mode so grub can boot both windows and linux.
Easy tips : https://sites.google.com/site/easylinuxtipsproject/
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 3:31 pm

Hi kc1di

I got both refind (the deb file) and supergrub2 (the iso). I don't need to use Windows if I can do the job in Mint. I looked at the instructions and I don't really know what to do. I will take a look at them again. It just seems like a lot to do just to change two parameters that were changed because of a Windows update. So far no one has suggested how I change the boot parameters from gpt6 to gpt4. Anyone got any ideas? Thanks.

JIm

Jimmmac1
Level 2
Level 2
Posts: 79
Joined: Fri Feb 03, 2012 7:04 pm

Re: Let's try this one again.

Post by Jimmmac1 » Thu Feb 08, 2018 4:31 pm

Hi everyone

Thanks so much for your help. I installed rEFInd, changed the bios to UEFI and everything is working. A really great boot manager, which works very well. Thanks again.

Jim

Post Reply

Return to “Installation & Boot”