# sles11sp2 read modified.xml at 1st boot

**URL:** <https://forums.suse.com/t/sles11sp2-read-modified-xml-at-1st-boot/23703>\
**Category:** SLES Install-Boot\
**Created:** [March 6, 2013, 3:43am UTC](https://forums.suse.com/t/sles11sp2-read-modified-xml-at-1st-boot/23703 "2013-03-06T03:43:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kat888](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kat888](https://forums.suse.com/u/kat888)\
**Post date:** [March 6, 2013, 3:43am UTC](https://forums.suse.com/t/sles11sp2-read-modified-xml-at-1st-boot/23703/1 "2013-03-06T03:43:12Z")

</div>

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. 😕 😕 😕

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]

---

<div class="post-metadata">

**Author:** ![kat888](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kat888](https://forums.suse.com/u/kat888)\
**Post date:** [March 7, 2013, 3:51am UTC](https://forums.suse.com/t/sles11sp2-read-modified-xml-at-1st-boot/23703/2 "2013-03-07T03:51:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [March 7, 2013, 3:45pm UTC](https://forums.suse.com/t/sles11sp2-read-modified-xml-at-1st-boot/23703/3 "2013-03-07T15:45:32Z")

</div>

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 [novell.com/ttp](http://novell.com/ttp) for more details.
