Changeset 969 for trunk/debirf/fs/usr/bin/debirf
- Timestamp:
- Jan 30, 2008 6:31:31 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/debirf/fs/usr/bin/debirf (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debirf/fs/usr/bin/debirf
r941 r969 58 58 enter PROFILE [CMDS] enter shell in debirf profile root changes 59 59 (optional execute CMDS in root and exit) 60 makeiso PROFILE create a bootable ISO using the given profile 61 (requires GRUB) 60 62 help this help 61 63 … … 455 457 } 456 458 459 # create an ISO from the given kernel and initramfs (requires GRUB, 460 # see: 461 # http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html) 462 makeiso() { 463 DEBIRF_PROFILE="$1" 464 shift 465 [ -d "$DEBIRF_PROFILE" ] || failure "'$DEBIRF_PROFILE' does not seem to be a directory" 466 467 local KERNEL=${KERNEL:-$(echo "vmlinu"*)} 468 local INITRAMFS=${INITRAMFS:-$(echo "debirf-"*.cgz)} 469 470 # FIXME: it would be best to pull the name of the architecture 471 # exactly instead of using shell globbing to guess at it: 472 local GRUB_ELTORITO=${GRUB_ELTORITO:-"/usr/lib/grub/"*"-pc/stage2_eltorito"} 473 474 ls -l "$KERNEL" > /dev/null || failure "Failed to find a single kernel in '$DEBIRF_PROFILE'" 475 ls -l "$INITRAMFS" > /dev/null || failure "Failed to find a single initramfs in '$DEBIRF_PROFILE'" 476 [ -r "$GRUB_ELTORITO" ] || failure "Failed to find a grub El Torito stage2 loader." 477 478 mkdir -p iso/boot/grub 479 ln -s "../$KERNEL" iso/ 480 ln -s "../$INITRAMFS" iso/ 481 ln -s "$GRUB_ELTORITO" iso/boot/grub/ 482 cat >iso/boot/grub/menu.lst <<EOF 483 serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 484 terminal --timeout=10 serial console 485 486 title Debirf ($DEBIRF_PROFILE) (created $(date -R)) 487 kernel /$KERNEL 488 initrd /$INITRAMFS 489 EOF 490 491 mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o "debirf-$DEBIRF_PROFILE.iso" -f iso 492 # do we need to clean up the iso/ directory so that this can be run again? 493 } 494 495 457 496 ############################################################### 458 497 ### MAIN … … 465 504 'make'|'m') 466 505 make "$@" 506 ;; 507 'makeiso'|'i') 508 makeiso "$@" 467 509 ;; 468 510 'enter'|'e')
Note: See TracChangeset
for help on using the changeset viewer.

