Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Bas van der Vlies
On 20-07-10 23:09, Tristam MacDonald wrote:
 On Tue, Jul 20, 2010 at 12:51 PM, Brian Elliott Finley
 br...@thefinleys.com  wrote:
 Tristam,

 Are you using ext4?  If so, I bet that's why. I'm in the process of
 adding support for ext4 and grub2, but its not there yet.

 Right you are - I am imaging an ubuntu 10.04 box, so ext4 and grub2 by
 default. I just tested switching to ext3, and the imaging appears to
 be proceeding perfectly, so I will mess with downgrading grub in the
 morning.

 Thanks,

If you want ext4 and grub2 support. You can can grab the kernel/initrd from
https://subtrac.sara.nl/oss/sali to replace the kernel/initrd that your are 
know using.

We us a post-installation script that determines if we must use grub1 or grub2:
{{{
# Author: Bas van der Vlies
# Date  : 6 Sep 2007
# Desc. : This will setup the GRUB bootloader
#
# SVN INFO:
#   $Id: 02all.bootloader 4683 2010-06-23 12:15:04Z bas $
#   $URL: 
https://subtrac.sara.nl/hpcv/svn/beowulf/trunk/systemimager/boot_scripts/post-install/02all.bootloader
 
$

# Get the Systemimager variables
. /tmp/post-install/variables.txt

echo setting up grub: running grub..
#

if [ -e /etc/default/grub ]
then

echo Using GRUB2 install method! :: $DISK0

echo grub-install --no-floppy $DISK0
grub-install --no-floppy $DISK0

echo grub-mkconfig -o /boot/grub/grub.cfg
echo This command can take while...
grub-mkconfig -o /boot/grub/grub.cfg

echo GRUB2 install done

else

echo Using Legacy GRUB install method!
grub --batch EOF
root (hd0,0)
setup (hd0)
EOF
echo setting up grub: done.

fi

exit 0
}}}

-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Tristam MacDonald
On Wed, Jul 21, 2010 at 3:00 AM, Bas van der Vlies b...@sara.nl wrote:

 If you want ext4 and grub2 support. You can can grab the kernel/initrd from
 https://subtrac.sara.nl/oss/sali to replace the kernel/initrd that your are
 know using.

I saw the SALI kernel and gave it a spin, but it seems to take a
different set of parameters, and I haven't been able to figure out
which parameter I am feeding wrong.

With the default systemimager configuration, it boots fine, rsyncs the
script directory successfully, and then errors out with 'couldn't find
script'. Any idea how I pass it the image/script name?

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Bas van der Vlies
On 21-07-10 12:52, Tristam MacDonald wrote:
 On Wed, Jul 21, 2010 at 3:00 AM, Bas van der Vliesb...@sara.nl  wrote:

 If you want ext4 and grub2 support. You can can grab the kernel/initrd from
 https://subtrac.sara.nl/oss/sali to replace the kernel/initrd that your are
 know using.

 I saw the SALI kernel and gave it a spin, but it seems to take a
 different set of parameters, and I haven't been able to figure out
 which parameter I am feeding wrong.

 With the default systemimager configuration, it boots fine, rsyncs the
 script directory successfully, and then errors out with 'couldn't find
 script'. Any idea how I pass it the image/script name?

You have to supply the scriptname parameter ;-). Here is an example:
{{{
default rsync_squeeze

label shell
   kernel sali/trunk/kernel
   append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=32768 
root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes SSHD=y 
tmpfs_size=5000M rw

label rsync_squeeze
   kernel sali/trunk/kernel
   append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072 
root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes PROTOCOL=rsync 
tmpfs_size=2400M STAGING=/tmp GRUB2=yes SCRIPTNAME=amd64_squeeze_lisa.master rw

label rsync_lenny
   kernel sali/trunk/kernel
   append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072 
root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes PROTOCOL=rsync 
tmpfs_size=2400M STAGING=/tmp SCRIPTNAME=amd64_lenny_lisa.master rw


label bittorent
   kernel sali/trunk/kernel
   append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072 
root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes 
PROTOCOL=bittorrent tmpfs_size=2400M STAGING=/tmp GRUB2=yes 
SCRIPTNAME=amd64_squeeze_lisa.master rw
}}}

