Fórum Ubuntu CZ/SK

Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: MisfiT 24 Února 2008, 21:00:49

Název: Zavaděč [vyřešeno]
Přispěvatel: MisfiT 24 Února 2008, 21:00:49
Zdravím, po instalaci Ubuntu vedle windows xp professional mi nenajela nabídka s výběrem os, automaticky naběhly windowsy. Zkusil jsem tedy obnovit GRUB podle návodu na wiki.

Kód: [Vybrat]
sudo grub
find /boot/grub/stage1
root (hd1,1)
setup (hd1)
quit

Poté už nabídka naběhla ale nedokázal jsem spustit žádný z os, po vybrání Ubuntu to hodilo tuto chybu:
Kód: [Vybrat]
Error 22: No such partition
Press any key to continue...

a po vybrání Windows
Citace
Starting up...
NTLDR is missing
Press ctrl+alt+delete to restart

dokázal jsem to vrátit do původního stavu pomocí fixmdr, takže mi teď najíždějí zase jen a jen windowsy a potřebuju vědět, jak to udělat, aby mi najel funkční zavaděč

děkuji
Název: Re: Zavaděč
Přispěvatel: Bernard Williams 24 Února 2008, 21:26:24
Hoď sem výpis z příkazu fdisk a obsah souboru /boot/grub/menu.lst
Název: Re: Zavaděč
Přispěvatel: premet 24 Února 2008, 21:40:14
Dobrá věc na obnovu a zpravení Grubu je LiveCD Super Grub Disk je o něm psáno i na wiki , vyzkoušel bych jej  ;)
Název: Re: Zavaděč
Přispěvatel: MisfiT 24 Února 2008, 22:30:42
fdisk
Kód: [Vybrat]
Usage: fdisk [-l] [-b SSZ] [-u] device
E.g.: fdisk /dev/hda  (for the first IDE disk)
  or: fdisk /dev/sdc  (for the third SCSI disk)
  or: fdisk /dev/eda  (for the first PS/2 ESDI drive)
  or: fdisk /dev/rd/c0d0  or: fdisk /dev/ida/c0d0  (for RAID devices)

/boot/grub/menu.lst
Kód: [Vybrat]
# 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-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 10

## 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=3f834d18-4d38-4097-8377-b798a25d5085 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,1)

## 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

## 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 7.10, kernel 2.6.22-14-generic
root (hd1,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3f834d18-4d38-4097-8377-b798a25d5085 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd1,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3f834d18-4d38-4097-8377-b798a25d5085 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd1,1)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Název: Re: Zavaděč
Přispěvatel: kkaarreell 24 Února 2008, 22:44:17
on spis myslel vysledek prikazu
Kód: [Vybrat]
sudo fdisk -l

IMHO, pokud mas v pocitaci jen jeden disk, tak by v tom grubu melo spis byt (hd0,0) pro windows a (hd0,1) linux (je-li jeho oddil hned za tim pro win).
Název: Re: Zavaděč
Přispěvatel: MisfiT 24 Února 2008, 22:49:50
sudo fdisk -l
Kód: [Vybrat]
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x370d6568

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       24321   195358401    7  HPFS/NTFS

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa3f0a3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       12766   102542863+   7  HPFS/NTFS
/dev/sdb2           12892       14593    13671315   83  Linux
/dev/sdb3           12767       12891     1004062+  82  Linux swap / Solaris

Partition table entries are not in disk order

na jednom disku mam windowsy a ubuntu a na druhym jen data jako hudba, filmy atd.
Název: Re: Zavaděč
Přispěvatel: donny 25 Února 2008, 02:57:28
Bohužel jsem nepochopil, z jakého disku a partition se snažíte který systém startovat - oba disky mají boot flag na první partition zapnutý a to přehazování disků v menu.lst u záznamu Windows mě taky docela mate.

Můžete využít i zavaděč z Windows ke startu Linuxu, na Internetu je spousta návodů, například http://highlandsun.com/hyc/linuxboot.html (http://highlandsun.com/hyc/linuxboot.html).
Název: Re: Zavaděč
Přispěvatel: karel kudrna 25 Února 2008, 09:16:43
vzhledem k tomu, že oba systémy jsou na jednom disku zkuste pročíst tohle http://wiki.ubuntu.cz/GRUB/Obnova?highlight=%28grub%29 :)
Název: Re: Zavaděč
Přispěvatel: kkaarreell 25 Února 2008, 10:56:01
Citace
Bohužel jsem nepochopil, z jakého disku a partition se snažíte který systém startovat
Na disku sda ma NTFS filesystem pouze s daty. Windows a linux ma na druhem disku oznacenem jako sdb, konkretne sdb1 win a sdb2 linux, z tohoto disku chce bootovat.
Název: Re: Zavaděč
Přispěvatel: MisfiT 01 Března 2008, 01:37:02
Nastavil jsem bootování z druhého disku a zavaděč najel a vše funguje jak má.  :D