Fórum Ubuntu CZ/SK

Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: starenka 06 Dubna 2009, 21:46:22

Název: grub 22 - klasika [vyřešeno]
Přispěvatel: starenka 06 Dubna 2009, 21:46:22
ahoj, jsa nakazen vlnou kde4, chtel jsem ji zkusit na svuj domaci cipotac (mel jsem tam hardyho - v podstate jen preharava muziku a video) kubuntu jaunty. Po instalaci jsem dostal grub 22. Vim, ze je to "spatna partisna". Zkousel jsem osvedceny "livecd-najit stage-root-blabla tedy

Kód: [Vybrat]
grub> find /boot/grub/stage1
 (hd2,5)

grub> root (hd2,5)

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 d (hd0) (hd0)1+17 p (hd2,5)/boot/grub/stage
2 /boot/grub/menu.lst"... succeeded
Done.

grub>

ale porad mi to hazi 22ku. disky mam takhle...

Kód: [Vybrat]
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcadecade

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3824    30716248+   7  HPFS/NTFS
/dev/sda2            3825       60801   457667752+   f  W95 Ext'd (LBA)
/dev/sda5            3825       60801   457667721    7  HPFS/NTFS

Disk /dev/sdb: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00076ff2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       77825   625129281    7  HPFS/NTFS

Disk /dev/sdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90459045

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           2       38913   312560640    f  W95 Ext'd (LBA)
/dev/sdc5               2       37405   300447598+   7  HPFS/NTFS
/dev/sdc6           37406       38621     9767488+  83  Linux
/dev/sdc7           38622       38913     2345458+  82  Linux swap / Solaris

moc diky za pomoc
Název: Re: grub 22 - klasika
Přispěvatel: truhlik 07 Dubna 2009, 14:06:16
A co je v /boot/grub/menu.lst ?
Název: Re: grub 22 - klasika
Přispěvatel: Marvn 07 Dubna 2009, 14:41:51
tohle sice neni moc odborna rada, ale ja jsem obdobnou vec resil pokus-omyl metodou...
tedy boot do grubu -> error -> 'e','e', zmenit (hd0,0) na (hd0,1), 'enter', 'b' -> a tak dal, dokud to nepojede. nacez editovat menu.lst a napsat tam tu funkcni variantu  8)
Název: Re: grub 22 - klasika
Přispěvatel: Martin Kiklhorn 08 Dubna 2009, 06:48:10
S K Jaunty jsem měl při síťové instalaci taky malý problémek - pouze jeden disk a v menu.lst mi nastavil na (hd1,..) namísto na (hd0,..)
Název: Re: grub 22 - klasika
Přispěvatel: starenka 08 Dubna 2009, 09:04:13
tohle sice neni moc odborna rada, ale ja jsem obdobnou vec resil pokus-omyl metodou...
tedy boot do grubu -> error -> 'e','e', zmenit (hd0,0) na (hd0,1), 'enter', 'b' -> a tak dal, dokud to nepojede. nacez editovat menu.lst a napsat tam tu funkcni variantu  8)
]
aha! ja nevedel, ze se da editovat i pri takovejhle chybe.. delal sem to jen kdyz uz byla spatne konkretni item v menu. No tak to super, protoze me fakt nebavi bootovat livecd opravit vec, co by to mohla bejt porad do kola...

menu tady
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=7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f

## 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 jaunty (development branch), kernel 2.6.28-11-generic
uuid 7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu jaunty (development branch), kernel 2.6.28-11-generic (recovery mode)
uuid 7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f ro  single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu jaunty (development branch), memtest86+
uuid 7b55e9fb-c8fb-4734-9e43-7e2d437ccc5f
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/sda1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

Název: Re: grub 22 - klasika
Přispěvatel: starenka 08 Dubna 2009, 09:15:33
no tak samozrejme to editovat primo v grubu nejde :(. Mozna jsem se spatne vyjadril, ale tu chybu nemam, kdyz odpalim polozku v menu, ale jeste pred tim, nez se menu nacte
Název: Re: grub 22 - klasika
Přispěvatel: GdH 08 Dubna 2009, 10:18:12
Nevím, jestli to je relevantní, ale měl jsem kdysi problém, který se vyskytl po odpojení pece od proudu. Stalo se to, že se mi v biosu přehodilo pořadí disků pro boot a dost nesmyslně se mi proházely partišny - jako že hdd 1,0 a 0,1 byly ve skutečnosti jeden fyzický disk. Navíc to bylo schopné se měnit, že to nebylo při každém bootu stejné.
Název: Re: grub 22 - klasika
Přispěvatel: Martin Kiklhorn 08 Dubna 2009, 10:54:45
idea - grub si vymýšlí pořadí disků

Žádné přímé řešení nedávám

kouknul bych sem
/boot/grub/device.map a do pořadí bootování v biosu

pročetl bych si stránky http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_12.html#SEC62 (http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_12.html#SEC62)
a http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_22.html#SEC116 (http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_22.html#SEC116)

a zkusil tam najít jak vnutit že root je (hd1,5) a ne (hd2,5) protože při bootu z disku jsou disky detekovány v jiném pořadí (IMHO) než při bootu z live.

Když bych chtěl zkoušet něco "trochu méně ruční práce":

Bootování do live otrava, tak bych bootoval z SGD (http://supergrub.forjamari.linex.org/) resp. zde (http://www.supergrubdisk.org/index.php?pid=5)
a pročetl si k tomu i nějakou hezkou dokumentaci  (http://users.bigpond.net.au/hermanzone/SuperGrubDiskPage.html)

edit: a možná se bude hodit i
http://www.abclinuxu.cz/poradna/linux/show/88470
a protože man o grubu moc nepoví:
http://www.gnu.org/software/grub/manual/html_node/
Název: Re: grub 22 - klasika
Přispěvatel: starenka 08 Dubna 2009, 11:14:56
kilkhorn: diky, prehazel jsem poradi disku v biosu podle device-map a fici to. DIKY MOC