Autor Téma: zakazani framebufferu pro debian installer  (Přečteno 2161 krát)

Offline nettezzaumana

  • Začátečník
  • **
  • Příspěvků: 43
  • skill :: LoLíííííkkk
    • Zobrazit profil
zakazani framebufferu pro debian installer
« kdy: 28. 06. 2010, 16:31:46 »
zdar,

jak se prosim zakaze framebuffer device pomoci kernel parametru pro debiani installer ?? zkousel jsem nejdriv guglit, potom generic options jak je znam z jinejch dister (nofb, video=nofb, apod), potom nadavat a otravovat na freenode.net v #debian, ale nikdo nevi ..

potrebuju nastartovat virtualni masinu s debianem v xenu s nasledujici konfiguraci:

Kód: (debian-xen.cfg) [Vybrat]
#  -*- mode: python; -*-

## base vars
name = "web-xen_lenny"
memory = 256
maxmem = 256
vcpus = 1
localtime=0
keymap="en-us"
builder="linux"

## vm actions
on_poweroff="destroy"
on_reboot="destroy"
on_crash="destroy"

## devices
vif = ['bridge=xenbr0']
disk = ['phy:/dev/sdb8,xvda,w']
vfb = [ 'type=vnc,vncdisplay=11,vnclisten=0.0.0.0' ]

#########################################################################################
### Debian Installer specific variables

# Debian Installer specific variables

def check_bool(name, value):
    value = str(value).lower()
    if value in ('t', 'tr', 'tru', 'true'):
        return True
    return False

global var_check_with_default
def var_check_with_default(default, var, val):
    if val:
        return val
    return default

xm_vars.var('install', use='Install Debian, default: false', check=check_bool)
xm_vars.var("install-method",
            use='Installation method to use "cdrom" or "network" (default: network)',
            check=lambda var, val: var_check_with_default('network', var, val))

# install-method == "network"
xm_vars.var("install-mirror",
            use='Debian mirror to install from (default: http://ftp.debian.org/debian)',
            check=lambda var, val: var_check_with_default('http://ftp.debian.org/debian', var, val))
xm_vars.var("install-suite",
            use='Debian suite to install (default: squeeze)',
            check=lambda var, val: var_check_with_default('squeeze', var, val))

# install-method == "cdrom"
xm_vars.var("install-media",
            use='Installation media to use (default: None)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-cdrom-device",
            use='Installation media to use (default: xvdd)',
            check=lambda var, val: var_check_with_default('xvdd', var, val))

# Common options
xm_vars.var("install-arch",
            use='Debian mirror to install from (default: i386)',
            check=lambda var, val: var_check_with_default('i386', var, val))
xm_vars.var("install-extra",
            use='Extra command line options (default: None)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-installer",
            use='Debian installer to use (default: network uses install-mirror; cdrom uses /install.ARCH)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-kernel",
            use='Debian installer kernel to use (default: uses install-installer)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-ramdisk",
            use='Debian installer ramdisk to use (default: uses install-installer)',
            check=lambda var, val: var_check_with_default(None, var, val))

xm_vars.check()

if not xm_vars.env.get('install'):
    bootloader="pygrub"
elif xm_vars.env['install-method'] == "network":
    import os.path
    print "Install Mirror: %s" % xm_vars.env['install-mirror']
    print "Install Suite: %s" % xm_vars.env['install-suite']
    if xm_vars.env['install-installer']:
        installer = xm_vars.env['install-installer']
    else:
        installer = xm_vars.env['install-mirror']+"/dists/"+xm_vars.env['install-suite'] + \
                    "/main/installer-"+xm_vars.env['install-arch']+"/current/images"
    print "Installer: %s" % installer

    print
    print "WARNING: Installer kernel and ramdisk are not authenticated."
    print

    if xm_vars.env.get('install-kernel'):
        kernelurl = xm_vars.env['install-kernel']
    else:
        kernelurl = installer + "/netboot/xen/vmlinuz"

    if xm_vars.env.get('install-ramdisk'):
        ramdiskurl = xm_vars.env['install-ramdisk']
    else:
        ramdiskurl = installer + "/netboot/xen/initrd.gz"

    import urllib
    class MyUrlOpener(urllib.FancyURLopener):
        def http_error_default(self, req, fp, code, msg, hdrs):
            raise IOError("%s %s" % (code, msg))
    urlopener = MyUrlOpener()

    try:
        print "Fetching %s" % kernelurl
        kernel, _ = urlopener.retrieve(kernelurl)
        print "Fetching %s" % ramdiskurl
        ramdisk, _ = urlopener.retrieve(ramdiskurl)
    except IOError, _:
        raise

elif xm_vars.env['install-method'] == "cdrom":
    arch_path = { 'i386': "/install.386",
                  'amd64': "/install.amd" }

    if xm_vars.env['install-media']:
        print "Install Media: %s" % xm_vars.env['install-media']
    else:
        raise OptionError("No installation media given.")

    if xm_vars.env['install-installer']:
        installer = xm_vars.env['install-installer']
    else:
        installer = arch_path[xm_vars.env['install-arch']]

    print "Installer: %s" % installer

    if xm_vars.env.get('install-kernel'):
        kernelpath = xm_vars.env['install-kernel']
    else:
        kernelpath = installer + "/xen/vmlinuz"

    if xm_vars.env.get('install-ramdisk'):
        ramdiskpath = xm_vars.env['install-ramdisk']
    else:
        ramdiskpath = installer + "/xen/initrd.gz"

    disk.insert(0, 'file:%s,%s:cdrom,r' % (xm_vars.env['install-media'],
                                           xm_vars.env['install-cdrom-device']))

    bootloader="pygrub"
    bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath)
    print "From CD"
else:
    print "WARNING: Unknown install-method: %s." % xm_vars.env['install-method']

if xm_vars.env.get('install'):
    # Figure out command line
    if xm_vars.env['install-extra']:
        extras=[xm_vars.env['install-extra']]
    else:
        extras=[]

    # Reboot will just restart the installer since this file is not
    # reparsed, so halt and restart that way.
    extras.append("debian-installer/exit/always_halt=true")
    extras.append("--")
    extras.append("quiet")

    console="hvc0"
    try:
        if len(vfb) >= 1:
            console="tty0"
    except NameError, e:
        pass

    extras.append("console="+ console)

    extra = str.join(" ", extras)
    print "command line is \"%s\"" % extra

coz delam pomoci prikazu:

Kód: [Vybrat]
# xm create xm-debian.cfg install=true install-method=network install-arch=i386 install-suite=lenny install-mirror=http://ftp.cz.debian.org/debian/ install-kernel=/var/xen/boot/vmlinuz-lenny install-ramdisk=/var/xen/boot/initrd-lenny install-extra=" nofb "
Using config file "./xm-debian.cfg".
Install Mirror: http://ftp.cz.debian.org/debian/
Install Suite: lenny
Installer: http://ftp.cz.debian.org/debian//dists/lenny/main/installer-i386/current/images

WARNING: Installer kernel and ramdisk are not authenticated.

Fetching /var/xen/boot/vmlinuz-lenny
Fetching /var/xen/boot/initrd-lenny
command line is "nofb debian-installer/exit/always_halt=true -- quiet console=tty0"
Started domain debian_lenny (id=25)

^^ v prikladu vyse je videt marny pokus s volbou nofb v install-extra (command line is "nofb debian-installer/exit/always_halt=true -- quiet console=tty0")

proste to furt startuje v grafice .. pokud udelam `xm create -c debian-xen.cfg $blabla`, a mam zakomentovanej ^vfb, tak to samozrejme me to samozrejme hodi po startu VM na /dev/tty0 coz mi ale desive nevyhovuje, protoze tu konzoli potrebuju mit extra ..

shrnuti: jak zakazat pomoci kernel parametru aby se nevytvarela framebuffer device a nebo popripade aby installer bezel v ncurses modu.

diky a zdar

Offline nettezzaumana

  • Začátečník
  • **
  • Příspěvků: 43
  • skill :: LoLíííííkkk
    • Zobrazit profil
Re: zakazani framebufferu pro debian installer
« Odpověď #1 kdy: 28. 06. 2010, 16:41:07 »
vyreseno, parametr: DEBIAN_FRONTEND=newt