Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2013-02-14 22:57:30

  maddening - Użytkownik

maddening
Użytkownik
Zarejestrowany: 2012-08-12

Problem z instalacją grub2 na MBR

Witam.

Od 3 dni męczę się z instalacją gruba na laptopie. Niezależnie od tego ile razy i w jakich okolicznościach bym nie odpalał grub-install, przy bootowaniu odpalia mi się od razu windows bez żadnej innej możliwości wyboru.

Zacząłem od zainstalowania Windowsa 7 N na pierwszych ok. 70 GB dysku - standardowo: 100MB partycja rozruchowa/recovery jako pierwsza, po niej reszta na właściwą instalację widzianą z Eksploratora Windows. MBR ustawiony na pierwszej partycji.

Następnie podjąłem próbę zainstalowania Wheezy z netinstallera. Wersja beta 4, odpalam

Kod:

dd if=./debian-wheezy-DI-b4-amd64-netinst.iso of=/dev/sdb1 bs=4M; sync

żeby utworzyć bootowalnu USB i instaluję. Gdzieś w trakcie dostałem komunikat

No EFI partition was found

ale kontynuowałem instalację. Następnie reboot - i nic. Windows włącza się, jak gdyby nigdy nic.

Wtedy podpiąłem RIPLinuX 13.7 i uruchomiłem go w trybie 64 bitowym. Następnie:

Kod:

# mount /dev/sda5 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /proc /mnt/proc
# chroot /mnt
root@RipLinux # grub-install --recheck /dev/sda
Installation finished. No error reported.

Bez zmian.

Wówczas spróbowałem wykorzystać RipLinux do uruchomienia partycji z Debianem (root="/dev/sda5"):

Kod:

# grub-install --recheck /dev/sda
Installation finished. No error reported.

Po restarcie nadal bez zmian.

Spróbowałem więc przeinstalować Debiana. Nadal nic. Przeczytałem gdzieś sugestię, że przyczyną może być włączony tryb UEFI. Wyłączyłem UEFI. Komputer nie chce bootować z USB. Wypalam więc Ripa na DVD. Powtarzam 2 powyższe kroki. Z takim samym skutkiem. Ehhh...

Ponieważ skończyły mi się pomysły, co jeszcze mógłbym próbować muszę zwrócić się do zacnego grona o pomoc. Aby nie było, że nie podałem żadnych informacji...

Dyski twarde i partycje:

Kod:

# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1c987f6f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   146800639    73296896    7  HPFS/NTFS/exFAT
/dev/sda3       146802686   312580095    82888705    5  Extended
/dev/sda5       146802688   295886847    74542080   83  Linux
/dev/sda6       295888896   312580095     8345600   82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x1c987f5a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   419432447   209715200    7  HPFS/NTFS/exFAT
/dev/sdb2       419432448   838862847   209715200    7  HPFS/NTFS/exFAT
/dev/sdb3       838862848  1953521663   557329408    7  HPFS/NTFS/exFAT

Efekt sprawdzania zawartości MBR przez file -s /dev/sda:

Kod:

# file -s /dev/sda
/dev/sda: sticky x86 boot sector; partition 1: ID=0x7, active, starthead 32, startsector 2048, 204800 sectors; partition 2: ID=0x7, starthead 223, startsector 206848, 146593792 sectors; partition 3: ID=0x5, starthead 254, startsector 146802686, 165777410 sectors, code offset 0xc0, OEM-ID "      м", Bytes/sector 190, sectors/cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes <=32 MB) , Media descriptor 0xf3, sectors/FAT 20644, heads 6, hidden sectors 309755, sectors 2147991229 (volumes > 32 MB) , physical drive 0x7e, dos < 4.0 BootSector (0x0)

Efekt sprawdzania zawartości MBR przy pomocy dd bs=512 count=1 if=/dev/sda:

Kod:

