Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: kozzyCZ 01 Února 2011, 17:26:15
-
ahoj prosim vas potreboval bych jeste pomoct s grubem nemuzu do nej dostat win pres 40_custom zkousel sem vsechny navody co sem potkal a nic :(
grub
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a324cc45-489a-49cc-8e62-a4821d90d991
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768x24
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a324cc45-489a-49cc-8e62-a4821d90d991
set locale_dir=($root)/boot/grub/locale
set lang=cs
insmod gettext
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_proxy ###
menuentry "Ubuntu, with Linux 2.6.35-25-generic" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
savedefault
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a324cc45-489a-49cc-8e62-a4821d90d991
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=a324cc45-489a-49cc-8e62-a4821d90d991 ro quiet splash
initrd /boot/initrd.img-2.6.35-25-generic
}
menuentry "Ubuntu, with Linux 2.6.35-25-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
savedefault
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a324cc45-489a-49cc-8e62-a4821d90d991
echo 'Loading Linux 2.6.35-25-generic ...'
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=a324cc45-489a-49cc-8e62-a4821d90d991 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-25-generic
}
### END /etc/grub.d/10_linux_proxy ###
### BEGIN /etc/grub.d/20_linux_xen_proxy ###
### END /etc/grub.d/20_linux_xen_proxy ###
### BEGIN /etc/grub.d/20_memtest86+_proxy ###
### END /etc/grub.d/20_memtest86+_proxy ###
### BEGIN /etc/grub.d/30_os-prober_proxy ###
### END /etc/grub.d/30_os-prober_proxy ###
### BEGIN /etc/grub.d/40_custom_proxy ###
### END /etc/grub.d/40_custom_proxy ###
### BEGIN /etc/grub.d/41_custom_proxy ###
### END /etc/grub.d/41_custom_proxy ###
po pridani 40_custom
menuentry "windows xp (loader) (on/dev/sda1)" {
insmod "ntfs"
set root=(hd0,sda1) {!!!místo 1 doplnite místo win...sdaX}
search --no-floppy --fs-uuid --set E8EC1A02EC19CBA6 {!!to dlouhé číslo je číslo partition, kterou zjistite, že namountujete oddíl s win}
drivemap -s (hd0) ${root}
chainloader +1
chyba konzole
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
/etc/grub.d/40_custom: 1: menuentry: not found
insmod: can't read 'ntfs': No such file or directory
/etc/grub.d/40_custom: 3: Syntax error: "(" unexpected
-
a co za navody si to skusal? to DO NOT EDIT THIS FILE na zaciatku toho suboru znamena - neupravujte tento subor [na to je tu iny konfigurak] > http://wiki.ubuntu.cz/GRUB2#grub.cfg_.28.2BAC8-boot.2BAC8-grub.2BAC8-grub.cfg.29
-
ano vim asi sem to blbe napsal :) ale do grub.d sem vytvoril spousteci soubor 40_custom a kdyz dam prikaz sudo update-grub tak mi to vyhodi tu chybu ze na tich radkach je chyba proste mi to nechce nacist ten soubor 40_custom. omlouvam se jsem zacatecnik ale myslim ze sem na dobrej ceste jen nevim co tam mam vyplnit
-
nejsem si jist, ale to set root=(hd0,sda1) ma byt asi set root=(hd0,1)
EDIT: a ty radky zacinajici insmod a search jsou tam asi zbytecne, kdyz se zavadeni predava dal tomu zavadeci na partisne
-
bohuzel nefunguje :( zkousel sem si s tim jeste hrad a furt mi to haze chyby :(
-
tak nakonec sem na to prisel :) uz sem tu pres win potom poslu 40_custom jak vypadal
edit: #! /bin/sh -e
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib
echo "Adding Windows" >&2
cat << EOF
menuentry "Windows XP" {
EOF
save_default_entry | sed -e "s/^/\t/"
cat << EOF
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set E8EC1A02EC19CBA6
chainloader +1
}