sles11sp2 read modified.xml at 1st boot

My autoyast file prompts for a number of variables (of which only a subset are included in the example). These are written to /tmp/answer_* before a chroot-script copies them to /mnt/tmp/ and then feeds them through sed to populate /mnt/tmp/profile/modified.xml. So far so good … inspection of (/mnt)/tmp/profile/modified.xml shows me all the specified values are there.

What I can’t get it to do is read autoyast=file:///tmp/profile/modified.xml at 1st boot (and it’s not a lot to ask is it really?)

I did think it would be possible to customise the /boot/grub/menu.lst which is installed by autoyast, however at 1st boot the menu flashes by and I am convinced that at this point grub is using a temporary custom grub configuration (as there is only a single menu option).

Tried adding a custom grub entry for 1st boot, see “#Create custom GRUB menu entry to start installation after reboot” below, and the menu entry is created, but all I get is “booting from local disk…” and a black screen. Why can’t the system see the kernel (either with /vmlinuz alias or /vmlinuz-3.0.13-0.27-default)?

All I want it to do is reread /tmp/profile/modified.xml at 1st boot. :confused: :confused: :confused:

cheers

Kat

[CODE]


false
false

<![CDATA[ #!/bin/sh cp /tmp/answer_* /mnt/tmp/ mkdir /tmp/mnt mkdir /mnt/tmp/profile mkdir /mnt/tmp/etc mount -o nolock 10.10.10.10:/install /tmp/mnt cp /tmp/mnt/fred.xml /mnt/tmp/profile/modified.xml umount /tmp/mnt #!/bin/sh # Get the answers HOSTNAME=`cat /tmp/answer_hostname` IPADDR=`cat /tmp/answer_ipaddr` GWIPADDR=`cat /tmp/answer_gwipaddr` PASSWORD=`cat /tmp/answer_password` FIRSTNODE=`cat /tmp/answer_firstnode` SRVNDSCONTEXT=`cat /tmp/answer_servercontext` NUM_DOTS=`echo $SRVNDSCONTEXT | grep -o "\\." | wc -l` ORGROOT=`echo $SRVNDSCONTEXT | cut -d. -f$[++NUM_DOTS]` SRVLDAPCONTEXT=`cat /tmp/answer_servercontext | sed -e 's/\\./,/g'` # Modify AutoYaST file sed -i -e "s/%%HOSTNAME%%/$HOSTNAME/g" \\ -e "s/%%IPADDR%%/$IPADDR/g" \\ -e "s/%%GWIPADDR%%/$GWIPADDR/g" \\ -e "s/%%PASSWORD%%/$PASSWORD/g" \\ -e "s/%%FIRSTNODE%%/$FIRSTNODE/g" \\ -e "s/%%SRVNDSCONTEXT%%/$SRVNDSCONTEXT/g" \\ -e "s/%%SRVLDAPCONTEXT%%/$SRVLDAPCONTEXT/g" /mnt/tmp/profile/modified.xml # Create custom GRUB menu entry to start installation after reboot cat < /mnt/boot/grub/menu.lst default 0 timeout 10 title Install SLES11SP2 root (hd0,0) kernel /vmlinuz textmode=1 install=nfs://10.10.10.10/install/x86_64/fred autoyast=file:///tmp/profile/modified.xml hostip=$IPADDR netmask=255.255.255.0 gateway=$GWIPADDR initrd /initrd EOF ]]>
  </source>
</script>
[/CODE]

Sorted. Replaced dodgy grub menu script with:

#Set Autoyast to kickoff at first boot cp /mnt/tmp/profile/modified.xml /mnt/var/lib/autoinstall/autoconf/autoconf.xml touch /mnt/etc/install.inf echo "AutoYaST:" >> /mnt/etc/install.inf touch /mnt/var/lib/YaST2/runme_at_boot

Job’s a good’un

K

On 07/03/2013 01:54, kat888 wrote:
[color=blue]

Sorted. Replaced dodgy grub menu script with:

Code:

 #Set Autoyast to kickoff at first boot

cp /mnt/tmp/profile/modified.xml /mnt/var/lib/autoinstall/autoconf/autoconf.xml
touch /mnt/etc/install.inf
echo “AutoYaST:” >> /mnt/etc/install.inf
touch /mnt/var/lib/YaST2/runme_at_boot

Job’s a good’un[/color]

Good work! Thanks for taking the time to come back and update this thread.

Simon
Novell/SUSE/NetIQ Knowledge Partner


Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partner (TTP) program. See TTP Organization | Micro Focus for more details.