summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradv <adv@uma.es>2011-05-29 23:54:35 +0000
committeradv <adv@uma.es>2011-05-29 23:54:35 +0000
commit971c33f8948cbe5f4f6597b5b6a190eda310aea0 (patch)
treefadac1805b587ebfcd85872056df6994f4387a8e
parentafeb76bd3976005d9ba52f715d584e958a5cfc41 (diff)
version 1.0.2 #404 acceso al sistema root en arranques usb, cd, particion cache
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2045 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r--client/boot-tools/clientstructure/etc/initramfs-tools/scripts/ogfunctions23
-rw-r--r--client/boot-tools/kernelParameterOG.es.txt5
-rw-r--r--client/boot-tools/ogClientManager.lib21
3 files changed, 35 insertions, 14 deletions
diff --git a/client/boot-tools/clientstructure/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/clientstructure/etc/initramfs-tools/scripts/ogfunctions
index 11f9478f..ec018789 100644
--- a/client/boot-tools/clientstructure/etc/initramfs-tools/scripts/ogfunctions
+++ b/client/boot-tools/clientstructure/etc/initramfs-tools/scripts/ogfunctions
@@ -99,10 +99,12 @@ ogPostConfigureFS()
echo "localnet $NETIP" >> /etc/networks
#route
- #enlace si iniciamos desde cdrom
- # el cdrom lo monta en /opt/og2fs/tftpboot
- # y el sistema root sqfs en /opt/og2fs/2ndfs
- [ "$ogprotocol" == "cdrom" ] && ln -s /opt/og2fs/2ndfs/opt/opengnsys/* /opt/opengnsys/
+ #enlace si iniciamos desde ogprotocolo=local { cdrom, usb, cache } .
+ # monta el raiz del dispositivo local en /opt/og2fs/tftpboot - acceso al fichero .sqfs
+ # y monta el sistema root sqfs en /opt/og2fs/2ndfs
+ [ "$LOCALMEDIA" == "CACHE" ] && ln -s /opt/og2fs/tftpboot /opt/opengnsys/cache
+ [ "$ogprotocol" == "local" ] && ln -s /opt/og2fs/2ndfs/opt/opengnsys/* /opt/opengnsys/
+
}
@@ -149,10 +151,15 @@ else
fi
case "$ogprotocol" in
- cdrom)
- echo "Montar imagen de CD-ROM"
- blkid /dev/s*
- mount -t iso9660 LABEL=ogClient $LOCALROOTBOOT
+ local)
+ echo "Montar imagen del sistema root desde dispositivo local"
+ for i in $(blkid /dev/s* | grep ogClient | awk -F: '{print $2}' | tr -d \"); do export $i; done
+ mount -t $TYPE LABEL=$LABEL $LOCALROOTBOOT
+ if [ $? != 0 ]
+ then
+ mount -t reiserfs LABEL=CACHE $LOCALROOTBOOT
+ export LOCALMEDIA=CACHE
+ fi
;;
httfs)
echo "protocolo httfs aun no soportado"
diff --git a/client/boot-tools/kernelParameterOG.es.txt b/client/boot-tools/kernelParameterOG.es.txt
index 4ec96c8a..66d7fcfa 100644
--- a/client/boot-tools/kernelParameterOG.es.txt
+++ b/client/boot-tools/kernelParameterOG.es.txt
@@ -28,7 +28,10 @@ ip=
og2nd=sqfs|img
#protocolo de acceso al og2nd.
- ogprotocol=smb|nfs
+ ogprotocol=smb|nfs|local
+ #local para cdrom, usb a partir de la iso. labelparticionusbUNETBOOTIN=ogClient
+ #loacl tambien para fichero.sqfs en cache.
+
# modo de funcionalidad del browser con shell root activa.
ogactiveadmin=true|false
diff --git a/client/boot-tools/ogClientManager.lib b/client/boot-tools/ogClientManager.lib
index 3241eef2..9f56ec4a 100644
--- a/client/boot-tools/ogClientManager.lib
+++ b/client/boot-tools/ogClientManager.lib
@@ -388,6 +388,7 @@ rm /tmp/id_dsa.pub
function ogCrearISO {
apt-get install syslinux genisoimage
+#TODO: deb http://free.nchc.org.tw/drbl-core drbl stable
#apt-get install gpxe
mkdir -p /tmp/iso/isolinux
#cd tmp/iso/
@@ -403,7 +404,7 @@ DEFAULT menu.c32
PROMPT 0
ALLOWOPTIONS 1
-MENU TITLE FuTuR3 Live Collection
+MENU TITLE OpenGnsys 1.0.1 v00
LABEL gpxe
MENU LABEL gpxe
@@ -423,22 +424,22 @@ APPEND initrd=/clonezilla/live/initrd1.img boot=live union=aufs noswap vga=788 i
LABEL 0
MENU LABEL ogClient vga irqpool acpi ogdebug ip:none
KERNEL /ogclient/linuxISO
-APPEND initrd=/ogclient/oginitrd.img ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=cdrom ogactiveadmin=true ogdebug=true ip=none
+APPEND initrd=/ogclient/oginitrd.img ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=true ip=none
LABEL 1
MENU LABEL ogClient irqpoll acpi ip:none
KERNEL /ogclient/linuxISO
-APPEND initrd=/ogclient/oginitrd.img ro irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=cdrom ogactiveadmin=true ogdebug=false ip=none
+APPEND initrd=/ogclient/oginitrd.img ro irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=false ip=none
LABEL 2
MENU LABEL ogClient acpi debug ip=dhcp
KERNEL /ogclient/linuxISO
-APPEND initrd=/ogclient/oginitrd.img ro acpi=on boot=oginit og2nd=sqfs ogprotocol=cdrom ogactiveadmin=true ogdebug=true ip=dhcp
+APPEND initrd=/ogclient/oginitrd.img ro acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=true ip=dhcp
LABEL 3
MENU LABEL ogClient ip=dhcp
KERNEL /ogclient/linuxISO
-APPEND initrd=/ogclient/oginitrd.img ro acpi=off boot=oginit og2nd=sqfs ogprotocol=cdrom ogactiveadmin=true ogdebug=false ip=dhcp
+APPEND initrd=/ogclient/oginitrd.img ro acpi=off boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=false ip=dhcp
#LABEL ogclient
@@ -473,6 +474,15 @@ FIN
#### /tmp/iso#
mkisofs -V ogClient -o ogClient.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -J -no-emul-boot -boot-load-size 4 -boot-info-table tmp/iso
+### vi /etc/grub.d/40_custom
+##
+#menuentry "og cache " {
+#set root=(hd0,4)
+#linux /ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=true ip=none
+#initrd /oginitrd.img
+#}
+
+
}
function ogprobarISO {
@@ -485,6 +495,7 @@ qemu -m 256 -boot d -cdrom ogClient.iso
+
ogClientConfpxe()
{
################## DEJAMOS FICHERO DE EJEMPLOS PARA: