GC failing to see WinXP
I have a dual boot installation with WinXP and a recently updated Peppermint Linux (now v6).
When I run GC is simply will not find the WinXP OS - only PM6, so I can no longer boot XP.
All attempts to update it are failing.
Can you point me to things to try - maybe it is documented somewhere, but I can't find it.
Thanks very much
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
GC should see all the contents of your grub menu. If WinXP wasn't included there, GC won't see it too as it's just running these scripts to get them.
If WinXP isn't visible on GC only, then I have to look into it. In this case I need the output of:
sudo /etc/grub.
OR (depends on your GC configuration)
sudo /etc/grub.
And also the information whether you disabled os-prober (in GC: "look for other operating systems")
Revision history for this message
|
#2 |
Dear Daniel
I was searching my own memory for what happened as I was working on several laptops at the same time!
In fact all was originally fine, then I tried a GC tweak to something minor, font size I think, and the somewhere in the save/load to MBR process the laptop locked up and I had to force a shutdown - I suspect that caused something, perhaps in the MBR, to get corrupted. I think that is what happened, I'm not quite sure when it 'went wrong'.
As far as I am aware I have not disabled os-prober, GC is certainly set to look for other Op systems.
BUT I can get nothing from os-prober, the first command line you suggest returns absolutely nothing, I just get the next $ prompt., the second alternative gives 'command not found'.
I suspect that something is wrong in the boot loader, but I am out-of-my depth in knowing how to fix it.
I found some vague references to "bootrec /fixboot" - but maybe you can give me some more detailed guidance?
Many thanks for any help
Revision history for this message
|
#3 |
Thanks Daniel Richter, that solved my question.
Revision history for this message
|
#4 |
sorry, seem to keep marking this as solve - unintentionally!
Revision history for this message
|
#5 |
What is the output of
ls -l /etc/grub.
and
sudo update-grub
?
Revision history for this message
|
#6 |
The first command line: no such file or directory
sudo update-grub:
Generating grub configuration file ...
using custom appearance settings
Found background image: /home/user-
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
Found memtest86+ image: /boot/memtest86
Might that have fixed something?
Revision history for this message
|
#7 |
Again, I need the output of:
sudo /etc/grub.
OR (depends on your GC configuration)
sudo /etc/grub.
Revision history for this message
|
#8 |
It seems that the script that is responsible to add lines for other operating systems into the grub menu is missing on your system.
what is the output of the commands (I hope they exist also on Peppermint the same way they are on Ubuntu)
uname -a
lsb_release -crid
dpkg -l | grep grub
apt-cache policy grub grub-pc grub-common
ls -l /etc/grub.d
Revision history for this message
|
#9 |
Hi
By the way the machine name is Worcester-3
uname -a
Linux Worcester-3 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:17:05 UTC 2015 i686 i686 i686 GNU/Linux
lsb_release -crid
Distributor ID: Peppermint
Description: Peppermint Six
Release: 6
Codename: trusty
dpkg -l | grep grub
ii grub-common 2.02~beta2-
ii grub-customizer 4.0.6-0ubuntu1~
ii grub-gfxpayload
ii grub-pc 2.02~beta2-
ii grub-pc-bin 2.02~beta2-
ii grub2-common 2.02~beta2-
apt-cache policy grub grub-pc grub-common
grub:
Installed: (none)
Candidate: 0.97-29ubuntu66
Version table:
0.
500 http://
grub-pc:
Installed: 2.02~beta2-
Candidate: 2.02~beta2-
Version table:
*** 2.02~beta2-
500 http://
100 /var/lib/
2.02~beta2-9 0
500 http://
grub-common:
Installed: 2.02~beta2-
Candidate: 2.02~beta2-
Version table:
*** 2.02~beta2-
500 http://
100 /var/lib/
2.02~beta2-9 0
500 http://
ls -l /etc/grub.d
total 80
-rwxr-xr-x 1 root root 9424 Jun 26 14:18 00_header
-rwxr-xr-x 1 root root 6064 Mei 2 17:45 05_debian_theme
-rwxr-xr-x 1 root root 11608 Apr 11 2014 10_linux
-rwxr-xr-x 1 root root 10412 Apr 11 2014 20_linux_xen
-rwxr-xr-x 1 root root 1992 Mac 12 2014 20_memtest86+
-rwxr-xr-x 1 root root 11692 Apr 11 2014 30_os-prober
-rwxr-xr-x 1 root root 1416 Apr 11 2014 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Apr 11 2014 40_custom
-rwxr-xr-x 1 root root 216 Apr 11 2014 41_custom
drwxr-xr-x 4 root root 4096 Jul 27 23:27 backup
-rw-r--r-- 1 root root 483 Apr 11 2014 README
I hope that helps you!
The plot thickens - I have just loaded PM6 onto another (similar) laptop, set up GC in much the same way - all fine.
PM then did some updating online, and although the boot screen does still gives me both OS options, if I go into PM6 and open GC the menu there no longer shows WinXP - so no doubt if I saved/installed a revision to GC I would have the same problem. I hope that provides some better clues; I did say that a minor update to GC caused the original problem - now we can see a bit of what is happening.
Revision history for this message
|
#10 |
This is a bit strange:
in response #6 the command ls -l /etc/grub.
What is the output of
sudo /etc/grub.
?
Revision history for this message
|
#11 |
Sorry to be slow responding, I was out!
sudo /etc/grub.
I have tried it on the other laptop I mentioned in #9, no response there either.
I re-checked the other response and can confirm again 'no such file or directory'
Sorry! I hope you have some clue as to what is happening.
Revision history for this message
|
#12 |
Please show the file content of os-prober. Maybe it's damaged…
Revision history for this message
|
#13 |
Sorry, I need slightly more explanation of how to do that.
Revision history for this message
|
#14 |
Just use a text editor to open /etc/grub.
cat etc/grub.
Revision history for this message
|
#15 |
Edit:
cat /etc/grub.
Revision history for this message
|
#16 |
I've left out the comment lines to save space here!
prefix="/usr"
exec_prefix="/usr"
datarootdir=
quick_boot="1"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR=
. "${datarootdir}
found_other_os=
adjust_timeout () {
if [ "$quick_boot" = 1 ] && [ "x${found_
cat << EOF
set timeout_style=menu
if [ "\${timeout}" = 0 ]; then
set timeout=10
fi
EOF
fi
}
if [ "x${GRUB_
exit 0
fi
if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
# missing os-prober and/or linux-boot-prober
exit 0
fi
OSPROBED=
if [ -z "${OSPROBED}" ] ; then
# empty os-prober output, nothing doing
exit 0
fi
osx_entry() {
found_
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"
else
# TRANSLATORS: it refers to kernel architecture (64-bit)
bitstr="$(gettext "(64-bit)")"
fi
# TRANSLATORS: it refers on the OS residing on device %s
onstr=
cat << EOF
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_
EOF
save_default_entry | grub_add_tab
prepare_
cat << EOF
load_video
set do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
set do_resume=1
fi
fi
if [ \$do_resume = 0 ]; then
xnu_uuid ${OSXUUID} uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
if [ /kernelcache -nt /System/
$1 /kernelcache boot-uuid=\${uuid} rd=*uuid
else
$1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
if [ /System/
else
fi
fi
if [ -f /Extra/
fi
if [ -d /Extra/Extensions ]; then
fi
if [ -f /Extra/devprop.bin ]; then
fi
if [ -f /Extra/splash.jpg ]; then
fi
if [ -f /Extra/splash.png ]; then
fi
if [ -f /Extra/splash.tga ]; then
fi
fi
}
EOF
}
used_osprober_
wubi=
for OS in ${OSPROBED} ; do
DEVICE="`echo ${OS} | cut -d ':' -f 1`"
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
BOOT="`echo ${OS} | cut -d ':' -f 4`"
if UUID="`
EXPUUID="$UUID"
if [ x"${DEVICE#*@}" != x ] ; then
EXPUUID=
fi
if [ "x${GRUB_
echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
continue
fi
fi
BTRFS="`echo ${OS} | cut -d ':' -f 5`"
if [ "x$BTRFS" = "xbtrfs" ]; then
BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`"
BTRFSsubvol="`echo ${OS} | cut -d ':' -f 7`"
fi
if [ -z "${LONGNAME}" ] ; then
LONGNAME=
fi
gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
case ${BOOT} in
chain)
case ${LONGNAME} in
Windows*)
if [ -z "$wubi" ]; then
if [ -x /usr/share/
wubi=yes
else
wubi=no
fi
fi
if [ "$wubi" = yes ]; then
echo "Skipping ${LONGNAME} on Wubi system" >&2
continue
fi
;;
esac
found_
onstr=
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_
EOF
save_
prepare_
if [ x"`${grub_probe} --device ${DEVICE} --target=partmap`" = xmsdos ]; then
cat << EOF
parttool \${root} hidden-
EOF
fi
case ${LONGNAME} in
Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) \${root}
EOF
;;
esac
cat <<EOF
chainloader +1
}
EOF
;;
efi)
found_other_os=1
EFIPATH=
DEVICE=
onstr=
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_
EOF
save_
prepare_
cat <<EOF
chainloader ${EFIPATH}
}
EOF
;;
linux)
if [ "x$BTRFS" = "xbtrfs" ]; then
else
fi
prepare_
boot_
is_
title_
OS=
for LINUX in ${LINUXPROBED} ; do
if [ -z "${LLABEL}" ] ; then
fi
if [ "${LROOT}" != "${LBOOT}" ]; then
LKERNEL=
LINITRD=
fi
if [ -z "${prepare_
prepare_
[ "${prepare_
fi
found_other_os=1
onstr=
recovery_
counter=1
while echo "$used_
counter=
done
if [ -z "$boot_device_id" ]; then
boot_
fi
used_osprober_
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_
cat << EOF
menuentry '$(echo "$OS $onstr" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_
EOF
save_
printf '%s\n' "${prepare_
cat << EOF
linux ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
initrd ${LINITRD}
EOF
fi
cat << EOF
}
EOF
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS} $onstr" | grub_quote)' \$menuentry_
is_
fi
title="${LLABEL} $onstr"
cat << EOF
menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_
EOF
save_default_entry | sed -e "s/^/$grub_
printf '%s\n' "${prepare_
cat << EOF
linux ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
initrd ${LINITRD}
EOF
fi
cat << EOF
}
EOF
if [ x"$title" = x"$GRUB_
replacemen
quoted="$(echo "$GRUB_
title_
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_
fi
done
if [ x"$is_top_level" != xtrue ]; then
echo '}'
fi
echo "$title_
;;
macosx)
if [ "${UUID}" ]; then
OSXUUID="${UUID}"
osx_entry xnu_kernel 32
osx_entry xnu_kernel64 64
fi
;;
hurd)
found_
onstr=
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_
EOF
save_
prepare_
grub_
mach_
grub_
case "${grub_fs}" in
*fs) hurd_fs=
*) hurd_fs=
esac
cat << EOF
multiboot /boot/gnumach.gz root=device:
module /hurd/$
--multiboot-
--host-
--device-
--exec-
'\$(
module /lib/ld.so.1 exec /hurd/exec '\$(exec-
}
EOF
;;
minix)
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE}, Multiboot)" {
EOF
cat << EOF
multiboot /boot/image_latest
}
EOF
;;
*)
echo -n " "
# TRANSLATORS: %s is replaced by OS name.
gettext_
;;
esac
done
adjust_timeout
Revision history for this message
|
#17 |
The file seems to be ok.
I think your windows bootloader is broken somehow.
Is it possible to view the file system contents? (Just click the windows partition on the left pane after opening the file manager)
If this works:
Please add a chainloader to the grub list, pointing to your windows partition. You can do this from grub customizer using the "add" button. Choose chainloader as type. Then boot from this new menuentry and report whether there's an error.
Revision history for this message
|
#18 |
That worked - I now have a WinXP boot option again, and yes it does boot Win correctly!
Well done and thank you.
Is that a complete and permanent solution?
Then, I'll need to try the same solution with the other laptop, but I guess it is likely to work.
Have you any idea why the PM6 software update process seems to be breaking the bootloader?
Revision history for this message
|
#19 |
Hmm... ok, interesting. I think there's no problem using this solution. The new menuentry just wont be updated automatically when you'll delete winXP or move it to another partition. However I think this task is rarely done ;-)
Why it isn't automatically detected anymore? There could be multiple reasons. 1. You damaged any file which is required from os-prober (there's a really deep dependecy tree) when forcing the shutdown. 2. The newer version of os-prober isn't compatible to winXP (possible since winXP isn't supported anymore, but don't know).
Revision history for this message
|
#20 |
Hi Daniel
The 'forced shutdown' is probably not relevant - as the second laptop updated without any such issues.
I have just tried: sudo /etc/grub.
I fear that some update of grub (???) from the peppermint updater may have broken os-prober.
Are there other things I could try to narrow-down the problem?
I expect to install PM6 on some more laptops shortly - it will be interesting to see if I get more problems.
As far as I am aware, no such problems have shown up on earlier versions of PM.
I will not be able to respond again until the end of the week.
Regards, Nick
Revision history for this message
|
#21 |
If you can reproduce the problem without using grub customizer, then you should ask the developers of grub 2 or your distribution.
Can you help with this problem?
Provide an answer of your own, or ask Nick Fane for more information if necessary.