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: Grub2 - zas a znov-nezobrazuje se v boot menu windows [VYRESENO]  (Přečteno 1907 krát)

jgaunt

  • Návštěvník
  • Příspěvků: 9
PROSÍM O POMOC.ahoj. nejdříve bych chtěl říci, že jsem procházel a zkoušel všechny možnosti..
takže problém je následující:při práci s geany (kompilátor C) se mi zhroutilo ubuntu.místo ikonek error, vykřičníky apod..toto jsem ještě nezažil. Při restartu se zhroutil GRUB2. Pomocí návodů a samozřejmě ubuntu live jsem se propracovat k uvodu GRUB>, což byl úspěch. Obnova boot menu se po 6 hodinách nepodařila..Tak jsem se rozhodl nainstalovat čisté ubuntu 10.4 (jako předtím). Instalace  v pohodě. Ještě musím říci, že jsem nachal na tom samém HDD, v jiném partition nainstalovavé win vista.boot menu zavedeno, ale bez win. zase spoustu návodů, ale nepodařilo se mi win přidat do boot menu. win je na sda1, ubuntu sda2 a swap sda3. prosím o pomoc...co napsat do 40_custom...musím tam někde dělat chybu..díky
« Poslední změna: 25 Srpna 2010, 16:15:43 od jgaunt »

jgaunt

  • Návštěvník
  • Příspěvků: 9
Re: Grub2 - zas a znova
« Odpověď #1 kdy: 25 Srpna 2010, 14:19:25 »
Tak po přidání do 40_custom :
menuentry "windows vista (loader) (on /dev/sda1)" {
   set root=(hd0,1)
chainloader +1
}
se mi boot menu ani neukáže..
prosím, má někdo nějaký nápad?
díky

jgaunt

  • Návštěvník
  • Příspěvků: 9
Re: Grub2 - zas a znova
« Odpověď #2 kdy: 25 Srpna 2010, 14:57:10 »
přidávám vypis z boot
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 #2 for /boot/grub.

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows Vista
    Boot files/dirs:   /bootmgr /Boot/BCD /Windows/System32/winload.exe
                       /boot/grub/core.img

sda2: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 10.04.1 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda3: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 120,0 GB, 120 034 123 776 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 14 593, celkem 234 441 648 sektorů
Jednotky = sektory po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 512 bajtů

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *          2,048    61,442,047    61,440,000   7 HPFS/NTFS
/dev/sda2          61,442,048   225,505,279   164,063,232  83 Linux
/dev/sda3         225,505,280   234,440,703     8,935,424  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda: PTTYPE="dos"
/dev/sda1        A876A7FA76A7C780                       ntfs                                     
/dev/sda2        19ddb906-cc39-40fd-87a0-991545d9b8b0   ext4                                     
/dev/sda3        676ed320-7ebf-4926-965b-97cb81cb2a5d   swap                                     

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda2        /                        ext4       (rw,errors=remount-ro)


=================== sda1: Location of files loaded by Grub: ===================


    ??GB: boot/grub/core.img

=========================== sda2/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="0"
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
}
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  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
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
set locale_dir=($root)/boot/grub/locale
set lang=cs
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=5
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-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=19ddb906-cc39-40fd-87a0-991545d9b8b0 ro   quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=19ddb906-cc39-40fd-87a0-991545d9b8b0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=19ddb906-cc39-40fd-87a0-991545d9b8b0 ro   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,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=19ddb906-cc39-40fd-87a0-991545d9b8b0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 19ddb906-cc39-40fd-87a0-991545d9b8b0
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
menuentry "windows vista (loader) (on /dev/sda1)" {
set root=(hd0,1)
chainloader +1
}
# 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 ###

=============================== sda2/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    nodev,noexec,nosuid 0       0
# / was on /dev/sda2 during installation
UUID=19ddb906-cc39-40fd-87a0-991545d9b8b0 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
UUID=676ed320-7ebf-4926-965b-97cb81cb2a5d none            swap    sw              0       0

=================== sda2: Location of files loaded by Grub: ===================


 113.2GB: boot/grub/core.img
 113.2GB: boot/grub/grub.cfg
 113.2GB: boot/initrd.img-2.6.32-21-generic
 113.2GB: boot/initrd.img-2.6.32-24-generic
 113.1GB: boot/vmlinuz-2.6.32-21-generic
 113.2GB: boot/vmlinuz-2.6.32-24-generic
 113.2GB: initrd.img
 113.2GB: initrd.img.old
 113.2GB: vmlinuz
 113.1GB: vmlinuz.old

jgaunt

  • Návštěvník
  • Příspěvků: 9
VYŘEŠENO!!
« Odpověď #3 kdy: 25 Srpna 2010, 16:13:25 »
Tak se mi to po úmorných hodinách podařilo vyřešit..

1. přidal jsem do /etc/grub.d/40_custom  příkazem v terminalu:
Kód: [Vybrat]
sudo gedit 40_custom {sudo-admin, gedit-editor,40_custom-nazev souboru}

Kód: [Vybrat]
menuentry "windows vista (loader) (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1) {!!!místo 1 doplnite místo win...sdaX}
search --no-floppy --fs-uuid --set A876A7FA76A7C780 {!!to dlouhé číslo je číslo partition, kterou zjistite, že namountujete oddíl s win}
drivemap -s (hd0) ${root}
chainloader +1
}

2. pokud dáte sudo update-grup
napíše se v části windows
ls: cannot access [some/path]/boot
  Boot: No such file or directory

to opravíte takto:
pujdete do namountovyného oddílu s win a přejmenujete adresar "boot" na cokoli..vedle bude jeste adresar "Boot".Ten NECHAT!!!

3. v terminálu dáte znovu sudo update-grup

a restart:)
hotovo

 

Provoz zaštiťuje spolek OpenAlt.