Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Instalace, aktualizace a spouštění => Téma založeno: regine 04 Května 2010, 22:34:45
-
Provedl jsem on-line update z UBUNTU 9.10 Karmic Koala na Ubuntu 10.04 Lucid Lynx.
Update nezahlásil žádný problém.
Po restartu a po odkliknutí jakéhokoliv typu spuštění GRUB v. 1.97 beta 4 pošle hlášku:
error: unknown command "recordfail"Co by běžný user nevím co si počít. Jak odstranit uvedený problém?
LiveCD Ubuntu 10.04 "Lucid Lynx" už jsem si stáhl a napálil, ale nejdříve bych chtěl zkusit opravit stávající instalaci. Zatím jsem na netu neobjevil v diskusích obdobný problém.
-
Prosím výstup z boot_info_script (http://wiki.ubuntu.cz/boot_info_script).
Také obsah souboru /boot/grub/grubenv (z HDD, tzn., že úplná cesta bude něco jako /media/něco/boot/grub/grubenv), jestli se ti ho podaří z LiveCD najít.
-
Výpis grubenv
# GRUB Environment Block
#############################oprava: stáhnul jsem script boot_info_script055.sh
Teď jdu znovu bootovat LiveCD.
-
Je to odkaz na wiki stránku s návodem
http://wiki.ubuntu.cz/boot_info_script
-
Výpis RESULTS.TXT:
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #7 for /boot/grub.
=> Testdisk is installed in the MBR of /dev/sdb
sda1: _________________________________________________________________________
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM
sda2: _________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files/dirs:
sda6: _________________________________________________________________________
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:
sda7: _________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sda8: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb1: _________________________________________________________________________
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:
=========================== Drive/Partition Info: =============================
Drive: sda ___________________ _____________________________________________________
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sda1 * 63 51,199,154 51,199,092 c W95 FAT32 (LBA)
/dev/sda2 51,199,155 156,296,384 105,097,230 f W95 Ext d (LBA)
/dev/sda5 51,199,218 120,824,864 69,625,647 7 HPFS/NTFS
/dev/sda6 120,824,928 123,893,279 3,068,352 b W95 FAT32
/dev/sda7 123,893,343 154,850,534 30,957,192 83 Linux
/dev/sda8 154,850,598 156,296,384 1,445,787 82 Linux swap / Solaris
Drive: sdb ___________________ _____________________________________________________
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sdb1 * 63 156,296,384 156,296,322 c W95 FAT32 (LBA)
blkid -c /dev/null: ____________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 2C9E-F52A vfat DISK_C
/dev/sda2: PTTYPE="dos"
/dev/sda5 421C79D51C79C487 ntfs disk_d
/dev/sda6 9415-035D vfat SWAP
/dev/sda7 d0cfb390-ca2f-4dae-8769-be513163af54 ext4
/dev/sda8 2a1e15a2-08d6-464c-9694-0c64979ba28d swap
/dev/sda: PTTYPE="dos"
/dev/sdb1 2C9E-F52A vfat DISK_E
/dev/sdb: PTTYPE="dos"
============================ "mount | grep ^/dev output: ===========================
Device Mount_Point Type Options
aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda5 /media/disk_d fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
================================ sda1/boot.ini: ================================
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /FASTDETECT
=========================== sda7/boot/grub/grub.cfg: ===========================
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="8"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
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/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.31-21-generic ...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 2c9e-f52a
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### 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 ###
=============================== sda7/etc/fstab: ===============================
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda7 during installation
UUID=d0cfb390-ca2f-4dae-8769-be513163af54 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=2a1e15a2-08d6-464c-9694-0c64979ba28d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
=================== sda7: Location of files loaded by Grub: ===================
65.4GB: boot/grub/core.img
64.2GB: boot/grub/grub.cfg
76.3GB: boot/initrd.img-2.6.31-21-generic
74.7GB: boot/initrd.img-2.6.32-21-generic
74.5GB: boot/vmlinuz-2.6.31-21-generic
76.4GB: boot/vmlinuz-2.6.32-21-generic
74.7GB: initrd.img
76.3GB: initrd.img.old
76.4GB: vmlinuz
74.5GB: vmlinuz.old
Snad to bude k něčemu.
-
Nejdřív zkus po restartu počítače najet v nabídce Grubu na požadovaný řádek a zmáčkni e (edit). Změň řádek
recordfailnarecordfail=1Pak Ctrl+x (spustit). Nabootuje do systému?
-
recordfail=1systém běží OK. :)
Jak a kde nastavit GRUB trvale? ???
-
Zkus nejdřív přeinstalovat grub-common
sudo apt-get --reinstall install grub-common
sudo update-grub
-
Provedl jsem reinstalaci Grub, ale pořád to chce
recordfail=1Nevím, zda není problém v tom, že předchozí zavaděč byl GRUB2.
-
Nevím, zda není problém v tom, že předchozí zavaděč byl GRUB2.
Nerozumím :(
Dej mi tu prosímgrep -C2 recordfail /etc/grub.d/10_linux /boot/grub/grub.cfg
-
Výpis:
user@user-desktop:~$ grep -C2 recordfail /etc/grub.d/10_linux /boot/grub/grub.cfg
/etc/grub.d/10_linux- printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
/etc/grub.d/10_linux- cat << EOF
/etc/grub.d/10_linux: recordfail
/etc/grub.d/10_linux-EOF
/etc/grub.d/10_linux- save_default_entry | sed -e "s/^/\t/"
--
/boot/grub/grub.cfg- save_env prev_saved_entry
/boot/grub/grub.cfg-fi
/boot/grub/grub.cfg:if [ ${recordfail} = 1 ]; then
/boot/grub/grub.cfg- set timeout=-1
/boot/grub/grub.cfg-else
--
/boot/grub/grub.cfg-### BEGIN /etc/grub.d/10_linux ###
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
--
/boot/grub/grub.cfg-}
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
--
/boot/grub/grub.cfg-}
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
--
/boot/grub/grub.cfg-}
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
--
/boot/grub/grub.cfg-}
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
--
/boot/grub/grub.cfg-}
/boot/grub/grub.cfg-menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
/boot/grub/grub.cfg: recordfail
/boot/grub/grub.cfg- insmod ext2
/boot/grub/grub.cfg- set root='(hd0,7)'
-
apt-cache policy grub-common
-
Výpis:
user@user-desktop:~$ apt-cache policy grub-common
grub-common:
Instalovaná verze: 1.98-1ubuntu6
Kandidát: 1.98-1ubuntu6
Tabulka verzí:
*** 1.98-1ubuntu6 0
500 http://cz.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
100 /var/lib/dpkg/status
1.98-1ubuntu5 0
500 http://cz.archive.ubuntu.com/ubuntu/ lucid/main Packages
-
Ještě prosím obsah souborů /boot/grub/grub.cfg a /etc/grub.d/00_header; někam nahrát, třeba na Ubuntu pastebin (http://paste.ubuntu.com).
-
Obojí je na:
http://paste.ubuntu.com/429491/ (http://paste.ubuntu.com/429491/)
-
To vypadá, žes' to nepřeinstaloval, nebo se přeinstalace nepovedla. ?Co vypíše
sudo apt-get --reinstall install grub-common
sudo update-grub
-
Dík. Provedl jsem. ale je to stejné. Výpis:
http://paste.ubuntu.com/429570/
-
Co když se to reinstaluje včetně nastavení?
Zatím to ještě nezkoušej
Arrange, myslíš, že to bude fungovat a nezdemoluje do GRUB? ???
sudo apt-get remove --purge grub-common
sudo apt-get install grub-common
sudo update-grub
-
No a teď znova
Ještě prosím obsah souborů /boot/grub/grub.cfg a /etc/grub.d/00_header; někam nahrát, třeba na Ubuntu pastebin (http://paste.ubuntu.com).
A neříkej mi, že je to stejné ;D
Co když se to reinstaluje včetně nastavení?
Zatím to ještě nezkoušej
Arrange, myslíš, že to bude fungovat a nezdemoluje do GRUB? ???
sudo apt-get remove --purge grub-common
sudo apt-get install grub-common
sudo update-grub
To by bylo asi to samé co ten můj reinstall. Problém, který tady nechápu, je ten, že balík grub-common ve verzi 1.98-1ubuntu6 z lucid-updates (konkrétně soubor /etc/grub.d/00_header z něj) vypadá na serveru úplně jinak než ten, co má (i po přeinstalaci) regine v počítači, a nevím proč.
-
Než se najde řešení, chci příkazem:
gksudo gedit /boot/grub/grub.cfgv části souboru grub.cfg (vím, že se to silně nedoporučuje):
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfailzeditovat na:
recordfail=1Je nutné potom provést ještě nějaký "chmod"? Například
sudo chmod u+x /boot/grub/grub.cfg
-
Řešení se samo nenajde; žádal jsem tě o obsah souborů /boot/grub/grub.cfg a /etc/grub.d/00_header PO přeinstalaci grub-* souborů.
Jinak ta editace je možná, je pak dobré provést chmod zpět na pův. 0444. Problém je, že se ti ten soubor přepíše při všech aktualizacích kernelu a grubu.
-
obsah souboru /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="6"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
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/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.32-22-generic ...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.31-21-generic ...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 2c9e-f52a
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### 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 ###obsah souboru /etc/grub.d/00_header
#! /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/>.
transform="s,x,x,"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
grub_prefix=`echo /boot/grub | sed ${transform}`
. ${libdir}/grub/grub-mkconfig_lib
# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
echo "insmod $i"
done
if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
cat << EOF
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="${GRUB_DEFAULT}"
if [ \${prev_saved_entry} ]; then
saved_entry=\${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
EOF
case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
serial:* | *:serial)
if ! test -e ${grub_prefix}/serial.mod ; then
echo "Serial terminal not available on this platform." >&2 ; exit 1
fi
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
GRUB_SERIAL_COMMAND=serial
fi
echo "${GRUB_SERIAL_COMMAND}"
;;
esac
case x${GRUB_TERMINAL_INPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_input
terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
;;
esac
case x${GRUB_TERMINAL_OUTPUT} in
xgfxterm)
# Make the font accessible
prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`
cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=640x480
insmod gfxterm
insmod ${GRUB_VIDEO_BACKEND}
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
EOF
;;
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
;;
esac
cat << EOF
if [ \${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=${GRUB_TIMEOUT}
fi
EOF
-
Pořád záhada... To vypadá, jak bys ten balík grub-common vůbec nepřeinstaloval...
Co tam máš za balík?ls -l /var/cache/apt/archives/grub-common*
-
výpis:
user@user-desktop:~$ ls -l /var/cache/apt/archives/grub-common*
-rw-r--r-- 1 root root 1503994 2010-04-29 10:06 /var/cache/apt/archives/grub-common_1.98-1ubuntu6_i386.deb
user@user-desktop:~$ale:
sudo apt-get --reinstall install grub-common
sudo update-grubjsem určitě provedl. když tak to provedu znovu.
-
sudo apt-get --reinstall install grub-commonUdělej to prosím ještě jednou. Pak pošli výstup zstat /etc/grub.d/00_header
cat /etc/grub.d/00_header
-
Je to stejné. Průběh instalace:
user@user-desktop:~$ sudo apt-get --reinstall install grub-common
[sudo] password for user:
Čtu seznamy balíků... Hotovo
Vytvářím strom závislostí
Čtu stavové informace... Hotovo
0 aktualizováno, 0 nově instalováno, 1 reinstalováno, 0 k odstranění a 0 neaktualizováno.
Potřebuji stáhnout 0B/1 504kB archivů.
Po této operaci bude na disku použito dalších 0B.
Chcete pokračovat [Y/n]? Y
(Čtu databázi ... nyní je nainstalováno 157371 souborů a adresářů.)
Připravuji nahrazení grub-common 1.98-1ubuntu6 (pomocí .../grub-common_1.98-1ubuntu6_i386.deb) ...
Rozbaluji náhradu grub-common ...
Zpracování spouštěčů pro balík man-db ...
Zpracování spouštěčů pro balík install-info ...
Zpracování spouštěčů pro balík ureadahead ...
ureadahead will be reprofiled on next reboot
Nastavuji balík grub-common (1.98-1ubuntu6) ...
user@user-desktop:~$stat /etc/grub.d/00_header:
user@user-desktop:~$ stat /etc/grub.d/00_header
File: `/etc/grub.d/00_header'
Size: 3286 Blocks: 8 IO Block: 4096 regular file
Device: 807h/2055d Inode: 130552 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2010-05-16 13:19:37.963417314 +0200
Modify: 2010-03-26 22:02:55.327048929 +0100
Change: 2010-03-26 22:02:55.327048929 +0100
user@user-desktop:~$ cat /etc/grub.d/00_header
user@user-desktop:~$ cat /etc/grub.d/00_header
#! /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/>.
transform="s,x,x,"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
grub_prefix=`echo /boot/grub | sed ${transform}`
. ${libdir}/grub/grub-mkconfig_lib
# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
echo "insmod $i"
done
if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
cat << EOF
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="${GRUB_DEFAULT}"
if [ \${prev_saved_entry} ]; then
saved_entry=\${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
EOF
case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
serial:* | *:serial)
if ! test -e ${grub_prefix}/serial.mod ; then
echo "Serial terminal not available on this platform." >&2 ; exit 1
fi
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
GRUB_SERIAL_COMMAND=serial
fi
echo "${GRUB_SERIAL_COMMAND}"
;;
esac
case x${GRUB_TERMINAL_INPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_input
terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
;;
esac
case x${GRUB_TERMINAL_OUTPUT} in
xgfxterm)
# Make the font accessible
prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`
cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=640x480
insmod gfxterm
insmod ${GRUB_VIDEO_BACKEND}
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
EOF
;;
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
;;
esac
cat << EOF
if [ \${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=${GRUB_TIMEOUT}
fi
EOF
user@user-desktop:~$ V současnosti mám upravený ručně recordfail=1, který po reinstalaci zůstal.
-
Change: 2010-03-26 22:02:55.327048929 +0100
Je tam vidět, že i po přeinstalaci tam zůstala stará verze souboru, která dělá ty problémy.
Zkussudo -s
strace -s 100 -f -o /tmp/apt.log apt-get --reinstall install grub-common
Vzniklý soubor /tmp/apt.log zazipuj/zataruj a někam nahrej ke stáhnutí.
-
Ke stažení na apt.log.zip
http://www.ulozto.cz/4857283/apt.log.zip (http://www.ulozto.cz/4857283/apt.log.zip)
průběh:
user@user-desktop:~$ sudo -s
[sudo] password for user:
root@user-desktop:~# strace -s 100 -f -o /tmp/apt.log apt-get --reinstall install grub-common
Čtu seznamy balíků... Hotovo
Vytvářím strom závislostí
Čtu stavové informace... Hotovo
0 aktualizováno, 0 nově instalováno, 1 reinstalováno, 0 k odstranění a 0 neaktualizováno.
Potřebuji stáhnout 0B/1 504kB archivů.
Po této operaci bude na disku použito dalších 0B.
Chcete pokračovat [Y/n]? Y
(Čtu databázi ... nyní je nainstalováno 157371 souborů a adresářů.)
Připravuji nahrazení grub-common 1.98-1ubuntu6 (pomocí .../grub-common_1.98-1ubuntu6_i386.deb) ...
Rozbaluji náhradu grub-common ...
Zpracování spouštěčů pro balík man-db ...
Zpracování spouštěčů pro balík install-info ...
Zpracování spouštěčů pro balík ureadahead ...
ureadahead will be reprofiled on next reboot
Nastavuji balík grub-common (1.98-1ubuntu6) ...
root@user-desktop:~#
-
Neopraví to soubor /etc/grub.d/00_header, nezjistil jsem proč. Zkus
sudo rm /etc/grub.d/00_header
sudo rm /var/cache/apt/archives/grub-common_1.98-1ubuntu6_i386.deb
sudo apt-get --reinstall install grub-common
Pak pošli obsah souboru /etc/grub.d/00_header.
-
Tak jsem provedl:
user@user-desktop:~$ sudo rm /var/cache/apt/archives/grub-common_1.98-1ubuntu6_i386.deb
user@user-desktop:~$ sudo apt-get --reinstall install grub-common
Čtu seznamy balíků... Hotovo
Vytvářím strom závislostí
Čtu stavové informace... Hotovo
0 aktualizováno, 0 nově instalováno, 1 reinstalováno, 0 k odstranění a 0 neaktualizováno.
Potřebuji stáhnout 1 504kB archivů.
Po této operaci bude na disku použito dalších 0B.
Chcete pokračovat [Y/n]? Y
Mám:1 http://cz.archive.ubuntu.com/ubuntu/ lucid-updates/main grub-common 1.98-1ubuntu6 [1 504kB]
Staženo 1 504kB za 1s (1 172kB/s)
(Čtu databázi ... nyní je nainstalováno 157371 souborů a adresářů.)
Připravuji nahrazení grub-common 1.98-1ubuntu6 (pomocí .../grub-common_1.98-1ubuntu6_i386.deb) ...
Rozbaluji náhradu grub-common ...
Zpracování spouštěčů pro balík man-db ...
Zpracování spouštěčů pro balík install-info ...
Zpracování spouštěčů pro balík ureadahead ...
ureadahead will be reprofiled on next reboot
Nastavuji balík grub-common (1.98-1ubuntu6) ...
W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_lucid_partner_binary-i386_Packages)
W: Pro nápravu těchto problémů můžete zkusit spustit apt-get update
user@user-desktop:~$
Ale nevznikl
/etc/grub.d/00_headerNevím jak mám reagovat na:
W: Pro nápravu těchto problémů můžete zkusit spustit apt-get update
Mám spustit:
apt-get update ???
-
Nahrej někam soubor /var/cache/apt/archives/grub-common_1.98-1ubuntu6_i386.deb.
-
http://ulozto.cz/4872544/grub-common-1.98-1ubuntu6-i386.deb (http://ulozto.cz/4872544/grub-common-1.98-1ubuntu6-i386.deb)
-
Opravdu tam není? Jak to tam tedy vypadá?
ls -al /etc/grub.d/
-
user@user-desktop:~$ ls -al /etc/grub.d/
total 56
drwxr-xr-x 2 root root 4096 2010-05-19 18:33 .
drwxr-xr-x 158 root root 12288 2010-05-19 18:29 ..
-rw-r--r-- 1 root root 483 2009-10-24 02:44 README
-rwxr-xr-x 1 root root 4444 2010-04-13 15:59 00_header.dpkg-dist
-rwxr-xr-x 1 root root 1416 2010-04-13 15:40 05_debian_theme
-rwxr-xr-x 1 root root 4594 2010-04-13 15:59 10_linux
-rwxr-xr-x 1 root root 918 2010-03-23 10:37 20_memtest86+
-rwxr-xr-x 1 root root 6605 2010-04-13 15:59 30_os-prober
-rwxr-xr-x 1 root root 214 2009-10-24 02:44 40_custom
user@user-desktop:~$
-
Přejmenuj ten soubor a mělo by to být OK.
sudo mv /etc/grub.d/00_header.dpkg-dist /etc/grub.d/00_header
sudo update-grub
Pro jistotu tu ještě pak zkopíruj obsah /boot/grub/grub.cfg.
-
Jo, a ještě
sudo debconf-show grub-pc
sudo debconf-show grub-common
-
Provedl jsem:
user@user-desktop:~$ sudo mv /etc/grub.d/00_header.dpkg-dist /etc/grub.d/00_header
[sudo] password for user:
user@user-desktop:~$ sudo update-grub
head: cannot open `/boot/grub/video.lst' for reading: No such file or directory
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.31-21-generic
Found initrd image: /boot/initrd.img-2.6.31-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Home Edition on /dev/sda1
done
user@user-desktop:~$ Potom:
user@user-desktop:~$ sudo debconf-show grub-pc
grub-pc/kopt_extracted: false
grub2/kfreebsd_cmdline:
* grub-pc/install_devices:
grub-pc/postrm_purge_boot_grub: false
grub-pc/disk_description:
* grub2/linux_cmdline: vga=769
* grub-pc/install_devices_empty: true
grub2/kfreebsd_cmdline_default: quiet
grub-pc/partition_description:
grub-pc/install_devices_failed: false
grub-pc/install_devices_disks_changed:
* grub2/linux_cmdline_default: quiet splash
grub-pc/chainload_from_menu.lst: true
grub-pc/hidden_timeout: false
grub-pc/timeout: 10
user@user-desktop:~$ sudo debconf-show grub-common
user@user-desktop:~$Výpis /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
load_env
fi
set default="6"
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
}
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
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/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.32-22-generic ...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro vga=769 quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
echo 'Loading Linux 2.6.31-21-generic ...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=d0cfb390-ca2f-4dae-8769-be513163af54 ro single vga=769
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set d0cfb390-ca2f-4dae-8769-be513163af54
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 2c9e-f52a
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### 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 ###
-
Teď už by to mělo fachat i po restartu. Pořád ale nevím proč se ti ten soubor nepřeinstaloval novějším >:(
-
Už to jde. (první spuštění) Chvíli jsem neměl čas.
Díky.
-
Ach jo, že mě to nenapadlo dřív:
asi sis ručně ten soubor upravil, a při upgradu se ti objevila tabulkaConfiguration file `/etc/grub.d/00_header'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.
*** 00_header (Y/I/N/O/D/Z) [default=N] ?
příp. českyKonfigurační soubor „/etc/grub.d/00_header“
==> Od doby instalace byl změněn (vámi nebo skriptem).
==> Distributor poskytl upravenou verzi.
Co s tím chcete udělat ? Možné volby jsou:
Y nebo I : nainstalovat verzi z balíku
N nebo O : ponechat současnou verzi
D : zobrazit rozdíl mezi verzemi
Z : přepnout tento proces na pozadí a prozkoumat situaci
Implicitní akcí je ponechání současné verze.kterou jsi odentroval, a tímpádem ten soubor nechal v pův. (s novým grubem nekompatibilní) verzi.
EDIT: z toho dále plyne, že Martin 'Želva' Malý měl pravdu: kdyby se to purge-odstranilo, a znovu nainstalovalo, bylo by vše OK.
-
Díky za pomoc. Jen dodám, že jsem pouhý "uživatel" IT.
1. Poprvé jsem zkusil on-line instalaci, protože až teprve teď jsem měl lepší konektování (UPC). Předtím jsem vždy instaloval jen smáznutím a instalací z CD.
2. MS-Win XP tam mám hlavně z důvodu mých rodinných příslušníků. Navíc mají zákaz jít na internet z MS-produktu.
3. Je možné, že při on-line instalaci jsem špatně reagoval na uvedený dotaz:
Configuration file `/etc/grub.d/00_header'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.
*** 00_header (Y/I/N/O/D/Z) [default=N] ?Několik dotazů šlo. Ale už si nepamatuji jakých.
4. Do přímých úprav se nepouštím, jen jsem si vědom následných zásahů do Grub:
- odstranění starých jader Linuxu (Smazání starých jader z GRUB - http://forum.ubuntu.cz/index.php/topic,44152.msg323043.html#msg323043 (http://forum.ubuntu.cz/index.php/topic,44152.msg323043.html#msg323043))
- Přes GUI - Správce spouštění - nastaveno prvotní bootování MS-Windows
- a potom až v nové verzi jsem ručně nastavil (o to je zde v tomto vlákně uvedeno) recordfail=1
-
Nenene, to nebyla v žádném případě kritika tvého postupu, jen vyjádření úlevy nad tím, že se pravděpodobně podařilo zjistit příčinu. Takže díky za spolupráci ;D
-
Prováděl jsem další on-line update na jiném kompu a problém mého příspěvku tkví v kroku: Nastavuji grub-pc.
Správně se má vybrat: Instalovat verzi od správce balíků
a já jsem předtím ponechal defaultně přednastavené: Ponechat aktuálně instalovanou lokální verzi, které vedlo k výše uvedenému problému.