Hi,

Had to use the autodetect-disk option because we use several types of
machines and some have different disk types.

I eventually got this working with patching the
autoinstallscript.template, but things would be a lot cleaner when
included in the core. I've attached both the patch as well as my
autoinstallscript.conf

Systemimager version: 4.0.2
Os: Centos 5.4


Patch is for fixing two issues:
1) get_part_name
This function is being used when generating the master install script.
Everything works like intended when using a fixed disk name
(e.g. /dev/sda, /dev/cciss/c0d0). For the last one, it will add a 'p'
for the partitions. However, when using a dynamic name, it will never
add the 'p' because the disk name is a variable which will not match the
regex.

2) replace variable by value
In the generation of the fstab content this disk value is being
inserted. When using a fixed disk name, everything works like it should.
However, when using a dynamic name, it will place the variable name
itself in fstab.


Regards,

Raf

--- autoinstallscript.template.org	2010-05-04 17:35:13.000000000 +0200
+++ autoinstallscript.template	2010-05-06 13:47:02.000000000 +0200
@@ -164,6 +164,10 @@
 
 ##PARTITION_DISKS##
 
+if echo $DISK0 | grep '^/dev/.*/c[0-9]\+d[0-9]\+'; then
+  DISK0=$DISK0"p"
+fi
+
 ### BEGIN software-RAID initialization commands -AR- ###
 ##CREATE_SOFT_RAID_DISKS##
 ### END software-RAID initialization commands ###
@@ -324,6 +328,8 @@
 ##GENERATE_FSTAB##
 ### END generate new fstab file from autoinstallscript.conf ###
 
+sed -i "s!\${DISK0}!${DISK0}!" /a/etc/fstab
+
 ################################################################################
 #
 #   Process override directories
<config>

  <disk dev="/dev/sda" label_type="msdos" unit_of_measurement="MB">
    <part  num="1" size="250"  p_type="primary"  p_name="-"  flags="boot"  />
    <part  num="2" size="*"    p_type="primary"  p_name="-"  flags="lvm"   
lvm_group="systemvg"  />
  </disk>


  <lvm>
    <lvm_group name="systemvg" max_log_vols="0" max_phys_vols="0" 
phys_exent_size="4096K">
      <lv  name="root"          size="4096M"  />
      <lv  name="var-log"       size="4096M"  />
      <lv  name="usr-local"     size="4096M"  />
      <lv  name="tmp"           size="4096M"  />
      <lv  name="swap"          size="2048M"  />
      <lv  name="home"          size="4096M"  />
      <lv  name="systemimager"          size="4096M"  />
    </lvm_group>
  </lvm>


  <fsinfo  line="10"  real_dev="/dev/systemvg/root"          mp="/"             
         fs="ext3" options="defaults" dump="1" pass="1" />
  <fsinfo  line="20"  real_dev="/dev/sda1"                   mp="/boot"         
         fs="ext3" options="defaults" dump="1" pass="2" />
  <fsinfo  line="30"  real_dev="/dev/systemvg/var-log"       mp="/var/log"      
         fs="ext3" options="defaults" dump="1" pass="2" />
  <fsinfo  line="40"  real_dev="/dev/systemvg/usr-local"     mp="/usr/local"    
         fs="ext3" options="defaults" dump="1" pass="2" />
  <fsinfo  line="50"  real_dev="/dev/systemvg/tmp"           mp="/tmp"          
         fs="ext3" options="defaults" dump="1" pass="2" />
  <fsinfo  line="60"  real_dev="/dev/systemvg/swap"          mp="swap"          
         fs="swap" options="defaults" dump="0" pass="0" />
  <fsinfo  line="70"  real_dev="/dev/systemvg/home"          mp="/home"         
         fs="ext3" options="defaults" dump="1" pass="2" />
  <fsinfo  line="80"  real_dev="/dev/systemvg/systemimager"          
mp="/var/lib/systemimager"                  fs="ext3" options="defaults" 
dump="1" pass="2" />
  <fsinfo  line="110" real_dev="none"       mp="/dev/pts"    fs="devpts" 
options="gid=5,mode=620" dump="0" pass="0" />
  <fsinfo  line="120" real_dev="none"       mp="/dev/shm"    fs="tmpfs"  
options="defaults" dump="0" pass="0" />
  <fsinfo  line="130" real_dev="none"       mp="/proc"       fs="proc"   
options="defaults" dump="0" pass="0" />
  <fsinfo  line="140" real_dev="none"       mp="/sys"        fs="sysfs"  
options="defaults" dump="0" pass="0" />

  <boel devstyle="udev"/>

</config>
------------------------------------------------------------------------------
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to