PDA

View Full Version : [SOLVED] Updates



kakashi_12
March 27th, 2011, 05:19 PM
From now on... every update that I try to install, FAILS!

kakashi_12
March 27th, 2011, 05:20 PM
Even when using Ubuntu Software Center to install games... it will go about 90% and then say it's failed. But it really plays okay.

kakashi_12
March 28th, 2011, 11:43 AM
Marked UNSOLVED.

Sean Moran
March 28th, 2011, 12:15 PM
I get that from time to time. Usually happens when my room is a long way from the hotel reception and the wifi router.

KegHead
March 28th, 2011, 01:51 PM
Hi!

Wifi could be the problem as well as ram and disk space.

Try a direct connection.


KegHead

Frogs Hair
March 28th, 2011, 01:56 PM
Try to change your server settings from the Update Manager > Settings > Ubuntu Software Tab . From the box that says download from if you choose other it will allow you to locate the best server for your area.

kakashi_12
March 29th, 2011, 12:31 AM
There is no wifi here. It is a direct ethernet.

kakashi_12
March 29th, 2011, 12:37 AM
Tried changing the server settings as noted above. When clicking close, it wanted to Reload. This error came up...

Could not download all repository indexes

The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct.

GPG error: http://mirror.files.bigpond.com lucid Release: The following signatures were invalid: NODATA 1 NODATA 2GPG error: http://mirror.files.bigpond.com lucid-updates Release: The following signatures were invalid: NODATA 1 NODATA 2GPG error: http://mirror.files.bigpond.com lucid-security Release: The following signatures were invalid: NODATA 1 NODATA 2Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/main/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/restricted/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/main/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/restricted/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/universe/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/universe/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/multiverse/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid/multiverse/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/main/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/restricted/binary-amd64/Packages.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/main/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/restricted/source/Sources.bz2 Sub-process /bin/bzip2 returned an error code (2)
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/universe/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/universe/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/multiverse/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-updates/multiverse/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/main/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/restricted/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/main/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/restricted/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/universe/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/universe/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/multiverse/binary-amd64/Packages.gz Unable to connect to mirror.files.bigpond.com:http:
Failed to fetch http://mirror.files.bigpond.com/ubuntu/dists/lucid-security/multiverse/source/Sources.gz Unable to connect to mirror.files.bigpond.com:http:
Some index files failed to download, they have been ignored, or old ones used instead.

Frogs Hair
March 29th, 2011, 12:49 AM
What version of Ubuntu are you using if you are using 9.04 or older your out of luck unless you update the repositories manually .

Old_Grey_Wolf
March 29th, 2011, 01:01 AM
When I tried to go to http://mirror.files.bigpond.com I got a server not found error.

When you try selecting a different server, click on the Select Best Server button.

It will run a test of the servers and recommend one.

kakashi_12
March 29th, 2011, 01:07 AM
I did click the "Select Best Server" button.

Ubuntu 10 64 bit Lucid

I also tried to re-check the software updates. Did not help. I also did a logout and log back in. Of course, I still got the exclamation point.

Old_Grey_Wolf
March 29th, 2011, 01:27 AM
I did click the "Select Best Server" button.

Ubuntu 10 64 bit Lucid

I also tried to re-check the software updates. Did not help. I also did a logout and log back in. Of course, I still got the exclamation point.

I found this link http://go.bigpond.com/help/file_library/index.jsp.

Change your server to "mirror.aarnet.edu.au" and try again.

kakashi_12
March 29th, 2011, 02:25 AM
I did that. Then I redownloaded/installed update packages. There were still errors. On reboot, I still got the exclamation point. I clicked on it and it allowed me to send reports to Linux Developers.

Old_Grey_Wolf
March 29th, 2011, 02:35 AM
I did that. Then I redownloaded/installed update packages. There were still errors. On reboot, I still got the exclamation point. I clicked on it and it allowed me to send reports to Linux Developers.

It would be helpful if you post the errors.

Also post the output from executing these commands in a terminal.

sudo apt-get update
sudo apt-get upgrade

