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 a 2xHDD  (Přečteno 2015 krát)

snowed

  • Návštěvník
  • Příspěvků: 34
grub2 a 2xHDD
« kdy: 16 Března 2011, 20:07:21 »
Mam dva disky. na SDA 1 je ubuntu to HD0. Na druhom disku SDB/hd0 windows 7. nainstaloval som win a potom ubuntu.

Skusal som super grub cd. Ked dam detect os najde mi iba ubuntu. Ked dam read any grub.cfg tak mi nic neukaze. A ked dam detect any grub instalation tak mi najde ubuntu len.
skusal som http://erickoo.wordpress.com/2009/06/14/how-to-add-vista-partition-to-grub-2-ubuntu-9-10-karmic-koala/

na internete som nice ine nenasiel.

snowed

  • Návštěvník
  • Příspěvků: 34
Re: grub2 a 2xHDD
« Odpověď #1 kdy: 17 Března 2011, 17:42:46 »
Co som zistil tak v subore menu.lst sa nenachadza uplne nic. I ked dam update-grub tak hoc mi vypise ze je v poriadku. Nic sa mi nezmeni.

daysleeper

  • Stálý člen
  • **
  • Příspěvků: 1206
Re: grub2 a 2xHDD
« Odpověď #2 kdy: 17 Března 2011, 17:50:41 »
nikde jsem v prispevcich nenasel, v cem je problem, co konkretne ti nefunguje
nemuzes nabootovat do win? nebo do ubuntu? nebo nikam?
dej tu take vypis z http://wiki.ubuntu.cz/boot_info_script

Krysař

  • Stálý člen
  • **
  • Příspěvků: 1253
Re: grub2 a 2xHDD
« Odpověď #3 kdy: 17 Března 2011, 18:00:52 »
Grub2 nepouziva menu.lst, takze je v poradku, ze tam neni.
Pokud je to tak, ze grub nenajde win, tak je mozne to zadat rucne do /etc/grub.d/40_custom
http://wiki.ubuntu.cz/GRUB2#A.2BAC8-etc.2BAC8-grub.d.2BAC8_.28slo.2BAX4-ka.29
„Nepropadejte naději, jste z nejhoršího vevnitř.“

snowed

  • Návštěvník
  • Příspěvků: 34
Re: grub2 a 2xHDD
« Odpověď #4 kdy: 17 Března 2011, 20:33:46 »
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 #1 for (,msdos1)/boot/grub.
 => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
    partition #1 for (,msdos1)/boot/grub.

sda1: _________________________________________________________________________

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

sda2: _________________________________________________________________________

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

sda5: _________________________________________________________________________

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

sdb1: _________________________________________________________________________

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

sdb2: _________________________________________________________________________

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

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

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *          2,048   600,565,759   600,563,712  83 Linux
/dev/sda2         600,567,806   625,141,759    24,573,954   5 Extended
/dev/sda5         600,567,808   625,141,759    24,573,952  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 / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1               2,048   614,402,047   614,400,000   7 HPFS/NTFS
/dev/sdb2         614,402,048 1,953,521,663 1,339,119,616   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        bf0b3328-2b69-42f6-862f-f9fc95b32895   ext4                                     
/dev/sda2: PTTYPE="dos"
/dev/sda5        3c641a50-e024-496d-a8fe-b57a06139392   swap                                     
/dev/sda: PTTYPE="dos"
/dev/sdb1        EE4CC1314CC0F57D                       ntfs                                     
/dev/sdb2        366EFA0E6EF9C6A1                       ntfs                                     
/dev/sdb: PTTYPE="dos"

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

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sr0         /media/CDROM             iso9660    (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
/dev/sdb2        /media/366EFA0E6EF9C6A1  fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


=========================== sda1/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
  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,msdos1)'
