Zaoane Posted March 18, 2012 Report Posted March 18, 2012 Salut.As avea nevoie de un mic ajutor pentru reconfigurarea bootloaderu-lui. Am 2 SO instalate Windows 7 si Backtrack. Am vrut sa modific ordinea aparitiei lor si am primit o eroare referitoare la grub. In momentul de fata imi booteaza direct in BT, iar partitia cu Windows nu o mai pot accesa. Va cer ajutorul in refacerea fisierului de boot.Multumesc Quote
pyth0n3 Posted March 19, 2012 Report Posted March 19, 2012 Ai scris 61 de cuvinte si nu ai postat continutul fisierului de boot.Inainte sa mofifici fisierul sper ca ai facut o copie de backup. Quote
Zaoane Posted March 19, 2012 Author Report Posted March 19, 2012 (edited) Din pacate pentru mine nu am facut back-up si acum regret.Calculatorul porneste in backtrack, dar nu stiu cum sa fac sa citeasca si partitia cu Windows, adica sa o afiseze la boot manager.LE: Urmand un tutorial pe net, am dat purge la GRUB2 si am instalat GRUBAm instalat Startupmanager, in Default operating system nu apare Windows-ul, doar backtrack si memtestLE2: Boot file## 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_envfiset 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=truefifunction 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 ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececif loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=1024x768 set gfxpayload=keep 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 fifiinsmod ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececset locale_dir=($root)/boot/grub/localeset lang=eninsmod gettextif [ ${recordfail} = 1 ]; then set timeout=-1else set timeout=10fi### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/05_debian_theme ###set menu_color_normal=white/blackset 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.39.4' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro text splash vga=791 initrd /boot/initrd.img-2.6.39.4}menuentry 'Ubuntu, with Linux 2.6.39.4 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec echo 'Loading Linux 2.6.39.4 ...' linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.39.4}### END /etc/grub.d/10_linux ###### BEGIN /etc/grub.d/20_memtest86+ ###menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin}menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin console=ttyS0,115200n8}### END /etc/grub.d/20_memtest86+ ###### BEGIN /etc/grub.d/30_os-prober ###menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 749C0AD49C0A9132 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 ### Edited March 19, 2012 by Zaoane Quote
dan_wtf Posted March 19, 2012 Report Posted March 19, 2012 Ai incercat in terminal: sudo update-grub ? si apoi restart? Quote
u0m3 Posted March 19, 2012 Report Posted March 19, 2012 (edited) O metoda ar fi sa tii apasata tasta Shift in timpul BIOS POST a PC-ul (adica sa o apesi inainte ca BIOS-ul sa predea comanda bootloader-ului, in cazul de fata GRUB2). Asta iti va face sa iti apara meniul de boot pe o perioada nedeterminata de timp. Edited March 20, 2012 by u0m3 Quote
pyth0n3 Posted March 20, 2012 Report Posted March 20, 2012 (edited) In primul rand fisierul de boot ti-a spus un lucru sfant cand l-ai editat pentru prima data # DO NOT EDIT THIS FILENu am dedus nimic concret din ceea ce ai postat mai sus si nu pot face presupuneri1.Posteaza fisierul corect care vine folost de catre grub intrun mod mai decent (poti sa faci wrap ) 2.Specifica in mod detaliat modificarile pa care le-ai facut Pas cu Pas.3.Specifica in mod detaliat ce versiune de GRUB ruleaza la tine in sistem4.Specifica in mod detaliat care din versiunile GRUB vine folosita in acest moment de catre sistem (chiar daca ai instalat o alta versiune de grub e probabil ca sistemul sa foloseasca cealalta versiune daca nu a fost dezinstalata )5.Din cate am inteles problema o intalnesti intro distributie Backtrack , eu din ceea ce ai postat mai sus vad ca e Ubuntu.Fara detalii precise nu poti obtine un raspuns concret decat presupuneri.In informatica nu se pot face presupuneri decat calcule precise. Edited March 20, 2012 by pyth0n3 Quote
Zaoane Posted March 20, 2012 Author Report Posted March 20, 2012 dan_wtf : Am incercat, nimic nouu0m3 : Am incercat si cu Shift-u, nu se schimba nimicpyth0n3: In primul rand multumesc de rabdarea ta. Ceea ca am vrut eu sa fac este sa inversez Windows-u cu Backtrack-u in Bootloader. Am cautat pe net si am gasit un tutorial care zice sa faci downgrade la GRUB2 (ce aveam instalat) si sa pun GRUB (ce am acuma) ca este simplu.Tutorialul este : Downgrading to GRUBAt the time of writing this guide GRUB 2 is unable to chainload the truecrypt bootloader (at least to my knowledge and without annoying workarounds). For this reason we will downgrade to GRUB (grub legacy) which will be able to handle everything perfectly and offers the same functionality.Start the Backtrack system you have just installed and open a terminal. To remove GRUB 2 execute "apt-get purge grub-pc". If it asks to remove all GRUB 2 files from /boot/grub select yes. Then execute "rm /boot/grub/core.img" to get rid of the remaining GRUB 2 files. Your computer won't be bootable until we install the old version of grub.Install grub by executing "apt-get install grub". Configure grub to load during boot by executing "grub-install /dev/sda". Finally configure the grub boot menu by executing "update-grub". It should say "could not find /boot/grub/menu.lst ...". Enter yes to create the menu. Reboot the system to verify it boots properly.Note: The grub menu will now display "Ubuntu 10.04.2 LTS" instead of Backtrack 5. At the end of this guide we will clean up this menu entry.Sursa : [HOW-TO] Dual Boot Backtrack 5 and Windows with Full Disk EncryptionSa raspund si la intrebarile tale:1. Nu stiu exact care este fisierul la care te referi, nu este bun cel postat de mine anterior?2. Cel mai simplu, cred ca in tutorialul pus anterior iti va arata ceea ce am facut3. Anterior am avut GRUB2, acuma la pornire imi arata GRUB loading stage 1.54. Banuiesc ca este folosita versiunea GRUB si ca GRUB2 este dezinstalat5. Am tot Backtrack-ul instalat, dar acel tutorial postat anterior mi-a modificat denumirea SO-ului la pornire in Ubuntu 10.04Stiu ca este o prostie ceea ce am facut, dat acuma incerc sa remediez cumva.Ceea ce am mai reusit sa rezolv, poate ca ajuta la ceva este urmatorul pas:Am dat jos Super Grub2, am pus pe un CD si am dat boot de pe el. Imi apare interfata Super Grub vers. 1.99, la Detect any Operating System imi apar cele 2 SO-uri instalate (Backtrack-Linux si Windows), pot intra in oricare.Daca nu dau boot de pe CD cu Super Grub nu mai apare si SO Windows.Multumesc anticipat de ajutor Quote
dan_wtf Posted March 20, 2012 Report Posted March 20, 2012 Poate te ajuta asta Încearc? Ubuntu - Restaurare GRUB sau ce e aici Quote
pyth0n3 Posted March 21, 2012 Report Posted March 21, 2012 (edited) 1.Instaleaza acest packet os-prober 2.Executa os-prober cu drepturi de root3.Incearca sa faci un reboot pentru a verifica daca windows apare in meniul bootloader-ului.4.Posteaza output-ul de la urmatorul comand "fdisk -l" executat cu drepturi de root5.Posteaza fisierul de configurare grub Edited March 21, 2012 by pyth0n3 Quote
Zaoane Posted March 21, 2012 Author Report Posted March 21, 2012 (edited) dan_wtf: Am incercat restaurare GRUB2Am urmarit restaurarea GRUB2.La comanda sudo grub-install --root-directory=/mnt /dev/sda am primit urmatoarea mesaj:Probing devices to guess BIOS drives. This may take a long time.The file /mnt/boot/grub/stage1 not read correctly.Dupa ce am citit inca odata, am dedus ca trebuie facut boot de pe CD cu versiunea de Ubuntu. Il descarc, pun pe un CD si revin cu detalii mai tarziu.pyth0n3:1. Am instalat os-prober2. Executat cu drept de root3. Reboot, nimic schimbat4. root@bt:~# fdisk -lDisk /dev/sda: 60.0 GB, 60011642880 bytes255 heads, 63 sectors/track, 7296 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xd53d826f Device Boot Start End Blocks Id System/dev/sda1 * 1 13 102400 7 HPFS/NTFSPartition 1 does not end on cylinder boundary./dev/sda2 13 1887 15050644 7 HPFS/NTFS/dev/sda3 2627 4086 11718750 7 HPFS/NTFS/dev/sda4 4086 7296 25789441 5 Extended/dev/sda5 4086 7158 24676352 83 Linux/dev/sda6 7158 7296 1112064 82 Linux swap / Solaris5. Grub.cfg GNU nano 2.2.2 File: grub.cfg ## 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_envfiset 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=truefifunction 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;$}insmod ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececif loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=1024x768 set gfxpayload=keep 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 fifiinsmod ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececset locale_dir=($root)/boot/grub/localeset lang=eninsmod gettextif [ ${recordfail} = 1 ]; then set timeout=-1else set timeout=10fi### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/05_debian_theme ###set menu_color_normal=white/blackset 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.39.4' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro text splash vga=791 initrd /boot/initrd.img-2.6.39.4}menuentry 'Ubuntu, with Linux 2.6.39.4 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec echo 'Loading Linux 2.6.39.4 ...' linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.39.4}}### END /etc/grub.d/10_linux ###### BEGIN /etc/grub.d/20_memtest86+ ###menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin}menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin console=ttyS0,115200n8}### END /etc/grub.d/20_memtest86+ ###### BEGIN /etc/grub.d/30_os-prober ###menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)'search --no-floppy --fs-uuid --set 749C0AD49C0A9132 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 ### Edited March 21, 2012 by Zaoane Quote
pyth0n3 Posted March 21, 2012 Report Posted March 21, 2012 Incearca sa modifici fisierul de boot cu rumatorul cod1.Editeaza fisierul cu gedit sau oricare alt editor grafic (asta ca sa nu gresesti tu) nu il edita cu nano sau vim 2.Copiaza codul exact asa cum il vezi in urmatorul wrap3.Fa un update-grub4.Incearca sa faci reboot 5.Spunemi daca sunt schimbari. ## 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_envfiset 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=truefifunction 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;$}insmod ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececif loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=1024x768 set gfxpayload=keep 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 fifiinsmod ext2set root='(hd0,5)'search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ececset locale_dir=($root)/boot/grub/localeset lang=eninsmod gettextif [ ${recordfail} = 1 ]; then set timeout=-1else set timeout=10fi### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/05_debian_theme ###set menu_color_normal=white/blackset 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.39.4' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro text splash vga=791 initrd /boot/initrd.img-2.6.39.4}menuentry 'Ubuntu, with Linux 2.6.39.4 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec echo 'Loading Linux 2.6.39.4 ...' linux /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.39.4}}### END /etc/grub.d/10_linux ###### BEGIN /etc/grub.d/20_memtest86+ ###menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin}menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set def7fc86-f2cf-4c48-89ac-7beae497ecec linux16 /boot/memtest86+.bin console=ttyS0,115200n8}### END /etc/grub.d/20_memtest86+ ###### BEGIN /etc/grub.d/30_os-prober ###menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 749C0AD49C0A9132 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 ### Quote
Zaoane Posted March 21, 2012 Author Report Posted March 21, 2012 Nu sunt schimbari la reboot.Ceea ce primesc la update-grub este urmatorul mesaj (poate te ajuta la ceva):Searching for GRUB installation directory ... found: /boot/grubSearching for default file ... found: /boot/grub/defaultTesting for an existing GRUB menu.lst file ... found: /boot/grub/menu.lstSearching for splash image ... none found, skipping ...Found kernel: /boot/vmlinuz-2.6.39.4Found kernel: /boot/memtest86+.binUpdating /boot/grub/menu.lst ... done Quote
pyth0n3 Posted March 21, 2012 Report Posted March 21, 2012 Din cate observ :1.Fisierul de configurare grub2 e grub.cfg 2.Fisierul de configurare grub1 e menu.lst3.Publica continutul fisierului /boot/grub/menu.lst4.E probabil sa rulezi grub1 si sa faci modificari in fisierul de configurare grub2 care nu vine citit . Quote
Zaoane Posted March 21, 2012 Author Report Posted March 21, 2012 Menu.lst# menu.lst - See: grub(8), info grub, update-grub(8)# grub-install(8), grub-floppy(8),# grub-md5-crypt, /usr/share/doc/grub# and /usr/share/doc/grub-legacy-doc/.## default num# Set the default entry to the entry number NUM. Numbering starts from 0, and# the entry number 0 is the default if the command is not used.## You can specify 'saved' instead of a number. In this case, the default entry# is the entry saved with the command 'savedefault'.# WARNING: If you are using dmraid do not use 'savedefault' or your# array will desync and will not let you boot your system.default 0## timeout sec# Set a timeout, in SEC seconds, before automatically booting the default entry# (normally the first entry defined).timeout 3## hiddenmenu# Hides the menu by default (press ESC to see the menu)hiddenmenu# Pretty colours#color cyan/blue white/blue## password ['--md5'] passwd# If used in the first section of a menu file, disable all interactive editing# control (menu entry editor and command-line) and entries protected by the# command 'lock'# e.g. password topsecret## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/# password topsecret## examples## title Windows 95/98/NT/2000# root (hd0,0)# makeactive# chainloader +1## title Linux# root (hd0,1)# kernel /vmlinuz root=/dev/hda2 ro### Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST### BEGIN AUTOMAGIC KERNELS LIST## lines between the AUTOMAGIC KERNELS LIST markers will be modified## by the debian update-grub script except for the default options below## DO NOT UNCOMMENT THEM, Just edit them to your needs## ## Start Default Options #### default kernel options## default kernel options for automagic boot options## If you want special options for specific kernels use kopt_x_y_z## where x.y.z is kernel version. Minor versions can be omitted.## e.g. kopt=root=/dev/hda1 ro## kopt_2_6_8=root=/dev/hdc1 ro## kopt_2_6_8_2_686=root=/dev/hdc2 ro# kopt=root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro## default grub root device## e.g. groot=(hd0,0)# groot=def7fc86-f2cf-4c48-89ac-7beae497ecec## should update-grub create alternative automagic boot options## e.g. alternative=true## alternative=false# alternative=true## should update-grub lock alternative automagic boot options## e.g. lockalternative=true## lockalternative=false# lockalternative=false## additional options to use with the default boot option, but not with the## alternatives## e.g. defoptions=vga=791 resume=/dev/hda5# defoptions=quiet splash## should update-grub lock old automagic boot options## e.g. lockold=false## lockold=true# lockold=false## Xen hypervisor options to use with the default Xen boot option# xenhopt=## Xen Linux kernel options to use with the default Xen boot option# xenkopt=console=tty0## altoption boot targets option## multiple altoptions lines are allowed## e.g. altoptions=(extra menu suffix) extra boot options## altoptions=(recovery) single# altoptions=(recovery mode) single## controls how many kernels should be put into the menu.lst## only counts the first occurence of a kernel, not the## alternative kernel options## e.g. howmany=all## howmany=7# howmany=all## specify if running in Xen domU or have grub detect automatically## update-grub will ignore non-xen kernels when running in domU and vice versa## e.g. indomU=detect## indomU=true## indomU=false# indomU=detect## should update-grub create memtest86 boot option## e.g. memtest86=true## memtest86=false# memtest86=true## should update-grub adjust the value of the default booted system## can be true or false# updatedefaultentry=false## should update-grub add savedefault to the default options## can be true or false# savedefault=false## ## End Default Options ##title Ubuntu 10.04.2 LTS, kernel 2.6.39.4uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro quiet splash initrd /boot/initrd.img-2.6.39.4quiettitle Ubuntu 10.04.2 LTS, kernel 2.6.39.4 (recovery mode)uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro singleinitrd /boot/initrd.img-2.6.39.4title Ubuntu 10.04.2 LTS, memtest86+uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/memtest86+.binquiet### END DEBIAN AUTOMAGIC KERNELS LIST Quote
nedo Posted March 21, 2012 Report Posted March 21, 2012 Fa un back-up la /boot/grub/menu.lstDupa care editeaza-l cu drepturi de root.Adaugi asa.title Windows Vista/Longhorn (loader) // aici editezi tu numele in Windows 7 / Windows xp whateverroot (sda0,0) // Presupunand ca windows-ul este instalat pe prima partitiesavedefaultmakeactivechainloader +1Salvezi fisierul menu.lst dupa care faci update-grub.Dai restart si ar trebui sa iti apara si partitia. Pythone sa ma corecteze daca nu retin bine cum se face numerotarea partitiilor si in loc de root (sda0,0) trebuie adaugat altfel Quote
pyth0n3 Posted March 21, 2012 Report Posted March 21, 2012 (edited) (hd0,1) se refera la discul 0 (care de fapt e primul disc) si partitia a doua care de fapt e /dev/sda2 Fa un backup cp /boot/menu.lst /boot/menu.lst.orgModifica fisierul adaugand urmatoarele datetitle Windows Vista/Longhornroot (hd0,1)savedefaultmakeactivechainloader +1Fa un update-grubAm observat ca Ubuntu foloseste UUID (Universally Unique IDentifier)Daca nu functioneaza posteaza erorile care ti le da si rezultatul de la urmatorul comandsudo blkid Edited March 21, 2012 by pyth0n3 Quote
Zaoane Posted March 21, 2012 Author Report Posted March 21, 2012 (edited) Tot nu apare Windowsulmenu.lst cu modificari# menu.lst - See: grub(8), info grub, update-grub(8)# grub-install(8), grub-floppy(8),# grub-md5-crypt, /usr/share/doc/grub# and /usr/share/doc/grub-legacy-doc/.## default num# Set the default entry to the entry number NUM. Numbering starts from 0, and# the entry number 0 is the default if the command is not used.## You can specify 'saved' instead of a number. In this case, the default entry# is the entry saved with the command 'savedefault'.# WARNING: If you are using dmraid do not use 'savedefault' or your# array will desync and will not let you boot your system.default 0## timeout sec# Set a timeout, in SEC seconds, before automatically booting the default entry# (normally the first entry defined).timeout 3## hiddenmenu# Hides the menu by default (press ESC to see the menu)hiddenmenu# Pretty colours#color cyan/blue white/blue## password ['--md5'] passwd# If used in the first section of a menu file, disable all interactive editing# control (menu entry editor and command-line) and entries protected by the# command 'lock'# e.g. password topsecret## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/# password topsecret## examples## title Windows 95/98/NT/2000# root (hd0,0)# makeactive# chainloader +1## title Linux# root (hd0,1)# kernel /vmlinuz root=/dev/hda2 ro### Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST### BEGIN AUTOMAGIC KERNELS LIST## lines between the AUTOMAGIC KERNELS LIST markers will be modified## by the debian update-grub script except for the default options below## DO NOT UNCOMMENT THEM, Just edit them to your needs## ## Start Default Options #### default kernel options## default kernel options for automagic boot options## If you want special options for specific kernels use kopt_x_y_z## where x.y.z is kernel version. Minor versions can be omitted.## e.g. kopt=root=/dev/hda1 ro## kopt_2_6_8=root=/dev/hdc1 ro## kopt_2_6_8_2_686=root=/dev/hdc2 ro# kopt=root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro## default grub root device## e.g. groot=(hd0,0)# groot=def7fc86-f2cf-4c48-89ac-7beae497ecec## should update-grub create alternative automagic boot options## e.g. alternative=true## alternative=false# alternative=true## should update-grub lock alternative automagic boot options## e.g. lockalternative=true## lockalternative=false# lockalternative=false## additional options to use with the default boot option, but not with the## alternatives## e.g. defoptions=vga=791 resume=/dev/hda5# defoptions=quiet splash## should update-grub lock old automagic boot options## e.g. lockold=false## lockold=true# lockold=false## Xen hypervisor options to use with the default Xen boot option# xenhopt=## Xen Linux kernel options to use with the default Xen boot option# xenkopt=console=tty0## altoption boot targets option## multiple altoptions lines are allowed## e.g. altoptions=(extra menu suffix) extra boot options## altoptions=(recovery) single# altoptions=(recovery mode) single## controls how many kernels should be put into the menu.lst## only counts the first occurence of a kernel, not the## alternative kernel options## e.g. howmany=all## howmany=7# howmany=all## specify if running in Xen domU or have grub detect automatically## update-grub will ignore non-xen kernels when running in domU and vice versa## e.g. indomU=detect## indomU=true## indomU=false# indomU=detect## should update-grub create memtest86 boot option## e.g. memtest86=true## memtest86=false# memtest86=true## should update-grub adjust the value of the default booted system## can be true or false# updatedefaultentry=false## should update-grub add savedefault to the default options## can be true or false# savedefault=false## ## End Default Options ##title Ubuntu 10.04.2 LTS, kernel 2.6.39.4uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro quiet splash initrd /boot/initrd.img-2.6.39.4quiettitle Ubuntu 10.04.2 LTS, kernel 2.6.39.4 (recovery mode)uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro singleinitrd /boot/initrd.img-2.6.39.4title Ubuntu 10.04.2 LTS, memtest86+uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/memtest86+.binquiettitle Windows Vista/Longhornroot (hd0,1)savedefaultmakeactivechainloader +1### END DEBIAN AUTOMAGIC KERNELS LISTupdate-grubSearching for GRUB installation directory ... found: /boot/grubSearching for default file ... found: /boot/grub/defaultTesting for an existing GRUB menu.lst file ... found: /boot/grub/menu.lstSearching for splash image ... none found, skipping ...Found kernel: /boot/vmlinuz-2.6.39.4Found kernel: /boot/memtest86+.binUpdating /boot/grub/menu.lst ... donesudo blkid/dev/sda5: UUID="def7fc86-f2cf-4c48-89ac-7beae497ecec" TYPE="ext4" /dev/sda1: LABEL="System Reserved" UUID="749C0AD49C0A9132" TYPE="ntfs" /dev/sda2: UUID="6CF01E41F01E11C6" TYPE="ntfs" /dev/sda3: UUID="0A8C22DB8C22C0D5" TYPE="ntfs" /dev/sda6: UUID="d8c0005c-9c47-4091-b6a7-03ee99125a83" TYPE="swap" Edited March 21, 2012 by Zaoane Quote
pyth0n3 Posted March 22, 2012 Report Posted March 22, 2012 Ai mare grija cand editezi fisierul , fiecare spatiu intre directive trebuie sa fie un tab.Patru spatii formeaza un tab , si fiecare directiva trebuie asezata la locul potrivitCopiaza codul corect si foloseste butonul tab pentru a aranja directivele in cazul in care gresesti.Nu uita sa faci update-grub, in output ar trebui sa vezi daca apare windows in menu fara sa faci reboot.# menu.lst - See: grub(8), info grub, update-grub(8)# grub-install(8), grub-floppy(8),# grub-md5-crypt, /usr/share/doc/grub# and /usr/share/doc/grub-legacy-doc/.## default num# Set the default entry to the entry number NUM. Numbering starts from 0, and# the entry number 0 is the default if the command is not used.## You can specify 'saved' instead of a number. In this case, the default entry# is the entry saved with the command 'savedefault'.# WARNING: If you are using dmraid do not use 'savedefault' or your# array will desync and will not let you boot your system.default 0## timeout sec# Set a timeout, in SEC seconds, before automatically booting the default entry# (normally the first entry defined).timeout 3## hiddenmenu# Hides the menu by default (press ESC to see the menu)hiddenmenu# Pretty colours#color cyan/blue white/blue## password ['--md5'] passwd# If used in the first section of a menu file, disable all interactive editing# control (menu entry editor and command-line) and entries protected by the# command 'lock'# e.g. password topsecret## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/# password topsecret## examples## title Windows 95/98/NT/2000# root (hd0,0)# makeactive# chainloader +1## title Linux# root (hd0,1)# kernel /vmlinuz root=/dev/hda2 ro### Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST### BEGIN AUTOMAGIC KERNELS LIST## lines between the AUTOMAGIC KERNELS LIST markers will be modified## by the debian update-grub script except for the default options below## DO NOT UNCOMMENT THEM, Just edit them to your needs## ## Start Default Options #### default kernel options## default kernel options for automagic boot options## If you want special options for specific kernels use kopt_x_y_z## where x.y.z is kernel version. Minor versions can be omitted.## e.g. kopt=root=/dev/hda1 ro## kopt_2_6_8=root=/dev/hdc1 ro## kopt_2_6_8_2_686=root=/dev/hdc2 ro# kopt=root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro## default grub root device## e.g. groot=(hd0,0)# groot=def7fc86-f2cf-4c48-89ac-7beae497ecec## should update-grub create alternative automagic boot options## e.g. alternative=true## alternative=false# alternative=true## should update-grub lock alternative automagic boot options## e.g. lockalternative=true## lockalternative=false# lockalternative=false## additional options to use with the default boot option, but not with the## alternatives## e.g. defoptions=vga=791 resume=/dev/hda5# defoptions=quiet splash## should update-grub lock old automagic boot options## e.g. lockold=false## lockold=true# lockold=false## Xen hypervisor options to use with the default Xen boot option# xenhopt=## Xen Linux kernel options to use with the default Xen boot option# xenkopt=console=tty0## altoption boot targets option## multiple altoptions lines are allowed## e.g. altoptions=(extra menu suffix) extra boot options## altoptions=(recovery) single# altoptions=(recovery mode) single## controls how many kernels should be put into the menu.lst## only counts the first occurence of a kernel, not the## alternative kernel options## e.g. howmany=all## howmany=7# howmany=all## specify if running in Xen domU or have grub detect automatically## update-grub will ignore non-xen kernels when running in domU and vice versa## e.g. indomU=detect## indomU=true## indomU=false# indomU=detect## should update-grub create memtest86 boot option## e.g. memtest86=true## memtest86=false# memtest86=true## should update-grub adjust the value of the default booted system## can be true or false# updatedefaultentry=false## should update-grub add savedefault to the default options## can be true or false# savedefault=false## ## End Default Options ##title Ubuntu 10.04.2 LTS, kernel 2.6.39.4uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro quiet splash initrd /boot/initrd.img-2.6.39.4quiettitle Ubuntu 10.04.2 LTS, kernel 2.6.39.4 (recovery mode)uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/vmlinuz-2.6.39.4 root=UUID=def7fc86-f2cf-4c48-89ac-7beae497ecec ro singleinitrd /boot/initrd.img-2.6.39.4title Ubuntu 10.04.2 LTS, memtest86+uuid def7fc86-f2cf-4c48-89ac-7beae497ececkernel /boot/memtest86+.binquiettitle Windows root (hd0,1)savedefaultmakeactivechainloader +1### END DEBIAN AUTOMAGIC KERNELS LIST Quote
dan_wtf Posted March 22, 2012 Report Posted March 22, 2012 (edited) Din ce stiu eu menu.lst de la grub 1 poate fi editat cu un simplu editor pe cand grub.cfg de la grub 2 isi ia setarile din alte fisiere, el fiind generat automat. Parerea mea de pe un live cd sters tot ce tine de grub 1 -2 ce ai instalat si reinstalat grub 2.Ptr adaugare manuala a windosului in grub 2 poti urma pasii:The files in this folder are read during execution of "update-grub" or "update-grub" commands. The contents are imported into /boot/grub/grub.cfgThe order of the entries in the grub menu is based on the order of the file names. File named with a starting numeral are run before those beginning with a letter. The order the files are run determines the menu order in grub.cfg.Custom entries can be added to the "40_custom" file or in a newly created file.Any file created must be executable in order to be included in the grub.cfg file during the "update-grub" command. 00_header 05_debian_theme: Set background and text colors, themes 10_hurd Locates Hurd kernels 10_linux Locates Linux kernels based on results of the "lsb_release" command. 10_lupin Locates Linux kernels in Wubi installs within Windows, among other things. 20_memtest86+: If the file /boot/memtest86+.bin exists, it is included as a menu item. 30_os-prober: Searches for Linux and OS's on other partitions and includes them in the menu. 40_custom: A template for adding custom menu entries which will be inserted into grub.cfg upon execution of the "update-grub" command. This and any other custom file must be made executable to allow importation into grub.cfg.Acum nu imi pot da seama exact care grub il ai instalat.Dar poti incerca cu reinstal ul dar sa fii atent cand instalezi bootloaderul(grub ul) sa fie pe mbs ul hdd ului (la instalare dai calea sda , fara numar ) Mai multe info poti afla aici Grub 2 Basics - Ubuntu ForumsMai e posibil ca tu sa faci editare la menu.lst folosit de grub 1 si sistemul sa foloseasca grub 2. Edited March 22, 2012 by dan_wtf Quote
Zaoane Posted March 22, 2012 Author Report Posted March 22, 2012 pyth0n3 : La fel, nici o schimbaredan_wtf : Voi incerca curand si varianta propusa de tine.Multumesc amandurora de sfaturi. Quote
pyth0n3 Posted March 22, 2012 Report Posted March 22, 2012 Sa clarificam 2 lucruriGRUB V1 foloseste menu.lst ca fisier de configurare , totul se va concentra asupra acestui fisier.GRUB V2 foloseste grub.cfg ca fisier de configurare , daca ruleaza V2 totul se concentra asupra acestui fisierDin cate am inteles ai facut downgrade de la GRUB V2 -> GRUB V1 GRUB V1 care citeste din menu.lst nu reuseste sa creeze un menu pentru windows si aici pot fi diverse probleme Lucrurile stau cam asa 1.GRUB V1 nu citeste noile directive introduse in fisiereul de configurare 2.GRUB V1 nu da nici o erroare cand fisierul vine modificat 3.GRUB V1 mentine in memorie aceleasi directiveVa trebui sa iei o decizie si sa pui totul cum a fost initial:1. Reinstalezi GRUB V2 2. Elimini GRUB V1 3. O data instalat GRUB V2 , comandul os-probe va aranja in mod automat toate directivele in fisierul de configurare si pana aici sper sa fie clar. 4. Vei avea un sistem multiboot , windows va fi recunoscut de catre GRUB V2 5.Daca sistemul functioneaza iei o decizie Pana aici totul ok.Acum ca ai pus totul la loc si functioneaza , pune o intrebare in legatura cu ceea ce vrei sa faci, da detalii , vei avea un raspuns care te va ajuta sa rezolvi problema.Nu poti face 100 de incercari si eu nu pot sa iti dau un raspuns concret deoarece tu modifici orice si nu reusesc sa inteleg in ce stare este sistemul tau.Modificarile se fac doar daca stii sigur ce se intampla, iar daca vrei sa faci teste asta e parte 2 .Daca nu am date concrete eu nu voi putea sa iti fiu de ajutor.Cum am mai spus eu nu ma bazez pe incercari deoarece stiu deja cum functioneaza sistemul , am avut ocazia sa intalnesc aceste errori si imi este foarte clar totul. Quote
Zaoane Posted March 22, 2012 Author Report Posted March 22, 2012 In cele din urma am reinstalat GRUB2 urmarind tutorialul de aci : Reinstall grub2 from LiveCD - Linux Mint CommunityAm folosit Live CD de Backtrack si comenzile scrise in tutorial, reboot si Grub2 Loader este ca si la inceput, adica arata toate SO-urile de pe HDD.Nu am reusit sa dau jos GRUB1, dar daca merge asa eu sunt multumit.Inversarea SO-urilor in loader sa inteleg ca se face din grub.cfg?Mersi frumos de ajutor Quote
pyth0n3 Posted March 22, 2012 Report Posted March 22, 2012 (edited) Chiar daca tu modifici fisierul /boot/grub/grub.cfg modififarile pe care le faci vor fi rescrise, acest fisier nu trebuie modificat ,spune foarte clar la inceput# DO NOT EDIT THIS FILE#Daca ruleaza GRUB V2 :Inainte sa faci vreo prostie din nou , ruleaza urmatoarea linie de cod la tine in terminal si vezi daca pozitia windows-ului a fost schimbata in menusudo sed -i'.bak' 's/GRUB_DEFAULT=0/GRUB_DEFAULT=4/' /etc/default/grub && sudo update-grub Edited March 22, 2012 by pyth0n3 1 Quote
Zaoane Posted March 23, 2012 Author Report Posted March 23, 2012 Versiunea de grub afisata este GRUB 1.99La rularea comenzii data de tine primesc eroarea:sed: can't read /etc/default/grub :No such file or directoryIn /etc/default nu exista grub.Legat de grub in default exista doar un grub.ucf-dist Quote
pyth0n3 Posted March 23, 2012 Report Posted March 23, 2012 Din pacate nomenclatura fisierelor nu mai apartine unui standard si distributiile Linux incep sa devina comerciale in acelasi timp de 2 lei pentru a atrage user Windows.Oricum userii windows ar trebui sa fie mandri de sistemul pe care le-a oferit Microsoft fara sa fac dual-boot.Oricum Ar fi trebuit sa existe /etc/default/grub , dar grub.ucf-dist ia luat locul in Ubuntu. Un linux pur ar trebui sa mentina /etc/default/grub.Ruleaza urmatorul comand:sudo sed -i'.bak' 's/GRUB_DEFAULT=0/GRUB_DEFAULT=4/' /etc/default/grub.ucf-dist && sudo update-grubPosteaza oricum fisierul grub.ucf-dist Quote