Grub - Boot-Device

stradi

Active Member
Hallo,

wie sollte die menu.lst aussehen damit es funktioniert.

Ich weiss dass Grub die Platte so bennent:

hd [Platte], [Partition].


Bei mir siehts so aus:

Code:
# df -h 
Filesystem    Size      Used     Avail Capacity  Mounted on 
/dev/wd0a     497M       29M      443M     6%    / 
/dev/wd0f     2.9G       18M      2.7G     0%    /var 
/dev/wd0e      14G      1.2G       12G     9%    /usr 
/dev/wd0g      75G      2.0K       72G     0%    /home 
kernfs        1.0K      1.0K        0B   100%    /kern

Da es angeblich im Grub einen bug geben soll, habe ich auch meine root Partition auf 512 MB beschraengt.


Meine ganze menu.lst, genauso wie im how-to:

Code:
#Grub config file for NetBSD/xen. Copy as /grub/menu.lst and run 
# grub-install /dev/rwd0d (assuming your boot device is wd0). 
# 
# The default entry to load will be the first one 
default=0 

# boot after 10s the default entry if the user didn't hit keyboard 
timeout=10 

# Configure serial port to use as console. Ignore if you'll use VGA only 
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 

# Let the user select which console to use (serial or VGA), default 
# to serial after 10s 
terminal --timeout=10 serial console 

# An entry for NetBSD/xen, using /netbsd as the domain0 kernel, and serial 
# console. Domain0 will have 64MB RAM allocated. 
# Assume NetBSD is installed in the first MBR partition. 
title Xen 3.1 / NetBSD (hda0, serial) 
  root(hd0,0) 
  kernel (hd0,a)/xen.gz dom0_mem=131072 com1=115200,8n1 
  module (hd0,a)/netbsd root=/dev/wd0a  ro console=ttyS0 

# Same as above, but using VGA console 
# We can use console=tty0 (Linux syntax) or console=pc (NetBSD syntax) 
title Xen 3.1 / NetBSD (hda0, vga) 
  root(hd0,0) 
  kernel (hd0,a)/xen.gz dom0_mem=131072 
  module (hd0,a)/netbsd root=/dev/wd0a ro console=tty0 

# NetBSD/xen using a backup domain0 kernel (in case you installed a 
# nonworking kernel as /netbsd 
title Xen 3.1 / NetBSD (hda0, backup, serial) 
  root(hd0,0) 
  kernel (hd0,a)/xen.gz dom0_mem=131072 com1=115200,8n1 
  module (hd0,a)/netbsd.backup root=/dev/wd0a ro console=ttyS0 
title Xen 3.1 / NetBSD (hda0, backup, VGA) 
  root(hd0,0) 
  kernel (hd0,a)/xen.gz dom0_mem=131072 
 module (hd0,a)/netbsd.backup root=/dev/wd0a ro console=tty0 

#Load a regular NetBSD/i386 kernel. Can be useful if you end up with a 
#nonworking /xen.gz 
title NetBSD 4.0 
  root (hd0,a) 
  kernel --type=netbsd /netbsd-GENERIC 

#Load the NetBSD bootloader, letting it load the NetBSD/i386 kernel. 
#May be better than the above, as grub can't pass all required infos 
#to the NetBSD/i386 kernel (e.g. console, root device, ...) 
title NetBSD chain 
  root        (hd0,0) 
  chainloader +1 

## end of grub config file.

Meine frage ist ob der Pfad zum kernel (/dev/wd0a) richtig ist oder muss man da konsequent /dev/hda1 schreiben. Obwohl wenn ich es richtig verstanden habe sollte es in meinem Fall /dev/hda0 stehen, stimmt es?


Ich frage, weil ich beim ersten mal genauso wie im how-to gemacht habe und konnte schliesslich nicht boote, bekamm dann Error 1, nicht mal den backup kernel (Error 15).

MfG,
stardi
 
(hd0,0,a) muss es heißen wenn er die partition finden soll.
Wusste aber garnicht, dass grub die NetBSD kernel direkt laden kann...
 
(hd0,0,a) muss es heißen wenn er die partition finden soll.
Wusste aber garnicht, dass grub die NetBSD kernel direkt laden kann...

Also so:

Code:
root(hd0,0) 
  kernel (hd0,0,a)/xen.gz dom0_mem=131072 com1=115200,8n1 
  module (hd0,0,a)/netbsd root=/dev/hda1  ro console=ttyS0

aber wass ist dann hiermit root=/dev/hda1? sollte es nicht so sein root=/dev/wd0a


//
edit. ok GRUB versteht kein wd0.
Aber bie Grub fangen die Partitionen von 0 an, dann sollte die wd0a in Grub so aussehen hda0 (?!) oder was bedeutet bei hda1 die 1?

mfg,
stradi
 
Zuletzt bearbeitet:
Hab jetzt gerade kein Grub hier zum testen aber AFAIR kannst du immer die Grub-bezeichnungen nehmen also auch root=(hd0,0,a)

Das steht aber auch recht ausführlich in den Info-Seiten von grub, wenn ich mich richtig erinnere...
 
Hab jetzt gerade kein Grub hier zum testen aber AFAIR kannst du immer die Grub-bezeichnungen nehmen also auch root=(hd0,0,a)

Das steht aber auch recht ausführlich in den Info-Seiten von grub, wenn ich mich richtig erinnere...

root=/dev/hda1 ist eine Variable für den Linuxkernel und muß deshalb in Linux-Syntax formuliert sein.

Ich beschäftige mich seit 3Jahren nicht mehr mit *BSD.
Zumindest damals konnte man dem NetBSD-Kernel auf die Art nicht das
root-Device mitteilen, sondern man muß es in der config vor dem Compilieren
festlegen.
GRUB lädt den NetBSD-Kernel, der muß selbst wissen wer das root-Device ist.
 
Zurück
Oben