918-git-images-111dconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change
on this file since 7f83dcb was
927f98c,
checked in by Irina Gómez <irinagomez@…>, 3 years ago
|
#1066 #1011 Fix the error when Windows is hibernated. "Error code 6" was displayed in the boot menu.
|
-
Property mode set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Script de ejemplo para arancar un sistema operativo instalado. |
---|
3 | # Nota: se usa como base para el programa de arranque de OpenGnsys Admin. |
---|
4 | |
---|
5 | PROG="$(basename $0)" |
---|
6 | if [ $# -lt 2 -o $# -gt 3 ]; then |
---|
7 | ogRaiseError $OG_ERR_FORMAT "Formato: $PROG ndisco nfilesys [str_kernel str_initrd str_kernelparams]" |
---|
8 | exit $? |
---|
9 | fi |
---|
10 | |
---|
11 | # Comprobar errores. |
---|
12 | PART=$(ogDiskToDev "$1" "$2") || exit $? |
---|
13 | MNTDIR=$(ogMount $1 $2) || exit $? |
---|
14 | |
---|
15 | echo "[0] Inicio del proceso de arranque." |
---|
16 | |
---|
17 | # Si el equipo está hibernado chequeamos el f.s. y borramos el hiberfile (error cod.6) |
---|
18 | mount |grep -q "$MNTDIR.*(rw" |
---|
19 | if [ $? -ne 0 ]; then |
---|
20 | ogEcho log session "${MSG_WARNING}: $MSG_MOUNTREADONLY" |
---|
21 | ogUnmount $1 $2 |
---|
22 | ogCheckFs $1 $2 |
---|
23 | |
---|
24 | PART=$(ogDiskToDev "$1" "$2") |
---|
25 | mkdir -p $MNTDIR |
---|
26 | ntfs-3g -o remove_hiberfile $PART $MNTDIR |
---|
27 | ogEcho log session "Particion desbloqueada" |
---|
28 | |
---|
29 | ogUnmount $1 $2 |
---|
30 | ogMount $1 $2 |
---|
31 | fi |
---|
32 | |
---|
33 | |
---|
34 | if which bootOsCustom &>/dev/null; then |
---|
35 | echo "[10] Configuración personalizada del inicio." |
---|
36 | bootOsCustom $@ |
---|
37 | fi |
---|
38 | |
---|
39 | echo "[70] Desmontar todos los sistemas de archivos." |
---|
40 | sync |
---|
41 | for (( i=1; i <= $(ogDiskToDev | wc -w); i++ )); do |
---|
42 | ogUnmountAll $i &>/dev/null |
---|
43 | done |
---|
44 | echo "[80] Desmontar cache local." |
---|
45 | ogUnmountCache |
---|
46 | echo "[90] Arrancar sistema operativo." |
---|
47 | ogBoot "$@" |
---|
Note: See
TracBrowser
for help on using the repository browser.