Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (e169c10e03d4c2dab863535b269b56e4cf04f22c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (e169c10e03d4c2dab863535b269b56e4cf04f22c)
  • Date: Wed, 6 Feb 2008 06:01:49 -0600

GIT changes to master cauldron by Justin Boffemmyer <flux AT sourcemage.org>:

iso/usr/share/doc/smgl.install/steps/boot-loader | 23 ------
iso/usr/share/doc/smgl.install/steps/copy-base | 4 +
iso/usr/share/doc/smgl.install/steps/disk-format | 22 ++----
iso/usr/share/doc/smgl.install/steps/disk-mount | 9 +-
iso/usr/share/doc/smgl.install/steps/grub | 19 +++++
iso/usr/share/doc/smgl.install/steps/lilo | 17 ++++
iso/usr/share/doc/smgl.install/steps/reboot | 17 ++++
iso/usr/share/doc/smgl.install/welcome | 12 +--
iso/usr/share/smgl.install/bashrc | 82
++++++++++++++++++++++-
iso/usr/share/smgl.install/commands | 8 ++
iso/usr/share/smgl.install/order | 4 -
iso/usr/share/smgl.install/steps | 2
12 files changed, 172 insertions(+), 47 deletions(-)

New commits:
commit e169c10e03d4c2dab863535b269b56e4cf04f22c
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

welcome: reorganized, updated commands

Reorganized the paragraphs so that they flow more logically. Also
updated the names of the commands, both for renames of the old ones
(list-steps -> steps) as well as for the new ones (help, welcome).
Included instructions on how to see the welcome screen again.

commit 19ba9cebdc49ab7a188700d79d5acab4a06f8bd9
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

bashrc: new prompt, branching, better printing

Added the new prompt system, which implements a help system as well.
Related to this, there are two user-level commands that were added,
help() and welcome(). help() prints the list of commands, while
welcome() prints the welcome screen from boot-up.

A new function was added to handle branching for cases beyond mere
linear progression. This may be deprecated later.

A new header() function outputs 3 newlines and before cat'ing the
requested file. This improves readability of the information displayed
to the user.

commit f0ac819618c71f5b457986646707f6becddd6ea6
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

commands: new, lists commands known by installer

This file has a listing of all the commands recognized by the
installer, as well as descriptions of what each command is for.

commit 201d26b16f4849eeed0a953420b20af4fb8a0450
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

order, steps: 2 new steps added

2 new steps were added: grub and lilo. These were added as branches
from the bootloader step.

commit 4238e0f552e3f56c17ee53f4caa4f19894fa9bb9
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

Various installer document updates

Updates to the docs that the installer displays to the user for each
of the installer steps. These updates resolve most of the issues with
the documentation for the steps seen in the previous devel iso.

diff --git a/iso/usr/share/doc/smgl.install/steps/boot-loader
b/iso/usr/share/doc/smgl.install/steps/boot-loader
index 73c4025..049a8f2 100644
--- a/iso/usr/share/doc/smgl.install/steps/boot-loader
+++ b/iso/usr/share/doc/smgl.install/steps/boot-loader
@@ -13,25 +13,6 @@ After you finish configuring your boot loader, you need to
"install" it.
This simply involves running the boot loader, which will install itself to
the location you specified in the config file.

-First, chroot into the target platform:
-mount --bind /dev /mnt/root/dev
-mount --bind /dev/pts /mnt/root/dev/pts
-mount --bind /proc /mnt/root/proc
-chroot /mnt/root /bin/bash
+For lilo instructions, type branch lilo.

-For lilo:
-/sbin/lilo
-
-For grub:
-cp /usr/lib/grub/i386-pc /boot/grub
-/sbin/grub
-> root (hd0,0)
-> setup (hd0)
-> quit
-
-Exit the chroot:
-exit
-
-Unless you got an error message when you were installing the boot loader,
-you should be done with this step. Type next to go to the next
-step.
+For grub instructions, type branch grub.
diff --git a/iso/usr/share/doc/smgl.install/steps/copy-base
b/iso/usr/share/doc/smgl.install/steps/copy-base
index d370c9d..8e9090b 100644
--- a/iso/usr/share/doc/smgl.install/steps/copy-base
+++ b/iso/usr/share/doc/smgl.install/steps/copy-base
@@ -1,4 +1,8 @@
Now, it's time to set up the basic smgl installation.
+Don't forget to mount any partitions you need first (this depends on your
+partition scheme; i.e. if you have a separate partition that you intend to
+mount as /var, mount that now). You may need to create the directories for
+the mount points you intend to mount.