-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Bas van der Vlies
On 21-07-10 13:34, Bas van der Vlies wrote:
 On 21-07-10 12:52, Tristam MacDonald wrote:
 On Wed, Jul 21, 2010 at 3:00 AM, Bas van der Vliesb...@sara.nl   wrote:

 If you want ext4 and grub2 support. You can can grab the kernel/initrd from
 https://subtrac.sara.nl/oss/sali to replace the kernel/initrd that your are
 know using.

 I saw the SALI kernel and gave it a spin, but it seems to take a
 different set of parameters, and I haven't been able to figure out
 which parameter I am feeding wrong.

 With the default systemimager configuration, it boots fine, rsyncs the
 script directory successfully, and then errors out with 'couldn't find
 script'. Any idea how I pass it the image/script name?

 You have to supply the scriptname parameter ;-). Here is an example:
 {{{
 default rsync_squeeze

 label shell
 kernel sali/trunk/kernel
 append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=32768
 root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes SSHD=y
 tmpfs_size=5000M rw

 label rsync_squeeze
 kernel sali/trunk/kernel
 append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072
 root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes PROTOCOL=rsync
 tmpfs_size=2400M STAGING=/tmp GRUB2=yes SCRIPTNAME=amd64_squeeze_lisa.master 
 rw

 label rsync_lenny
 kernel sali/trunk/kernel
 append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072
 root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes PROTOCOL=rsync
 tmpfs_size=2400M STAGING=/tmp SCRIPTNAME=amd64_lenny_lisa.master rw


 label bittorent
 kernel sali/trunk/kernel
 append vga=extended initrd=sali/trunk/initrd.img ramdisk_size=131072
 root=/dev/ram MONITOR_SERVER=si_monitor MONITOR_CONSOLE=yes
 PROTOCOL=bittorrent tmpfs_size=2400M STAGING=/tmp GRUB2=yes
 SCRIPTNAME=amd64_squeeze_lisa.master rw
 }}}


There is also an example master script that use GRUB2. We expect a 
partition for grub2, see:
   * https://subtrac.sara.nl/oss/sali/browser/trunk/example/masterscript.new

ans search for grub2


-- 

*  Bas van der Vliese-mail: b...@sara.nl   *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Tristam MacDonald
On Wed, Jul 21, 2010 at 7:40 AM, Bas van der Vlies b...@sara.nl wrote:
 On 21-07-10 13:34, Bas van der Vlies wrote:

 You have to supply the scriptname parameter ;-).

Excellent, one more hurdle overcome!

 There is also an example master script that use GRUB2. We expect a
 partition for grub2, see:
   * https://subtrac.sara.nl/oss/sali/browser/trunk/example/masterscript.new

 and search for grub2

I am a little confused how the master scripts work.

Do I manually edit (having made a backup copy) my image-name.master
script to include those features, or is there a way to modify
systemimager to generate a master script which works like that?

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Tristam MacDonald
On Wed, Jul 21, 2010 at 11:14 AM, Tristam MacDonald
swiftco...@gmail.com wrote:

 I am a little confused how the master scripts work.

 Do I manually edit (having made a backup copy) my image-name.master
 script to include those features, or is there a way to modify
 systemimager to generate a master script which works like that?

Having assumed that I manually create the master script at this point,
I have been able to create something that gets most of the way. Still
working on getting a valid grub config in place post imaging.

In case someone else is trying to use Ubuntu 10.04 with the SALI
kernel in the future, take note of the following:
- Ubuntu does not use a separate grub partition by default, so you
need to make one
- Ubuntu identifies partitions by UUIDs by default, so edit your
/etc/fstab to use partition names instead
- Ubuntu uses UUIDs in grub by default, so disable that in /etc/default/grub

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users


Re: [sisuite-users] how to disable tmpfs staging?

2010-07-21 Thread Bas van der Vlies

On 21 jul 2010, at 23:38, Tristam MacDonald wrote:

 On Wed, Jul 21, 2010 at 11:14 AM, Tristam MacDonald
 swiftco...@gmail.com wrote:
 
 I am a little confused how the master scripts work.
 
 Do I manually edit (having made a backup copy) my image-name.master
 script to include those features, or is there a way to modify
 systemimager to generate a master script which works like that?
 
 Having assumed that I manually create the master script at this point,
 I have been able to create something that gets most of the way. Still
 working on getting a valid grub config in place post imaging.
 
 In case someone else is trying to use Ubuntu 10.04 with the SALI
 kernel in the future, take note of the following:
 - Ubuntu does not use a separate grub partition by default, so you
 need to make one
 - Ubuntu identifies partitions by UUIDs by default, so edit your
 /etc/fstab to use partition names instead
 - Ubuntu uses UUIDs in grub by default, so disable that in /etc/default/grub
 

Thanks for the info. We currently using it on debian lenny and squeeze and 
converted a systemimager scriptt by hand. And yes we use labels to identify
partitions.  To use the grub2 setup we have decided to use a seperate 
partition. currently there is no function to generate the fstab file.

Hopefully some useful info and explanations:

We have just one master script for all our differrent hosts/oses., eg:
 *  ln -s base/sara_install_2 amd64_lenny_lisa.master 
 * will install the amd64_lenny_lisa image
 * Is not necessary 

Your kernel must support 'CONFIG_EFI_PARTITION=y'. If this option is set then 
you can use the grub2 setup. Put in your master.script
  - set_disklabel $DISK0 gpt

instead of:
{{{
### BEGIN partition $DISK0 ###
logmsg Partitioning $DISK0...
logmsg Old partition table for $DISK0:
parted -s -- $DISK0 print

# Wipe the MBR (Master Boot Record) clean.
logmsg dd if=/dev/zero of=$DISK0 bs=512 count=1 || shellout
dd if=/dev/zero of=$DISK0 bs=512 count=1 || shellout

# Re-read the disk label.
logmsg blockdev --rereadpt $DISK0
blockdev --rereadpt $DISK0

# Create disk label.  This ensures that all remnants of the old label, whatever
# type it was, are removed and that we're starting with a clean label.
logmsg parted -s -- $DISK0 mklabel msdos || shellout
parted -s -- $DISK0 mklabel msdos || shellout
}}}

==
Further in the script file you see these lines. This are the partitions 
logmsg partition $DISK0 1024:ext2:/boot:boot 1:grub2 4096:swap::swap 
0:xfs:/:root
partition $DISK0 1024:ext2:/boot:boot 1:grub2 4096:swap::swap 
0:xfs:/:root || shellout

See for full explanation:
 * https://subtrac.sara.nl/oss/sali/wiki/SaliUsage/Functions/partition

The first entry 1024:ext2:/boot:boot:
{{{
will create an ext2 partition of size 1024 MB mounted /boot and with label boot
}}}

Used to be this code in masterscript for one partition:
{{{
logmsg Creating partition ${DISK0}1.
START_MB=$END_OF_LAST_PRIMARY
END_MB=$(echo scale=3; ($START_MB + 1024) | bc)
logmsg parted -s -- $DISK0 mkpart primary $START_MB $END_MB || shellout
parted -s -- $DISK0 mkpart primary $START_MB $END_MB || shellout
END_OF_LAST_PRIMARY=$END_MB

logmsg mke2fs -q ${DISK0}1 || shellout
mke2fs -q ${DISK0}1 || shellout
logmsg tune2fs -L boot ${DISK0}1 || shellout`
tune2fs -L boot ${DISK0}1 || shellout`
logmsg mkdir -p /a/boot || shellout
mkdir -p /a/boot || shellout
logmsg mount ${DISK0}1 /a/boot -t ext2 -o rw || shellout
mount ${DISK0}1 /a/boot -t ext2 -o rw || shellout
}}}


  
 -- 
 Tristam MacDonald
 http://swiftcoder.wordpress.com/
 
 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 sisuite-users mailing list
 sisuite-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sisuite-users

--
Bas van der Vlies
b...@sara.nl




--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users