kakashi_12
March 30th, 2011, 01:05 AM
First output:
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/tualatrix/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release
Hit http://mirror.aarnet.edu.au lucid Release.gpg
Hit http://ppa.launchpad.net lucid/main Packages
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid/main Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid/restricted Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid/universe Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid/multiverse Translation-en_US
Get:1 http://mirror.aarnet.edu.au lucid-updates Release.gpg [198B]
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-updates/main Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-updates/restricted Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-updates/universe Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-updates/multiverse Translation-en_US
Get:2 http://mirror.aarnet.edu.au lucid-security Release.gpg [198B]
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-security/main Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-security/restricted Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-security/universe Translation-en_US
Ign http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid-security/multiverse Translation-en_US
Hit http://mirror.aarnet.edu.au lucid Release
Get:3 http://mirror.aarnet.edu.au lucid-updates Release [44.7kB]
Get:4 http://mirror.aarnet.edu.au lucid-security Release [44.7kB]
Hit http://mirror.aarnet.edu.au lucid/main Packages
Hit http://mirror.aarnet.edu.au lucid/restricted Packages
Hit http://mirror.aarnet.edu.au lucid/main Sources
Hit http://mirror.aarnet.edu.au lucid/restricted Sources
Hit http://mirror.aarnet.edu.au lucid/universe Packages
Hit http://mirror.aarnet.edu.au lucid/universe Sources
Hit http://mirror.aarnet.edu.au lucid/multiverse Packages
Hit http://mirror.aarnet.edu.au lucid/multiverse Sources
Get:5 http://mirror.aarnet.edu.au lucid-updates/main Packages [465kB]
Get:6 http://mirror.aarnet.edu.au lucid-updates/restricted Packages [3,267B]
Get:7 http://mirror.aarnet.edu.au lucid-updates/main Sources [182kB]
Get:8 http://mirror.aarnet.edu.au lucid-updates/restricted Sources [1,443B]
Get:9 http://mirror.aarnet.edu.au lucid-updates/universe Packages [188kB]
Get:10 http://mirror.aarnet.edu.au lucid-updates/universe Sources [70.5kB]
Get:11 http://mirror.aarnet.edu.au lucid-updates/multiverse Packages [8,341B]
Get:12 http://mirror.aarnet.edu.au lucid-updates/multiverse Sources [4,364B]
Get:13 http://mirror.aarnet.edu.au lucid-security/main Packages [165kB]
Get:14 http://mirror.aarnet.edu.au lucid-security/restricted Packages [14B]
Get:15 http://mirror.aarnet.edu.au lucid-security/main Sources [48.7kB]
Get:16 http://mirror.aarnet.edu.au lucid-security/restricted Sources [14B]
Get:17 http://mirror.aarnet.edu.au lucid-security/universe Packages [65.8kB]
Get:18 http://mirror.aarnet.edu.au lucid-security/universe Sources [20.2kB]
Get:19 http://mirror.aarnet.edu.au lucid-security/multiverse Packages [1,853B]
Get:20 http://mirror.aarnet.edu.au lucid-security/multiverse Sources [653B]
Fetched 1,314kB in 8s (149kB/s)
Reading package lists... Done


Second Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-2.6.32-29-generic (2.6.32-29.58) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-29-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-29-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-30-generic (2.6.32-30.59) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-30-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-30-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-2.6.32-30-generic; however:
Package linux-image-2.6.32-30-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 2.6.32.30.36); however:
Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-2.6.32-29-generic
linux-image-2.6.32-30-generic
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

kakashi_12
March 31st, 2011, 11:14 PM
This is a first... today I only have one update available

gdm

error installing

E: linux-image-2.6.32-29-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-2.6.32-30-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-generic: dependency problems - leaving unconfigured
E: linux-generic: dependency problems - leaving unconfigured

kakashi_12
April 3rd, 2011, 01:59 AM
bump:(:confused:

Dutch70
April 3rd, 2011, 03:22 PM
Try running this command in a terminal...

sudo dpkg --configure -a

and this one...

sudo apt-get -f install

If it works, run...

sudo apt-get update && sudo apt-get upgrade

If it doesn't work, then try selecting a different download mirror.

kakashi_12
April 4th, 2011, 11:40 PM
what do those cmds mean exactly?

the second command did not work, so i did not go ahead with the 3rd one. here is the output...


Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.32-29-generic (2.6.32-29.58) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-29-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-29-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-30-generic (2.6.32-30.59) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-30-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-30-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-2.6.32-30-generic; however:
Package linux-image-2.6.32-30-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 2.6.32.30.36); however:
Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-2.6.32-29-generic
linux-image-2.6.32-30-generic
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

dnairb
April 4th, 2011, 11:54 PM
If I may jump in here. The errors reported include the line:


/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")

..which is preventing your system from configuring the new kernel, and is then preventing any further updates.

This needs to be fixed first.

In terminal, run:


gksudo gedit /etc/grub.d/30_os-prober

Which will open the /etc/grub.d/30_os-prober file in gedit with sudo privileges, allowing you to edit and save the file.
BE VERY CAREFUL editing this file.

The error is on line 157. To view line numbers, click "Edit" then "Preferences". There is a line "Display line numbers" - click this then "close".

Scroll down to line 157. On my system it reads:


Windows\ Vista*|Windows\ 7*)

Be aware that yours may not be the same.

Please copy the section lines 156 - 159 here so we can check it and advise how to correct it.