# dd bs=512 count=1 if=/dev/sda
3\C0\8Eм\00|\8E\C0\8Eؾ\00|\BF\00\B9\00\FC\F3\A4Ph\CB\FB\B9\00\BD\BE\80~\00\00|\85\83\C5\E2\F1\CD\88V\00U\C6F\C6F\00\B4A\BB\AAU\CD]r\81\FBU\AAu    \F7\C1\00t\FEFf`\80~\00t&fh\00\00\00\00f\FFvh\00\00h\00|h\00h\00\B4B\8AV\00\8B\F4\CD\9F\83\C4\9E\EB\B8\BB\00|\8AV\00\8Av\8AN\8An\CDfas\FENu\80~\00\80\84\8A\00\B2\80\EB\84U2\E4\8AV\00\CD]랁>\FE}U\AAun\FFv\00\E8\8D\00u\FA\B0\D1\E6d\E8\83\00\B0\DF\E6`\E8|\00\B0\FF\E6d\E8u\00\FB\B8\00\BB\CDf#\C0u;f\81\FBTCPAu2\81\F9r,fh\BB\00\00fh\00\00\00fh\00\00\00fSfSfUfh\00\00\00\00fh\00|\00\00fah\00\00\CDZ2\F6\EA\00|\00\00\CD\A0\B7\EB\A0\B6\EB\A0\B52\E4\00\8B\F0\AC<\00t    \BB\00\B4\CD\EB\F2\F4\EB\FD+\C9\E4d\EB\00$\E0\F8$\C3Invalid partition table\00Error loading operating system\00Missing operating system\00\00\00c{\9Ao\98\00\00\80 !\00\DF\00\00\00\00 \00\00\DF\FE\FF\FF\00(\00\00ؼ\00\FE\FF\FF\FE\FF\FF\FE\C0\90\E1    \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00U\AA

Zawartość grub.cfg:

Kod:

#
# 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
  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 load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 402EE0A92EE09964
    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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Wynik działania grub-mkconfig:

Kod:

Generating grub.cfg ...
#
# 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
  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 load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
Found background image: /usr/share/images/desktop-base/desktop-grub.png
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
Found Windows 7 (loader) on /dev/sda1
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 402EE0A92EE09964
    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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done

Obecnie UEFI jest ustawione na disabled.

Offline

 

#2  2013-02-14 23:12:23

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Problem z instalacją grub2 na MBR

Powinno byc chyba:

of=/dev/sdb

Przydatny jest w takich przypadkach wynik:
http://sourceforge.net/projects/bootinfoscript/

Offline

 

#3  2013-02-14 23:43:26

  maddening - Użytkownik

maddening
Użytkownik
Zarejestrowany: 2012-08-12

Re: Problem z instalacją grub2 na MBR

yossarian napisał(-a):

Powinno byc chyba:

of=/dev/sdb

Możliwe. Akurat polecenia spisywałem ręcznie z drugiego komputera i mogłem się pomylić. Same wyniki zrzucałem do plików, więc tam błędów być nie powinno.

yossarian napisał(-a):

Przydatny jest w takich przypadkach wynik:
http://sourceforge.net/projects/bootinfoscript/

Z tym będzie drobny problem. Nie zabierałem się jeszcze za to, bo nie mogłem normalnie zbootować systemu, ale nie mam poinstalowanych wielu sterowników. Z tego co zauważyłem, będę musiał wgrać:
- sterownik grafiki, bo bez niego Gnome 3 nie chce ruszyć i zostaje mi Gnome 2,
- nie mam uprawnień do montowania systemów NTFS, więc wszystko muszę przenosić ręcznie na pendrivie,
- i nie mogę połączyć się z internetem - ani przez kabel, ani przez wifi - a w każdym razie Gnome 2 nie robi tego automatycznie. Jak próbowałem ustawiać połączenie ręcznie, nie
byłem w stanie wybrać z listy, żadnego urządzenia (ten pasek Device MAC Address). Możliwe, że po prostu nie wiem jak skonfigurować środowisko, żeby to działało.
Na Windowsie miałem ten sam problem. Dopóki nie wgrałem stada sterów z płyty, nic nie mogłem zrobić. No, a bez internetu nie pościągam zależności wymaganych przez skrypt...

Offline

 

#4  2013-02-15 07:21:29

  marcin'82 - Użytkownik

marcin'82
Użytkownik
Zarejestrowany: 2011-10-02

Re: Problem z instalacją grub2 na MBR

maddening napisał(-a):

Z tym będzie drobny problem.

Uruchom dowolne livecd, które uruchamia się na tym komputerze. Paczkę skryptu rozpakuj na Pulpicie. Jak uruchomić skrypt znajdziesz w pliku samego skryptu. Na forum podaj zawartość RESULTS.txt.

Ostatnio edytowany przez marcin'82 (2013-02-15 07:21:56)

Offline

 

