Die Auflösung der Konsole in Grub ändern (grub1; Debian ≤ 5)

-> Zurück zum Artikel: Die Auflösung der Konsole in Grub2 ändern

Um die Auflösung in Grub1 zu ändern muss die Konfigurationsdatei des Bootmanagers Grub (/boot/grub/menu.lst) modifiziert werden, damit man das Terminal in den Grafikmodus schalten kann.

Mit hwinfo --framebuffer können wir uns die verfügbaren Modis der Grafikkarte anzeigen lassen:

# hwinfo --framebuffer
02: None 00.0: 11001 VESA Framebuffer                           
  [Created at bios.450]
  Unique ID: rdCR.O3PgoQaqFo1
  Hardware Class: framebuffer
  Model: "VMware virtual machine"
  Vendor: "VMware, Inc"
  Device: "VMware virtual machine"
  SubVendor: "V M ware, Inc. VBE support 2.0"
  SubDevice: 
  Revision: "2.0"
  Memory Size: 62 MB + 512 kB
  Memory Range: 0xd0000000-0xd3e7ffff (rw)
  Mode 0x0300: 640x400 (+640), 8 bits
  Mode 0x0301: 640x480 (+640), 8 bits
  Mode 0x0303: 800x600 (+800), 8 bits
  Mode 0x0305: 1024x768 (+1024), 8 bits
  Mode 0x0307: 1280x1024 (+1280), 8 bits
  Mode 0x030e: 320x200 (+640), 16 bits
  Mode 0x0311: 640x480 (+1280), 16 bits
  Mode 0x0314: 800x600 (+1600), 16 bits
  Mode 0x0317: 1024x768 (+2048), 16 bits
  Mode 0x031a: 1280x1024 (+2560), 16 bits
  Mode 0x0320: 320x200 (+320), 8 bits
  .
  .
  .
  Config Status: cfg=new, avail=yes, need=no, active=unknown

(Ausgabe gekürzt, Auswahl gelb hinterlegt)

Anschließend stellen wir den gewünschten Wert in der menu.lst ein:
Dazu ergänzen wir die Zeile # kopt=root=/dev/sda1 ro mit vga=0x317:

/boot/grub/menu.lst

# 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-legacy-doc/.
 
   --- snip ---
 
# 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=/dev/sda1 ro vga=0×317
 
  --- snip ---

Anschliessend führen wir das update-grub-Kommando aus:

# update-grub 
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-686
Updating /boot/grub/menu.lst ... done

Die daraus resultierende menu.lst schauen wir uns noch einmal genauer an:

/boot/grub/menu.lst

# 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-legacy-doc/.
 
   --- snip ---
 
# 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=/dev/sda1 ro vga=0x317
 
  --- snip ---
 
## ## End Default Options ##
 
title		Debian GNU/Linux, kernel 2.6.26-2-686
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro vga=0x317 quiet
initrd		/boot/initrd.img-2.6.26-2-686
 
title		Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro vga=0x317 single
initrd		/boot/initrd.img-2.6.26-2-686
 
### END DEBIAN AUTOMAGIC KERNELS LIST

Die eigentlich relevanten Stellen sind die letzten kernel-Zeilen ohne #-Zeichen. Diese werden aber beim Ausführen von update-grub von den darüber stehenden Default-Options überschrieben. Deshalb habe ich den Eintrag nur in der kopt-Zeile (# kopt=root=/dev/sda1 ro vga=0x317) vorgenommen, so hat das finale update-grub-Kommando den vga-Wert aus den Defaults in die aktuelle Grub Bootkonfiguration geschrieben. Starten Sie abschließend Ihr System neu.

# reboot

Hinweis: Die Syntax der menu.lst unterscheidet sich von Version zu Version möglicherweise voneinander. Ggf ist die vga-Einstellung an anderer Stelle vorzunehmen. Auch der neue grub-pc bzw grub2 Bootloader wird völlig anders konfiguriert. Eine /boot/grub/menu.lst gibt es dort nicht mehr, dafür werden die Einstellungen in der /boot/grub/grub.conf vorgenommen. Zur Zeit der Erstellung dieses HowTos lag in der neuen grub-pc Konfiguration ein Bug vor, so das die vga- bzw gfxpayload-Einstellung möglicherweise ignoriert wird 1) Ich konnte das Problem an einer Testinstallation mit grub-pc nachstellen und arbeite noch an einer Lösung.

WikiSysop 2009/11/27 13:20

tux/conres_old.txt (9955 views) · Zuletzt geändert: 2011/04/17 00:40 von wikisysop
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0