shaun6mc
April 5th, 2011, 05:14 AM
i have been having similar problems after upgrading to 10.10 I have never had problems with past installations of ubuntu, but this one is kicking me something fierce.


on boot, there is a red triangle in the top right, i try to find new updates and it starts, but fails most and then says

-----------------------------------------------------------------
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en.bz2 Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en.bz2 Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en_US.bz2 Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.canonical.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.canonical.com/ubuntu/dists/maverick/partner/i18n/Translation-en.bz2 Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname)
Failed to fetch http://archive.canonical.com/ubuntu/dists/maverick/partner/i18n/Translation-en_US.bz2 Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname)
Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en.bz2 Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)
Failed to fetch http://linux.dropbox.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'linux.dropbox.com:http' (-5 - No address associated with hostname)
Failed to fetch http://linux.dropbox.com/ubuntu/dists/maverick/main/i18n/Translation-en.bz2 Something wicked happened resolving 'linux.dropbox.com:http' (-5 - No address associated with hostname)
Failed to fetch http://linux.dropbox.com/ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 Something wicked happened resolving 'linux.dropbox.com:http' (-5 - No address associated with hostname)
Failed to fetch http://deb.playonlinux.com/dists/maverick/Release.gpg Something wicked happened resolving 'deb.playonlinux.com:http' (-5 - No address associated with hostname)
Failed to fetch http://deb.playonlinux.com/dists/maverick/main/i18n/Translation-en.bz2 Something wicked happened resolving 'deb.playonlinux.com:http' (-5 - No address associated with hostname)
Failed to fetch http://deb.playonlinux.com/dists/maverick/main/i18n/Translation-en_US.bz2 Something wicked happened resolving 'deb.playonlinux.com:http' (-5 - No address associated with hostname)
Some index files failed to download, they have been ignored, or old ones used instead.
-----------------------------------------------------------------

can't figure it out?!?!

kakashi_12
April 5th, 2011, 11:40 PM
I remember seeing that error before...


case ${LONGNAME} in
Windows \ Vista*|Windows \ 7*)
;;
*)

dnairb
April 6th, 2011, 05:17 PM
I remember seeing that error before...



case ${LONGNAME} in
Windows \ Vista*|Windows \ 7*)
;;
*)

Hmm. Maybe the error is elsewhere in this file.

Can you run, in terminal:


sudo cat /etc/grub.d/30_os-prober
and post the output here

kakashi_12
April 7th, 2011, 12:36 AM
#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

. ${libdir}/grub/grub-mkconfig_lib

found_other_os=

adjust_timeout () {
if [ "x${found_other_os}" = "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=
else
verbose=" --verbose"
fi

if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
cat <<EOF
if [ \${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep$verbose --interruptible 3 ; then
set timeout=0
fi
fi
fi
EOF
else
cat << EOF
if [ \${timeout} != -1 ]; then
if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=0
fi
fi
EOF
fi
fi
fi
}

if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
adjust_timeout
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
adjust_timeout
exit 0
fi

OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
if [ -z "${OSPROBED}" ] ; then
# empty os-prober output, nothing doing
adjust_timeout
exit 0
fi

osx_entry() {
cat << EOF
menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
cat << EOF
insmod ${GRUB_VIDEO_BACKEND}
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
$1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
xnu_mkext /System/Library/Extensions.mkext
else
xnu_kextdir /System/Library/Extensions
fi
if [ -f /Extra/Extensions.mkext ]; then
xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devprop.bin ]; then
xnu_devprop_load /Extra/devprop.bin
fi
if [ -f /Extra/splash.jpg ]; then
insmod jpeg
xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
insmod png
xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
insmod tga
xnu_splash /Extra/splash.tga
fi
fi
}
EOF
}

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 [ -z "${LONGNAME}" ] ; then
LONGNAME="${LABEL}"
fi

echo "Found ${LONGNAME} on ${DEVICE}" >&2
found_other_os=1

case ${BOOT} in
chain)

cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

case ${LONGNAME} in
Windows \ Vista*|Windows \ 7*)
;;
*)
cat << EOF
drivemap -s (hd0) \${root}
EOF
;;
esac

cat <<EOF
chainloader +1
}
EOF
;;
linux)
LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
prepare_boot_cache=

for LINUX in ${LINUXPROBED} ; do
LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"

if [ -z "${LLABEL}" ] ; then
LLABEL="${LONGNAME}"
fi

if [ "${LROOT}" != "${LBOOT}" ]; then
LKERNEL="${LKERNEL#/boot}"
LINITRD="${LINITRD#/boot}"
fi

cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
initrd ${LINITRD}
EOF
fi
cat << EOF
}
EOF
done
;;
macosx)
OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
osx_entry xnu_kernel 32
osx_entry xnu_kernel64 64
;;
hurd)
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
mach_device="`echo "${grub_device}" | tr -d '()' | tr , s`"
grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
case "${grub_fs}" in
*fs) hurd_fs="${grub_fs}" ;;
*) hurd_fs="${grub_fs}fs" ;;
esac
cat << EOF
multiboot /boot/gnumach.gz root=device:${mach_device}
module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
--device-master-port='\${device-port}' \\
--exec-server-task='\${exec-task}' -T typed '\${root}' \\
'\$(task-create)' '\$(task-resume)'
module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
}
EOF
;;
*)
echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2
;;
esac
done

adjust_timeout

dnairb
April 7th, 2011, 01:31 AM
Thank you. That file looks all OK; I ran the diff command to compare yours to mine, and there is no difference.

Next step: have you edited any of the grub files?

/etc/default/grub
/etc/grub.d/00_header
/etc/grub.d/05_debian_theme
/etc/grub.d/10_linux
/etc/grub.d/20_memtest86+
/etc/grub.d/30_os-prober
/etc/grub.d/40_custom

If so, please copy-and-paste them here

kakashi_12
April 7th, 2011, 11:15 PM
Yes I have. I am debating with myself to just format and start over. lets see if i can get those files...
what is the compare command by the way? that would come in handy for me.

kakashi_12
April 7th, 2011, 11:22 PM
see attachments.

dnairb
April 7th, 2011, 11:28 PM
The command I used was "diff" in terminal:


diff options file1 file2

to compare 2 files. There are a number of options, such as display files in 2 columns, suppress all lines that are common (display only the different lines), etc. More info can be found running man diff in terminal

There are no attachments to your post. Can you try again?

kakashi_12
April 7th, 2011, 11:33 PM
Files would not upload unless i gave them an extension. i had to copy them to another directory and then add the txt extension to them.

dnairb
April 7th, 2011, 11:59 PM
I have found a missing line in your /etc/grub.d/20_memtest86+ file.
This:


menuentry "Memory test (memtest86+, serial console 115200)" {

is missing at line 30.

The full file should read:


#!/bin/sh
set -e

# older versions of grub2 do not have this yet (LP: #459080)
if [ ! -e /usr/lib/grub/grub-mkconfig_lib ]; then
echo "no grub-mkconfig_lib, exiting"
exit 0
fi

. /usr/lib/grub/grub-mkconfig_lib

# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
/dev/loop/*|/dev/loop[0-9])
exit 0
;;
esac

if test -e /boot/memtest86+.bin ; then
MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
echo "Found memtest86+ image: $MEMTESTPATH" >&2
cat << EOF
menuentry "Memory test (memtest86+)" {
EOF
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux16 $MEMTESTPATH
}
menuentry "Memory test (memtest86+, serial console 115200)" {
EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux16 $MEMTESTPATH console=ttyS0,115200n8
}
EOF
fi

You need to edit and save this file with sudo privileges.
When you have done so, try updating again.

kakashi_12
April 8th, 2011, 12:38 AM
oh crap. i commented that menuentry line out last i knew. i did not want it in the boot order. either i did it or the program i have did it for me. hmmm. ok, i'll give that a shot i guess.

can i remove it from the boot properly and still be able to update?!?!:confused:

thanks for help. editting file. also updating grub (if i can remember the command) I think it's sudo update-grub. and then reboot and re-update.

kakashi_12
April 8th, 2011, 12:41 AM
when running sudo-update grub i still get the usual error...

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
/etc/grub.d/30_os-prober: 157: Syntax error: word unexpected (expecting ")")



.... and in that file here are the lines surrounding that line number

prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

case ${LONGNAME} in
Windows \ Vista*|Windows \ 7*)
;;
*)
cat << EOF

kakashi_12
April 8th, 2011, 01:42 AM
rebooted and retried updating. still failed. if i get some time this weekend, i'll reformat and re-install. at least i know where the error is coming from now (i think).

... unless anyone else has other suggestions.

dnairb
April 8th, 2011, 05:50 AM
If you have a live CD or USB stick with Lucid Lynx available, you could boot from that and copy the relevant files to your hard disk, rather than reinstall. You would lose your changes however.

After doing this you will need to reinstall grub to your hard disk.

While still in the LiveCD/USB stick, run the following in terminal:


sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /mnt

The highlighted parts (sda, sda1) will depend on your setup.
sda is the hard disk you are booting from and sda1 is the Ubuntu partition (where /boot lives).

kakashi_12
April 23rd, 2011, 10:36 PM
FINALLY... got a round to formatting. Back to scratch now.
Maybe I should leave this unsolved for now until i have another update and see if it goes through.