#5  2013-02-15 10:32:49

  maddening - Użytkownik

maddening
Użytkownik
Zarejestrowany: 2012-08-12

Re: Problem z instalacją grub2 na MBR

marcin'82 napisał(-a):

Uruchom dowolne livecd, które uruchamia się na tym komputerze.

Że też sam na to nie wpadłem.

RAPORT.txt

Kod:

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Windows is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe

sda3: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 7.0
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda6: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2             206,848   146,800,639   146,593,792   7 NTFS / exFAT / HPFS
/dev/sda3         146,802,686   312,580,095   165,777,410   5 Extended
/dev/sda5         146,802,688   295,886,847   149,084,160  83 Linux
/dev/sda6         295,888,896   312,580,095    16,691,200  82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1               2,048   419,432,447   419,430,400   7 NTFS / exFAT / HPFS
/dev/sdb2         419,432,448   838,862,847   419,430,400   7 NTFS / exFAT / HPFS
/dev/sdb3         838,862,848 1,953,521,663 1,114,658,816   7 NTFS / exFAT / HPFS


GUID Partition Table detected, but does not seem to be used.

Partition    Start Sector    End Sector  # of Sectors System

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sda1        402EE0A92EE09964                       ntfs       System Reserved
/dev/sda2        D0348AED348AD63E                       ntfs       Windows
/dev/sda5        b29a6c34-739b-482f-8cbe-f0694b0b0083   ext4       
/dev/sda6        ace2ee74-ca39-40f6-a76e-a61e1a3b7967   swap       
/dev/sdb1        804A4BF84A4BEA0C                       ntfs       Games
/dev/sdb2        303656F43656BA94                       ntfs       Music
/dev/sdb3        6A4A60B54A608025                       ntfs       Data
/dev/sr0                                                iso9660    Debian wheezy 20130120-20:36

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /lib/live/mount/rootfs/filesystem.squashfs squashfs   (ro,noatime)
/dev/sr0         /lib/live/mount/medium   iso9660    (ro,noatime)


=========================== sda5/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# 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
  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 load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 402EE0A92EE09964
    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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
# / was on /dev/sda5 during installation
UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=ace2ee74-ca39-40f6-a76e-a61e1a3b7967 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdc1       /media/usb0     auto    rw,user,noauto  0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

               =                boot/grub/grub.cfg                             1
               =                boot/initrd.img-3.2.0-4-amd64                  2
               =                boot/vmlinuz-3.2.0-4-amd64                     1
            ?? = ??             vmlinuz                                        1

=============================== StdErr Messages: ===============================

awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in

Offline

 

#6  2013-02-15 10:53:42

  beer_hunter - Użytkownik

beer_hunter
Użytkownik
Zarejestrowany: 2008-11-28

Re: Problem z instalacją grub2 na MBR

a nie wystarczy zrobić:

Kod:

grub-install /dev/sda
update-grub

?

Offline

 

#7  2013-02-15 11:09:34

  maddening - Użytkownik

maddening
Użytkownik
Zarejestrowany: 2012-08-12

Re: Problem z instalacją grub2 na MBR

Sprawdziłem:

Kod:

root@debian:/home/user# mount /dev/sda5 /mnt
root@debian:/home/user# mount --bind /dev /mnt/dev
root@debian:/home/user# mount --bind /proc /mnt/proc
root@debian:/home/user# chroot /mnt
root@debian:/# grub-install /dev/sda
Installation finished. No error reported.
root@debian:/# update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
Cannot find list of partitions!  (Try mounting /sys.)
done

Wynik ./bootinfoscript ./RAPORT2.txt:

Kod:

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Windows is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe

sda3: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 7.0
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda6: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2             206,848   146,800,639   146,593,792   7 NTFS / exFAT / HPFS
/dev/sda3         146,802,686   312,580,095   165,777,410   5 Extended
/dev/sda5         146,802,688   295,886,847   149,084,160  83 Linux
/dev/sda6         295,888,896   312,580,095    16,691,200  82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1               2,048   419,432,447   419,430,400   7 NTFS / exFAT / HPFS
/dev/sdb2         419,432,448   838,862,847   419,430,400   7 NTFS / exFAT / HPFS
/dev/sdb3         838,862,848 1,953,521,663 1,114,658,816   7 NTFS / exFAT / HPFS


GUID Partition Table detected, but does not seem to be used.