search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
set locale_dir=($root)/boot/grub/locale
set lang=en
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 ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
    linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=bf0b3328-2b69-42f6-862f-f9fc95b32895 ro   quiet splash
    initrd    /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
    echo    'Loading Linux 2.6.35-22-generic ...'
    linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=bf0b3328-2b69-42f6-862f-f9fc95b32895 ro single
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/11_Windows ###
menuentry “Windows 7″ {

insmod ntfs
insmod chain
insmod drivemap
set root=(hd1,1)
drivemap -s (hd1) (hd0)
chainloader +1
}
### END /etc/grub.d/11_Windows ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set bf0b3328-2b69-42f6-862f-f9fc95b32895
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-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 ###
# 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 ###

=============================== sda1/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/sda1 during installation
UUID=bf0b3328-2b69-42f6-862f-f9fc95b32895 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=3c641a50-e024-496d-a8fe-b57a06139392 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

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


 206.3GB: boot/grub/core.img
 134.0GB: boot/grub/grub.cfg
    .6GB: boot/initrd.img-2.6.35-22-generic
 206.2GB: boot/vmlinuz-2.6.35-22-generic
    .6GB: initrd.img
 206.2GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader  on sda2

00000000  bf 65 88 81 e6 ae 72 47  3d 0f 4f ce a9 47 7f e4  |.e....rG=.O..G..|
00000010  3c 82 d9 8e c6 1b 57 2a  7c be b8 28 47 ae 40 19  |<.....W*|..(G.@.|
00000020  f6 a9 71 4e 7c dd 51 a4  74 d1 9a fa 65 d4 cb 29  |..qN|.Q.t...e..)|
00000030  0a 88 b2 bc 4e a6 77 c2  6f 40 0e e5 1c 1e 0f 4c  |....N.w.o@.....L|
00000040  7b d4 46 fc 4c ec 56 0f  dd e4 ac 85 1b 7f 91 81  |{.F.L.V.........|
00000050  e9 d8 74 1e b5 8c 67 cd  59 13 25 cb b0 9a 82 f9  |..t...g.Y.%.....|
00000060  76 ec 2e 96 05 69 97 ce  8d 61 62 51 54 8c 92 40  |v....i...abQT..@|
00000070  ef cf ea 2b 03 47 9d ad  de 7b 68 ee 16 28 e4 75  |...+.G...{h..(.u|
00000080  d9 71 72 db a4 56 c1 18  39 e3 d3 f3 ae b5 2f 75  |.qr..V..9...../u|
00000090  a2 1b e5 b5 ce de 09 92  38 6d fc fb 6f b6 65 f0  |........8m..o.e.|
000000a0  c1 58 6e 0f 8e 09 c7 20  0c 8a b7 17 9f fd 9d 26  |.Xn.... .......&|
000000b0  e9 82 dc 23 93 15 b4 a7  73 31 23 81 bb d1 70 2b  |...#....s1#...p+|
000000c0  ca 8f bb 88 70 9b d0 d1  4b dc 4e 26 05 d4 b7 1e  |....p...K.N&....|
000000d0  41 f3 24 76 50 81 6e 19  5f cb 1f 2f 7c e3 82 3d  |A.$vP.n._../|..=|
000000e0  bd 69 da 7c 13 fe fa 07  33 08 ae 11 6e 21 89 8e  |.i.|....3...n!..|
000000f0  f4 38 3c 15 3e bd eb b1  52 f7 9e a4 39 39 6e 5a  |.8<.>...R...99nZ|
00000100  fe cb 86 5d a7 c9 7d cd  27 95 30 95 42 82 09 e4  |...]..}.'.0.B...|
00000110  8e f9 1d aa 83 e8 92 db  dc de 5d e9 b3 24 0a 13  |..........]..$..|
00000120  ca 8a 39 46 e2 4a 64 82  79 ea 7d 2a 23 52 50 97  |..9F.Jd.y.}*#RP.|
00000130  2b d8 d3 9d 73 f2 1e 9f  f0 bf e2 e6 a7 e1 64 93  |+...s.........d.|
00000140  4f 9e e2 59 ad 2e b7 26  a3 0d dc c3 c9 50 d8 05  |O..Y...&.....P..|
00000150  14 13 8c 0e a3 e9 5e e9  f0 f3 c2 be 14 f8 dd e2  |......^.........|
00000160  9b 8b 01 aa da e8 11 f9  0f e5 33 02 12 77 5e 41  |..........3..w^A|
00000170  f5 e7 1d 3e b4 ab 52 73  ab 19 44 db da 25 45 c3  |...>..Rs..D..%E.|
00000180  a9 d5 f8 b3 f6 53 d5 2c  93 1e 00 9d bc 5d a8 59  |.....S.,.....].Y|
00000190  48 66 d6 74 eb 30 f7 32  c4 10 16 26 31 ea a3 39  |Hf.t.0.2...&1..9|
000001a0  af 9e 2f fe df a3 ac d6  9a c5 8c 96 4f 20 31 c8  |../.........O 1.|
000001b0  97 70 79 37 10 3a 31 57  59 17 aa b0 20 82 00 fe  |.py7.:1WY... ...|
000001c0  ff ff 82 fe ff ff 02 00  00 00 00 f8 76 01 00 00  |............v...|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200


