Home > Solaris > Create Solaris 10×86 USB bootdisk installer

Create Solaris 10×86 USB bootdisk installer

Requirement

USB disk (min size 4GB)

PC / laptop with solaris 10 x86 installed

Solaris installer iso image (tested with Solaris 10 x86 update 8/9/10/11)

Advantage

Installation time will be much faster compare to install from DVDROM

Disadvantage

BIOS must be able to boot from USB disk

Configuration Step

  1. Disable service volfs
  2. svcadm disable volfs

    svcs volfs

  3. Plug in USB Disk and detect device name
  4. rmformat -l

  5. Prepare USB disk as single solaris slice
  6. fdisk -d -B /dev/rdsk/c0t0d0p0

    -d : debug mode

    -B : use whole usb disk as single partition

  7. Check usb disk partition layout
  8. fdisk -d /dev/rdsk/c0t0d0p0

  9. Recheck and Clean up the device tree
  10. devfsadm -vC

  11. Create solaris partition layout in file /root/slices.txt
  12. slices: 0 = 2MB, 3990MB, "wm", "root" :
    1 = 0, 1MB, "wu", "boot" :
    2 = 0, 4000MB, "wm", "backup"

  13. now apply partition layout to usb disk
  14. rmformat -s /root/slices.txt /dev/rdsk/c0t0d0p0

  15. Recheck and Clean up the device tree
  16. devfsadm -vC

  17. Create filesystem on usb disk
  18. newfs /dev/rdsk/c0t0d0s0

  19. Mount existing solaris iso image
  20. LOFI_ISO=`lofiadm -a /root/sol-10u10.iso`

    mount -o ro -F hsfs ${LOFI_ISO} /mnt/cdrom

  21. Mount USB disk
  22. mount /dev/dsk/c0t0d0s0 /mnt/usbdisk

  23. Copy content of cdrom to usb disk (please be patient for a few minutes +20)
  24. cd /mnt/cdrom

    tar -cpBf - . | (cd /mnt/usbdisk; tar -xpBf -)

  25. Make sure copy proces is complete (match output from this 2 couple command)
  26. cd /

    find /mnt/cdrom | wc -l

    find /mnt/usbdisk | wc -l

    ls -lah /mnt/cdrom

    ls -lah /mnt/usbdisk

  27. Create local-hack to make autodetect and automount usb disk partition on /cdrom within installation process
  28. gzip -dc /mnt/usbdisk/boot/amd64/x86.miniroot > /tmp/miniroot_uncompressed

    LOFI_MINIROOT=`lofiadm -a /tmp/miniroot_uncompressed`

    mount ${LOFI_MINIROOT} /mnt/miniroot

    vi /mnt/miniroot/sbin/install-solaris

    Insert this line in the beginning of script
    ###########################################################################################
    #
    # 180109 LQman: tuning scripts
    # 160411 LQman: local hack to make 1st partition on USB disk
    # mounted automagically on /cdrom
    #==========================================================================================
    echo "===== Start LQman's local hack ====="

    echo "Hardware re-detection"
    /usr/sbin/devfsadm -C > /dev/null 2>&1
    sleep 2

    echo "Probing USB disk partition name to mount on /cdrom"
    for PARTITION in `ls /dev/dsk/*s0`; do
    mount -o ro ${PARTITION} /cdrom > /dev/null 2>&1
    echo "${PARTITION} - \c"
    if [ -d "/cdrom/Solaris_10" ]; then
    echo "OK"
    break
    else
    echo "Failed"
    if [ "`mount | grep cdrom`" ]; then
    umount /cdrom
    fi
    fi
    sleep 1
    done

    echo "===== Finish LQman's local hack ====="

    echo "Press [ENTER] to continue..."
    read ANY
    ###########################################################################################

    cd /

    umount /mnt/miniroot

    lofiadm -d ${LOFI_MINIROOT}

    lofiadm -d ${LOFI_ISO}

    gzip -c1 /tmp/miniroot_uncompressed > /mnt/usbdisk/boot/amd64/x86.miniroot

  29. Installing boot loader on usb disk from existing solaris installation
  30. umount /mnt/usbdisk

    cd /boot/grub

    /sbin/installgrub ./stage1 ./stage2 /dev/rdsk/c0t0d0s0

    Testing

    Reboot your PC and boot from usb disk.

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: