On 21 jul 2010, at 23:38, Tristam MacDonald wrote:
> On Wed, Jul 21, 2010 at 11:14 AM, Tristam MacDonald
> <[email protected]> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sisuite-users
--
Bas van der Vlies
[email protected]
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users