To ze je grub 2 nainstalovana na sdb je vysledok pokusu. V sdb je windows.

daysleeper

  • Stálý člen
  • **
  • Příspěvků: 1206
Re: grub2 a 2xHDD
« Odpověď #5 kdy: 17 Března 2011, 20:38:40 »
nastav si v BIOSu primarni bootovani z disku s Ubuntu (pokud nemas)

snowed

  • Návštěvník
  • Příspěvků: 34
Re: grub2 a 2xHDD
« Odpověď #6 kdy: 17 Března 2011, 20:41:47 »
Grub2 nepouziva menu.lst, takze je v poradku, ze tam neni.
Pokud je to tak, ze grub nenajde win, tak je mozne to zadat rucne do /etc/grub.d/40_custom
http://wiki.ubuntu.cz/GRUB2#A.2BAC8-etc.2BAC8-grub.d.2BAC8_.28slo.2BAX4-ka.29

Tak ako v prvom poste uz som dal link k tomu ako upravit to.


Nazov suboru co som vytvoril je 11_Windows
Kód: [Vybrat]
#! /bin/sh -e
echo “Adding Windows” >&2
cat << EOF
menuentry “Windows 7″ {

insmod ntfs
insmod chain
insmod drivemap
set root=(hd1,1)
drivemap -s (hd1) (hd0)
chainloader +1
}
EOF

snowed

  • Návštěvník
  • Příspěvků: 34
Re: grub2 a 2xHDD
« Odpověď #7 kdy: 17 Března 2011, 21:37:28 »
nastav si v BIOSu primarni bootovani z disku s Ubuntu (pokud nemas)

A preco mi potom bootuje Ubuntu. Asi to mam nastavene.


Mala by sa mi zobrazovat grub tabulka hoc len z linuxom?
« Poslední změna: 17 Března 2011, 23:03:40 od snowed »

Krysař

  • Stálý člen
  • **
  • Příspěvků: 1253
Re: grub2 a 2xHDD
« Odpověď #8 kdy: 18 Března 2011, 06:05:37 »
Mala by sa mi zobrazovat grub tabulka hoc len z linuxom?
Pokud grub nenajde jine OS, tak se tabulka pri startu nezobrazi. Da se to ale nastavit v /etc/default/grub na radcich
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
„Nepropadejte naději, jste z nejhoršího vevnitř.“

snowed

  • Návštěvník
  • Příspěvků: 34
Re: grub2 a 2xHDD
« Odpověď #9 kdy: 18 Března 2011, 17:56:16 »
A ako potom mam spravit aby to detekovalo? Uz mam myslienky instalovat znova windows.

Uz som skusal niekolko krat prejst na grub 1 nefungovala a potom nasledne grub2. Problem bude tam ze grub2 nevie neako odkazat "vedenie" windowsu na druhy HDD. Ale musi to neako fungovat len 99%navodov na nete je napisana na jeden hdd a nie na 2x hdd. A z toho0.5% ne uzitocnych.
« Poslední změna: 18 Března 2011, 18:58:06 od snowed »

 

Provoz zaštiťuje spolek OpenAlt.