Ignore:
Timestamp:
Jun 18, 2013 7:15:04 AM (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
1105519
Parents:
fdb75b8
Message:

Add bootManager=GRUB option to pc-sysinstall. Using this will require that
you ship grub-install && grub-mkconfig with your install image,
or just install the package during installation time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/functions-disk.sh

    r1620346 r9caf430  
    649649{ 
    650650  _intDISK=$1 
     651  _intBOOT=$2 
    651652  
    652653  # Set our sysctl so we can overwrite any geom using drives 
     
    665666  rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}" 
    666667   
    667   echo_log "Stamping boot sector on ${_intDISK}" 
    668   rc_halt "gpart bootcode -b /boot/pmbr ${_intDISK}" 
     668  if [ "${_intBOOT}" = "GRUB" ] ; then 
     669    # Doing a GRUB stamp? Lets save it for post-install 
     670    echo "${_intDISK}" >> ${TMPDIR}/.grub-install 
     671  else 
     672    echo_log "Stamping boot sector on ${_intDISK}" 
     673    rc_halt "gpart bootcode -b /boot/pmbr ${_intDISK}" 
     674  fi 
    669675 
    670676} 
     
    706712    echo_log "Stamping boot0 on ${_intDISK}" 
    707713    rc_halt "gpart bootcode -b /boot/boot0 ${_intDISK}" 
     714  elif [ "$_intBOOT" = "GRUB" ] ; then 
     715    # Doing a GRUB stamp? Lets save it for post-install 
     716    echo "${_intDISK}" >> ${TMPDIR}/.grub-install 
    708717  else 
    709718    echo_log "Stamping boot1 on ${_intDISK}" 
     
    727736    slice=`echo "${DISK}:1:mbr" | sed 's|/|-|g'` 
    728737  else 
    729     init_gpt_full_disk "$DISK" 
     738    init_gpt_full_disk "$DISK" "$BOOT" 
    730739    slice=`echo "${DISK}:1:gpt" | sed 's|/|-|g'` 
    731740  fi 
     
    837846  sleep 1 
    838847 
    839   if [ "${BMANAGER}" = "bsd" ] 
    840   then 
     848  if [ "${BMANAGER}" = "bsd" ]; then 
    841849    echo_log "Stamping boot sector on ${DISK}" 
    842850    rc_halt "gpart bootcode -b /boot/boot0 ${DISK}" 
     851  elif [ "${BMANAGER}" = "GRUB" ] ; then 
     852    # Doing a GRUB stamp? Lets save it for post-install 
     853    echo "${DISK}" >> ${TMPDIR}/.grub-install 
    843854  fi 
    844855 
     
    890901  sleep 1 
    891902 
    892   if [ "${BMANAGER}" = "bsd" ] 
    893   then 
     903  if [ "${BMANAGER}" = "bsd" ]; then 
    894904    echo_log "Stamping boot sector on ${DISK}" 
    895905    rc_halt "gpart bootcode -b /boot/boot0 ${DISK}" 
     906  elif [ "${BMANAGER}" = "GRUB" ] ; then 
     907    # Doing a GRUB stamp? Lets save it for post-install 
     908    echo "${DISK}" >> ${TMPDIR}/.grub-install 
    896909  fi 
    897910 
Note: See TracChangeset for help on using the changeset viewer.