LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-31-2020, 11:20 PM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
win7 no longer appears on grub menu, also error while generating grub config


I am using arch based linux, xfce. using legacy mode, MBR hdd.
This is my hdd partition:
sda1 windows7 reserve
sda2 win7 ntfs
sda3 / ext4
sda4 extended
sda6 logical ext4 /home
sda5 /swap

I have win7 install, and i also have eos linux installed

Issue1:
------------
Previously when i execute
Code:
grub-mkconfig -o /boot/grub/grub.cfg
it always creates 2 lines for windows7:
1. windows7 sda1
2. windows7 sda2
While windows7 sda2 should not be listed.. I think it is generated when grub-mkconfig is because something have being created in sda2, which grub thought it is also and os of itself.

Q1.
What does grub look in every partitions when grub-mkconfig (so that it know to create a menu for a os that it detected or don't create when it see a partition that has got no os in it )?

Why in this case it mistaken SDA2 as an os loader when it is not ?


Scenario2:
------
So, i entered found a webpage said
Code:
disable os-prober in /etc
.. but i lost the article now.. can't remember where was the /etc file that i have modified. I did however made bak copy of the file beside it before i made the change.
This "os-prober disable" fix the dual line win7 in grub menu. (i think i also went to grub config to mask out the "win7 sda2 boot menu".
*which now i come to think of it, it is not the right thing to do, because everytime when a kernel update or installed, it will be over written.

Today, i used the Kernel manager of EOS to install several kernels, lts , zen , hardened.. (just to have more kernel to try out). the Kernel manager did the grub config generating in background by itself.

Issue2:
--------
Booted the computer, it shows the whole list of kernels, but the original rolling release kernel is not in the grub menu.
Also Win7 is not in the grub menu.
I suspect it was due to the "os-prober disable" line that i have added in (i can't remember where is the file i added the line)

Q2.
What skeleton files that refers to by
Code:
 grub-mkconfig -o
I believe it looks for
Code:
/etc/default/grub
as "template" to create grub config file.
I want to undo my previous *mistake* so, grub will able to show win7 and rolling release kernel.
Or is there way to grab and replace those files in /etc/default from liveusb ?


Thx

Last edited by andrewysk; 12-31-2020 at 11:22 PM.
 
Old 01-01-2021, 01:34 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
/dev/sda2 probably does have loader code. os-prober was doing its job. PEBKAC.

Simplest solution is likely to (force) re-install os-prober. mkconfig doesn't go looking for other boot entries - it invokes os-prober to do that if it's present. It's just a (bunch of) script - go look what it does yourself.
 
Old 01-01-2021, 05:21 AM   #3
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by andrewysk View Post
Q2.
What skeleton files that refers to by
Code:
 grub-mkconfig -o
I believe it looks for
Code:
/etc/default/grub
as "template" to create grub config file.
I want to undo my previous *mistake* so, grub will able to show win7 and rolling release kernel.
Or is there way to grab and replace those files in /etc/default from liveusb ?


Thx
Yes, the file needed to be edited as root/sudo is /etc/default/grub, you will want to comment out this line ---> GRUB_DISABLE_OS_PROBER=true.
After editing /etc/default/grub you will need to run command as root/sudo:#grub-mkconfig -o /boot/grub/grub.cfg
 
Old 01-01-2021, 05:54 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
Why in this case it mistaken SDA2 as an os loader when it is not ?
It isn't. The second windows option is likely the Recovery partition for windows 7 which has boot files on it also which is why a Grub entry was created for it.

You can disable/enable os-prober by changing the execute permissions on the file using root permissions: /etc/grub.d/30_os-prober
Also, you may need to do the same with: chmod a-x /usr/bin/os-prober
And probably the simplest to try is to change the line below in /etc/default/grub:

Code:
GRUB_DISABLE_OS_PROBER=true
Simply change true to false.

If it bothers you to have the 2nd entry for windows, given your level of expertise from reading your other post, it might be less problematic for you to simply go into the grub.cfg file with root permissions after running grub-mkconfig and delete it each time. I would also suggest that when you are making changes to the system like this that you create a file listing all the steps you took and the commands you used and files you changed so that you can undo them if problems arise.

I don't see any error listed while running grub-mkconfig as stated in your thread title?

Last edited by yancek; 01-01-2021 at 05:57 AM.
 
Old 01-01-2021, 06:51 AM   #5
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
/dev/sda2 probably does have loader code. os-prober was doing its job. PEBKAC.

Simplest solution is likely to (force) re-install os-prober. mkconfig doesn't go looking for other boot entries - it invokes os-prober to do that if it's present. It's just a (bunch of) script - go look what it does yourself.
1.
So, SDA2 even is not a boot partition, but it might have loader code.
I would very much like to learn this. Any idea how i search for google ? i have being trying to search, but it seems google just does not understand at all my question..
Any idea, What term of keyword i can search google so that it understand what i want.
 
Old 01-01-2021, 08:23 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
go here install on usb and boot, produce a boot-info file and post. https://sourceforge.net/projects/boot-repair-cd/files/
 
Old 01-01-2021, 08:47 AM   #7
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
I don't see any error listed while running grub-mkconfig as stated in your thread title?
Here is the partial error prompt when grub-mkconfig:
Code:
.
.
.

found linux image: /boot/vmlinuz-linux-hardened

found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-hardened.img

found fallback initrd image(s) in /boot: initramfs-linux-hardened-fallback.img

found memtest86+ image: /boot/memtest86+/memtest.bin

error: syntax error.

syntax error at line 346

syntax error are detected in generated Grub config file.

Ensure that thre are no errors in /etc/default/grub

and /etc/grub.d/* files or please file a bug report with /boot/grub/grub.cfg.new file attached.

This is the new grub.cfg created by grub-mkconfig for troubleshooting:
Code:
#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  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 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_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
else
  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
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_input console
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
else
  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/EndeavourOS/unifont-regular-16.pf2
insmod png
set theme=($root)/boot/grub/themes/EndeavourOS/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_grub-customizer_menu_color_helper ###
### END /etc/grub.d/01_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux_proxy ###











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

### BEGIN /etc/grub.d/30_os-prober_proxy ###



menuentry "Windows 7 (on /dev/sda1)" --class windows --class os $menuentry_id_option 'osprober-chain-442C45772C456550' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  442C45772C456550
	else
	  search --no-floppy --fs-uuid --set=root 442C45772C456550
	fi
	parttool ${root} hidden-
	chainloader +1
}
### END /etc/grub.d/30_os-prober_proxy ###

### BEGIN /etc/grub.d/31_os-prober.bak_proxy ###



menuentry "Windows 7 (on /dev/sda1)" --class windows --class os $menuentry_id_option 'osprober-chain-442C45772C456550' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  442C45772C456550
	else
	  search --no-floppy --fs-uuid --set=root 442C45772C456550
	fi
	parttool ${root} hidden-
	chainloader +1
}
### END /etc/grub.d/31_os-prober.bak_proxy ###

### BEGIN /etc/grub.d/32_linux_proxy ###











menuentry "EndeavourOS, on linux-zen" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-zen ...'
	linux	/boot/vmlinuz-linux-zen root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
menuentry "EndeavourOS, on linux-zen (fallback initramfs)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-zen ...'
	linux	/boot/vmlinuz-linux-zen root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-zen-fallback.img
}
menuentry "EndeavourOS, on linux-zen (recovery mode)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-recovery-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-zen ...'
	linux	/boot/vmlinuz-linux-zen root=UUID=5c487842-7591-49e3-8d50-77304544091e rw single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-zen-fallback.img
}
menuentry "EndeavourOS, on linux-lts (fallback initramfs)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-lts ...'
	linux	/boot/vmlinuz-linux-lts root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-lts-fallback.img
}
menuentry "EndeavourOS, on linux-lts (recovery mode)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-recovery-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-lts ...'
	linux	/boot/vmlinuz-linux-lts root=UUID=5c487842-7591-49e3-8d50-77304544091e rw single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-lts-fallback.img
}
menuentry "EndeavourOS, on linux-hardened" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-hardened-advanced-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-hardened ...'
	linux	/boot/vmlinuz-linux-hardened root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-hardened.img
}
menuentry "EndeavourOS, on linux-hardened (fallback initramfs)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-hardened-fallback-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-hardened ...'
	linux	/boot/vmlinuz-linux-hardened root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-hardened-fallback.img
}
menuentry "EndeavourOS, on linux-hardened (recovery mode)" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-hardened-recovery-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-hardened ...'
	linux	/boot/vmlinuz-linux-hardened root=UUID=5c487842-7591-49e3-8d50-77304544091e rw single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-hardened-fallback.img
}
menuentry "EndeavourOS, on linux-lts" --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-5c487842-7591-49e3-8d50-77304544091e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  5c487842-7591-49e3-8d50-77304544091e
	else
	  search --no-floppy --fs-uuid --set=root 5c487842-7591-49e3-8d50-77304544091e
	fi
	echo	'Loading kernel linux-lts ...'
	linux	/boot/vmlinuz-linux-lts root=UUID=5c487842-7591-49e3-8d50-77304544091e rw  loglevel=3 quiet nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
### END /etc/grub.d/32_linux_proxy ###

### BEGIN /etc/grub.d/61_custom_proxy ###

# 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/61_custom_proxy ###

### BEGIN /etc/grub.d/62_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/62_custom ###

### BEGIN /etc/grub.d/63_memtest86+_proxy ###

if [ "${grub_platform}" == "pc" ]; then

fi
### END /etc/grub.d/63_memtest86+_proxy ###
 
Old 01-01-2021, 08:55 AM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
did you edit the /etc/default/grub or one of the files in /etc/grub.d?
 
Old 01-01-2021, 09:28 AM   #9
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
go here install on usb and boot, produce a boot-info file and post. https://sourceforge.net/projects/boot-repair-cd/files/
I am not sure how to use this.

I booted it up with the repair boot liveusb,
pressed "advanced option"
under "main option" , i pressed "backup partition table, bootsectors and logs"
boot repair generate a zip file , which contains :

boot-repairing.log
partition_table.dmp (under sda folder)
current_mbr.img (under sda folder)

boot-repair.log
partition_table.dmp.txt
I can't attach *.img file. i suppose that is image file of bootsector

Last edited by andrewysk; 01-01-2021 at 09:30 AM.
 
Old 01-01-2021, 09:32 AM   #10
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
did you edit the /etc/default/grub or one of the files in /etc/grub.d?
That's what i can't remember. I was exhausted back then.
Can you tell me what is the different purpose of both
/etc/default/grub
and
/etc/grub.d
which is template for grub-mkconfig ?
 
Old 01-01-2021, 10:25 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Most likely the error is from /etc/grub.d/40_custom
 
Old 01-01-2021, 01:15 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The error messages you posted above in post 7 indicate it is likely that there are error in the /etc/default/grub file. Post the contents here so members can view it and hopefully tell you what to change. Did you modify the 30_os-prober file or one of the other files (40_custom). You implied earlier that you had disabled 30_os-prober so post the permissions on that file.

Code:
ls -l /etc/grub.d/30_os-prober
The comment below (beginning on line 5) of the bootinfoscript tells us that windows is hibernated and Grub will never create an entry for a hibernated system.

Quote:
Windows is hibernated, refused to mount.
You should have an option to Create BootInfo Summary on boot repair, use that.

Last edited by yancek; 01-01-2021 at 01:17 PM.
 
Old 01-02-2021, 10:14 PM   #13
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
andrew posted several changes to grub installation and configuration but not the "boot time results" of any of it (is booting windows an option yet?)

obviously andrew you want to insure your grub is the right version, that you have it installed original (noting on ubuntu original means highly hacked!). you don't have a backup to check (you should).

you should seek to see what the default install files (for ubuntu not for grub, for ubuntu post-install not before installed) are and use those and will likely see what you should. that's the way you'd get "rolling release support". running grub config may have "permanently ooops'ed" that feature

i don't have those files for you, sorry
 
Old 01-03-2021, 04:26 PM   #14
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
The error messages you posted above in post 7 indicate it is likely that there are error in the /etc/default/grub file. Post the contents here so members can view it and hopefully tell you what to change. Did you modify the 30_os-prober file or one of the other files (40_custom). You implied earlier that you had disabled 30_os-prober so post the permissions on that file.
Sorry, reply late. Was sick, due to improper late sleeping.. what a start for new year.

I think i modified 30_os-prober .. i remember 30_os-prober something.. was late and tired. I don't recall anything about 40_custom.
 
Old 01-03-2021, 04:29 PM   #15
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post

Code:
ls -l /etc/grub.d/30_os-prober
The comment below (beginning on line 5) of the bootinfoscript tells us that windows is hibernated and Grub will never create an entry for a hibernated system.


You should have an option to Create BootInfo Summary on boot repair, use that.
I don't understand what did you meant by "windows is hibernated and grub..... hibernated system".

This is the boot repair disk summary. I also have read thru it (trying to learn).
boot_repair_disk-summary.txt
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] win7 no longer booting after installed endea linux. need help in undo or recover win7 os andrewysk Linux - Newbie 32 12-31-2020 06:26 AM
generating k permutations of a series and then generating all possible binary trees from them jamesbon Programming 5 09-27-2018 12:42 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
generating tmp file in samba server while saving file from win7 in samba server centos123 Linux - Server 15 11-05-2011 05:05 AM
[SOLVED] After Upgrading from Win7-32 to WIN7-64 can't mount cifs shares pobrika Linux - Networking 2 07-21-2010 08:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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