Changeset 1284


Ignore:
Timestamp:
Sep 29, 2009, 5:13:58 AM (9 years ago)
Author:
jrollins
Message:

Use isolinux as default eltorito bootloader for iso, since grub2 does
not yet support simultaneous serial and console terminal (boo!).
However, grub is still supported through the DEBIRF_ELTORITO env
variable, ie: "isolinux", "grub", "grub:serial", "grub:console".
updated man page.

Location:
trunk/debirf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/debirf/debian/changelog

    r1279 r1284  
    33  * "absolutize" BUILDD path to get around bug in getcwd in fakechroot
    44    (#548691)
    5   * update makeiso to use new grub2 grub-pc grub-mkrescue utility, or
    6     isolinux from syslinux-common
     5  * update makeiso to use isolinux from syslinux-common as default
     6    eltorito.  support for grub2 with the grub-pc grub-mkrescue utility is
     7    also supported, but grub2 does not yet support simultaneous
     8    serial/console terminal, so this is not the default (Closes: #548712).
    79  * bumped standards version to 3.8.3 (no changes needed).
    810  * explicitly delete root passwd
    911
    10  -- Jameson Graef Rollins <jrollins@finestructure.net>  Mon, 28 Sep 2009 21:24:53 +0200
     12 -- Jameson Graef Rollins <jrollins@finestructure.net>  Tue, 29 Sep 2009 11:10:52 +0200
    1113
    1214debirf (0.23-1) unstable; urgency=low
  • trunk/debirf/man/man1/debirf.1

    r1274 r1284  
    3333Create a bootable CD-ROM image from the kernel and initramfs in
    3434PROFILE.  This requires an El Torito bootloader to be available.  If
    35 grub-pc is installed, then the grub-mkrescue utility from that package
    36 will be used.  If grub-mkrescue is not available, then isolinux from
    37 the syslinux-common can be used as long as genisoimage utility is also
    38 available.
     35the syslinux-common package is installed, then isolinux is used.  If
     36not, and grub-pc is installed, then the grub-mkrescue utility from
     37that package will be used.  You may use the \fBDEBIRF_ELTORITO\fP
     38environment variable to specify manually (see below).
    3939.TP
    4040.B help
     
    149149keyring to verify debootstrap (default determined by DEBIRF_DISTRO)
    150150.TP
    151 .B GRUB_ELTORITO
    152 absolute path to grub's stage2_eltorito image when using \fBdebirf
    153 makeiso\fR (default: standard location from debian grub package -- you
    154 probably don't need to specify this)
     151.B DEBIRF_ELTORITO
     152whether to use "isolinux" or "grub" as eltorito bootloader for
     153\fBdebirf makeiso\fR.  if not specified, "isolinux" is the default.
     154when specifying "grub" you may also specify the grub i/o as either the
     155serial port or video console with "grub:serial" or "grub:console"
     156(default is serial).
    155157.PD
    156158.SH FILES
  • trunk/debirf/src/debirf

    r1283 r1284  
    567567    # determine which eltorito boot loader we're using
    568568    if [ -z "$DEBIRF_ELTORITO" ] ; then
    569         if which grub-mkrescue >/dev/null ; then
     569        if [ -f /usr/lib/syslinux/isolinux.bin ] ; then
     570            local DEBIRF_ELTORITO=isolinux
     571        elif which grub-mkrescue >/dev/null ; then
    570572            local DEBIRF_ELTORITO=grub
    571         elif [ -f /usr/lib/syslinux/isolinux.bin ] ; then
    572             local DEBIRF_ELTORITO=isolinux
    573573        else
    574             failure "Suitable El Torito boot loader not found.  Please install grub-pc or syslinux-common."
     574            failure "Suitable El Torito boot loader not found.  Please install syslinux-common or grub-pc."
    575575        fi
    576576    fi
     
    587587
    588588    case "$DEBIRF_ELTORITO" in
    589         grub)
    590             msg "using grub as bootloader..."
     589        grub|grub:serial|grub:console)
     590            msg "using $DEBIRF_ELTORITO as bootloader..."
    591591
    592592            # use hard links to avoid massive copying time and genisoimage's
     
    597597            # make grub.cfg
    598598            mkdir -p "$ISODIR"/boot/grub/
    599             cat >"$ISODIR"/boot/grub/grub.cfg <<EOF
     599            case "$DEBIRF_ELTORITO" in
     600                grub|grub:serial)
     601                    cat >"$ISODIR"/boot/grub/grub.cfg <<EOF
    600602serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
    601603if terminal_input serial ; then true ; else
    602604  # For backward compatibility with versions of terminal.mod that don't
    603605  # understand terminal_input
    604   terminal --timeout=10 serial console
     606  terminal serial
    605607fi
    606608if terminal_output serial ; then true ; else
    607609  # For backward compatibility with versions of terminal.mod that don't
    608610  # understand terminal_output
    609   terminal --timeout=10 serial console
     611  terminal serial
    610612fi
     613EOF
     614                    ;;
     615                grub:console)
     616                    cat >"$ISODIR"/boot/grub/grub.cfg <<EOF
     617if terminal_input console ; then true ; else
     618  # For backward compatibility with versions of terminal.mod that don't
     619  # understand terminal_input
     620  terminal console
     621fi
     622if terminal_output console ; then true ; else
     623  # For backward compatibility with versions of terminal.mod that don't
     624  # understand terminal_output
     625  terminal console
     626fi
     627EOF
     628                    ;;
     629            esac
     630            cat >>"$ISODIR"/boot/grub/grub.cfg <<EOF
    611631menuentry "Debirf: $DEBIRF_LABEL, serial console (created $(date -R))" {
    612         linux   /$KERNEL console=ttyS0,115200n8
     632        linux   /$KERNEL console=tty0 console=ttyS0,115200n8
    613633        initrd  /$INITRAMFS
    614634}
    615635menuentry "Debirf: $DEBIRF_LABEL, video console (created $(date -R))" {
    616         linux   /$KERNEL console=tty0
     636        linux   /$KERNEL console=ttyS0,115200n8 console=tty0
    617637        initrd  /$INITRAMFS
    618638}
     
    621641            # make the iso
    622642            grub-mkrescue --image-type=cdrom --overlay="$ISODIR" "${DEBIRF_BUILDD}/${ISO}"
    623    
    624643            ;;
    625644
     
    642661prompt 1
    643662timeout 0
    644 display isolinux.cfg
     663display menu
    645664default serial
    646 
    647 # DebIRF: $DEBIRF_LABEL
    648 # kernel: $KERNEL
    649 # initramfs: $INITRAMFS
    650 # created: $(date -R)
    651665
    652666# serial console
    653667label serial
    654668  kernel vmlinuz
    655   append initrd=debirf.cfg console=ttyS0,115200n8
     669  append initrd=debirf.cfg console=tty0 console=ttyS0,115200n8
    656670
    657671# video console
    658672label video
    659673  kernel vmlinuz
    660   append initrd=debirf.cfg console=tty0
     674  append initrd=debirf.cfg console=ttyS0,115200n8 console=tty0
     675
     676EOF
     677            cat >"$ISODIR"/menu <<EOF
     678
     679Welcome to debirf: DEBian on InitRamFs
     680
     681label: $DEBIRF_LABEL
     682kernel: $KERNEL
     683initramfs: $INITRAMFS
     684created: $(date -R)
     685
     686type 'serial' for serial console i/o (default)
     687type 'video' for video console i/o
    661688
    662689EOF
Note: See TracChangeset for help on using the changeset viewer.