Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: Update na 10.04 GRUB poškozen - unknown command "recordfail" [vyřešeno]  (Přečteno 8844 krát)

regine

  • Stálý člen
  • **
  • Příspěvků: 826
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:
Kód: [Vybrat]
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.
« Poslední změna: 19 Května 2010, 22:29:02 od regine »
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #1 kdy: 04 Května 2010, 22:44:49 »
Prosím výstup z 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.
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #2 kdy: 04 Května 2010, 23:21:56 »
Výpis grubenv
Kód: [Vybrat]
# GRUB Environment Block
#############################
oprava: stáhnul jsem script boot_info_script055.sh
Teď jdu znovu bootovat LiveCD.
« Poslední změna: 04 Května 2010, 23:28:10 od regine »
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #3 kdy: 04 Května 2010, 23:27:48 »
Je to odkaz na wiki stránku s návodem
http://wiki.ubuntu.cz/boot_info_script
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
výpis RESULTS.TXT
« Odpověď #4 kdy: 04 Května 2010, 23:44:32 »
Výpis RESULTS.TXT:
Kód: [Vybrat]
                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.
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #5 kdy: 05 Května 2010, 00:05:31 »
Nejdřív zkus po restartu počítače najet v nabídce Grubu na požadovaný řádek a zmáčkni e (edit). Změň řádek
Kód: [Vybrat]
recordfailna
Kód: [Vybrat]
recordfail=1Pak Ctrl+x (spustit). Nabootuje do systému?
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #6 kdy: 05 Května 2010, 19:29:58 »
Kód: [Vybrat]
recordfail=1systém běží OK.  :)
Jak a kde nastavit GRUB trvale? ???
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #7 kdy: 05 Května 2010, 20:08:21 »
Zkus nejdřív přeinstalovat grub-common
Kód: [Vybrat]
sudo apt-get --reinstall install grub-common
sudo update-grub
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #8 kdy: 05 Května 2010, 22:18:10 »
Provedl jsem reinstalaci Grub, ale pořád to chce
Kód: [Vybrat]
recordfail=1Nevím, zda není problém v tom, že předchozí zavaděč byl GRUB2.
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #9 kdy: 05 Května 2010, 22:25:29 »
Nevím, zda není problém v tom, že předchozí zavaděč byl GRUB2.
Nerozumím  :(

Dej mi tu prosím
Kód: [Vybrat]
grep -C2 recordfail /etc/grub.d/10_linux /boot/grub/grub.cfg
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #10 kdy: 05 Května 2010, 22:37:41 »
Výpis:
Kód: [Vybrat]
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)'

Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #11 kdy: 05 Května 2010, 22:42:33 »
Kód: [Vybrat]
apt-cache policy grub-common
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #12 kdy: 06 Května 2010, 19:26:11 »
Výpis:
Kód: [Vybrat]
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
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #13 kdy: 06 Května 2010, 20:30:49 »
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://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #14 kdy: 07 Května 2010, 14:32:46 »
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #15 kdy: 07 Května 2010, 16:54:59 »
To vypadá, žes' to nepřeinstaloval, nebo se přeinstalace nepovedla. ?Co vypíše
Kód: [Vybrat]
sudo apt-get --reinstall install grub-common
sudo update-grub
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #16 kdy: 07 Května 2010, 17:18:01 »
Dík. Provedl jsem. ale je to stejné. Výpis:
http://paste.ubuntu.com/429570/
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

Martin 'Želva' Malý

  • Závislák
  • ***
  • Příspěvků: 2438
  • Zalezlej v krunýři
    • Želvův zápisník
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #17 kdy: 07 Května 2010, 17:54:22 »
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
Osobní počítače jsou nanic a opravdu nikdy nedělají to, co se po nich chce. Fakt. I když na něm třeba běží Debian, Ubuntu, Arch, Widle, Mac, je to skoro furt to samé... :-(

Pokud mi dáváte zápornou karmu, budu rád, když mi napíšete proč, abych aspoň věděl, jak jsem vám uškodil. ;-)

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #18 kdy: 07 Května 2010, 19:10:19 »
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.

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č.
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
modifikace /boot/grub/grub.cfg
« Odpověď #19 kdy: 16 Května 2010, 08:38:48 »
Než se najde řešení, chci příkazem:
Kód: [Vybrat]
gksudo gedit /boot/grub/grub.cfgv části souboru grub.cfg (vím, že se to silně nedoporučuje):
Kód: [Vybrat]
### 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
zeditovat na:
Kód: [Vybrat]
recordfail=1Je nutné potom provést ještě nějaký "chmod"? Například
Kód: [Vybrat]
sudo chmod u+x /boot/grub/grub.cfg
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #20 kdy: 16 Května 2010, 11:49:55 »
Ř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.
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
obsah souborů
« Odpověď #21 kdy: 16 Května 2010, 13:21:34 »
obsah souboru /boot/grub/grub.cfg
Kód: [Vybrat]
#
# 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
Kód: [Vybrat]
#! /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

Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #22 kdy: 16 Května 2010, 14:38:55 »
Pořád záhada... To vypadá, jak bys ten balík grub-common vůbec nepřeinstaloval...

Co tam máš za balík?
Kód: [Vybrat]
ls -l /var/cache/apt/archives/grub-common*
http://www.openstreetmap.org - mapy celého světa "wiki style"

regine

  • Stálý člen
  • **
  • Příspěvků: 826
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #23 kdy: 16 Května 2010, 23:03:35 »
výpis:
Kód: [Vybrat]
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:
Kód: [Vybrat]
sudo apt-get --reinstall install grub-common
sudo update-grub
jsem určitě provedl. když tak to provedu znovu.
Ubuntu 16.04 LTS 32bit, 22.04 LTS 64bit

arrange

  • Závislák
  • ***
  • Příspěvků: 4031
  • "jdu s hlavou vztyčenou..."
Re: Update na 10.04 GRUB poškozen - unknown command "recordfail"
« Odpověď #24 kdy: 16 Května 2010, 23:19:26 »
Kód: [Vybrat]
sudo apt-get --reinstall install grub-commonUdělej to prosím ještě jednou. Pak pošli výstup z
Kód: [Vybrat]
stat /etc/grub.d/00_header
cat /etc/grub.d/00_header
http://www.openstreetmap.org - mapy celého světa "wiki style"

 

Provoz zaštiťuje spolek OpenAlt.