beautypg.com

Microsoft windows install_win.sh sample script – HP SmartStart-Software User Manual

Page 18

background image

Advanced topics 18

dd if=/dev/zero of=/dev/sssd bs=512 count=32

echo "forcing kernel to re-read partition table"

sfdisk --re-read /dev/sssd

sleep 5

echo "landing mbr"

dd if=${NFS_MAIN}/linux_unattend/generic.mbr of=/dev/sssd bs=512 count=1

echo "create new 256M FAT16 partition using sfdisk"

echo "0,256,6,*" | sfdisk -uM -D /dev/sssd

echo "forcing kernel to re-read partition table"

sfdisk --re-read /dev/sssd

sleep 5

## make symlink for first partition, usually sda1 or c0d0p1

if test -e ${BOOTDEVNODE}1 ; then

ln -s ${BOOTDEVNODE}1 /dev/sssd1

elif test -e ${BOOTDEVNODE}p1 ; then

ln -s ${BOOTDEVNODE}p1 /dev/sssd1

else

echo "Partition 1 missing, check that partition creation succeeded"

exec /bin/bash

fi

ls -al /dev/sssd1

cd ${NFS_MAIN}/linux_unattend/rhel4/

echo "landing diskboot.img from RHEL4-disc1/images/"

dd if=diskboot.img of=/dev/sssd1

## mount disk

echo "mounting to /mnt/dos"

mount -t vfat /dev/sssd1 /mnt/dos

##### MAKE SURE YOU MODIFY syslinux-rh.cfg FOR YOUR ENVIRONMENT #######

cp -a syslinux-rh.cfg /mnt/dos/syslinux.cfg

cd ${TOOLKIT}

## unmount disk

umount /mnt/dos

umount ${NFS_MAIN}

## unmount everything else

#umount -a

#echo "Rebooting"

#sleep 5

#/bin/reboot c:

Microsoft Windows install_win.sh sample script

The install_win.sh sample script performs many of the same hardware configuration tasks described in

"Performing an unattended operating system installation (on page

14

)."

This manual is related to the following products: