|
|
|
@ -0,0 +1,548 @@
|
|
|
|
|
#/**
|
|
|
|
|
#@file BootLib.py
|
|
|
|
|
#@brief Librería o clase Boot
|
|
|
|
|
#@class Boot
|
|
|
|
|
#@brief Funciones para arranque y post-configuración de sistemas de archivos.
|
|
|
|
|
#@warning License: GNU GPLv3+
|
|
|
|
|
#*/
|
|
|
|
|
|
|
|
|
|
import ogGlobals
|
|
|
|
|
import SystemLib
|
|
|
|
|
import FileSystemLib
|
|
|
|
|
import RegistryLib
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBoot int_ndisk int_nfilesys [ NVRAMPERM ] [str_kernel str_initrd str_krnlparams]
|
|
|
|
|
#@brief Inicia el proceso de arranque de un sistema de archivos.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@param str_nvramperm UEFI: La entrada en la NVRAM se incluye en el orden de arranque (opcional)
|
|
|
|
|
#@param str_krnlparams parámetros de arranque del kernel (opcional)
|
|
|
|
|
#@return (activar el sistema de archivos).
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#@exception OG_ERR_NOTOS La partición no tiene instalado un sistema operativo.
|
|
|
|
|
#@note En Linux, si no se indican los parámetros de arranque se detectan de la opción por defecto del cargador GRUB.
|
|
|
|
|
#@note En Linux, debe arrancarse la partición del directorio \c /boot
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGetWindowsName int_ndisk int_nfilesys
|
|
|
|
|
#@brief Muestra el nombre del equipo en el registro de Windows.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@return str_name - nombre del equipo
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogLinuxBootParameters int_ndisk int_nfilesys
|
|
|
|
|
#@brief Muestra los parámetros de arranque de un sistema de archivos Linux.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@return str_kernel str_initrd str_parameters ...
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#@warning Función básica usada por \c ogBoot
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogSetWindowsName int_ndisk int_nfilesys str_name
|
|
|
|
|
#@brief Establece el nombre del equipo en el registro de Windows.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@param str_name nombre asignado
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#@exception OG_ERR_OUTOFLIMIT Nombre Netbios con más de 15 caracteres.
|
|
|
|
|
#*/ ##
|
|
|
|
|
def ogSetWindowsName (disk, par, name):
|
|
|
|
|
if len (name) > 15:
|
|
|
|
|
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_OUTOFLIMIT, f'"{name[0:15]}..."')
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
mntdir = FileSystemLib.ogMount (disk, par)
|
|
|
|
|
if not mntdir: return None
|
|
|
|
|
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\Control\ComputerName\ComputerName\ComputerName', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\Services\Tcpip\Parameters\Hostname', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\Services\Tcpip\Parameters\HostName', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\services\Tcpip\Parameters\Hostname', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\Services\Tcpip\Parameters\NV Hostname', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\Services\Tcpip\Parameters\NV HostName', name)
|
|
|
|
|
RegistryLib.ogSetRegistryValue (mntdir, 'system', r'\ControlSet001\services\Tcpip\Parameters\NV Hostname', name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogSetWinlogonUser int_ndisk int_npartition str_username
|
|
|
|
|
#@brief Establece el nombre de usuario por defecto en la entrada de Windows.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_npartition nº de orden de la partición
|
|
|
|
|
#@param str_username nombre de usuario por defecto
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootMbrXP int_ndisk
|
|
|
|
|
#@brief Genera un nuevo Master Boot Record en el disco duro indicado, compatible con los SO tipo Windows
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@return salida del programa my-sys
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootMbrGeneric int_ndisk
|
|
|
|
|
#@brief Genera un nuevo Codigo de arranque en el MBR del disco indicado, compatible con los SO tipo Windows, Linux.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@return salida del programa my-sys
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogFixBootSector int_ndisk int_parition
|
|
|
|
|
#@brief Corrige el boot sector de una particion activa para MS windows/dos -fat-ntfs
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_partition nº de particion
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGetBootMbr int_ndisk
|
|
|
|
|
#@brief Obtiene el contenido del sector de arranque de un disco.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@return str_MBR Descripción del contenido del MBR.
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Dispositivo de disco no encontrado.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogWindowsBootParameters int_ndisk int_parition
|
|
|
|
|
#@brief Configura el gestor de arranque de windows 7 / vista / XP / 2000
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_partition nº de particion
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogWindowsRegisterPartition int_ndisk int_partiton str_volume int_disk int_partition
|
|
|
|
|
#@brief Registra una partición en windows con un determinado volumen.
|
|
|
|
|
#@param int_ndisk nº de orden del disco a registrar
|
|
|
|
|
#@param int_partition nº de particion a registrar
|
|
|
|
|
#@param str_volumen volumen a resgistar
|
|
|
|
|
#@param int_ndisk_windows nº de orden del disco donde esta windows
|
|
|
|
|
#@param int_partition_windows nº de particion donde esta windows
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubInstallMbr int_disk_GRUBCFG int_partition_GRUBCFG
|
|
|
|
|
#@brief Instala el grub el el MBR del primer disco duro (FIRSTSTAGE). El fichero de configuración grub.cfg ubicado según parametros disk y part(SECONDSTAGE). Admite sistemas Windows.
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param bolean_Check_Os_installed_and_Configure_2ndStage true | false[default]
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubInstallPartition int_disk_SECONDSTAGE int_partition_SECONDSTAGE bolean_Check_Os_installed_and_Configure_2ndStage
|
|
|
|
|
#@brief Instala y actualiza el gestor grub en el bootsector de la particion indicada
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param bolean_Check_Os_installed_and_Configure_2ndStage true | false[default]
|
|
|
|
|
#@param str "kernel param "
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogConfigureFstab int_ndisk int_nfilesys
|
|
|
|
|
#@brief Configura el fstab según particiones existentes
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No se encuentra el fichero fstab a procesar.
|
|
|
|
|
#@warning Puede haber un error si hay más de 1 partición swap.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogSetLinuxName int_ndisk int_nfilesys [str_name]
|
|
|
|
|
#@brief Establece el nombre del equipo en los ficheros hostname y hosts.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@param str_name nombre asignado (opcional)
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#@note Si no se indica nombre, se asigna un valor por defecto.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogCleanLinuxDevices int_ndisk int_nfilesys
|
|
|
|
|
#@brief Limpia los dispositivos del equipo de referencia. Interfaz de red ...
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_nfilesys nº de orden del sistema de archivos
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubAddOgLive num_disk num_part [ timeout ] [ offline ]
|
|
|
|
|
#@brief Crea entrada de menu grub para ogclient, tomando como paramentros del kernel los actuales del cliente.
|
|
|
|
|
#@param 1 Numero de disco
|
|
|
|
|
#@param 2 Numero de particion
|
|
|
|
|
#@param 3 timeout Segundos de espera para iniciar el sistema operativo por defecto (opcional)
|
|
|
|
|
#@param 4 offline configura el modo offline [offline|online] (opcional)
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No existe kernel o initrd en cache.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No existe archivo de configuracion del grub.
|
|
|
|
|
# /// FIXME: Solo para el grub instalado en MBR por Opengnsys, ampliar para más casos.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubHidePartitions num_disk num_part
|
|
|
|
|
#@brief ver ogBootLoaderHidePartitions
|
|
|
|
|
#@see ogBootLoaderHidePartitions
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgHidePartitions num_disk num_part
|
|
|
|
|
#@brief ver ogBootLoaderHidePartitions
|
|
|
|
|
#@see ogBootLoaderHidePartitions
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderHidePartitions num_disk num_part
|
|
|
|
|
#@brief Configura el grub/burg para que oculte las particiones de windows que no se esten iniciando.
|
|
|
|
|
#@param 1 Numero de disco
|
|
|
|
|
#@param 2 Numero de particion
|
|
|
|
|
#@param 3 Numero de disco de la partición de datos (no ocultar)
|
|
|
|
|
#@param 4 Numero de particion de datos (no ocultar)
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception No existe archivo de configuracion del grub/burg.
|
|
|
|
|
#*/
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubDeleteEntry num_disk num_part num_disk_delete num_part_delete
|
|
|
|
|
#@brief ver ogBootLoaderDeleteEntry
|
|
|
|
|
#@see ogBootLoaderDeleteEntry
|
|
|
|
|
#*/
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgDeleteEntry num_disk num_part num_disk_delete num_part_delete
|
|
|
|
|
#@brief ver ogBootLoaderDeleteEntry
|
|
|
|
|
#@see ogBootLoaderDeleteEntry
|
|
|
|
|
#*/
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogRefindDeleteEntry num_disk_delete num_part_delete
|
|
|
|
|
#@brief ver ogBootLoaderDeleteEntry
|
|
|
|
|
#@see ogBootLoaderDeleteEntry
|
|
|
|
|
#*/
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderDeleteEntry num_disk num_part num_part_delete
|
|
|
|
|
#@brief Borra en el grub las entradas para el inicio en una particion.
|
|
|
|
|
#@param 1 Numero de disco donde esta el grub
|
|
|
|
|
#@param 2 Numero de particion donde esta el grub
|
|
|
|
|
#@param 3 Numero del disco del que borramos las entradas
|
|
|
|
|
#@param 4 Numero de la particion de la que borramos las entradas
|
|
|
|
|
#@note Tiene que ser llamada desde ogGrubDeleteEntry, ogBurgDeleteEntry o ogRefindDeleteEntry
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Use ogGrubDeleteEntry or ogBurgDeleteEntry.
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No existe archivo de configuracion del grub.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgInstallMbr int_disk_GRUBCFG int_partition_GRUBCFG
|
|
|
|
|
#@param bolean_Check_Os_installed_and_Configure_2ndStage true | false[default]
|
|
|
|
|
#@brief Instala y actualiza el gestor grub en el MBR del disco duro donde se encuentra el fichero grub.cfg. Admite sistemas Windows.
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param bolean_Check_Os_installed_and_Configure_2ndStage true | false[default]
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición no soportada
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubDefaultEntry int_disk_GRUGCFG int_partition_GRUBCFG int_disk_default_entry int_npartition_default_entry
|
|
|
|
|
#@brief ver ogBootLoaderDefaultEntry
|
|
|
|
|
#@see ogBootLoaderDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgDefaultEntry int_disk_BURGCFG int_partition_BURGCFG int_disk_default_entry int_npartition_default_entry
|
|
|
|
|
#@brief ver ogBootLoaderDefaultEntry
|
|
|
|
|
#@see ogBootLoaderDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogRefindDefaultEntry int_disk_default_entry int_npartition_default_entry
|
|
|
|
|
#@brief ver ogBootLoaderDefaultEntry
|
|
|
|
|
#@see ogBootLoaderDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderDefaultEntry int_disk_CFG int_partition_CFG int_disk_default_entry int_npartition_default_entry
|
|
|
|
|
#@brief Configura la entrada por defecto de Burg
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param int_disk_default_entry
|
|
|
|
|
#@param int_part_default_entry
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_OUTOFLIMIT Param $3 no es entero.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubOgliveDefaultEntry num_disk num_part
|
|
|
|
|
#@brief ver ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#@see ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgOgliveDefaultEntry num_disk num_part
|
|
|
|
|
#@brief ver ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#@see ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogRefindOgliveDefaultEntry
|
|
|
|
|
#@brief ver ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#@see ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderOgliveDefaultEntry
|
|
|
|
|
#@brief Configura la entrada de ogLive como la entrada por defecto de Burg.
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: burg.cfg.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Entrada de OgLive no encontrada en burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubSecurity int_disk_GRUBCFG int_partition_GRUBCFG [user] [password]
|
|
|
|
|
#@brief Configura grub.cfg para que sólo permita editar entrada o acceder a línea de comandos al usuario especificado
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param user (default root)
|
|
|
|
|
#@param password (default "", no puede entrar)
|
|
|
|
|
#@return (nada)
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No encuentra archivo de configuración del grub.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubSetTheme num_disk num_part str_theme
|
|
|
|
|
#@brief ver ogBootLoaderSetTheme
|
|
|
|
|
#@see ogBootLoaderSetTheme
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgSetTheme num_disk num_part str_theme
|
|
|
|
|
#@brief ver ogBootLoaderSetTheme
|
|
|
|
|
#@see ogBootLoaderSetTheme
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogRefindSetTheme str_theme
|
|
|
|
|
#@brief ver ogBootLoaderSetTheme
|
|
|
|
|
#@see ogBootLoaderSetTheme
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderSetTheme
|
|
|
|
|
#@brief asigna un tema al BURG
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param str_theme_name
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: grub.cfg burg.cfg refind.conf.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Entrada deltema no encontrada en burg.cfg.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración del tema no encontrado: theme.conf (sólo refind).
|
|
|
|
|
#@note El tema debe situarse en OGLIB/BOOTLOADER/themes
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubSetAdminKeys num_disk num_part str_theme
|
|
|
|
|
#@brief ver ogBootLoaderSetTheme
|
|
|
|
|
#@see ogBootLoaderSetTheme
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgSetAdminKeys num_disk num_part str_bolean
|
|
|
|
|
#@brief ver ogBootLoaderSetAdminKeys
|
|
|
|
|
#@see ogBootLoaderSetAdminKeys
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderSetAdminKeys
|
|
|
|
|
#@brief Activa/Desactica las teclas de administracion
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param Boolean TRUE/FALSE
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: grub.cfg burg.cfg.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Entrada deltema no encontrada en burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubSetTimeOut num_disk num_part int_timeout_seconds
|
|
|
|
|
#@brief ver ogBootLoaderSetTimeOut
|
|
|
|
|
#@see ogBootLoaderSetTimeOut
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgSetTimeOut num_disk num_part str_bolean
|
|
|
|
|
#@brief ver ogBootLoaderSetTimeOut
|
|
|
|
|
#@see ogBootLoaderSetTimeOut
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogRefindSetTimeOut int_timeout_second
|
|
|
|
|
#@brief ver ogBootLoaderSetTimeOut
|
|
|
|
|
#@see ogBootLoaderSetTimeOut
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderSetTimeOut
|
|
|
|
|
#@brief Define el tiempo (segundos) que se muestran las opciones de inicio
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param int_timeout_seconds
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: grub.cfg burg.cfg.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Entrada deltema no encontrada en burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrubSetResolution num_disk num_part int_resolution
|
|
|
|
|
#@brief ver ogBootLoaderSetResolution
|
|
|
|
|
#@see ogBootLoaderSetResolution
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBurgSetResolution num_disk num_part str_bolean
|
|
|
|
|
#@brief ver ogBootLoaderSetResolution
|
|
|
|
|
#@see ogBootLoaderSetResolution
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderSetResolution
|
|
|
|
|
#@brief Define la resolucion que usuara el thema del gestor de arranque
|
|
|
|
|
#@param int_disk_SecondStage
|
|
|
|
|
#@param int_part_SecondStage
|
|
|
|
|
#@param str_resolution (Opcional)
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: grub.cfg burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogBootLoaderSetResolution
|
|
|
|
|
#@brief Define la resolucion que usuara el thema del gestor de arranque
|
|
|
|
|
#@param int_resolution1
|
|
|
|
|
#@param int_resolution2 (Opcional)
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_PARTITION Partición errónea o desconocida (ogMount).
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Fichero de configuración no encontrado: grub.cfg burg.cfg.
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
# ogRefindInstall bool_autoconfig
|
|
|
|
|
#@brief Instala y actualiza el gestor rEFInd en la particion EFI
|
|
|
|
|
#@param bolean_Check__auto_config true | false[default]
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No se encuentra la partición ESP.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No se encuentra shimx64.efi.signed.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND No se encuentra refind-install o refind en OGLIB
|
|
|
|
|
#@exception OG_ERR_PARTITION No se puede montar la partición ESP.
|
|
|
|
|
#@note Refind debe estar instalado en el ogLive o compartido en OGLIB
|
|
|
|
|
#*/ ##
|
|
|
|
|
|
|
|
|
|
#/**
|
|
|
|
|
# ogGrub4dosInstallMbr int_ndisk
|
|
|
|
|
#@brief Genera un nuevo Codigo de arranque en el MBR del disco indicado, compatible con los SO tipo Windows, Linux.
|
|
|
|
|
#@param int_ndisk nº de orden del disco
|
|
|
|
|
#@param int_ndisk nº de orden del particion
|
|
|
|
|
#@return
|
|
|
|
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
|
|
|
|
#@exception OG_ERR_NOTFOUND Tipo de partición desconocido o no se puede montar.
|
|
|
|
|
#@exception OG_ERR_NOTBIOS Equipo no firmware BIOS legacy
|
|
|
|
|
#@exception OG_ERR_NOMSDOS Disco duro no particioniado en modo msdos
|
|
|
|
|
#@exception OG_ERR_NOTWRITE Particion no modificable.
|
|
|
|
|
#*/ ##
|