|
From: <cod...@go...> - 2009-05-01 22:09:22
|
Author: M0...@gm...
Date: Fri May 1 13:34:06 2009
New Revision: 541
Modified:
branches/speedy/.lang/.pot
branches/speedy/.lang/Conf0.pot
branches/speedy/.lang/MdlBootMngr.pot
branches/speedy/.project
branches/speedy/Conf0.class
branches/speedy/Conf0.form
branches/speedy/MdlBootMngr.module
Log:
- Completed lilo setup window
-- Ready for testing
Modified: branches/speedy/.lang/.pot
==============================================================================
--- branches/speedy/.lang/.pot (original)
+++ branches/speedy/.lang/.pot Fri May 1 13:34:06 2009
@@ -54,102 +54,102 @@
msgid "Bootsplash Extra High"
msgstr ""
-#: Conf0.class:336 Step1.class:433 Step3a1.class:22 Step3a1a.class:186
+#: Conf0.class:337 Step1.class:433 Step3a1.class:22 Step3a1a.class:186
#: Step7a.class:143
msgid "WARNING:"
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "Selecting this option will bypass your boot manager configuration."
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid ""
"You may not be able to start your VectorLinux installation. Do not
choose "
"this option"
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "unless you are fully aware of what you are doing."
msgstr ""
-#: Conf0.class:406
+#: Conf0.class:407
msgid "Unable to find boot arguments for OS in"
msgstr ""
-#: Conf0.class:413
+#: Conf0.class:414
msgid "Offer"
msgstr ""
-#: Conf0.class:413
+#: Conf0.class:414
msgid "as a bootable choice"
msgstr ""
-#: Conf0.class:449
+#: Conf0.class:450
msgid "Title"
msgstr ""
-#: Conf0.class:471
+#: Conf0.class:472
msgid "Initial RAM Disk"
msgstr ""
-#: Conf0.class:527
+#: Conf0.class:528
msgid "Include this Operating System in boot menu"
msgstr ""
-#: Conf0.class:536
+#: Conf0.class:537
msgid "Boot this operating system by default"
msgstr ""
-#: Conf0.class:628
+#: Conf0.class:646
msgid "System Bootloader Configuration"
msgstr ""
-#: Conf0.class:644
+#: Conf0.class:662
msgid "Select system boot manager to use"
msgstr ""
-#: Conf0.class:653
+#: Conf0.class:671
msgid "LILO"
msgstr ""
-#: Conf0.class:660
+#: Conf0.class:678
msgid "GRUB"
msgstr ""
-#: Conf0.class:666
+#: Conf0.class:684
msgid "NONE"
msgstr ""
-#: Conf0.class:675
+#: Conf0.class:693
msgid "Boot Menu Options"
msgstr ""
-#: Conf0.class:685
+#: Conf0.class:703
msgid "Target"
msgstr ""
-#: Conf0.class:697
+#: Conf0.class:715
msgid "Video Resolution"
msgstr ""
-#: Conf0.class:716
+#: Conf0.class:734
msgid "Prompt Time Out"
msgstr ""
-#: Conf0.class:727
+#: Conf0.class:745
msgid "Seconds"
msgstr ""
-#: Conf0.class:734
+#: Conf0.class:752
msgid "Boot Default"
msgstr ""
-#: Conf0.class:754
+#: Conf0.class:775
msgid "DETECTED OPERATING SYSTEMS."
msgstr ""
-#: Conf0.class:770
+#: Conf0.class:791
msgid "Tab 0"
msgstr ""
@@ -568,23 +568,23 @@
msgid "Bootsector of"
msgstr ""
-#: MdlBootMngr.module:586
+#: MdlBootMngr.module:587
msgid "You must select one operating system to be started by default"
msgstr ""
-#: MdlBootMngr.module:589
+#: MdlBootMngr.module:591
msgid ""
"Check this box to make this your default operating system, or select
another "
"tab."
msgstr ""
-#: MdlBootMngr.module:597
+#: MdlBootMngr.module:599
msgid ""
"Found duplicate operating system names. Please use unique labels for
each "
"menu entry"
msgstr ""
-#: MdlBootMngr.module:600
+#: MdlBootMngr.module:602
msgid "Check these boxes to make sure they have unique names"
msgstr ""
Modified: branches/speedy/.lang/Conf0.pot
==============================================================================
--- branches/speedy/.lang/Conf0.pot (original)
+++ branches/speedy/.lang/Conf0.pot Fri May 1 13:34:06 2009
@@ -54,99 +54,99 @@
msgid "Bootsplash Extra High"
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "WARNING:"
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "Selecting this option will bypass your boot manager configuration."
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "You may not be able to start your VectorLinux installation. Do not
choose this option"
msgstr ""
-#: Conf0.class:336
+#: Conf0.class:337
msgid "unless you are fully aware of what you are doing."
msgstr ""
-#: Conf0.class:406
+#: Conf0.class:407
msgid "Unable to find boot arguments for OS in"
msgstr ""
-#: Conf0.class:413
+#: Conf0.class:414
msgid "Offer"
msgstr ""
-#: Conf0.class:413
+#: Conf0.class:414
msgid "as a bootable choice"
msgstr ""
-#: Conf0.class:449
+#: Conf0.class:450
msgid "Title"
msgstr ""
-#: Conf0.class:471
+#: Conf0.class:472
msgid "Initial RAM Disk"
msgstr ""
-#: Conf0.class:527
+#: Conf0.class:528
msgid "Include this Operating System in boot menu"
msgstr ""
-#: Conf0.class:536
+#: Conf0.class:537
msgid "Boot this operating system by default"
msgstr ""
-#: Conf0.class:628
+#: Conf0.class:646
msgid "System Bootloader Configuration"
msgstr ""
-#: Conf0.class:644
+#: Conf0.class:662
msgid "Select system boot manager to use"
msgstr ""
-#: Conf0.class:653
+#: Conf0.class:671
msgid "LILO"
msgstr ""
-#: Conf0.class:660
+#: Conf0.class:678
msgid "GRUB"
msgstr ""
-#: Conf0.class:666
+#: Conf0.class:684
msgid "NONE"
msgstr ""
-#: Conf0.class:675
+#: Conf0.class:693
msgid "Boot Menu Options"
msgstr ""
-#: Conf0.class:685
+#: Conf0.class:703
msgid "Target"
msgstr ""
-#: Conf0.class:697
+#: Conf0.class:715
msgid "Video Resolution"
msgstr ""
-#: Conf0.class:716
+#: Conf0.class:734
msgid "Prompt Time Out"
msgstr ""
-#: Conf0.class:727
+#: Conf0.class:745
msgid "Seconds"
msgstr ""
-#: Conf0.class:734
+#: Conf0.class:752
msgid "Boot Default"
msgstr ""
-#: Conf0.class:754
+#: Conf0.class:775
msgid "DETECTED OPERATING SYSTEMS."
msgstr ""
-#: Conf0.class:770
+#: Conf0.class:791
msgid "Tab 0"
msgstr ""
Modified: branches/speedy/.lang/MdlBootMngr.pot
==============================================================================
--- branches/speedy/.lang/MdlBootMngr.pot (original)
+++ branches/speedy/.lang/MdlBootMngr.pot Fri May 1 13:34:06 2009
@@ -54,19 +54,19 @@
msgid "Bootsector of"
msgstr ""
-#: MdlBootMngr.module:586
+#: MdlBootMngr.module:587
msgid "You must select one operating system to be started by default"
msgstr ""
-#: MdlBootMngr.module:589
+#: MdlBootMngr.module:591
msgid "Check this box to make this your default operating system, or
select another tab."
msgstr ""
-#: MdlBootMngr.module:597
+#: MdlBootMngr.module:599
msgid "Found duplicate operating system names. Please use unique labels
for each menu entry"
msgstr ""
-#: MdlBootMngr.module:600
+#: MdlBootMngr.module:602
msgid "Check these boxes to make sure they have unique names"
msgstr ""
Modified: branches/speedy/.project
==============================================================================
--- branches/speedy/.project (original)
+++ branches/speedy/.project Fri May 1 13:34:06 2009
@@ -1,7 +1,7 @@
# Gambas Project File 2.0
# Compiled with Gambas 2.12
Title=VectorLinux Installer
-Startup=Conf0
+Startup=MdlStartUp
Version=0.0.2
Library=gb.gtk
Library=gb.form
Modified: branches/speedy/Conf0.class
==============================================================================
--- branches/speedy/Conf0.class (original)
+++ branches/speedy/Conf0.class Fri May 1 13:34:06 2009
@@ -231,6 +231,7 @@
MdlBootMngr.Display_Bootmanager_Target_Options(ME.cbTarget)
ME.PROBE_SYSTEM_FOR_OS("lilo")
+ ME.Timer1.Enabled = TRUE
END
@@ -241,7 +242,21 @@
END
PUBLIC SUB OnExit()
-
+ IF MdlBootMngr.CHECK_LILO_VALUES(FALSE) > 0 THEN
+ RETURN
+ STOP EVENT
+ END IF
+ MdlBootMngr.GENERATE_LILO_HEADER()
+ MdlBootMngr.GENERATE_LILO_OS_LIST()
+ ' after that's done, we need to run lilo. The config file has already
been saved to /mnt/target/etc/lilo.conf
+ IF Exist(ClsGlobal.sTargetPath &/ "etc" &/ "lilo.conf") THEN
+ MdlBootMngr.SETUP_LILO_BOOT_MANAGER()
+ PRINT " \\ --> Lilo boot manager installed successfully."
+ ELSE
+ DEBUG ClsGlobal.sTargetPath &/ "etc/lilo.conf not found...cannot
install lilo."
+ RETURN
+ END IF
+
END
PUBLIC SUB StartUp()
@@ -379,6 +394,8 @@
DIM sKernel, sInitrd, sAppendLine AS String
DIM sBootargs AS String
+ SHELL "/bin/os-prober > /tmp/os.lst"
+
sOsList = Split(Trim(File.Load("/tmp/os.lst")), gb.NewLine)
FOR i = 0 TO sOsList.Max
TsOsList.Index = TsOsList.Count - 1
@@ -398,7 +415,7 @@
IF sType LIKE "linux" THEN
' this function will return an array separated by "," in this
order
' /path/to/kernel, /path/to/initrd, appendline here
-
+ SHELL "/bin/linux-boot-prober " & sRoot & "
>/tmp/bootargs.lst" WAIT ' we need to hunt these arguments for every OS
found
sBootargs = MdlBootMngr.Get_OS_Boot_Params(sRoot)
IF NOT (sBootargs) THEN
@@ -553,6 +570,16 @@
cbDefBoot.Tag = tb.Text
END IF
NEXT
+ IF LAST.value = FALSE THEN
+ FOR EACH tb IN objNames
+ IF tb.Tag = LAST.tag THEN
+ IF cbDefBoot.Tag = tb.Text THEN
+ cbDefBoot.Tag = ""
+ END IF
+ END IF
+ NEXT
+ END IF
+
@@ -561,9 +588,7 @@
PUBLIC SUB TLoSlIST_MouseDown()
- IF MdlBootMngr.CHECK_LILO_VALUES() > 0 THEN RETURN
- MdlBootMngr.GENERATE_LILO_HEADER()
- MdlBootMngr.GENERATE_LILO_OS_LIST()
+
END
PUBLIC SUB OsNameBox_KeyRelease()
@@ -579,3 +604,9 @@
END
+
+PUBLIC SUB Timer1_Timer()
+
+ ClsGlobal.fRunningMainForm.btnext.enabled =
MdlBootMngr.CHECK_LILO_VALUES(TRUE) < 1
+
+END
Modified: branches/speedy/Conf0.form
==============================================================================
--- branches/speedy/Conf0.form (original)
+++ branches/speedy/Conf0.form Fri May 1 13:34:06 2009
@@ -110,6 +110,10 @@
}
}
}
+ { Timer1 #Timer
+ #X = 608
+ #Y = 208
+ }
{ HBox5 HBox
MoveScaled(1,27,58,3.5)
Expand = True
Modified: branches/speedy/MdlBootMngr.module
==============================================================================
--- branches/speedy/MdlBootMngr.module (original)
+++ branches/speedy/MdlBootMngr.module Fri May 1 13:34:06 2009
@@ -430,6 +430,55 @@
END
+PUBLIC SUB SETUP_LILO_BOOT_MANAGER()
+
+ DIM cbx AS CheckBox
+ DIM cb AS ComboBox
+ DIM tl AS TextLabel
+ DIM sKernel, sInitrd, sArch AS String
+
+ ' find kernels and initrds, copy them to /boot on the target dir
+ ' can't use /boot/tamu anymore... all has to go into /boot
+ FOR EACH cbx IN Conf0.objMenuObjects
+ IF cbx.Value = TRUE THEN
+ FOR EACH tl IN Conf0.objKernels
+ IF cbx.Tag = tl.Name THEN sKernel = tl.Tag
+ NEXT
+ FOR EACH cb IN Conf0.objinitrds
+ IF cb.tag = tl.Name THEN sInitrd = cb.Text
+
+ NEXT
+
+ ' now that we got kernel and initrd, copy them over
+ IF sKernel AND IF sInitrd THEN
+ SHELL "cp " & sKernel & Space(1) & ClsGlobal.sTargetPath &/ "boot"
+ SHELL "cp " & sInitrd & Space(1) & ClsGlobal.sTargetPath &/ "boot"
+ END IF
+
+ NEXT
+
+ ' determine wether we need to update modules
+ EXEC ["uname", "-r"] TO sArch
+ IF Exist("/lib" &/ "modules" &/ Trim(sArch)) = FALSE THEN ' hosted
install detected
+ EXEC ["mkdir", "-p", "/lib" &/ "modules" &/ Trim(sArch)] WAIT
+ SHELL "mount -o bind " & ClsGlobal.sTargetPath &/ "lib/modules" &/
Trim(sArch) & Space(1) & "/lib/modules" &/ Trim(sarch) & " && depmod -aq"
WAIT
+ END IF
+
+
+ ' now that kernels have been copied, I need to run lilo
+ ' Bind mount the target /tmp and sys dirs now
+ ' See PUBLIC SUB_PERFORM_BINDING on iVL branch
+ EXEC ["mount", "-o", "bind", "/sys", ClsGlobal.sTargetPath &/ "sys"] WAIT
+ EXEC ["mount", "-o", "bind", "/proc", ClsGlobal.sTargetPath &/ "proc"]
WAIT
+ EXEC ["mount", "-o", "bind", "/tmp", ClsGlobal.sTargetPath &/ "tmp"] WAIT
+ EXEC ["mount", "-o", "bind", "/dev", ClsGlobal.sTargetPath &/ "dev"] WAIT
+
+ ' now, we need to run the lilo command itself
+ SHELL "chroot " & ClsGlobal.sTargetPath & " && /sbin/depmod -aq &&
lilo " WAIT
+
+END
+
+
PUBLIC SUB GENERATE_LILO_OS_LIST()
DIM ckb AS CheckBox
@@ -477,7 +526,10 @@
'load the header
sHeader = File.Load(Temp("lilo.in"))
sFullFile = sHeader & sBody
- Message(sFullFile)
+ 'Message(sFullFile)
+ IF Exist(ClsGlobal.sTargetPath &/ "etc/lilo.conf") THEN MOVE
ClsGlobal.sTargetPath &/ "etc/lilo.conf" TO ClsGlobal.sTargetPath
&/ "etc/lilo.old"
+
+ File.Save(ClsGlobal.sTargetPath &/ "etc/lilo.conf", Trim(sFullFile))
END
@@ -575,7 +627,7 @@
END
-PUBLIC FUNCTION CHECK_LILO_VALUES() AS Integer
+PUBLIC FUNCTION CHECK_LILO_VALUES(bquiet AS Boolean) AS Integer
' will return 0 for clear
' 1 for error
@@ -583,21 +635,23 @@
DIM cb AS CheckBox
DIM sTag AS String = Conf0.TsOsList.Current.Text
IF NOT (Conf0.cbDefBoot.tag) THEN
+ IF bquiet = FALSE THEN
Message.Error(("You must select one operating system to be started
by default"))
+ END IF
FOR EACH cb IN Conf0.objDefOs
IF cb.Tag = sTag THEN
- Balloon.Error(("Check this box to make this your default
operating system, or select another tab."), cb, cb.Left + 24)
+ IF bquiet = FALSE THEN Balloon.Error(("Check this box to make
this your default operating system, or select another tab."), cb, cb.Left +
24)
END IF
NEXT
RETURN 1
END IF
FOR EACH tb IN Conf0.objNames
FOR EACH tb1 IN Conf0.objNames
- IF tb.Text = tb1.Text THEN
- Message.Error(("Found duplicate operating system names. Please use
unique labels for each menu entry"))
+ IF tb <> tb1 AND IF tb.Text = tb1.Text THEN
+ IF bquiet = FALSE THEN Message.Error(("Found duplicate operating
system names. Please use unique labels for each menu entry"))
FOR EACH tb2 IN Conf0.objNames
IF tb2.Tag = sTag THEN
- Balloon.Error(("Check these boxes to make sure they have
unique names"), tb2, tb2.Left + 24)
+ IF bquiet = FALSE THEN Balloon.Error(("Check these boxes to
make sure they have unique names"), tb2, tb2.Left + 24)
END IF
NEXT
RETURN 1
|