Run the following command:
tar -xjvf /system.tar.bz2 -C /mnt/root
diff --git a/iso/usr/share/doc/smgl.install/steps/disk-format
b/iso/usr/share/doc/smgl.install/steps/disk-format
index f59bbad..bc378ba 100644
--- a/iso/usr/share/doc/smgl.install/steps/disk-format
+++ b/iso/usr/share/doc/smgl.install/steps/disk-format
@@ -1,25 +1,23 @@
disk-format step
-Now, we need to create filesystems on the partitions you just created.
-Preferences for filesystems differ, and we're not here to tell you which you
-should use (should we?), so here's just a list of commands to create the
-different filesystems I know about:
+Now create filesystems on the partitions you just created. Below is a list
+of example commands for the different types of filesystems supported on this
+ISO. The partitions given are examples. Be sure to format all the partitions
+you need.

mke2fs /dev/hda1
-# This one is the same as mke2fs -j /dev/hda1
mkfs.ext3 /dev/hda1
-# big TODO: seems we don't actually ship this yet 8)
-# We do now :-D
mkreiserfs /dev/hda1
-# same for xfs and jfs
mkfs.jfs /dev/hda1
mkfs.xfs /dev/hda1

-We do provide support for reiser4 on the ISO. However, the ISO kernel does
-not yet support reiser4, so although you can create reiser4 filesystems and
+# swap:
+mkswap /dev/hda2
+
+The reiser4 tools are provided on the ISO. However, the ISO kernel does not
+yet support reiser4, so although you can create reiser4 filesystems and
check ones already created, you cannot yet mount them. Only make a reiser4
filesystem if you really know what you are doing.

mkfs.reiser4

-# swap:
-mkswap /dev/hda2
+Type next to go to the next step.
diff --git a/iso/usr/share/doc/smgl.install/steps/disk-mount
b/iso/usr/share/doc/smgl.install/steps/disk-mount
index fd7d425..a92b10d 100644
--- a/iso/usr/share/doc/smgl.install/steps/disk-mount
+++ b/iso/usr/share/doc/smgl.install/steps/disk-mount
@@ -1,5 +1,5 @@
disk-mount step
-Now you need to mount the filesystems. We'll be installing to /mnt/root,
+Now, you need to mount the filesystems. We'll be installing to /mnt/root,
so mount the filesystem that will be / onto /mnt/root.

Examples:
@@ -10,9 +10,12 @@ mount -t jfs /dev/hda1 /mnt/root
mount -t xfs /dev/hda1 /mnt/root

Then mount any other partitions you made at the proper subdirectories.
+You'll probably need to make directories for the other mount points first
+(assuming you just formatted the / partition). Make sure you mount / first.

-For example, if you created /dev/hda2 for /home:
-mount -t ext2 /dev/hda1 /mnt/root/home
+For example, if you created /dev/hda2 for /usr:
+mkdir /mnt/root/usr
+mount -t ext2 /dev/hda2 /mnt/root/usr

Don't forget to mount all the (system) partitions you plan to use.