Partition    Start Sector    End Sector  # of Sectors System

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sda1        402EE0A92EE09964                       ntfs       System Reserved
/dev/sda2        D0348AED348AD63E                       ntfs       Windows
/dev/sda5        b29a6c34-739b-482f-8cbe-f0694b0b0083   ext4       
/dev/sda6        ace2ee74-ca39-40f6-a76e-a61e1a3b7967   swap       
/dev/sdb1        804A4BF84A4BEA0C                       ntfs       Games
/dev/sdb2        303656F43656BA94                       ntfs       Music
/dev/sdb3        6A4A60B54A608025                       ntfs       Data
/dev/sr0                                                iso9660    Debian wheezy 20130120-20:36

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /lib/live/mount/rootfs/filesystem.squashfs squashfs   (ro,noatime)
/dev/sda5        /mnt                     ext4       (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/sr0         /lib/live/mount/medium   iso9660    (ro,noatime)


=========================== sda5/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# 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
  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 load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root b29a6c34-739b-482f-8cbe-f0694b0b0083
    echo    'Loading Linux 3.2.0-4-amd64 ...'
    linux    /boot/vmlinuz-3.2.0-4-amd64 root=UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-4-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
# / was on /dev/sda5 during installation
UUID=b29a6c34-739b-482f-8cbe-f0694b0b0083 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=ace2ee74-ca39-40f6-a76e-a61e1a3b7967 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdc1       /media/usb0     auto    rw,user,noauto  0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

               =                boot/grub/grub.cfg                             1
               =                boot/initrd.img-3.2.0-4-amd64                  2
               =                boot/vmlinuz-3.2.0-4-amd64                     1
            ?? = ??             vmlinuz                                        1

=============================== StdErr Messages: ===============================

awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in

Niestety bez zmian.

Z ciekawości uruchomiłem jeszcze w osobnym terminalu:

Kod:

root@debian:/home/user# mount --bind /sys /mnt/sys
root@debian:/home/user# chroot /mnt
root@debian:/# grub-install /dev/sda
Installation finished. No error reported.
root@debian:/# update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
Found Windows 7 (loader) on /dev/sda1
done

Jednak wynik bootinfoscript pozostał taki sam.

Offline

 

#8  2013-02-15 15:36:01

  beer_hunter - Użytkownik

beer_hunter
Użytkownik
Zarejestrowany: 2008-11-28

Re: Problem z instalacją grub2 na MBR

hmm, skoro nie w ten sposób to może:

Kod:

dpkg-reconfigure grub-pc

?

Offline

 

#9  2013-02-15 17:22:51

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Problem z instalacją grub2 na MBR

Próbowałeś z poziomu LiveCD?

Kod:

mkdir -p /media/debian
mount /dev/sda5 /media/debian
grub-install --recheck --no-floppy --root-directory=/media/debian /dev/sda

Offline

 

#10  2013-02-16 15:29:14

  maddening - Użytkownik

maddening
Użytkownik
Zarejestrowany: 2012-08-12

Re: Problem z instalacją grub2 na MBR

beer_hunter napisał(-a):

hmm, skoro nie w ten sposób to może:

Kod:

dpkg-reconfigure grub-pc

?

Gdy testowałem Twoje rozwiązanie otrzymałem informację, że grub-pc nie jest zainstalowany. Gdy odpaliłem

Kod:

apt-get install grub-pc

zadziałało!

Zgaduję, że z powodu wcześniejszego włączenia UEFI, installer nie zainstalował mi tego pakietu i mogłem sobie odpalać grub-install aż do śmierci... Dzięki, za naprowadzenie na właściwą drogę, sam bym na to nie wpadł. :)

Offline

 

#11  2013-02-16 15:39:49

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Problem z instalacją grub2 na MBR

Zgaduję, że z powodu wcześniejszego włączenia UEFI, installer nie zainstalował mi tego pakietu i mogłem sobie odpalać grub-install aż do śmierci... Dzięki, za naprowadzenie na właściwą drogę, sam bym na to nie wpadł. :)

Wcześniej miałeś włączone UEFI i dlatego zainstalowany grub-efi, a nie grub-pc.

Prawdopodobnie metoda, o której pisałem wcześniej też by zadziałała. Użyta by została wersja Gruba z LiveCD.
Poprzednie próby były z poziomu chroota, a tam brakowało tego pakietu.

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)