How to create a Solaris 10 x86 recovery DVD

How to create a Solaris 10 x86 recovery DVD

This step by step guide will help you create a bootable Solaris 10 x86 recovery DVD. This is for Solaris 10 u6.

You will need either a spare disk or at least 10 gigs on a separate partition

In this case my spare disk is c0t2d0s4

Mount your scratch disk

# newfs /dev/rdsk/c0t2d0s4
# mount /dev/dsk/c0t2d0s4 /mnt
# mkdir /mnt/DVD (this is for the DVD build)
# mkdir /mnt/MR (this is for the miniroot build)

Put a solaris 10 install disk into the drive and create the build files
# vold&
# cd /cdrom/cdrom0
# find . –depth –print | cpio –pdm /mnt/DVD
# cd /mnt/DVD/Solaris_10/Product
# rm –rf SUNW*

Note: wasted space and we need to fit on a single DVD

Extract the miniroot

# /boot/solaris/bin/root_archive unpackmedia /mnt/DVD /mnt/MR

Modify the miniroot
# touch /mnt/MR/.tmp_proto/.preinstall
# cd /mnt/MR/etc
# rm sysidcfg
# vi sysidcfg
root_password= DBYd501nKLh/g: (from shadow file)
{ hostname=daps1
protocol_ipv6=no }

Note: I can’t remember the command to define Kerberos, so the system will prompt you during install

# vi /mnt/MR/usr/sbin/install.d/profind

Find the section that looks like this and add lines

# Factory JumpStart is only allowed with factory
# stub images, indicated by the file /tmp/.preinstall
if [ -f /tmp/.preinstall ]; then
mount -o ro -F lofs ${CD_CONFIG_DIR} ${SI_CONFIG_DIR}>/dev/null 2>&1
if [ $? -eq 0 ]; then
verify_config "defaults" "CDROM"
# Added to profind
gettext "<<< using CD default >>>";echo
rmdir ${SI_CONFIG_DIR}
ln -s /cdrom/.install_config ${SI_CONFIG_DIR}
exit 0
# End of profind modifications

Compile the miniroot

# /boot/solaris/bin/root_archive packmedia /mnt/DVD /mnt/MR
# rm –rf /mnt/MR/*

Note: once you run the packmedia operation the files in /mnt/MR are modified and can no longer be used to compile another miniroot

Modify the jumpstart

# cd /mnt/DVD/.install_config
# vi flasharchive
install_type flash_install
archive_location local_file /cdrom/flasharchive
fdisk all solaris all
partitioning explicit
filesys rootdisk.s0 16000 /
filesys rootdisk.s1 2048 swap
filesys rootdisk.s3 103000 /var
filesys rootdisk.s4 free /var/spool/kodak_library/document_storage

note: the numbers for the slices are megs, just duplicate what you have for your install which can be found in format, partition, print. See dracko article #765 for greater detail

# rm rules.ok rules
# echo "any – – flasharchive -" > rules
# /mnt/DVD/Solaris_10/Misc/jumpstart_sample/check

The resulting output from the last command should look similar to:
Validating rules…
Validating profile flashinstall_profile…
The custom JumpStart configuration is ok.

Create your flash archive
# flarcreate –n “the archive name” –R / -a “author” –c –e “my archive” –x /mnt /mnt/DVD/flasharchive

Note: purists will want to boot to single user mode, and then mount the scratch drive

Create the ISO

/usr/bin/mkisofs -N -D -R -U -l -J
-b boot/grub/stage2_eltorito
-boot-load-size 4
-c .catalog
-V "my archive name"
-o /mnt/my_archive.iso

Burn it

# cdrw –i /mnt/my_archive.iso

Boot it
When you boot select “custom jumpstart install”

Leave a Reply

Your email address will not be published. Required fields are marked *