diff --git a/iso/usr/share/doc/smgl.install/steps/grub
b/iso/usr/share/doc/smgl.install/steps/grub
new file mode 100644
index 0000000..81c7c1c
--- /dev/null
+++ b/iso/usr/share/doc/smgl.install/steps/grub
@@ -0,0 +1,19 @@
+grub instructions:
+First, chroot into the target platform:
+mount --bind /dev /mnt/root/dev
+mount --bind /dev/pts /mnt/root/dev/pts
+mount --bind /proc /mnt/root/proc
+chroot /mnt/root /bin/bash
+
+cp /usr/lib/grub/i386-pc /boot/grub
+/sbin/grub
+> root (hd0,0)
+> setup (hd0)
+> quit
+
+Exit the chroot:
+exit
+
+Unless you got an error message when you were installing the boot loader,
+you should be done with this step. Type next to go to the next
+step.
diff --git a/iso/usr/share/doc/smgl.install/steps/lilo
b/iso/usr/share/doc/smgl.install/steps/lilo
new file mode 100644
index 0000000..2014b27
--- /dev/null
+++ b/iso/usr/share/doc/smgl.install/steps/lilo
@@ -0,0 +1,17 @@
+lilo instructions:
+Edit /mnt/root/etc/lilo.conf
+
+Chroot into the target platform:
+mount --bind /dev /mnt/root/dev
+mount --bind /dev/pts /mnt/root/dev/pts
+mount --bind /proc /mnt/root/proc
+chroot /mnt/root /bin/bash
+
+/sbin/lilo
+
+Exit the chroot:
+exit
+
+Unless you got an error message when you were installing the boot loader,
+you should be done with this step. Type next to go to the next
+step.
diff --git a/iso/usr/share/doc/smgl.install/steps/reboot
b/iso/usr/share/doc/smgl.install/steps/reboot
index 7317958..c710915 100644
--- a/iso/usr/share/doc/smgl.install/steps/reboot
+++ b/iso/usr/share/doc/smgl.install/steps/reboot
@@ -1,2 +1,17 @@
+Finished!
+You should be all done with the installation! Congratulations!
+
+Now it is time to umount all of your partitions. For all partitions you
mounted
+under /mnt/root, unmount them, starting with the deepest mount first and
+working back up to /mnt/root.
+
+Example - assume that there are separate partitions for /, /var, /var/spool,
+and /var/cache:
+
+umount /mnt/root/var/cache
+umount /mnt/root/var/spool
+umount /mnt/root/var
+umount /mnt/root
+
You should be able to reboot now.
-Don't forget to take out the CD
+Don't forget to take out the CD before the machine boots back up!
diff --git a/iso/usr/share/doc/smgl.install/welcome
b/iso/usr/share/doc/smgl.install/welcome
index b198f71..0164f9d 100644
--- a/iso/usr/share/doc/smgl.install/welcome
+++ b/iso/usr/share/doc/smgl.install/welcome
@@ -1,18 +1,18 @@
-Welcome to the SMGL <insert version here> install CD!
+Welcome to the SMGL 0.10.0-devel install CD!

The install process is currently a guided shell prompt. Type next to
start.
Everytime you finish a step, enter next to advance to the next one.
If you want to re-read the documentation for a step, type todo.
You can enter back at any time to jump to the previous step.

+If you ever get lost, type steps to get a list of installer steps,
+and e.g. jump copy-base to jump to a specific step.
+
Don't worry, there's no magic attached to the steps, you can jump between
them as you please without breaking anything.

-If you ever get lost, type list-steps to get a list of installer
steps,
-and e.g. jump copy-base to jump to a specific step.
-
-The Source Mage GNU/Linux cauldron team hopes that this new form of installer
-will help you setting up your systems efficiently, or learning a lot.
+If at any time you need help, type help.
+To see this message again, type welcome.

If you have any feedback you'd like us to hear, please drop by
#sourcemage-cauldron on irc.freenode.net, file a bug on bugs.sourcemage.org,
diff --git a/iso/usr/share/smgl.install/bashrc
b/iso/usr/share/smgl.install/bashrc
index 56fc160..3e11d39 100755
--- a/iso/usr/share/smgl.install/bashrc
+++ b/iso/usr/share/smgl.install/bashrc
@@ -13,10 +13,37 @@ INSTALLER_DOCS=/usr/share/doc/smgl.install
mkdir -p $INSTALLER_TMP
[[ -e $INSTALLER_STATUS ]] || echo 'init' >$INSTALLER_STATUS

+function header() {
+ local doc
+ doc=$1
+ echo ""
+ echo ""
+ echo ""
+ cat $1
+}
+
function todo() {
local CURSTEP
CURSTEP=$(cat $INSTALLER_STATUS)
- cat $INSTALLER_DOCS/steps/$CURSTEP
+ header $INSTALLER_DOCS/steps/$CURSTEP
+}
+
+function next_step() {
+ local CURSTEP
+ # get old status
+ CURSTEP=$(cat $INSTALLER_STATUS)
+ # find next status
+ CURSTEP=$(grep "^$CURSTEP:" $INSTALLER_DATA/order | head -n 1 | cut -d:
-f2)
+ # check if next status is a branch
+ [[ ${CURSTEP} == *'|'* ]] && CURSTEP="error"
+ # if we couldn't find a next status, jump to 'error'
+ CURSTEP=${CURSTEP:-error}
+ # print out new status
+ echo "$CURSTEP"
+}
+
+function cur_step() {
+ cat $INSTALLER_STATUS
}

function next() {
@@ -25,6 +52,8 @@ function next() {
CURSTEP=$(cat $INSTALLER_STATUS)
# find next status
CURSTEP=$(grep "^$CURSTEP:" $INSTALLER_DATA/order | head -n 1 | cut -d:
-f2)
+ # check if next status is a branch
+ [[ ${CURSTEP} == *'|'* ]] && CURSTEP="error"
# if we couldn't find a next status, jump to 'error'
CURSTEP=${CURSTEP:-error}
# save new status
@@ -33,6 +62,33 @@ function next() {
todo
}

+function branch() {
+ local CURSTEP
+ local b1
+ local b2
+ # get old status
+ CURSTEP=$(cat $INSTALLER_STATUS)
+ # find next status
+ CURSTEP=$(grep "^$CURSTEP:" $INSTALLER_DATA/order | head -n 1 | cut -d:
-f2)
+ # make sure next status is a branch
+ if [[ ${CURSTEP} == *'|'* ]] ; then
+ b1=$(echo ${CURSTEP} | cut -d '|' -f 1)
+ b2=$(echo ${CURSTEP} | cut -d '|' -f 2)
+ if [[ $* = ${b1} || $* = ${b2} ]] ; then
+ CURSTEP=$*
+ else
+ CURSTEP="error"
+ fi
+ else
+ # couldn't match against the branches
+ CURSTEP="error"
+ fi
+ # save new status
+ echo "$CURSTEP" >$INSTALLER_STATUS
+ # print new message
+ todo
+}
+
function back() {
local CURSTEP
CURSTEP=$(cat $INSTALLER_STATUS)
@@ -44,10 +100,30 @@ function back() {
todo
}

-function list-steps() {
- cat $INSTALLER_DATA/steps
+function num_current() {
+ local CURSTEP
+ CURSTEP=$(cat $INSTALLER_STATUS)
+ grep -n "$CURSTEP" $INSTALLER_DATA/steps | cut -d: -f1
+}
+
+function num_steps() {
+ cat $INSTALLER_DATA/steps | wc -l
+}
+
+function steps() {
+ header $INSTALLER_DATA/steps
}

function jump() {
echo "$*" >$INSTALLER_STATUS
}
+
+function welcome() {
+ header $INSTALLER_DOCS/welcome
+}
+
+function help() {
+ header $INSTALLER_DATA/commands
+}
+
+PS1="[current:\$(cur_step) next:\$(next_step) \$(num_current)/\$(num_steps)]
For a list of commands, type help\n\u \w\$ "
diff --git a/iso/usr/share/smgl.install/commands
b/iso/usr/share/smgl.install/commands
new file mode 100644
index 0000000..cdce121
--- /dev/null
+++ b/iso/usr/share/smgl.install/commands
@@ -0,0 +1,8 @@
+back return to the previous step
+branch <step> choose one of two possible next steps
+help print a list of commands (this list)
+jump <step> jump directly to <step>
+next go to the next step
+steps print a listing of all possible steps
+todo show what needs to be done for the current step
+welcome show some help information (seen at the welcome
screen)
diff --git a/iso/usr/share/smgl.install/order
b/iso/usr/share/smgl.install/order
index 15b552e..7582e0a 100644
--- a/iso/usr/share/smgl.install/order
+++ b/iso/usr/share/smgl.install/order
@@ -4,7 +4,9 @@ disk-format:disk-mount
disk-mount:copy-base
copy-base:edit-confs
edit-confs:boot-loader
-boot-loader:install-opt-spells
+boot-loader:lilo|grub
+lilo:install-opt-spells
+grub:install-opt-spells
install-opt-spells:user-setup
user-setup:reboot
reboot:reboot
diff --git a/iso/usr/share/smgl.install/steps
b/iso/usr/share/smgl.install/steps
index b230d99..c8f548d 100644
--- a/iso/usr/share/smgl.install/steps
+++ b/iso/usr/share/smgl.install/steps
@@ -4,6 +4,8 @@ disk-format - creating filesystems
disk-mount - mounting filesystems at appropriate mount-points
copy-base - copying basesystem and basic /etc files
boot-loader - installing and setting up a boot manager
+lilo - do this step to set up lilo
+grub - do this step to set up grub
edit-confs - editing the basic configuration files
install-opt-spells - installing other spells you may need
user-setup - set root password, create regular users




Archive powered by MHonArc 2.6.24.

Top of Page