grml-debootstrap-0.59/0000755000000000000000000000000012240423742011622 5ustar grml-debootstrap-0.59/TODO0000644000000000000000000000224411710074211012306 0ustar TODO list for grml-debootstrap ============================== * support Virtual Machine deployment in interactive mode(?) * support for LVM * support tarballs for customization/mirror source -> integrate/use 'fai dirinstall'? * support automatic installation of grml packages: * grml-etc-core * grml-x + xserver-xorg [configuration of X] -> in progress.. (GRMLPACKAGES works already) * support cross-installation (other architectures than the currently running one) -> like in http://www.netfort.gr.jp/~dancer/diary/daily/2007-Jun-16.html.en#2007-Jun-16-04:04:03 * support selection between DESKTOP/WORKSTATION and SERVER (provide default packages selection) * support rpmstrap (bootstrap a basic RPM-based system) -> http://xen-tools.org/software/rinse/ * support automatic installation of Gentoo * provide zsh-completion for grml-debootstrap's cmdline variables (in progress) * support installation on usb-pen (like grml2usb for Debian) -> http://blog.256bit.org/archives/172-Debian-in-der-Hosentasche.html#extended * support adduser for new user who has same permissions as an user created by d-i * test support for Ubuntu as debootstrap >=1.0.0 provides support for it grml-debootstrap-0.59/releasetable-man.txt0000644000000000000000000000113111664217047015570 0ustar Current status: +----------------+-------------+-----------------+ | Release / Tool | debootstrap | cdebootstrap | +----------------+-------------+-----------------+ | Lenny | works [1] | works [1] | +----------------+-------------+-----------------+ | Squeeze | works | works | +----------------+-------------+-----------------+ | Wheezy | works | works | +----------------+-------------+-----------------+ | Sid | works [2] | works [2] | +----------------+-------------+-----------------+ grml-debootstrap-0.59/images/0000755000000000000000000000000011336336436013077 5ustar grml-debootstrap-0.59/images/screenshot.png0000644000000000000000000001260511336336436015766 0ustar PNG  IHDRbKGD pHYs  ~tIME;{vtEXtCommentCreated with The GIMPd%nIDATxkPv*YdO9[azdΙRMBBn4=?_ǯӖ߿C{]ں)&/-V84=_Z -zzb2[n]$I$IR飗~Bc;ck^Rф-e- O ҕ?e]ktbwn) Q$I$Ifj%ܧ`l#v{X(s_yh=pc:Vw}`mHlr6̰ CՂ!s_3q>h%&/-Vv-_LL;<\G=ŕgyeT.)A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qkݺu˳>>2+b!eH}byV;!Ib==5 "˦+i\\***!tz Uȁx!BhZK%RHd(ݗ/_ FId !j33.oSe_rQZ?jX2#glOOvGMnHL|(=]=ZmOw"#파+WI chR54LS0f}߻vqο ~~_nҁεKN|t4@63- ZZO?w/Z?8+Ky80c;_۷wfjB~ڀ#3?Ĥu0 ivv3kqLq JNNCCHdEetI4\+V3gOȬ PIA6o86laIӎ;+..ΉNGS ,OS/A @Dڂc'3g.\{Ç\@ΎQLRB^L,r͚5+C|Рw w-5I_Ӹts>|?V쑛;cƌy[bΕ8KH打+ n;;w٪UֲeJKKΝRM2%;;;##شL,_PP%̙SRRdP^b CO A)`ANL@yhW__Ī* %>)@$pHccի,gɓ'q{{2/ Xk .QK!dYj!1-{ u -e =K_cfa< 67%CL l! p,yџ~O-d)퀹FE*EW"0y_f hIENDB`grml-debootstrap-0.59/images/icons/next.png0000644000000000000000000000242611336336436015702 0ustar PNG  IHDRĴl;bKGD pHYs ?@"tIME )(IDATxڕُU{kު{vbpƱ'1.T_ .o@#Yh2сapY{ꮪ{}IK:ʯ'2X@uu 4]T1z=k}끷@ H#8VEׁ}1 p5ۉx֤\amkri:ռbrbBM\W1K?ߜЇANnY>FC6scpy]z3/]bHz Xx^D2+})%c!#O1se/poL;~ubٴ1b)( b6tG82ҕ4}FfZS-Ɯ3ѰȦPAƉJ72X#f+@S4 In2:wN+1||t;=qє|Mm>P" Xbr|QrN/pڀd2%#$TK2U ,l̤h)-}qVį5RtcHH캢H%ЁVG̀"welpmY{R4afсaM l,يbcCϪO4;|f@!*΢+EILF}zV/ZaɱL&w͇/EPg) RJ4JF6eKF{Ao$V@X!wG _|>oNQ?  UT\U i[qcex1[0~hY3-jk$95,3ԔN.b5tb͎mIc5.lS`0Y\`|x-83-I 4TvMOγ׈MR5#f QSJCf* ]sl`Kח<߽Am& olduNJD(@ =7 sǁ0d@~ɢH1(lAMxv3eLN%{_9ExIENDB`grml-debootstrap-0.59/images/icons/example.png0000644000000000000000000000446211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'(/"Ou gDŽuX4U;M5pݺu@֭cq*_VXiV L43>7x@:kM2 C sb5N6o|]7ڰaKZ5ň슢39N + * R@I܀kA⚰~AB?ҝ 23h%c⳦ZgZ!֯_"Wird3a-!^H Q3DeG7t;ˢs5( VqF/_~,kK-beM98q%Ǐ DTd 8oeC5BE#<b0!53F-[EBu*DutmwpW;U';]+g EEg24TM^UWG ktk" <ª.)t\ۓQu5K եeW. RasC얊(fkq ΧheLk׺i{)m5v-|1.(tS/J $Ԝ#R܈ ;"iBbh,XJȦp >ת)ؗAIYEJFpzDJƁ6'F9INF82TG P[}bHЮq A_@֑@yq̩.\Na4]ˋhLkōA9ޫG8PH}%'>m @KBqIS*B0G l~GA'L(ơ+7 uU%LU0ԐH-I]24#阠.  P__^QJ$Z0U][d\j۴%v}]Wm :'QhDdRX+Kh;ͽ 8'CJY$Bo cӖY԰ZY4k" ., 2!0Bt>JHHHK ;-Y`|xCWiו>\fRPnVU=G2P[u;`at( Pyq(vZ:YBLc6#+J." rQ#56]@M NZXK/c5k8ۣ5w02Iaa&U + u`=liM:K7k~Lr(D(=]E* F0kjLJd8ħV! ]߹sg C㇦'N +Gi5CtA&RVm& (]_?/":'Ě{'Ea0˜NԀiҥ(q U_PwY̔cwp;}@P2e.Vp ,XԀە+W%91ΟH`c\x1[/ٹЧŞ(+Sܜs'C>?!%̻h"??*>/D"Qss3 6444**Μ9pܰk\>>>G 2Lܿ Aӯr4M`@B׏b!anSa,X,U$I=п;@лj% [PB ,*㱀1TApдF'F?O~̽s_Q,#IENDB`grml-debootstrap-0.59/zsh-completion0000644000000000000000000000257011336336436014534 0ustar #compdef grml-debootstrap # Filename: /etc/zsh/completion.d/_grml-debootstrap # Purpose: zsh completion for grml-debootstrap # Authors: grml-team (grml.org), (c) Frank Terbeck , (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ _arguments -s \ '(-h --help)'{-h,--help}'[this help text]:' \ '(-v --version)'{-v,--version}'[display version information]:' \ '(-m --mirror)'{-m,--mirror}'[specify mirror for apt{-get,itude}]:mirror' \ '(-p --mntpoint)'{-p,--mntpoint}'[mountpoint for the target system]:mount point:_path_files' \ '(-r --release)'{-r,--release}'[specify the release name of the new system]:release' \ '(-t --target)'{-t,--target}'[target partition or directory]:device or directory:_path_files' \ '--grub[installation device for grub]' \ '--password[specify password for root user]' \ '--bootappend[appendline for kernel]' ## END OF FILE ################################################################# # vim:ft=zsh grml-debootstrap-0.59/locale.gen0000644000000000000000000000050211336336436013561 0ustar # This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED. Other # combinations are possible, but may not be well tested. If you change # this file, you need to rerun locale-gen. # en_US ISO-8859-1 en_US.ISO-8859-15 ISO-8859-15 en_US.UTF-8 UTF-8 grml-debootstrap-0.59/devices.tar.gz0000644000000000000000000025727011336336436014420 0ustar ݷHߒǑ QROrZۋck`Cy,@؉lsJc@Ef;{r㏿?_?Ç_gk}x}w/_W~~3BIgo?n M>7~=?=tϩ׸?~M_Ϙgw?p|/OK|hۻkr!뫻>3ܿ?w1"\r~^__u@~z։G3,Ix[?c__ !nOautxX8<o?˭Pj)OǗ҈.C{fgw'x4Jq }lg,]Hyz}3?{9ū~x~g???oo?KO{?[37>~ aſOQ=b;ϜEb?{ە`GV'X[mKNWN4mj)h?!?vsHuv2VG#sO!Ϝ+Kq?m}m$_2?2$/~36?9&?&3477]'gό`G'qtg͂Z|hs3}I=8 VK%H*_<?m^~gqcTLSd? y&'7\Oa?+7LϘt3?*y%/c??GKKiL 鿍#;o]\Hh)Ϭ?d&g?wz"\qDZI'*?k$L+7G$ǫ?Q_d+QgO' /fc)ch_c^:K%YO&&SNcq}3VoT\tw?`7OBeFM924H9Xeb@MF_ߵ$RhG* C%3_?;w"O7~: q0xgUiSj?FƎu)ߣLU}Pow& 7Gmp 0?濥m\zfg/E/-D Ob_e]:K/sK1|{ 4:G#Co_ ϕ?? VD_Sc 0?v^XKOky.'G6_(W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'?h?0?>_:I/eGw_u,[@ $tv C:+j_-6_ FWO$bW$.;c?P|m]?>MHO?_$g1UV#T_+GIt$f@ý}xOgY2kxOnu_DM+;-LG?AŮ }Cwb8?"xEd=z?R?qvbbyeCORKJ3yGӮ_ 7OSFs3^S P_? s$?Pw?)ڣ Cκ1/w@z7+_)Yc_v.\ ߥ6_O}}_ GDyȗOA{z [j(>/;_dl\֏.]3?Eg$/kփA2/Y??Y@A_߯^^}S{91Q7~5k߇} Li; ?rw7T;_HhocoP]*Vc/?v4Tϱ?꿑Oq-=q$~s@YSVk is?[wNY?I ߩ?_sb/s?gI?$쾇_)1ſk?_g~??:'?q{#r:'Ra [yjoO ˳S?_ r6U"/hφob]0?@_v?5/59H:>MhY^PO=//_91/V5D\Egb9=ϫos>!OlmchgxGſKhY?i[YFd_6p?%<ϼZ]ٙx?k_$翓߾XgW< $v)_B^g/ik#7]Uٮ࿭ u_!w 'g3~EO}Uo?os/%79$ۍ%I/,_diK(H-Raߏ;Oif-Uq4Zw`%?y;72Tg3d? G !$of?n_DYT?X1W|Ɍ{C]}V.WNvT??+Õco/LPo!?E!8t gK?AH__Q$iF5qq?>nT?%l_<yXo?IQ?"_?CAߣD_yo!%!6TQ+5/I_r#QMO4y+ \z/IQ+Zc_k%@LWyIWZ^r;qKI?:_D'>?Xwp:m 8Gxt[["<D';>gfoNw!?>z/qo wz?QM$ U_3}w '?=O?1 _̬LC9B$? b;_Pd'?<kc,U?-8u1~c׀OLO?9/tlLZxA;CLA!}h)7_?ԯ]b?C]jqC 4:[7]{oy7?IqwvcOw,L;wb>L.'⿛'I{?)_d.j& ?2+h;?/_ow{ {8"SPO ?O{W?0$uv?`x?fsO_g~sȷ?ZGHփMv翯R~ܐ7ruC_*#ur(kwqS?ϯB={_AP*grml-debootstrap-0.59/tests/0000755000000000000000000000000011746273603012775 5ustar grml-debootstrap-0.59/tests/run_tests.sh0000755000000000000000000000141311664217047015360 0ustar #!/bin/bash # Filename: run_tests # Purpose: run unit tests for grml-autoconfig # Authors: grml-team (grml.org), (c) Ulrich Dangel # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ GLOBRETVAL=0 for FILE in test_*.sh ; do if [ -x ${FILE} ] ; then pretty_name="${FILE##test_}" pretty_name="${pretty_name/.sh/}" echo "Running test for: ${pretty_name}" ./${FILE} RETVAL=$? [ "$RETVAL" -ne 0 ] && GLOBRETVAL=$RETVAL fi done exit $GLOBRETVAL ## END OF FILE ################################################################# # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=2 grml-debootstrap-0.59/tests/test_cmdlineopts.sh0000755000000000000000000000233411336336436016715 0ustar #!/bin/bash test_cmdlineopts() { . ../cmdlineopts.clp CMDLINE= typeset -a VALUES count=0 i=0 OLDIFS="$IFS" IFS=, for CMD in $CMDLINE_OPTS ; do PARAM="" DELIM=" " # check if CMD is optional if [[ $CMD == *:: ]] ; then DELIM="=" fi # CMD expects addional parameter if [[ $CMD == *: ]] ; then PARAM=$RANDOM fi VALUES[$count]="${CMD%%:*}$DELIM$PARAM" ((count++)) done IFS=$OLDIFS # build the commandline while [ "$i" -lt "$count" ] ; do CMDLINE+="--${VALUES[$i]} " ((i++)) done . ../cmdlineopts.clp $CMDLINE i=0 # check the result against input while [ "$i" -lt "$count" ] ; do ENTRY="${VALUES[$i]}" VARNAME=${ENTRY% *} VARNAME=${VARNAME%=*} RESULT=${ENTRY/* /} RESULT=${RESULT/*=/} VARNAME='$_opt_'${VARNAME/-/_} VALUE="$(eval echo $VARNAME)" if [ -z "$RESULT" ] ; then assertNotNull "$VARNAME should be not null" "$VALUE" else assertEquals "$VARNAME" "$RESULT" "$VALUE" fi ((i++)) done } SHUNIT_PARENT=$0 . /usr/share/shunit2/shunit2 grml-debootstrap-0.59/cmdlineopts.clp0000644000000000000000000001205412116355602014646 0ustar # -*- shell-script -*- # Filename: cmdlineopts.clp # Purpose: shell script command line parameter-processing for grml-debootstrap # Authors: grml-team (grml.org), Tong Sun # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ # @WARNING: Do NOT modify this file without prior contacting the author. # This script is use for the command line *logic* processing. It should be # as dumb as possible. I.e., it should NOT be more complicated than # copy-paste-and-rename from existing code. All *business-logic* processing # should be handled in the main script, where it belongs. ################################################################################ CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,pre-scripts:,debconf:,vmfile,vmsize:,keep_src_list,hostname:,password:,nopassword,grmlrepos,backportrepos,bootappend:,grub:,arch:,insecure,verbose,help,version,force _opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \ $CMDLINE_OPTS -- "$@"` if [ $? != 0 ]; then eerror "Try 'grml-debootstrap --help' for more information."; eend 1; exit 1 fi eval set -- "$_opt_temp" while :; do case "$1" in # == Bootstrap options --mirror|-m) # Mirror which should be used for apt-get/aptitude shift; _opt_mirror="$1" ;; --iso|-i) # Mountpoint where a Debian ISO is mounted to shift; _opt_iso="$1" ;; --release|-r) # Release of new Debian system shift; _opt_release="$1" ;; --target|-t) # Target partition (/dev/...) or directory shift; _opt_target="$1" ;; --vmfile) # Virtual machine file _opt_vmfile="T" ;; --vmsize) # size of Virtual machine file shift; _opt_vmsize="$1" ;; --mntpoint|-p) # Mountpoint used for mounting the target system shift; _opt_mntpoint="$1" ;; --debopt) # Extra parameters passed to the debootstrap command shift; _opt_debopt="$1" ;; --filesystem) # Filesystem that should be used shift; _opt_filesystem="$1" ;; --interactive) # Use interactive mode (frontend) _opt_interactive=T ;; --nodebootstrap) # Skip debootstrap, only do configuration to the target _opt_nodebootstrap=T ;; --nopackages) # Skip installation of packages defined in /etc/debootstrap/packages _opt_nopackages=T ;; --arch) # Target architecutre shift; _opt_arch="$1" ;; # just for backwards compatibility --insecure) _opt_insecure=T ;; # # == Configuration options --config|-c) # Use specified configuration file, defaults to /etc/debootstrap shift; _opt_config="$1" ;; --confdir|-d) # Place of config files for debootstrap, defaults to /etc/debootstrap shift; _opt_confdir="$1" ;; --packages) # Install packages defined in specified file shift; _opt_packages="$1" _opt_packages_set=T ;; --debconf) # Pre-seed packages using specified file shift; _opt_debconf="$1" _opt_debconf_set=T ;; --pre-scripts) # Execute scripts from specified directory (before chroot-scripts). shift; _opt_pre_scripts="$1" _opt_pre_scripts_set=T ;; --scripts) # Execute scripts from specified directory shift; _opt_scripts="$1" _opt_scripts_set=T ;; --chroot-scripts) # Execute chroot scripts from specified directory shift; _opt_chroot_scripts="$1" _opt_chroot_scripts_set=T ;; --keep_src_list) # Do not overwrite user provided apt sources.list _opt_keep_src_list=T ;; --hostname) # Hostname of Debian system shift; _opt_hostname="$1" ;; --password) # Use specified password as password for user root shift; _opt_password="$1" ;; --nopassword) # Skip password dialog _opt_nopassword=T ;; --grmlrepos) # Enable Grml repository _opt_grmlrepos=T ;; --backportrepos) # Enable Debian backports repository _opt_backportrepos=T ;; --bootappend) # Add specified appendline to kernel whilst booting shift; _opt_bootappend="$1" ;; --grub) # Target for grub installation. Use grub syntax for specifying shift; _opt_grub="$1" ;; # == Other options --verbose|-v) # Increase verbosity if [ "$_opt_verbose" ]; then _opt_verbose=`expr $_opt_verbose + 1` else _opt_verbose=1; fi ;; --help|-h) # Print usage information and exit _opt_help=T ;; --version|-V) # Show version information and exit _opt_version=T ;; --force) # Do not prompt for user input _opt_force=T ;; --) shift; break ;; *) eerror "Internal getopt error!"; eend 1 ; exit 1 ;; esac shift done ## END OF FILE ################################################################# grml-debootstrap-0.59/bootgrub.mksh0000644000000000000000000002361711571002310014330 0ustar #!/usr/bin/env mksh # $Id$ # $miros: src/sys/arch/i386/stand/bootxx/mkbxinst.sh,v 1.28 2010/11/12 21:20:35 tg Exp $ # $miros: src/sys/arch/i386/stand/bootxx/bootxx.S,v 1.26 2010/12/01 19:56:58 tg Exp $ +t:GRUB +s:MBR #- # Copyright (c) 2007, 2008, 2009, 2010 # Thorsten Glaser # # Provided that these terms and disclaimer and all copyright notices # are retained or reproduced in an accompanying document, permission # is granted to deal in this work without restriction, including un‐ # limited rights to use, publicly perform, distribute, sell, modify, # merge, give away, or sublicence. # # This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to # the utmost extent permitted by applicable law, neither express nor # implied; without malicious intent or gross negligence. In no event # may a licensor, author or contributor be held liable for indirect, # direct, other damage, loss, or other issues arising in any way out # of dealing in the work, even if advised of the possibility of such # damage or existence of a defect, except proven that it results out # of said person’s immediate fault when using the work as intended. #- # Self-installing 32-bit x86 boot blocks for GNU GRUB2 on i386-pc # Reads a list of extents (firstblock lastblock) from standard input # and writes bootxx to standard output, which can subsequentially be # stored as partition boot record (or floppy boot sector) on disc. set -A thecode 0x66 0x31 0xC9 0x8E 0xD1 0xBC 0xFC 0x7B 0x66 0x51 0x66 0x9D 0x8E 0xC1 0xBE 0x00 0x7C 0x8E 0xD9 0xBB 0x00 0x08 0x53 0x53 0x8E 0xC3 0xBF 0x00 0xFE 0xB5 0x02 0xF3 0xA4 0x1F 0x68 0x6B 0xFE 0xCB 0x30 0x41 0x41 0x44 0x20 0x4C 0x6F 0x61 0x64 0x69 0x6E 0x67 0x20 0x00 0x20 0x65 0x72 0x72 0x6F 0x72 0x0D 0x0A 0x00 0x96 0x02 0x00 0x12 0x00 0x00 0x80 0x65 0xFF 0xB4 0x0E 0xBB 0x07 0x00 0xCD 0x10 0xAC 0x08 0xC0 0x75 0xF4 0xC3 0xE8 0xF7 0xFF 0xB8 0x41 0xFF 0x87 0x06 0x44 0xFE 0x3D 0x41 0xFF 0x75 0x19 0x31 0xC0 0xCD 0x16 0xEA 0xF0 0xFF 0x00 0xF0 0xFB 0x88 0x16 0x43 0xFE 0xBE 0x26 0xFE 0x80 0xFA 0x80 0x72 0xDB 0xE8 0xD2 0xFF 0x31 0xDB 0xBE 0x68 0xFF 0x0F 0xB6 0x2E 0x3D 0xFE 0xAC 0x0F 0xB6 0xC8 0xC0 0xE9 0x05 0x83 0xE0 0x1F 0x40 0x41 0x50 0xBF 0x10 0xFE 0xB8 0x10 0x00 0xAB 0xB0 0x01 0xAB 0x89 0xD8 0xAB 0x8C 0xC8 0xAB 0xF3 0xA4 0x31 0xC0 0xAB 0xAB 0xAB 0xAB 0x5F 0x55 0x56 0xBE 0x10 0xFE 0xFF 0x16 0x44 0xFE 0xBD 0x04 0x00 0x8A 0x16 0x43 0xFE 0x60 0xF9 0xCD 0x13 0x9C 0xB8 0x2E 0x0E 0xBB 0x07 0x00 0xCD 0x10 0x9D 0xFB 0x61 0x73 0x1C 0x4D 0x60 0x9C 0x31 0xC0 0xCD 0x13 0x9D 0xBE 0x34 0xFE 0x0F 0x84 0x77 0xFF 0xB8 0x30 0x0E 0x01 0xE8 0xBB 0x07 0x00 0xCD 0x10 0x61 0xEB 0xD2 0xB4 0x02 0x00 0xE7 0x89 0x5C 0x04 0x00 0xFC 0x72 0x14 0x66 0x83 0x44 0x08 0x01 0x66 0x83 0x54 0x0C 0x00 0x4F 0x75 0xAC 0x5E 0x5D 0x4D 0x0F 0x85 0x7D 0xFF 0xBE 0x3A 0xFE 0xE8 0x3F 0xFF 0x66 0x31 0xD2 0x52 0x66 0x4A 0x8A 0x16 0x43 0xFE 0xB8 0x00 0x82 0x50 0xFA 0xCB 0x60 0x06 0xB4 0x08 0x8A 0x16 0x43 0xFE 0xF9 0xCD 0x13 0xFB 0x07 0xBE 0x34 0xFE 0x0F 0x82 0x21 0xFF 0x80 0xE1 0x3F 0x88 0x0E 0x40 0xFE 0x0F 0xB6 0xC6 0x40 0xA3 0x3E 0xFE 0x61 0x8B 0x0E 0x40 0xFE 0xE3 0xD7 0x8B 0x44 0x08 0x8B 0x54 0x0A 0xF7 0xF1 0x42 0x31 0xC9 0x87 0xD1 0xF7 0x36 0x3E 0xFE 0xC0 0xE4 0x06 0x86 0xC4 0x09 0xC1 0x88 0xD6 0xB8 0x01 0x02 0xC3 0xB4 0x42 0xC3 typeset -i ofs_bkcnt=61 typeset -i ofs_geomh=62 typeset -i ofs_geoms=64 typeset -i ofs_partp=66 typeset -i ofs_secsz=234 typeset -i begptr=360 typeset -Uui8 thecode typeset -Uui16 curptr=begptr typeset -i wnum=0 wofs=0 wrec=0 bkend=0x1FE function do_record { typeset -Ui blk=$1 cnt=$2 n typeset -Uui16 x=blk y (( blk && cnt )) || return print -u2 "$wrec @0x${curptr#16#}: $cnt @$blk (0x${x#16#})" while (( cnt )); do let wrec++ (( n = blk < 0x00000100 ? 0 : blk < 0x00010000 ? 1 : blk < 0x01000000 ? 2 : 3 )) (( x = cnt < 33 ? cnt : 32 )) (( y = blk )) print -u2 " - 0x${curptr#16#}: $((x)) (0x${x#16#}) @ $blk" \ "(0x${y#16#})" (( thecode[curptr++] = (n++ << 5) | (x - 1) )) (( blk += x )) (( cnt -= x )) while (( n-- )); do (( thecode[curptr++] = y & 0xFF )) (( y >>= 8 )) done done } function record_block { typeset -Ui blk=$1 if (( !blk || (wofs && blk != (wofs + wnum)) )); then # flush the blocks from the cache (( wnum )) && do_record $wofs $wnum wofs=0 wnum=0 fi if (( blk )); then # record some new block into the cache (( wofs )) || let wofs=blk (( wnum += 1 << sscale )) fi } typeset -i partp=0 numheads=0 numsecs=0 sscale=0 bsh=9 mbrpno=0 mbrptp=0 pofs=0 set -A g_code 0 0 0 while getopts ":0:1AB:g:h:M:O:p:S:s:" ch; do case $ch { (0) ;; (1) ;; (A) numheads=0 numsecs=99 ;; (B) if (( (bsh = OPTARG) < 9 || OPTARG > 15 )); then print -u2 Error: invalid block size "2^'$OPTARG'" exit 1 fi ;; (g) if [[ $OPTARG != +([0-9]):+([0-9]):+([0-9]) ]]; then print -u2 Error: invalid geometry code "'$OPTARG'" exit 1 fi saveIFS=$IFS IFS=: set -A g_code -- $OPTARG IFS=$saveIFS ;; (h) if (( (numheads = OPTARG) < 1 || OPTARG > 256 )); then print -u2 Warning: invalid head count "'$OPTARG'" numheads=0 fi ;; (M) if [[ $OPTARG != +([0-9])?(:?(0[Xx])+([0-9])) ]]; then print -u2 Warning: invalid partition info "'$OPTARG'" mbrpno=0 mbrptp=0 else saveIFS=$IFS IFS=: set -A mbr_code -- $OPTARG IFS=$saveIFS (( mbrpno = mbr_code[0] )) (( mbrptp = mbr_code[1] )) if (( mbrpno < 1 || mbrpno > 4 )); then print -u2 Warning: invalid partition \ number "'$OPTARG'" mbrpno=0 fi if (( mbrptp < 1 || mbrptp > 255 )); then print -u2 Warning: invalid partition \ type "'$OPTARG'" mbrptp=0 fi fi ;; (O) if [[ $OPTARG != +([0-9]) ]]; then print -u2 Warning: invalid partition offset "'$OPTARG'" else pofs=$OPTARG fi ;; (p) if (( (partp = OPTARG) < 1 || OPTARG > 255 )); then print -u2 Warning: invalid partition type "'$OPTARG'" partp=0 fi ;; (S) if (( (sscale = OPTARG) < 0 || OPTARG > 24 )); then print -u2 Error: invalid input scale "'$OPTARG'" exit 1 fi ;; (s) if (( (numsecs = OPTARG) < 1 || OPTARG > 63 )); then print -u2 Warning: invalid sector count "'$OPTARG'" numsecs=0 fi ;; (*) print -u2 'Syntax: bxinst [-1A] [-B blocksize] [-g C:H:S] [-h heads] [-M pno(1..4)[:typ]] [-O partitionofs] [-p type] [-S scale] [-s secs] 256 || g_code[2] < 1 || g_code[2] > 63 )); then print -u2 Invalid geometry, values out of bounds. elif [[ $(print "(${g_code[0]} * ${g_code[1]} * ${g_code[2]})" \ "> 4294967295" | bc) = 1 ]]; then print -u2 Invalid geometry, more than 2 TiB of data. else # we know it's <= 2^32-1 (( psz = g_code[0] * g_code[1] * g_code[2] )) fi fi if (( psz )); then print -u2 geometry is $psz sectors \($(print \ "$psz * $((1 << bsh))" | bc) bytes\) in ${g_code[0]} cylinders, \ ${g_code[1]} heads, ${g_code[2]} sectors per track if (( numsecs == 0 || (numsecs != 99 && numheads == 0) )); then print -u2 Warning: using these values for C/H/S boot numheads=${g_code[1]} numsecs=${g_code[2]} fi (( mbrpno )) || mbrpno=4 # default partition number fi if (( mbrpno )); then bkend=0x1BE (( psz )) || print -u2 Warning: no geometry given, will not \ create an MBR partition table entry fi if (( numsecs == 99 )); then numheads=0 numsecs=0 else if (( !numheads )); then print -u2 Warning: using default value of 16 heads numheads=16 fi if (( !numsecs )); then print -u2 Warning: using default value of 63 sectors numsecs=63 fi fi # read in the extents while read firstblock lastblock junk; do while (( firstblock <= lastblock )); do record_block $((firstblock++ << sscale)) done done record_block 0 # just flush print -u2 "using $wrec blocks, $((curptr-begptr)) bytes ($((bkend-curptr)) free)" # fill the block table if (( curptr-- > bkend )); then print -u2 Error: too many blocks exit 1 fi while (( ++curptr < bkend )); do thecode[curptr]=0 done thecode[510]=0x55 thecode[511]=0xAA # fill in other data (( thecode[ofs_bkcnt] = wrec )) (( thecode[ofs_geomh] = numheads & 0xFF )) (( thecode[ofs_geomh + 1] = numheads >> 8 )) (( thecode[ofs_geoms] = numsecs )) (( thecode[ofs_partp] = partp )) print -u2 "using sectors of 2^$bsh = $((1 << bsh)) bytes" (( thecode[ofs_secsz] = (1 << (bsh - 8)) )) # create an MBR partition if desired if (( psz )); then (( mbrpno = 0x1BE + ((mbrpno - 1) * 16) )) set -A o_code # g_code equivalent for partition offset (( o_code[2] = pofs % g_code[2] + 1 )) (( o_code[1] = pofs / g_code[2] )) (( o_code[0] = o_code[1] / g_code[1] + 1 )) (( o_code[1] = o_code[1] % g_code[1] + 1 )) # boot flag; C/H/S offset thecode[mbrpno++]=0x80 (( thecode[mbrpno++] = o_code[1] - 1 )) (( cylno = o_code[0] > 1024 ? 1023 : o_code[0] - 1 )) (( thecode[mbrpno++] = o_code[2] | ((cylno & 0x0300) >> 2) )) (( thecode[mbrpno++] = cylno & 0x00FF )) # partition type; C/H/S end (( thecode[mbrpno++] = (mbrptp ? mbrptp : partp ? partp : 0x27) )) (( thecode[mbrpno++] = g_code[1] - 1 )) (( cylno = g_code[0] > 1024 ? 1023 : g_code[0] - 1 )) (( thecode[mbrpno++] = g_code[2] | ((cylno & 0x0300) >> 2) )) (( thecode[mbrpno++] = cylno & 0x00FF )) # partition offset, size (LBA) (( thecode[mbrpno++] = pofs & 0xFF )) (( thecode[mbrpno++] = (pofs >> 8) & 0xFF )) (( thecode[mbrpno++] = (pofs >> 16) & 0xFF )) (( thecode[mbrpno++] = (pofs >> 24) & 0xFF )) (( pssz = psz - pofs )) (( thecode[mbrpno++] = pssz & 0xFF )) (( thecode[mbrpno++] = (pssz >> 8) & 0xFF )) (( thecode[mbrpno++] = (pssz >> 16) & 0xFF )) (( thecode[mbrpno++] = (pssz >> 24) & 0xFF )) fi # create the output string ostr= curptr=0 while (( curptr < 512 )); do ostr=$ostr\\0${thecode[curptr++]#8#} done # over and out print -n "$ostr" exit 0 grml-debootstrap-0.59/THANKS0000644000000000000000000000057311336336436012552 0ustar THANKS ====== Tong Sun [several patches/features] Ulrich Dangel [bugfix] Zoran Dzelajlija [bugfix] Wolfgang Karall [bugfix] Darshaka Pathirana [bugfix] ... and to the other developers of the grml team for bugfixes, patches and ideas. -- Michael Prokop grml-debootstrap-0.59/config0000644000000000000000000001473012236715271013025 0ustar # Filename: /etc/debootstrap/config # Purpose: configuration file for grml-debootstrap # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ ################################################################################ # Important: adjust this file if you want to execute grml-debootstrap # without using the (limited) interactive frontend or # command line options (see manpage and grml-debootstrap --help) ################################################################################ # Where should Debian be installed to? # Usually you want to use a partition. # If you specify a string *without* /dev/ in the beginning, grml-debootstrap # assumes you want to install Debian into a directory. MKFS, TUNE2FS, GRUB and # FSCK will be ignored. # Make sure the TARGET-directory points to a filesystem which has the dev, exec # options enabled. # Default: no default. # Usage examples: # TARGET='/dev/sda1' # install to partition /dev/sda1 # TARGET='/mnt/grml' # install into directory /mnt/grml # Install the grub bootloader? # Specify the device where grub will be installed. # Note: grub can not be installed into a partition. # Default: no default. (Grub will not be installed.) # Usage example: # GRUB='/dev/sda' # Install into MBR of sda # Additional kernel boot options. (For grub.) # Default: no default. # Usage example: # BOOT_APPEND='pci=nomsi' # Set mirror where packages will be downloaded from. # Default: use /etc/debootstrap/etc/apt/sources.list if it exists, else # 'http://http.debian.net/debian' # Usage example: # MIRROR='ftp://ftp.de.debian.org/debian' # Debian Install CD path: # If you have a Debian CD (or mounted ISO), core packages will be # installed from the CD instead of from the network. # Default: no default. # ISO='file:/mnt/iso/debian/' # If /etc/apt/sources.list should NOT be build on the fly, this # options allows providing a separate apt sources.list file via # /etc/debootstrap/etc/apt/sources.list # KEEP_SRC_LIST='yes' # To enable the Grml repository via /etc/apt/sources.list.d/grml.list # set this variable to 'yes'. # Default: 'no' # GRMLREPOS='yes' # Install packages from grml-repository? # Requires activated $GRMLREPOS from above. If empty nothing will be added. # Default: no default. # GRMLPACKAGES='grml-etc-core' # To enable Debian's backports repository via # /etc/apt/sources.list.d/backports.list set this variable to 'yes'. # Default: 'no' # BACKPORTREPOS='yes' # Debian release that should be installed. # Supported values: lenny, squeeze, wheezy, sid # Default: 'wheezy' # RELEASE='wheezy' # Define components that should be used within sources.list. # Default: 'main contrib non-free' # COMPONENTS='main contrib non-free' # Set target architecture. # Only useful when installing i386 while running an amd64 kernel. # Default: current architecture. (From 'dpkg —print-architecture'.) # ARCH='amd64' # Hostname of new system. # Default: 'grml' # HOSTNAME='grml' # Kernel version to install. # Default: according to current architecture. # KERNEL='2.6-686' # Set initial password for the root user. # Please change this password after installation for security reasons. # Default: no default. # ROOTPASSWORD='' # Name of debootstrap executable. # Supported values: 'debootstrap', 'cdebootstrap' # Default: 'debootstrap' # DEBOOTSTRAP='debootstrap' # Pass extra options to debootstrap. # Default: no default. # Usage example: # DEBOOTSTRAP_OPT='--include=debconf-utils,locales,pciutils --exclude=nano,tasksel,tasksel-data,iptables' # debconf-frontend that should be used. # Default: 'noninteractive' # DEBIAN_FRONTEND='noninteractive' # Pass extra options to aptitude/apt-get. # Default: no default. # DPKG_OPTIONS='-o APT::Get::AllowUnauthenticated=true -o aptitude::Cmdline::ignore-trust-violations=yes' # Use custom grml-debootstrap stages. # Specify path to your custom grml-debootstrap stages. # Default: '/var/cache/grml-debootstrap' # STAGES='/var/cache/grml-debootstrap' # Install packages defined in /etc/debootstrap/packages. # Default: 'yes' # PACKAGES='no' # Pre-seed DebConf questions from /etc/debootstrap/debconf-selections. # Default: 'yes' (if file exists) # DEBCONF='no' # Run scripts from /etc/debootstrap/pre-scripts/ before creating the chroot. # Default: 'yes' # PRE_SCRIPTS='no' # Run scripts from /etc/debootstrap/chroot-scripts/ inside chroot. # Default: 'yes' # CHROOT_SCRIPTS='no' # Run scripts from /etc/debootstrap/scripts/ after setting up chroot. # Default: 'yes' # SCRIPTS='no' # Install *.deb packages from /etc/debootstrap/extrapackages/ # Default: 'yes' # EXTRAPACKAGES='no' # Location of config files for debootstrap. # Default: '/etc/debootstrap' # CONFFILES='/etc/debootstrap' # Mount point to use during installation. # Default: no default. # MNTPOINT='/mnt/debootstrap' # File system creation tool to apply on $TARGET. # If empty, no file system will be created. # Default: 'mkfs.ext3' # MKFS='' # Filesystem tuning tool to apply on $TARGET. # If empty, the created file system will not be tuned. # Default: 'tune2fs -c0 -i0' if ext* filesystem is used, no default otherwise. # TUNE2FS='tune2fs -c0 -i0' # Check file system after installation is finished. # Default: 'no' # FSCK='yes' # File system checking tool to apply on $TARGET. # Default: guessed. # FSCKTOOL='' # Packages that should be 'dpkg-reconfigure'-ed while installation. # Default: 'console-data'. # RECONFIGURE='console-data' # Generate locales using /etc/debootstrap/locale.gen configuration file. # Default: 'yes' # LOCALES='no' # locales that should be used as default. # Default: 'en_US.UTF-8' # DEFAULT_LOCALES='en_US.UTF-8' # Use /usr/share/zoneinfo/$TIMEZONE for /etc/localtime. # Default: 'Europe/Vienna' # TIMEZONE='Europe/Vienna' # Clean APT cache after installation is finished. # Default: 'yes' # RM_APTCACHE='no' # Upgrade system via apt-get/aptitude update + [safe-]upgrade. # Default: 'yes' # UPGRADE_SYSTEM='no' # Explicit generation of initrd via update-initramfs. # Default: 'yes' # INITRD='no' # If the specified file exists its content will be displayed at the end of the # installation process. # Useful for checking for errors and display warning message. # Default: '/etc/debootstrap/install_notes' (empty file). # INSTALL_NOTES='/etc/debootstrap/install_notes' ## END OF FILE ################################################################# grml-debootstrap-0.59/debian/0000755000000000000000000000000012240424000013030 5ustar grml-debootstrap-0.59/debian/copyright0000644000000000000000000000257411745366244015023 0ustar This package was debianized by Michael Prokop on Fri, 3 Nov 2006 01:10:52 +0100. It was downloaded from http://deb.grml.org/ Upstream Author: Michael Prokop Copyright: 2006-2012 Michael Prokop , Alexander Wirt , Christian Hofstaedtler , Michael Gebetsroither , Tong Sun , Ulrich Dangel License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License, version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is Copyright 2006-2012, Michael Prokop and is licensed under the GPL, see above. grml-debootstrap-0.59/debian/NEWS0000644000000000000000000000111511664217047013551 0ustar grml-debootstrap (0.32) unstable; urgency=low Starting with this release support for the Debian/etch release does not exist any longer. Starting with this release grml-debootstrap uses Grub2 instead of Grub-legacy (v1). To simplify handling for the user the configuration variable GROOT was dropped and the syntax of GRUB slightly changed. Instead of the old grub syntax style 'hd0' you can use '/dev/sdX' for $GRUB nowadays. You don't have to care about that if you are using the interactive mode. -- Michael Prokop Wed, 28 Oct 2009 23:39:19 +0100 grml-debootstrap-0.59/debian/compat0000644000000000000000000000000211336336436014252 0ustar 5 grml-debootstrap-0.59/debian/changelog0000644000000000000000000007354212240423777014741 0ustar grml-debootstrap (0.59) unstable; urgency=low * [b8fb51c] Fix usage of configuration variables * [6e7a2c8] Drop URL to release notes from script header * [2ef61aa] Improve error handling for update-locale -- Michael Prokop Tue, 12 Nov 2013 14:06:52 +0100 grml-debootstrap (0.58) unstable; urgency=low * [ddf2a40] Support $DEFAULT_LOCALES to enable specified locales as default * [a75f067] Install grub to main md device when installing on SW-RAID/mdadm * [172555b] Support overriding configuration via environment variables * [45642a3] Add vlan package to default package list * [af82910] Add bridge-utils to default package list * [53d51ac] Fix description of SCRIPTS variable in config file. Thanks to Jimmy Gredler for the hint * [2ecc3d3] Mention that "raw format" is used for vmfile option -- Michael Prokop Tue, 12 Nov 2013 13:15:23 +0100 grml-debootstrap (0.57) unstable; urgency=low The "happy wheezy release" release [ Christian Hofstaedtler ] * [dfac692] Remove obsolete DM-Upload-Allowed flag * [5fbec1d] Bump Standards-Version to 3.9.4 (no changes needed) -- Michael Prokop Wed, 08 May 2013 16:21:23 +0200 grml-debootstrap (0.56) experimental; urgency=low [ Markus Rekkenbeil ] * [4f9ea91] Add new feature "backportrepos" via option --backportrepos [ Evgeni Golov ] * [e45e376] fix kernel image search on i386 -- Michael Prokop Fri, 08 Mar 2013 15:28:21 +0100 grml-debootstrap (0.55) experimental; urgency=low [ Evgeni Golov ] * ISO related bugfixes: * [6f8ba91] set ISO to file:$ISO, not to file:$1 which is just wrong * [ab690ec] debootstrap from an ISO when ISO is set as MIRROR is always set * [10690a9] Debian ISOs do not contain signed Release files * [9c1ec11] remove local (file://) mirrors from sources.list * Misc improvements: - [010a354] add a fallback mirror to be added in case when a local mirror is removed - [91e39fc] Dynamically determine the correct kernel package name [Closes: issue1206] - [76ca758] Add firmware-linux-free to the packages to be installed - [a9697fb] add BOOT_APPEND to GRUB_CMDLINE_LINUX_DEFAULT - [a93156c] don't fail to ask for a password if there is no TTY [Closes: issue1200] [ Michael Prokop ] * [f3a7ab6] Use http.debian.net as default mirror -- Michael Prokop Mon, 04 Feb 2013 15:58:46 +0100 grml-debootstrap (0.54) unstable; urgency=low The "happy new year, Verena" release. [ Evgeni Golov ] * [5ee8148] add BOOT_APPEND to GRUB_CMDLINE_LINUX_DEFAULT [ Michael Prokop ] * [62cec4e] Do not hardcode squeeze as Debian/stable * [6589216] Set wheezy as the new default release [Closes: #688234] * [ae9070d] docs: fix outdated default mirror reference * [e5a6244] docs: clarify AUTOINSTALL is currently supported on Grml live systems only. Thanks to Evgeni Golov for review + improving * [4280921] docs: mention VM image and dialog based frontend support. Thanks to Evgeni Golov for review and improving -- Michael Prokop Mon, 31 Dec 2012 23:52:42 +0100 grml-debootstrap (0.53) unstable; urgency=low * [4d08103] Add acpi-support-base to default package selection -- Michael Prokop Tue, 19 Jun 2012 23:04:16 +0200 grml-debootstrap (0.52) unstable; urgency=low [ Darshaka Pathirana ] * [344f0e9] detect architecture before checkconfiguration * [ddbb875] display architecture in checkconfiguration summary [ Michael Prokop ] * [14e6e30] dm-mod: also check for device-mapper support using /proc/misc -- Michael Prokop Mon, 11 Jun 2012 17:34:47 +0200 grml-debootstrap (0.51) unstable; urgency=low * [0452dad] VM feature: improve sed command line to replace root=... kernel option. Thanks to Conny Seidel for bugreport + patch * [06fc8bd] Drop --insecure/SECURE option + instead depend on debian-archive-keyring package * [4fac6ee] Redirect eerror messages to stderr * [ab9101c] Remove chroot-script after execution * [f831c79] Display debootstrap.log if bootstrapping failed and log file isn't empty * [8cf8a43] Display grml-debootstrap version information in configuration-check dialog * [14021b8] Adjust source code comment for --nopassword option -- Michael Prokop Mon, 14 May 2012 18:21:55 +0200 grml-debootstrap (0.50) unstable; urgency=low [ Michael Prokop ] * [772c343] docs: mention http://archive.debian.org/debian/ for lenny release * [6ea6382] Make sure loop module is present [Closes: issue1155] Thanks to Christian Hofstaedtler for the bugreport. [ Gregor Thill ] * [afe4bad] Remove the sysfs noauto entry from the installed fstab. Thanks to Carsten Hey for helping in bug report handling and patch handling. (Closes: #670074) -- Michael Prokop Tue, 24 Apr 2012 01:59:55 +0200 grml-debootstrap (0.49) unstable; urgency=low * Team upload * [d17c54b] Run upgrade procedure by default (disable via UPGRADE_SYSTEM config) * [04d37b9] Rework cleanup process * [5f348b9] grub_install: slightly change message if grub is not installed * [0c7dbbc] Wording: since->because * [f720b57] Slightly improve bailout and cleanup functions to better catch errors * [d31f878] Check for dialog executeable only when using interactive mode * [07c0379] VM installation: also check for parted executable * [f48891f] Try to load dm-mod kernel module if kpartx fails * [60881cb] Run unmount of chroot's /dev twice. Thanks to Michael Hanke for reporting and testing (Closes: #657023) * [07c7f30] Bump Standards-Version to 3.9.3 * [851c803] Update years of copyright -- Michael Prokop Fri, 24 Feb 2012 14:44:27 +0100 grml-debootstrap (0.48) unstable; urgency=low [ Michael Prokop ] * [837ac57] chroot-script: de-duplicate code WRT security mirror. * [6197947] chroot-script: be more verbose about steps executed in chrootmirror(). * [c3dbeb4] clarify usage text of --packages option * [aadfa9e] chroot-script: clarify error message iff packages is not available + send it to stderr * [ad7c3cf] Support --nopassword option to not prompt for the root password * [8fe289c] do not run fsck when deploying virtual machine * [e68a7d9] vim modeline: set shiftwidth to a less insane value * [a7bfe23] support --grmlrepos command line option * [7140774] clarify usage of --arch option * [6891310] docs: improve option formating, minor typo fixes * [20a41b7] update release table (drop etch, add wheezy) * [bcc5b04] disable filesystem check by default * [d88d27d] drop enabled config variables from config file and use defaults. Thanks to Christian Hofstaedtler for review and improvements. * [3adae46] make sure chroot variables are quoted * [1ba2adf] make sure grub-pc is installed when grub option is used [ Christian Hofstaedtler ] * [074c439] Reformat NEWS.Debian * [56a04d7] Install bootgrub.mksh 0755 * [ab804e4] Switch to source format 3.0 (native) * [9f2c2ff] Reworded package Description a tiny bit * [19bf46a] Fix debian/copyright to point to GPL-2 license * [2b2dc77] Add dialog to Recommends -- Michael Prokop Sat, 26 Nov 2011 18:13:26 +0100 grml-debootstrap (0.47) unstable; urgency=low The "initial upload to Debian" release. [ Ulrich Dangel ] * [e47ca96] Use /bin/bash for tests instead of /bin/zsh [ Christian Hofstaedtler ] * [c87dc4a] Don't depend on grml-etc-core * [5e16f74] Update copyright file based on git log * [bf11621] Prepare control file for targetting Debian * [23140a3] Fix lintian warning debian-rules-missing-recommended-target * [fcc981a] Update package description * [50de133] Depend on gawk, as we're using that * [5081ff4] fix ported eend function return value * [79ea500] bailout on dialog cancellation [ Michael Prokop ] * [561fb86] Drop "set -e" from the scripts. * [4384a10] Fix vim syntax folding issue with missing }}}. -- Michael Prokop Thu, 28 Jul 2011 18:04:13 +0200 grml-debootstrap (0.46) unstable; urgency=low * [f1c990c] Update package description and documentation to reflect squeeze as current stable release. * [fc6d883] Support --vmfile and --vmsize command line options for deploying a virtual machine. * [a64fecc] Support --force option to skip user acknowledgement and do not prompt for user input. * [5ee5cac] Consequently use eerror for displaying error messages. * [25bfeb7] Bump Standards-Version to 3.9.2. -- Michael Prokop Mon, 30 May 2011 23:27:33 +0200 grml-debootstrap (0.45) unstable; urgency=low * [dc5e2a0] Install os-prober by default. * [f7fc84f] Improve installed-check for packages that should be reconfigured. * [c96402b] Be quiet when checking for package precense. -- Michael Prokop Sat, 14 May 2011 03:15:40 +0200 grml-debootstrap (0.44) unstable; urgency=low [ Christian Hofstaedtler ] * [840f5b8] Install (non-free) firmware for Linux kernel * [a6c9e87] turn off Install-Recommends for our apt-get calls * [05d6993] add rsync to package list * [7f6ece8] add lsb-release to package list [ Michael Prokop ] * [5c9bdb3] Add security.debian.org to sources.list (except for unstable/sid). Thanks for the suggestion to Michael Renner. [Closes: issue967] * [cbe2eae] Integrate Debian/squeeze and Debian/wheezy proberly. -- Michael Prokop Fri, 11 Mar 2011 12:31:05 +0100 grml-debootstrap (0.43) unstable; urgency=low * [57a2d9c] Automatically reboot after 10 seconds of inactivity after successfully finishing automatic installation. -- Michael Prokop Sat, 08 Jan 2011 01:33:25 +0100 grml-debootstrap (0.42) unstable; urgency=low * [0d2a566] grml-debootstrap.8.txt: Add Squeeze as alternative recommendation as suite. * [9577874] Move grub_install from grml-debootstrap to chroot-script. * [8782512] Makefile: drop uniq/sed/... workarounds for broken docbook-xsl (1.71.0.dfsg.1-1). -- Michael Prokop Tue, 28 Dec 2010 15:54:11 +0100 grml-debootstrap (0.41) unstable; urgency=low * [97eb00e] Use /etc/apt/sources.list.d/grml.list (instead of /etc/apt/sources.list) for grml-repository. Retrieve the grml-debian-keyring Debian package if possible and fall back to direct use of gpg/apt-key only if that fails. [Closes: issue867] * [17695f7] Dynamically calculate version number using the Debian package version. * [0fd00f0] Run grml-debootstrap under bash. * [171d6a2] Fix --help parsing. * [6364b23] Improve check4root message WRT usage instructions. * [8c38e6c] Improve check4root. -- Michael Prokop Thu, 02 Dec 2010 14:55:19 +0100 grml-debootstrap (0.40) unstable; urgency=low [ Christian Hofstaedtler ] * Create md raids with metadata format 0.90 when installing lenny, as grub from lenny can not boot from md with newer metadata versions. [Closes: issue878]. -- Michael Prokop Mon, 18 Oct 2010 16:27:57 +0200 grml-debootstrap (0.39) unstable; urgency=low [ Tong Sun ] * remove 'umount -a' in bailout(). [Closes: issue806]. [ Christian Hofstaedtler ] * Remove "read -s" bashism from target chroot script. [Closes: issue912]. [ Michael Prokop ] * Bump Standards-Version to 3.9.1. -- Michael Prokop Mon, 18 Oct 2010 14:51:16 +0200 grml-debootstrap (0.38) unstable; urgency=low * Source specified configuration file at according stage. * Make sure to reread the correct partition table if using SW-RAID. * Cosmetic: fix comment regarding local CHOOSE_MIRROR. -- Michael Prokop Fri, 28 May 2010 00:45:20 +0200 grml-debootstrap (0.37) unstable; urgency=low * Do not unmount ISO loopback mount point in finalize(). -- Michael Prokop Tue, 02 Mar 2010 02:30:32 +0100 grml-debootstrap (0.36) unstable; urgency=low * Add support for specifying filesystem that should be created when installing to directories through --filesystem. [Closes: issue596] * Provide /etc/network/interfaces.examples file. [Closes: issue495] -- Michael Prokop Sat, 27 Feb 2010 21:39:57 +0100 grml-debootstrap (0.35) unstable; urgency=low * Do NOT execute 'umount -a' in chroot script for cleanup. This can cause problems with installations to directories. Thanks for the bugreport and debugging, Tong Sun. [Closes: issue806] * Replace vol_id command with blkid. -- Michael Prokop Fri, 26 Feb 2010 15:19:10 +0100 grml-debootstrap (0.34) unstable; urgency=low * Move the apt cache removal function to a later point of execution so custom scripts still have access to the Debian packages. * Display executed debootstrap cmdline when running it. * Slightly improve checks for grub-install/update-grub and do no set full path to the binaries. * Revert "Updated grml-debootstrap parameter handling" which breaks the way grml-debootstrap used to work. Instead: * Introduce option --nopackages to skip installation of packages defined in /etc/debootstrap/packages. * Support config variable RM_APTCACHE to allow disabling removal of apt-cache. Thanks for the idea and initial patch, Tong Sun. [Closes: issue805] -- Michael Prokop Mon, 22 Feb 2010 23:46:13 +0100 grml-debootstrap (0.33) unstable; urgency=low [ Michael Prokop ] * Do not provide the 'install bootloader into partition' feature in the interactive menu. * Install to directory: normalise the path to an absolute directory name. * remove cached debs to reduce diskpace during bootstrap (based on patch by gebi, thanks). * Fix sed usage for fall back to old behaviour in MBR handling. * Bump Standards-Version to 3.8.4 (no further changes). [ Ulrich Dangel ] * Support and enable per default --keyring option. [Closes: issue746] * Do not run MAKEDEV inside the chroot. * Adjusted umount handling in bailout() to work with set -e * Always execute install_policy_rcd in chroot [Closes: issue778] * Install signal handler to always cleanup chroot. * Replace /bin/true with true in chroot-script * Remove duplicate : in getopt definition. Caused wrong parameter handling. * Adjusted Filename comment in cmdlineopts.clp * Remove trailing whitespace from debian/rules * Switched order of including cmdlineopts.clp, first check local directory * Only set PARTITION=1 if target is a block device. * Apply patch by Tong Sun which addresses grml-debootstrap's parameter handling. Thanks! * Added unit tests for cmddlineopts.clp. [ Michael Gebetsroither ] * introduce --pre-scripts to be executed before chroot-scripts -- Michael Prokop Mon, 15 Feb 2010 22:32:33 +0100 grml-debootstrap (0.32) unstable; urgency=low * Drop support for old-stable/etch. * Simplify usage for grub handling, now it's just GRUB="/dev/sdX[#]". * Execute blockdev to reread partition table. * Replace vol_id command with blkid. * Drop deprecated sarge specific code. -- Michael Prokop Wed, 28 Oct 2009 23:29:47 +0100 grml-debootstrap (0.31) unstable; urgency=low * Adjust grub handling and install grub-pc package for supporting grub2. [Closes: issue747] * Use cdn.debian.net as default mirror. * Support config variable INSTALL_NOTES to catch information during installation which is reported at the end of the installation process. -- Michael Prokop Sat, 24 Oct 2009 02:47:00 +0200 grml-debootstrap (0.30) unstable; urgency=low [ Ulrich Dangel ] * Add cmdline option for specifying target architecture (--arch). Allows to specify target architecture i386 if running on an amd64 system. [Closes: issue658] [ Michael Prokop ] * Add according documentation for new --arch option. * Bump Standards-Version to 3.8.3 (no further changes). -- Michael Prokop Fri, 11 Sep 2009 03:15:46 +0200 grml-debootstrap (0.29) unstable; urgency=low The "thanks to gebi for the bugreports and feedback" release. :) * Install busybox in kernel stage to be able to debug initramfs problems. * Check whether we are installing into a directory in stage mkfs so we don't skip if the target is already mounted. * Mention "default: lenny" instead of "default: stable" in help text as "stable" is invalid. * Use 'pri=0' as example for swap partition in /etc/fstab. * Do not adjust mydestination and myhostname in /etc/postfix/main.cf as mydestination defaults to "$myhostname, localhost.$mydomain, localhost", myhostname defaults to gethostname() and mydomain to localdomain. * Slightly improve wording of -t and -p options. * Do not try to create /etc/debootstrap if it already exists (which might be the case when installing to a directory). * Mention hostname in configuration check dialog. * Apply patch by Zoran Dzelajlija which addresses the partition calculation problem when installing to /dev/cciss/c0d0*. Thanks! * Use ls for locating /dev/md* devices instead of echo so we don't have '/dev/md*' in the interactive partition dialog. * Do not display mountpoint if we are using the default one. * Avoid duplicate 'Running ... on a directory, nothing to mount.' message. * Do not continue execution if provided mirror doesn't work. [Closes: issue711] * Bump Standard Version to 3.8.2 (no further changes). -- Michael Prokop Fri, 24 Jul 2009 09:47:47 +0200 grml-debootstrap (0.28) unstable; urgency=low * Work around the chpasswd problem. [Closes: issue692] Thanks to Ulrich Dangel for the patch! -- Michael Prokop Tue, 16 Jun 2009 16:11:30 +0200 grml-debootstrap (0.27) unstable; urgency=low * New features: - support setting Debian suite components (like main, contrib,...) through COMPONENTS so it's possible to use a simple 'main' mirror. - support setting aptitude/apt-get options through $DPKG_OPTIONS. - support selection of netinstall vs. local mirror in interactive menu * Bugfixes: - make sure to ignore /dev/md* devices if not using SW-RAID - do not fail in chrootmirror() when using $ISO variable. - change order of checkconfiguration() so we get the prompt/ display for checking configuration again. - Drop 'do not prompt for partition dialog if swraid has been configured already' which doesn't make any sense in most situations * Minor changes: - check for mounted target in mkfs() step already instead of mount_target() - use '.. to the debootstrap command' in description of --debopt - chroot-script: put installation of kernel before installing additional packages so installation of kernel doesn't fail if the kernel directory exists already * Debian Package: - bump Standard Version to 3.8.1 (no further changes). -- Michael Prokop Fri, 08 May 2009 17:57:57 +0200 grml-debootstrap (0.26) unstable; urgency=low * Do not use UUID on SW-RAID. * Add /dev/md* to partition list. If /dev/md* is already configured we don't want to re-run the SW-RAID setup but instead just install on /dev/md*. -- Michael Prokop Tue, 17 Mar 2009 10:47:53 +0100 grml-debootstrap (0.25) unstable; urgency=low * Use configuration $RELEASE as well as default in interactive setup script. * Provide $MNTPOINT as environment variable for usage inside /etc/debootstrap/scripts/. -- Michael Prokop Sat, 07 Mar 2009 14:37:46 +0100 grml-debootstrap (0.24) unstable; urgency=low * Update documentation. * Use configuration of $MIRROR, $HOSTNAME as defaults in interactive setup script. * Add initial support for Debian/squeeze and drop sarge instead. * Update VCS*-headers and long description of Debian package. * Move asciidoc, docbook-xsl, xsltproc to Build-Depends-Indep. * Drop $CHROOTMIRROR variable, instead use $MIRROR for debootstrap as well as inside the chroot. * Provide $MNTPOINT as environment variable for usage inside /etc/debootstrap/scripts/. -- Michael Prokop Sat, 07 Mar 2009 14:15:32 +0100 grml-debootstrap (0.23) unstable; urgency=low The "hey, rocking - we get patches via git" release. * Improve look'n'feel of partition error dialog. * Improve documentation regarding installation of bootloader when using directories as installation target. Thanks Tong Sun! [Closes: issue539] * Copy /etc/debootstrap/[s]bin as well to the chroot if they are present. Suggestion by Tong Sun - thanks! [Closes: issue540] * Apply several patches by Tong Sun (thanks!): - allow symlinks when coping existing files to chroot. - pre-seed packages using /etc/debootstrap/debconf-selections [Closes: issue518] - support DEBOOTSTRAP_OPT for passing extra parameters to the debootstrap command - support KEEP_SRC_LIST to allow user to provide their own apt sources.list from /etc/debootstrap/etc/apt/sources.list - provide cmdline processing in separate script - added the '-d, --confdir=path' option - added "--nodebootstrap": Skip debootstrap, only do configuration to the target - add -v, --verbose: Increase verbosity - do not create stage file at finalize() * Edit /etc/network/interfaces as well if the file exists already, we definitely need at least a loopback interface. * Adjust postfix configuration: - modify hostname related options in /etc/postfix/main.cf - listen on loopback interface by default (thanks for suggestion, gebi) * Unify the --bootappend option, it's not --boot_append (thanks for the hint, Tong Sun). * Support execution of further scripts via options --scripts and --chroot-scripts. * Drop locales from RECONFIGURE list (thanks for hint, Tong Sun). [Closes: issue560] -- Michael Prokop Mon, 24 Nov 2008 23:29:30 +0100 grml-debootstrap (0.22) unstable; urgency=low * Display meaningful information when no partitions could be found. -- Michael Prokop Mon, 15 Sep 2008 19:46:20 +0200 grml-debootstrap (0.21) unstable; urgency=low * Make sure it works on target directories also if they are *not* mounted separately. Thanks for reporting, Tong. -- Michael Prokop Tue, 02 Sep 2008 23:19:05 +0200 grml-debootstrap (0.20) unstable; urgency=low * Use root=UUID=... by default if possible to avoid possible race conditions with libata vs. pata. * Fix setting hostname via interface. * Provide interface in dialog for setting root password. -- Michael Prokop Tue, 02 Sep 2008 14:02:43 +0200 grml-debootstrap (0.19) unstable; urgency=low * Use dialog with --separate-output option to make sure mdadm receives correct quoting for the RAID devices. -- Michael Prokop Tue, 02 Sep 2008 13:36:12 +0200 grml-debootstrap (0.18) unstable; urgency=low The "development sponsored by Sipwise GmbH" release. * Provide interactive configuration dialog. * Initial support for SW-RAID. * Use stages based on target information, this gives us the possibility to run multiple instance of grml-debootstrap. [Closes: issue510] * Use policy-rc.d inside chroot to avoid startup of daemons. [Closes: issue509] * Do not activate /sys by default anymore in /etc/fstab. * Copy /etc/network/interfaces from running system to target installation. * Setting password via passwd does not work, use chpaswd instead. * Remove stages after successful execution. [Closes: issue513] * Make sure the configuration file inside the chroot provides the same configuration as specified on the cmdline (thanks gebi for reporting). * Copy system's /etc/hosts to the target system. * Move stages to /var/cache/grml-debootstrap (thanks for the idea, gebi). * Install devices using our own device tarball instead of running MAKEDEV (which is just an ungly fork bomb). * Install MTA postfix by default to avoid installation of unwanted packages like citadel in lenny. * Allow use of comments in file /etc/debootstrap/packages. * Replace initrd-tools with initramfs-tools. * Run aptitude with --without-recommends option. * Run grub-install using --no-floppy, as requested by gebi. * Support setting hostname via cmdline. * Close issue in grml's BTS which showed up during development in hg: Fix handling of config file inside chroot, thanks for spotting, gebi! [Closes: issue512] * Update debian/ to make lintian happy. -- Michael Prokop Sat, 30 Aug 2008 02:01:14 +0200 grml-debootstrap (0.17) unstable; urgency=low * Support "-r" option as well as "--release" as being documented. Thanks for reporting, Jens Kubieziel. -- Michael Prokop Wed, 26 Mar 2008 22:44:06 +0100 grml-debootstrap (0.16) unstable; urgency=low * Drop the second passwd call. -- Michael Prokop Wed, 19 Dec 2007 10:10:54 +0100 grml-debootstrap (0.15) unstable; urgency=low * Make sure the passwd command succeeds. Thanks, Wolfgang Karall! [Closes: issue363] -- Michael Prokop Sun, 16 Dec 2007 16:30:37 +0100 grml-debootstrap (0.14) unstable; urgency=low * Make sure variable ISO is unset variable if not used. Thanks for the bugreport, Darsha! [Closes: issue352] -- Michael Prokop Sun, 09 Dec 2007 20:16:15 +0100 grml-debootstrap (0.13) unstable; urgency=low * Fix manpage handling of xsltproc. -- Michael Prokop Thu, 06 Dec 2007 23:47:09 +0100 grml-debootstrap (0.12) unstable; urgency=low * Fixed some typos in the manpage. Thanks for the patch, Alexander 'Stone' Steinböck! -- Michael Prokop Wed, 24 Oct 2007 10:16:03 +0200 grml-debootstrap (0.11) unstable; urgency=low * Better inform user about already executed stages. [Closes: issue299] -- Michael Prokop Sat, 6 Oct 2007 18:03:16 +0200 grml-debootstrap (0.10) unstable; urgency=low * Add console-common to /etc/debootstrap/packages. Thanks for the feature request, Thorsten Strusch! * Support option -i/--iso: now it's possible to install packages from a normal Debian ISO. Thanks for the idea and the basic instructions to Thorsten Strusch! http://www.thorstenstrusch.de/software/debian-linux/ -- Michael Prokop Mon, 04 Jun 2007 10:13:32 +0200 grml-debootstrap (0.9) unstable; urgency=low [ Alexander Wirt ] * Add support for EXTRAPACKAGES that can be dropped in /etc/debootstrap/extrapackages * Add boot_append option to manpage * Manpage reformatted [ Michael Prokop ] * Support grml-repository and installation of grml-kernel via GRMLREPOS and GRMLPACKAGES. * Use stage logic inside chroot-script as well. * Activate zsh completion. * Rewrote interfaces() code for handling of /etc/network/interfaces. Thanks for the pointer, formorer. * Make sure stopping a service inside chroot-script does not fail chroot-script itself. -- Michael Prokop Mon, 23 Apr 2007 00:23:19 +0200 grml-debootstrap (0.8) unstable; urgency=low * Add BOOT_APPEND option for kernel appendline -- Alexander Wirt Sat, 21 Apr 2007 11:19:06 +0200 grml-debootstrap (0.7) unstable; urgency=low * Support setting some variables via cmdline. * Support full automatic installation via debian2hd. * Change logic of function execution and improved error handling in some functions. * Use aptitude instead of apt-get in chroot-script, but only if it's available. * Use DEBIAN_FRONTEND='noninteractive' so we avoid unnecessary questions when installing. (Thanks, formorer!) * Added additional check to grub code for running sed on /boot/grub/menu.lst. * Updated TODO file. * Use asciidoc for manpage generation. * Added basic zsh-completion (thanks, ft!), but do not install it yet. We have to adjust $fpath in grml-etc-core first. -- Michael Prokop Fri, 13 Apr 2007 17:57:29 +0200 grml-debootstrap (0.6) unstable; urgency=low * Support Debian release with codename 'lenny'. Depend on debootstrap/cdebootstrap versions supporting lenny therefore. * Split all the code into separate functions. * Export LANG=C and LC_ALL=C as we don't have the locales inside the chroot when running grml-debootstrap. (Just a cosmetic change as there aren't any errors but warning messages from dpkg.) * Always assume architecture of the running system (overwriting via $ARCH is still supported of course). * Write variables from grml-debootstrap to /etc/debootstrap/variables and provide it to chroot-script. * Support stages. [Closes: issue151] -- Michael Prokop Mon, 9 Apr 2007 14:35:21 +0200 grml-debootstrap (0.5) unstable; urgency=low * Changed Architecture from any to all. -- Michael Prokop Sat, 24 Mar 2007 16:58:53 +0100 grml-debootstrap (0.4) unstable; urgency=low * Support installation into directory. -- Michael Prokop Fri, 17 Nov 2006 23:00:38 +0100 grml-debootstrap (0.3) unstable; urgency=low * Initial support for $ARCH. * Added function for clean exit (using trap). -- Michael Prokop Fri, 10 Nov 2006 00:51:09 +0100 grml-debootstrap (0.2) unstable; urgency=low * Support Sarge and Sid as "$RELEASE"s as well. * Added 'debootstrap | cdebootstrap' and grml-etc-core to depends. * Added support for: - cdebootstrap [broken for sarge as $RELEASE, see #390510] - setting hostname via /etc/hostname - /etc/kernel-img.conf - support setting locales through /etc/debootstrap/locale.gen * Added ssh, mdadm and lvm2 to default package list. * Rewrote kernel package version handling (removed from package list to be able to support sarge as well). -- Michael Prokop Fri, 3 Nov 2006 19:05:19 +0100 grml-debootstrap (0.1) unstable; urgency=low * Initial release. -- Michael Prokop Fri, 3 Nov 2006 01:10:52 +0100 grml-debootstrap-0.59/debian/control0000644000000000000000000000224312142457502014452 0ustar Source: grml-debootstrap Section: admin Priority: optional Maintainer: Grml Team Uploaders: Michael Prokop , Alexander Wirt , Christian Hofstaedtler , Ulrich Dangel Build-Depends: debhelper (>= 5) Build-Depends-Indep: asciidoc, docbook-xsl, xsltproc, shunit2 Standards-Version: 3.9.4 Homepage: http://grml.org/grml-debootstrap/ Vcs-git: git://git.grml.org/grml-debootstrap.git Vcs-Browser: http://git.grml.org/?p=grml-debootstrap.git Package: grml-debootstrap Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, debootstrap (>= 0.3.3.3) | cdebootstrap (>= 0.3.16), gawk, debian-archive-keyring Recommends: kpartx, mksh, parted, qemu-utils, dialog Description: wrapper around debootstrap for installing pure Debian Provides a wrapper suite around debootstrap and cdebootstrap to ease installation of a pure Debian system. . Configuration can be done on the command line, in a dialog frontend or in /etc/debootstrap/config. You will get a pure Debian system installed on the specified device or directory, or directly into an image file suitable for Virtual Machine use. grml-debootstrap-0.59/debian/rules0000755000000000000000000000416011664217047014135 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir (cd tests && ./run_tests.sh) make touch $@ clean: dh_testdir dh_testroot rm -f build-stamp make clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs etc/debootstrap usr/sbin etc/debootstrap/extrapackages etc/zsh/completion.d \ usr/share/grml-debootstrap/functions # Add here commands to install the package into debian/grml-debootstrap. install -m 644 config debian/grml-debootstrap/etc/debootstrap/ install -m 644 devices.tar.gz debian/grml-debootstrap/etc/debootstrap/ install -m 644 locale.gen debian/grml-debootstrap/etc/debootstrap/ install -m 644 packages debian/grml-debootstrap/etc/debootstrap/ install -m 755 chroot-script debian/grml-debootstrap/etc/debootstrap/ install -m 755 grml-debootstrap debian/grml-debootstrap/usr/sbin/ install -m 644 zsh-completion debian/grml-debootstrap/etc/zsh/completion.d/_grml-debootstrap install -m 644 cmdlineopts.clp debian/grml-debootstrap/usr/share/grml-debootstrap/functions/cmdlineopts.clp install -m 755 bootgrub.mksh debian/grml-debootstrap/usr/share/grml-debootstrap/bootgrub.mksh # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs TODO THANKS dh_installman grml-debootstrap.8 dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install grml-debootstrap-0.59/debian/source/0000755000000000000000000000000011664217047014354 5ustar grml-debootstrap-0.59/debian/source/format0000644000000000000000000000001511664217047015563 0ustar 3.0 (native) grml-debootstrap-0.59/packages0000644000000000000000000000037412240420314013317 0ustar locales console-data console-common initramfs-tools mdadm lvm2 grub-pc os-prober bzip2 dhcp3-client file less lsof most pciutils resolvconf screen ssh strace sysfsutils usbutils vim w3m zsh rsync postfix lsb-release acpi-support-base vlan bridge-utils grml-debootstrap-0.59/Makefile0000644000000000000000000000164111502657543013274 0ustar all: doc doc: doc_man doc_html doc_html: html-stamp html-stamp: grml-debootstrap.8.txt sed -i 's/^include::releasetable-man.txt\[\]/include::releasetable.txt\[\]/' grml-debootstrap.8.txt asciidoc -b xhtml11 -a icons grml-debootstrap.8.txt touch html-stamp doc_man: man-stamp man-stamp: grml-debootstrap.8.txt sed -i 's/^include::releasetable.txt\[\]/include::releasetable-man.txt\[\]/' grml-debootstrap.8.txt asciidoc -d manpage -b docbook grml-debootstrap.8.txt xsltproc /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl grml-debootstrap.8.xml touch man-stamp online: all scp grml-debootstrap.8.html grml:/var/www/grml/grml-debootstrap/index.html scp images/icons/* grml:/var/www/grml/grml-debootstrap/images/icons/ scp images/screenshot.png grml:/var/www/grml/grml-debootstrap/images/ clean: rm -rf grml-debootstrap.8.html grml-debootstrap.8.xml grml-debootstrap.8 html-stamp man-stamp grml-debootstrap-0.59/grml-debootstrap.8.txt0000644000000000000000000003411112240417201016007 0ustar grml-debootstrap(8) =================== Name ---- grml-debootstrap - wrapper around debootstrap for installing plain Debian Synopsis -------- grml-debootstrap [ _options_ ] image:images/screenshot.png[Screenshot] Introduction ------------ grml-debootstrap is a wrapper suite around debootstrap (and cdebootstrap if you want) for installing a plain Debian system (e.g. via Grml) very fast and easy. All you have to do is adjust a few variables in the configuration file /etc/debootstrap/config or specify some command line options and invoke grml-debootstrap. If invoked without any configuration modifications or command line options a dialog based frontend will be available to control some basic configuration options. A plain and base Debian system will be installed on the given device, directory or virtual image file then. Customization of this process is possible as well. CAUTION: The Grml team does not take responsibility for loss of any data! Options and environment variables --------------------------------- *--arch* _architecture_:: Set target architecture you want to install. Defaults to the architecture you are currently running. If you're running an amd64 kernel and want to deploy an i386 system use this option. Note: deploying amd64 from an i386 kernel does *not* work. Example: "_--arch i386_" *--backportrepos*:: Enable Debian's Backports repository (http://backports.debian.org/) via the /etc/apt/sources.list.d/backports.list configuration file. This provides the option to install Debian packages from Debian's backports repository. *--bootappend* _appendline-for-the-kernel_:: Specify appendline for the kernel. E.g. "_pci=nomsi_" *-c*, *--config* _file_:: Use specified configuration file, defaults to /etc/debootstrap/config. *--chroot-scripts* _directory_:: Execute chroot scripts from specified directory. This allows customisation of the chroot setup, the executable script(s) present in the given directory are executed at the end of the chroot procedure. Default directory: /etc/debootstrap/chroot-scripts/ *-d*, *--confdir* _path_:: Place of configuration files for debootstrap, defaults to /etc/debootstrap. *--debconf* _file_:: Use specified file for preseeding Debian packages instead of using the default /debconf-selections. *--debopt* _params_:: Extra parameters passed to the debootstrap command. *--filesystem* _filesystem_:: Filesystem that should be created when installing to a partition. If unset defaults to ext3. Valid values are all filesystems that can be created through mkfs._filesystem_. *--force*:: Skip user acknowledgement and do not prompt for user input. *--grmlrepos*:: Enable Grml.org's Debian repository (http://deb.grml.org/) via the /etc/apt/sources.list.d/grml.list configuration file. This provides the option to install Debian packages from Grml's repository. *--grub* _device_:: Device where grub should be installed to. Note that only the MBR (master boot record) can be used (/dev/sda, /dev/sdb,...). Partitions (like /dev/sda1, /dev/sdb2,...) are NOT supported because grub2 doesn't support installation into the PBR (partition boot record) anymore. Usage example: '--grub /dev/sda'. Note: just do not set this option to avoid installation of grub. *--help*, *-h*:: Show summary of options and exit. *--hostname* _hostname_:: Use specified hostname instead of the default (being 'grml'). *-i*, *--iso* _/mntpoint_:: Specify mount point where you have a Debian ISO mounted loopback. Using this option instead of the mirror option gives you the possibility to install the base-system without network access. Make sure you mounted the according Debian-ISO to the given _/mntpoint_. See section 'Usage examples' for a demonstration. *--keep_src_list*:: Do not overwrite user provided /etc/apt/sources.list. *-m*, *--mirror* _URL_:: Specify mirror which should be used for apt-get/aptitude. Corresponding with configuration variable MIRROR. *--nodebootstrap*:: Skip debootstrap, only do configuration to the target. *--nopackages*:: Skip installation of packages defined in /etc/debootstrap/packages. *--nopassword*:: Do not prompt for the root password. Note: Use the '--password' option if you want to set the root password during an automatic installation but don't want to use the interactive dialog. *-p*, *--mntpoint* _/mntpoint_:: Specify mount point that should be used for mounting the target system. Corresponding with configuration variable MNTPOINT. Note: this option has no effect if option -t is given and represents a directory. *--packages* _file_:: Use specified file as list for packages that should be installed instead of the default package list file /packages. *--password* _password_:: Use specified password as password for user root. Use with caution, as your command line might be visible in the process list and the shell history. It's meant for automatic installation only. *-r*, *--release* _releasename_:: Specify release of new Debian system. Supported releases names: lenny, squeeze, wheezy (note: requires current version of debootstrap) and sid. Corresponding with configuration variable RELEASE. *--pre-scripts* _directory_:: Execute scripts from specified directory before executing the chroot script. This allows customisation of the system before the chroot has been set up. The environment variable $MNTPOINT is available inside the scripts for direct access of the chroot. Default directory: /etc/debootstrap/pre-scripts/ *--scripts* _directory_:: Execute scripts from specified directory. This allows customisation of the system after the chroot has been set up. The environment variable $MNTPOINT is available inside the scripts for direct access of the chroot. Default directory: /etc/debootstrap/scripts/ *-t*, *--target* _target_:: Target partition (/dev/...) or directory (anything else without /dev at the beginning). To install grub using *--grub* make sure to use a _device_ instead of a directory as _target_ (installation of grub as bootloader when using directories is NOT supported). *-v*, *--verbose*:: Increase verbosity. *--vmfile*:: Set up a Virtual Machine instead of installing to a partition or directory. This allows deployment of a Virtual Machine. The options needs to be combined with the --target option. Usage example: --vmfile --target /mnt/sda1/qemu.img *--vmsize* _size_:: Use specified size for size of Virtual Machine disk file. If not specified it defaults to 2G (being 2GB). Syntax as supported by qemu-img (see manpage qemu-img(1) for details. Usage example: --vmsize 3G *-V*, *--version*:: Show version of program and exit. WARNING: the command line parsing of grml-debootstrap does not validate the provided arguments for the command line options. Please be careful and check docs and /etc/debootstrap/config for further information. Usage examples --------------- grml-debootstrap --target /dev/sda1 --grub /dev/sda Install default Debian release (wheezy) on /dev/sda1 and install bootmanager Grub in MBR (master boot record) of /dev/sda and use /dev/sda1 as system partition. grml-debootstrap --target /dev/sda6 --grub /dev/sda --release sid Install Debian unstable/sid on /dev/sda6, install bootmanager Grub in MBR (master boot record) of /dev/sda and use /dev/sda6 as system partition. mount /dev/sda1 /data/chroot grml-debootstrap --target /data/chroot Install default Debian release (wheezy) in directory /data/chroot (without any bootloader). grml-debootstrap --target /dev/sda3 --grub /dev/sda --mirror ftp://ftp.tugraz.at/mirror/debian Install default debian release (wheezy) in a Virtual Machine file with 3GB disk size (including Grub as bootmanager in MBR of the virtual disk file): mount /dev/sda1 /mnt/sda1 grml-debootstrap --vmfile --vmsize 3G --target /mnt/sda1/qemu.img Install default Debian release (wheezy) on /dev/sda3 and install bootmanager Grub in MBR (master boot record) of /dev/sda and use /dev/sda3 as system partition. Use specified mirror instead of the default (ftp://ftp.debian.de/debian) one. mount -o loop /mnt/sda6/debian-CD-1.iso /mnt/iso grml-debootstrap --target /dev/sda1 --grub /dev/sda --iso file:/mnt/iso/debian/ Install Debian on /dev/sda1 using the loopback mounted Debian-ISO for the base-system and install bootmanager Grub in MBR (master boot record) of /dev/sda and use /dev/sda1 as system partition. Please notice, that the chroot system requires network access for all packages which are not part of the ISO. Files ----- /etc/debootstrap/config Main configuration file. You have to adjust it according to your needs if you want to execute grml-debootstrap in the non-interactive mode without any special command line arguments. /etc/debootstrap/chroot-script The script executed within the new Debian system as soon as the main system has been installed via [c]debootstrap. /etc/debootstrap/locale.gen Defines the default locales used for generating locales via locale-gen. /etc/debootstrap/packages Defines the software packages which should be installed in the new Debian system by default. /etc/debootstrap/extrapackages/ Debian Packages dropped in this directory will be installed into the new Debian system by default (Control variable: EXTRAPACKAGES) /etc/debootstrap/stages/ The default directory for storing information about executed stages. Every single function of grml-debootstrap will write 'done' to the stages directory into a file named as the function itself if it has been executed successfully. You can adjust the location of the directory via configuration variable STAGES via /etc/debootstrap/config. Please notice that you have to remove the stages directory on your own if you want to re-execute grml-debootstrap after running it successfully once. This should avoid recurrent execution by error of grml-debootstrap (which might delete present data). Customization ------------- You can control execution of grml-debootstrap via adjusting /etc/debootstrap/config for some main stuff or via setting some selected variables via command line. The packages which should be installed in the new Debian system can be defined via the file /etc/debootstrap/packages. If you want to put existing files to the new Debian system you can place them into the (by default non-existing) directories boot, etc, share, usr and var in /etc/debootstrap/. Every existing directory will be copied to the new Debian system then. If you want to install additional packages that are not available via the Grml or Debian mirror drop them into /etc/debootstrap/extrapackages and make sure that EXTRAPACKAGES is set to "yes". Automatic installation ---------------------- If environment variable AUTOINSTALL is set grml-debootstrap can be executed in a full automatic mode. While this mode isn't really useful for interactive execution (just configure /etc/debootstrap/configure or specify the relevant variables on the command line instead) it is meant for use via boot option debian2hd on the Grml live system. The boot option debian2hd (more precise: the kernelname at the bootprompt) supports the following boot options (they correspond with the command line options mentioned above): target=... The target partition/directory of the new Debian system. Usage example: target=/dev/sda1 grub=... Where do you want to install grub to? Usage example: grub=/dev/sda release=... Specify release of new Debian system. Defaults to Debian wheezy. Supported relases: lenny, squeeze, wheezy and sid. Usage example: release=sid mirror=... Specify mirror which should be used for apt-get/aptitude instead of the default one (http://http.debian.net/debian). Usage example: mirror=ftp://ftp.tugraz.at/mirror/debian password=... Set password of user root without prompting for it but set it to the given argument. Usage example: password=AiTh5ahn Usage example for automatic installation: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ debian2hd target=/dev/sda1 grub=/dev/sda mirror=ftp://ftp.tugraz.at/mirror/debian password=foobar You have to enter this command line at the bootprompt of the Grml live system. Please make sure that /dev/sda1 is the partition where you really want to install your new Debian system. [NOTE] Automatic installation within booting process is done in grml-autoconfig via setting environment variable AUTOINSTALL and creation of /usr/bin/grml-debootstrap_noninteractive with the available and relevant boot options for grml-debootstrap. Supported Releases ------------------ include::releasetable.txt[] [NOTE] .lenny release ================================================================================ [1] Please notice that lenny is the current old-stable release within Debian. grml-debootstrap can handle the release but you really should not use lenny anymore unless you really know what you are doing. Choose Debian 6.0 (squeeze) or Debian 7.0 (wheezy) instead. Notice that you need to specify a mirror providing the lenny release, the default (http://http.debian.net/debian) doesn't provide it any longer nowadays. Set the mirror to e.g. http://archive.debian.org/debian/ if you don't have your own lenny mirror. When installing lenny to a new mdraid, grml-debootstrap will use md metadata format version 0.90. This limits the device to a maximum size of 2TB, but has the advantage of grub-legacy actually being able to boot from it. ================================================================================ [NOTE] .sid release ================================================================================ [2] Please notice that sid is Debian/unstable and due to its nature might not be always installable. What _might_ work instead is deploying a stable or testing release and upgrade it after installation finished. ================================================================================ Bugs ---- Probably. Please send bugreports to Michael Prokop . See also -------- debootstrap (8), cdebootstrap (1). Author ------ Michael Prokop grml-debootstrap-0.59/releasetable.txt0000644000000000000000000000055011664217047015023 0ustar .Current status [grid="all"] '---------.-----------------.--------------- Release / Tool debootstrap cdebootstrap -------------------------------------------- Lenny works [1] works [1] Squeeze works works Wheezy works works Sid works [2] works [2] -------------------------------------------- grml-debootstrap-0.59/grml-debootstrap0000755000000000000000000013007212240417576015050 0ustar #!/bin/bash # Filename: grml-debootstrap # Purpose: wrapper around debootstrap for installing plain Debian via Grml # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2+ ################################################################################ # variables {{{ PN="$(basename $0)" VERSION="$(dpkg --list $PN 2>/dev/null| awk '/^i/ {print $3}')" VERSION="${VERSION:-unknown}" MNTPOINT="/mnt/debootstrap.$$" # defaults [ -n "$CHROOT_SCRIPTS" ] || CHROOT_SCRIPTS='yes' [ -n "$CONFFILES" ] || CONFFILES='/etc/debootstrap' [ -n "$DEBCONF" ] || DEBCONF='yes' [ -n "$DEBIAN_FRONTEND" ] || DEBIAN_FRONTEND='noninteractive' [ -n "$DEBOOTSTRAP" ] || DEBOOTSTRAP='debootstrap' [ -n "$DEFAULT_LOCALES" ] || DEFAULT_LOCALES='en_US.UTF-8' [ -n "$EXTRAPACKAGES" ] || EXTRAPACKAGES='yes' [ -n "$FALLBACK_MIRROR" ] || FALLBACK_MIRROR='http://http.debian.net/debian' [ -n "$FORCE" ] || FORCE='' [ -n "$HOSTNAME" ] || HOSTNAME='grml' [ -n "$INITRD" ] || INITRD='yes' [ -n "$INSTALL_NOTES" ] || INSTALL_NOTES='/etc/debootstrap/install_notes' [ -n "$LOCALES" ] || LOCALES='yes' [ -n "$MIRROR" ] || MIRROR="$FALLBACK_MIRROR" [ -n "$MKFS" ] || MKFS='mkfs.ext3' [ -n "$PACKAGES" ] || PACKAGES='yes' [ -n "$PRE_SCRIPTS" ] || PRE_SCRIPTS='yes' [ -n "$RECONFIGURE" ] || RECONFIGURE='console-data' [ -n "$RELEASE" ] || RELEASE='wheezy' [ -n "$RM_APTCACHE" ] || RM_APTCACHE='yes' [ -n "$SCRIPTS" ] || SCRIPTS='yes' [ -n "$SECURE" ] || SECURE='yes' [ -n "$TIMEZONE" ] || TIMEZONE='Europe/Vienna' [ -n "$TUNE2FS" ] || TUNE2FS='tune2fs -c0 -i0' [ -n "$UPGRADE_SYSTEM" ] || UPGRADE_SYSTEM='yes' [ -n "$VMSIZE" ] || VMSIZE="2G" # inside the chroot system locales might not be available, so use minimum: export LANG=C export LC_ALL=C # make sure interactive mode is only executed when # using an empty configuration file or option --interactive INTERACTIVE='' # }}} # help text {{{ usage() { echo "$PN - wrapper around debootstrap for installing Debian Usage: $PN [options] Bootstrap options: -m, --mirror Mirror which should be used for apt-get/aptitude. -i, --iso Mountpoint where a Debian ISO is mounted to, for use instead of fetching packages from a mirror. -r, --release Release of new Debian system (default: wheezy). -t, --target Target partition (/dev/...) or directory where the system should be installed to. -p, --mntpoint Mountpoint used for mounting the target system, has no effect if -t is given and represents a directory. --debopt Extra parameters passed to the debootstrap command. --interactive Use interactive mode (frontend). --nodebootstrap Skip debootstrap, only do configuration to the target. --grub Target for grub installation. Usage example: /dev/sda --arch Set target architecture, use for installing i386 on amd64. --filesystem Filesystem that should be used when target is a partition or Virtual Machine (see --vmfile). --force Do not prompt for user acknowledgement. Options for Virtual Machine deployment: --vmfile Set up a Virtual Machine (raw format) instead of installing to a partition or directory, to be combined with --target, like: --vmfile --target /mnt/sda1/qemu.img --vmsize Use specified size for size of VM file (default: 2G). Syntax as supported by qemu-img, like: --vmsize 3G Configuration options: -c, --config Use specified configuration file, defaults to /etc/debootstrap/config -d, --confdir Place of config files for debootstrap, defaults to /etc/debootstrap --packages Install packages defined in specified list file instead of using /etc/debootstrap/packages. --nopackages Skip installation of packages defined in /etc/debootstrap/packages --debconf Pre-seed packages using specified pre-seed db file. --grmlrepos Enable Grml's Debian repository (deb.grml.org). --backportrepos Enable Debian's backports repository (backports.debian.org). --keep_src_list Do not overwrite user provided apt sources.list. --hostname Hostname of Debian system. --nopassword Do not prompt for the root password. --password Use specified password as password for user root. --bootappend Add specified appendline to kernel whilst booting. --chroot-scripts Execute chroot scripts from specified directory. --pre-scripts Execute scripts from specified directory (before chroot-scripts). --scripts Execute scripts from specified directory (after chroot-scripts). Other options: -v, --verbose Increase verbosity. -h, --help Print this usage information and exit. -V, --version Show summary of options and exit. Usage examples can be found in the grml-debootstrap manpage. Send bugreports to the grml-team: bugs (at) grml.org || http://grml.org/bugs/ " } if [ "$1" = '-h' ] || [ "$1" = '-help' ] || [ "$1" = "--help" ] ; then usage echo 'Please notice that this script requires root permissions!' exit 0 fi # }}} # early helper functions {{{ GOOD='' WARN='' BAD='' NORMAL='' HILITE='' BRACKET='' einfo() { einfon "$1\n" return 0 } einfon() { [ "${RC_ENDCOL}" != "yes" ] && [ "${LAST_E_CMD}" = "ebegin" ] && echo printf " ${GOOD}*${NORMAL} $*" LAST_E_CMD=einfon return 0 } eerror() { [ "${RC_ENDCOL}" != "yes" ] && [ "${LAST_E_CMD}" = "ebegin" ] && echo printf " ${BAD}*${NORMAL} $*\n" >&2 LAST_E_CMD=eerror return 0 } eend() { local retval="${1:-0}" shift if [ $retval -gt 0 ]; then printf " ${BAD}-> Failed (rc=${retval})${NORMAL}\n" fi return $retval } check4root(){ if [ "$(id -u 2>/dev/null)" != 0 ] ; then echo 1>&2 "Error: please run this script with uid 0 (root)." ; return 1 fi } check4progs(){ local RC='' for arg in $* ; do which $arg >/dev/null 2>&1 || RC="$arg" done if [ -n "$RC" ] ; then echo "$RC not installed" return 1 fi } # }}} # helper functions {{{ cleanup() { if [ -n "$CHROOT_VARIABLES" ] ; then einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $? fi if [ -n "$STAGES" ] ; then einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $? fi # Remove temporary mountpoint again if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then rmdir "$MNTPOINT" 2>/dev/null fi # make sure $TARGET is not mounted when exiting grml-debootstrap if [ -n "$MNTPOINT" ] ; then if grep -q "$MNTPOINT" /proc/mounts ; then # make sure nothing is left inside chroot so we can unmount it [ -x "$MNTPOINT"/etc/init.d/ssh ] && "$MNTPOINT"/etc/init.d/ssh stop [ -x "$MNTPOINT"/etc/init.d/mdadm ] && "$MNTPOINT"/etc/init.d/mdadm stop [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount -a >/dev/null 2>&1 # ugly, but make sure we really don't leave anything (/proc /proc and # /dev /dev are intended, trying to work around timing issues, see #657023) for ARG in /sys /proc /proc /dev /dev ; do [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount $ARG >/dev/null 2>&1 umount "$MNTPOINT"/$ARG >/dev/null 2>&1 done if [ -n "$ISODIR" ] ; then [ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" >/dev/null 2>&1 fi if [ -n "$DIRECTORY" ] ; then einfo "Not unmounting $MNTPOINT as you requested me to install into a directory of your own choice." ; eend 0 else einfo "Unmounting $MNTPOINT" umount "$MNTPOINT" eend $? fi if [ -n "$STAGES" ] ; then echo -n "Removing stages directory ${STAGES}: " rm -rf "$STAGES" && echo done fi # remove directory only if we used the default with process id inside the name if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then einfo "Removing directory ${MNTPOINT}" rmdir "$MNTPOINT" eend $? fi fi fi if [ -n "${ORIG_TARGET}" ] ; then einfo "Removing loopback mount of file ${ORIG_TARGET}." kpartx -d "${ORIG_TARGET}" ; eend $? fi } # we want to exit smoothly and clean: bailout(){ cleanup [ -n "$1" ] && EXIT="$1" || EXIT="1" [ -n "$2" ] && einfo "Notice: remove $STAGES/$2 to reexecute the stage" exit "$EXIT" } trap bailout HUP INT QUIT TERM # we want to execute all the functions only once, simple check for it: stage() { if [ -n "$2" ] ; then echo "$2" > "${STAGES}/${1}" return 0 elif grep -q done "${STAGES}/${1}" 2>/dev/null ; then ewarn "Notice: stage $1 has been executed already, skipping execution therefore." ; eend 0 ewarn " To reexecute it clean up the according directory inside $STAGES" ; eend 0 return 1 fi } # }}} # make sure we have what we need {{{ check4progs debootstrap || bailout 1 # }}} # source main configuration file {{{ if [ -r /etc/debootstrap/config ] ; then . /etc/debootstrap/config fi # }}} # cmdline handling {{{ # source external command line parameter-processing script if [ -r ./cmdlineopts.clp ] ; then . ./cmdlineopts.clp elif [ -r /usr/share/grml-debootstrap/functions/cmdlineopts.clp ] ; then . /usr/share/grml-debootstrap/functions/cmdlineopts.clp else eerror "Error: cmdline function file not found, exiting." eend 1 bailout 1 fi # == business-logic of command line parameter-processing # source configuration file in if supplied. {{{ [ "$_opt_confdir" ] && { CONFFILES=$_opt_confdir einfo "Using config files under $CONFFILES/." if ! [ -r "$CONFFILES/config" ] ; then eerror "Error: config file $CONFFILES/config not found."; eend 1; bailout 1 fi if ! . "$CONFFILES/config" ; then eerror "Error reading config file $CONFFILES/config" ; eend 1 ; bailout 1 fi # restore the command line parameter value CONFFILES=$_opt_confdir } # }}} [ "$_opt_mirror" ] && MIRROR=$_opt_mirror [ "$_opt_iso" ] && ISO=$_opt_iso [ "$_opt_release" ] && RELEASE=$_opt_release [ "$_opt_target" ] && TARGET=$_opt_target [ "$_opt_vmfile" ] && VIRTUAL=1 [ "$_opt_vmsize" ] && VMSIZE=$_opt_vmsize [ "$_opt_mntpoint" ] && MNTPOINT=$_opt_mntpoint [ "$_opt_debopt" ] && DEBOOTSTRAP_OPT=$_opt_debopt [ "$_opt_interactive" ] && INTERACTIVE=1 [ "$_opt_config" ] && CONFIGFILE=$_opt_config [ "$_opt_filesystem" ] && MKFS="mkfs.$_opt_filesystem" [ "$_opt_packages_set" ] && PACKAGES='yes' [ "$_opt_nopackages" ] && PACKAGES='' [ "$_opt_debconf_set" ] && DEBCONF='yes' [ "$_opt_scripts_set" ] && SCRIPTS='yes' [ "$_opt_pre_scripts_set" ] && PRE_SCRIPTS='yes' [ "$_opt_chroot_scripts_set" ] && CHROOT_SCRIPTS='yes' [ "$_opt_keep_src_list" ] && KEEP_SRC_LIST='yes' [ "$_opt_grmlrepos" ] && GRMLREPOS='yes' [ "$_opt_backportrepos" ] && BACKPORTREPOS='yes' [ "$_opt_hostname" ] && HOSTNAME=$_opt_hostname [ "$_opt_password" ] && ROOTPASSWORD=$_opt_password [ "$_opt_nopassword" ] && NOPASSWORD='yes' [ "$_opt_bootappend" ] && BOOT_APPEND=$_opt_bootappend [ "$_opt_grub" ] && GRUB=$_opt_grub [ "$_opt_arch" ] && ARCH=$_opt_arch [ "$_opt_insecure" ] && echo "Warning: --insecure is deprecated, continuing anyway." [ "$_opt_force" ] && FORCE=$_opt_force [ "$_opt_verbose" ] && VERBOSE="-v" [ "$_opt_help" ] && { usage ; eend 0 eend 0 exit 0 } [ "$_opt_version" ] && { einfo "$PN - version $VERSION" einfo "Send bug reports to bugs@grml.org or http://grml.org/bugs/" eend 0 exit 0 } # }}} # check for root permissions {{{ if ! check4root ; then echo "For usage instructions please execute '$PN --help'." bailout 1 fi # }}} # make sure we have what we need {{{ if [ -n "$VIRTUAL" ] ; then check4progs kpartx mksh parted qemu-img || bailout 1 fi # }}} # source specified configuration file {{{ if [ -n "$CONFIGFILE" ] ; then einfo "Reading specified config file $CONFIGFILE." if ! . "$CONFIGFILE" ; then eerror "Error reading config file $CONFIGFILE" ; eend 1 ; bailout 1 fi fi # }}} # backwards compability checks {{{ if [ -n "$GROOT" ] ; then eerror "Error: you seem to have \$GROOT configured." eerror "This variable is no longer supported, please visit the" eerror "grml-debootstrap documentation for details." eend 1 bailout 1 fi if echo "$GRUB" | grep -q '^hd' ; then eerror "Error: this syntax for the grub configuration variable is no longer supported." eerror "Please do not use hd... any longer but /dev/sdX instead." eend 1 bailout 1 fi # }}} # welcome screen {{{ welcome_dialog() { dialog --title "$PN" --yesno "Welcome to the interactive configuration of ${PN}. Do you want to continue installing Debian using this frontend?" 0 0 || bailout 0 } # }}} # ask for target {{{ prompt_for_target() { AVAILABLE_PARTITIONS=$(LANG=C fdisk -l 2>/dev/null | \ sed 's/*//' | \ grep -v 'Extended$' | \ gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}'; ls /dev/md* 2>/dev/null || true); if [ -z "$AVAILABLE_PARTITIONS" ] ; then dialog --title "$PN" --trim \ --msgbox "Sorry, no partitions found. Please configure your harddisks (see /proc/partitions) using a tool like fdisk, cfdisk, gpart, gparted,..." 0 0 bailout 1 fi PARTITION_LIST=$(for i in $(echo $AVAILABLE_PARTITIONS) ; do echo "$i $(blkid -s TYPE -o value $i 2>/dev/null || echo [no_filesystem_yet])" done) TARGET=$(dialog --title "$PN" --single-quoted --stdout \ --menu "Please select the target partition:" 0 0 0 \ $PARTITION_LIST) [ $? -eq 0 ] || bailout 1 } # }}} # ask for bootmanager {{{ prompt_for_bootmanager() { ADDITIONAL_PARAMS="" if echo "$TARGET" | grep -q "/dev/md" ; then MBRPART="all disks of Software RAID $TARGET" else # figure out whole disk device found= for device in /dev/disk/by-id/* do [ $(readlink -f $device) = ${TARGET} ] || continue found=1 break done [ -n "$found" ] && MBRDISK=$(echo ${device}|sed -e 's/-part[0-9][0-9]*$//') if [ -e "$MBRDISK" ]; then MBRDISK=$(readlink -f $MBRDISK) else # fall back to old behaviour MBRDISK=$(echo ${TARGET} | sed -e 's/[0-9][0-9]*$//') fi MBRPART="MBR of $MBRDISK" fi for device in cciss/c0d0 sda hda; do if [ "/dev/$device" != "${MBRDISK}" ]; then grep -q $device /proc/partitions && \ ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS:$device:install bootmanager grub into MBR of /dev/$device" fi done ADDITIONAL_PARAMS=${ADDITIONAL_PARAMS#:} OIFS="$IFS"; IFS=: GETMBR=$(dialog --stdout --title "$PN" --default-item mbr \ --menu "Where do you want to install the bootmanager grub?" 0 0 0 \ mbr "install bootmanager into $MBRPART" \ nowhere "do not install bootmanager at all" \ ${ADDITIONAL_PARAMS}) [ $? -eq 0 ] || bailout 3 IFS="$OIFS" case "$GETMBR" in mbr) # /dev/md0: has to be installed in MBR of /dev/md0 and not in /dev/md: if echo "$TARGET" | grep -q "/dev/md" ; then GRUB="$TARGET" else GRUB="$MBRDISK" fi ;; hda) GRUB="/dev/hda" ;; sda) GRUB="/dev/sda" ;; nowhere) GRUB='' ;; esac } # }}} # ask for Debian release {{{ prompt_for_release() { [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='wheezy' RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \ "Please enter the Debian release you would like to use for installation:" \ 0 50 4 \ lenny Debian/5.0 \ squeeze Debian/6.0 \ wheezy Debian/7.0 \ sid Debian/unstable)" [ $? -eq 0 ] || bailout } # }}} # ask for hostname {{{ prompt_for_hostname() { HOSTNAME="$(dialog --stdout --title "${PN}" --inputbox \ "Please enter the hostname you would like to use for installation:" \ 0 0 $HOSTNAME)" [ $? -eq 0 ] || bailout } # }}} # ask for password {{{ prompt_for_password() { if [ "$_opt_nopassword" ] ; then einfo "Skip asking for root password as requested." return 0 fi ROOTPW1='PW1' ROOTPW2='PW2' while [ "$ROOTPW1" != "$ROOTPW2" ]; do ROOTPW1=$(dialog --insecure --stdout --title "${PN}" --passwordbox \ "Please enter the password for the root account:" 10 60) [ $? -eq 0 ] || bailout ROOTPW2=$(dialog --insecure --stdout --title "${PN}" --passwordbox \ "Please enter the password for the root account again for \ confirmation:" 10 60) [ $? -eq 0 ] || bailout if [ "$ROOTPW1" != "$ROOTPW2" ]; then $(dialog --stdout --title "${PN}" --ok-label \ "Retry" --msgbox "Passwords do not match!" 10 60) fi done ROOTPASSWORD="$ROOTPW1" } # }}} # ask for Debian mirror {{{ prompt_for_mirror() { [ -n "$ISO" ] && DEFAULT_MIRROR='local' || DEFAULT_MIRROR='net' CHOOSE_MIRROR=$(dialog --stdout --title "$PN" --default-item $DEFAULT_MIRROR \ --menu "Where do you want to install from?" 0 0 0 \ net "install via network (downloading from mirror)" \ local "install from local directory/mirror" ) [ $? -eq 0 ] || bailout if [ "$CHOOSE_MIRROR" = 'net' ] ; then [ -n "$MIRROR" ] || MIRROR='http://http.debian.net/debian' MIRROR="$(dialog --stdout --title "${PN}" --inputbox \ "Please enter Debian mirror you would like to use for installing packages." \ 0 0 $MIRROR)" [ $? -eq 0 ] || bailout else # CHOOSE_MIRROR == local [ -n "$ISO" ] || ISO='/mnt/mirror' ISO="$(dialog --stdout --title "${PN}" --inputbox \ "Please enter directory name you would like to use for installing packages." \ 0 0 $ISO)" [ $? -eq 0 ] || bailout fi } # }}} # software raid setup {{{ config_swraid_setup() { TMPFILE=$(mktemp) # Currently we support only raid1: RAIDLEVEL='raid1' #RAIDLEVEL=$(dialog --stdout --title "$PN" --default-item raid1 \ # --menu "Which RAID level do you want to use?" 0 0 0 \ # raid1 "Software RAID level 1" \ # raid5 "Software RAID level 5") #[ $? -eq 0 ] || bailout 20 MD_LIST=$(for i in $(seq 0 9) ; do awk '{print $4}' /proc/partitions | grep -q md$i || \ echo "/dev/md$i /dev/md$i" done) TARGET=$(dialog --stdout --title "$PN" --default-item /dev/md0 \ --menu "Which device do you want to use for ${RAIDLEVEL}? Notice: activated devices will not be listed for security reasons. Anyway, please make sure the selected device is not in use already!" 0 0 0 \ $MD_LIST) [ $? -eq 0 ] || bailout 20 AVAILABLE_PARTITIONS=$(LANG=C fdisk -l 2>/dev/null | \ sed 's/*//' | \ grep -v 'Extended$' | \ gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}') [ -n "$AVAILABLE_PARTITIONS" ] || echo "FIXME: no partitions available?" PARTITION_LIST=$(for i in $(echo $AVAILABLE_PARTITIONS) ; do echo "$i $(blkid -s TYPE -o value $i 2>/dev/null || echo [no_filesystem_yet]) off" done) dialog --title "$PN" --separate-output \ --checklist "Please select the partitions you would like to use for your $RAIDLEVEL on ${TARGET}:" 0 0 0 \ $PARTITION_LIST 2>$TMPFILE [ $? -eq 0 ] || bailout RETVAL=$? SELECTED_PARTITIONS="$(cat $TMPFILE)" NUM_PARTITIONS=0 for i in $(cat $TMPFILE) ; do NUM_PARTITIONS=$((${NUM_PARTITIONS}+1)) done # force metadata version 0.90 for lenny so old grub can boot from this array. METADATA_VERSION="" if [ $RELEASE = "lenny" ]; then METADATA_VERSION="-e0" fi ERRORFILE=$(mktemp) yes | mdadm --create "${TARGET}" --level="${RAIDLEVEL}" \ --raid-devices="${NUM_PARTITIONS}" ${METADATA_VERSION} ${SELECTED_PARTITIONS} >/dev/null 2>$ERRORFILE RC=$? if [ "$RC" = 0 ] ; then dialog --title "$PN" --msgbox \ "Creating $TARGET was successful." 0 0 rm -f "$TMPFILE" "$ERRORFILE" else dialog --title "$PN" --msgbox \ "There was an error setting up $TARGET: $(cat $ERRORFILE) Exiting." 0 0 rm -f "$TMPFILE" "$ERRORFILE" bailout 1 fi } prompt_for_swraid() { if dialog --stdout --title "$PN" \ --defaultno --yesno "Do you want to configure Software RAID? Please notice that only RAID level 1 is supported by ${PN} currently. Configuration will take place using mdadm." 0 0 ; then config_swraid_setup fi } # }}} # user should recheck his configuration {{{ # support full automatic installation: checkforrun() { dialog --timeout 10 --title "$PN" \ --yesno "Do you want to stop at this stage? Notice: you are running ${PN} in non-interactive mode. ${PN} will install Debian ${RELEASE} on ${TARGET}. Last chance to quit. Timeout of 10 seconds running.... Do you want to stop now?" 0 0 2>/dev/null } # }}} # make sure the user is aware of the used configuration {{{ checkconfiguration() { if [ -n "$AUTOINSTALL" ] ; then if checkforrun ; then eerror "Exiting as requested" ; eend 0 bailout 1 fi elif [ -n "$INTERACTIVE" ] ; then INFOTEXT="Please recheck configuration before execution: " [ -n "$TARGET" ] && INFOTEXT="$INFOTEXT Target: $TARGET" [ -n "$GRUB" ] && INFOTEXT="$INFOTEXT Install grub: $GRUB" [ -n "$RELEASE" ] && INFOTEXT="$INFOTEXT Using release: $RELEASE" [ -n "$HOSTNAME" ] && INFOTEXT="$INFOTEXT Using hostname: $HOSTNAME" [ -n "$MIRROR" ] && INFOTEXT="$INFOTEXT Using mirror: $MIRROR" [ -n "$ISO" ] && INFOTEXT="$INFOTEXT Using ISO: $ISO" [ -n "$ARCH" ] && INFOTEXT="$INFOTEXT Using arch: $ARCH" INFOTEXT="$INFOTEXT Is this ok for you? Notice: selecting 'No' will exit ${PN}." dialog --title "$PN" --no-collapse \ --yesno "$INFOTEXT" 0 0 [ $? -eq 0 ] || bailout 0 else # if not running automatic installation display configuration and prompt for execution: einfo "$PN [${VERSION}] - Please recheck configuration before execution:" echo echo " Target: $TARGET" # do not display if MNTPOINT is the default one case "$MNTPOINT" in /mnt/debootstrap*) ;; *) echo " Mount point: $MNTPOINT" ;; esac if [ -n "$VIRTUAL" ] ; then echo " Install grub: yes" else [ -n "$GRUB" ] && echo " Install grub: $GRUB" || echo " Install grub: no" fi [ -n "$RELEASE" ] && echo " Using release: $RELEASE" [ -n "$HOSTNAME" ] && echo " Using hostname: $HOSTNAME" [ -n "$MIRROR" ] && echo " Using mirror: $MIRROR" [ -n "$ISO" ] && echo " Using ISO: $ISO" [ -n "$ARCH" ] && echo " Using arch: $ARCH" if [ -n "$VIRTUAL" ] ; then echo " Deploying as Virtual Machine." [ -n "$VMSIZE" ] && echo " Using Virtual Disk file with size of ${VMSIZE}." fi if [ ! -t 0 -a -z "$ROOTPASSWORD" -a -z "$NOPASSWORD" ] ; then echo echo " You do not have a TTY allocated, your password will be shown in" echo " plaintext on the terminal! If you are using SSH, try its -t option!" fi echo echo " Important! Continuing will delete all data from ${TARGET}!" if [ -n "$FORCE" ] ; then einfo "Skip user acknowledgement as requested via --force option." else echo einfon "Is this ok for you? [y/N] " read a if ! [ "$a" = 'y' -o "$a" = 'Y' ] ; then eerror "Exiting as requested." ; eend 1 bailout 1 fi fi fi } # }}} # interactive mode {{{ interactive_mode() { check4progs dialog || bailout 1 welcome_dialog prompt_for_release prompt_for_swraid prompt_for_target prompt_for_bootmanager prompt_for_hostname prompt_for_password prompt_for_mirror } # run interactive mode if we didn't get the according configuration yet if [ -z "$TARGET" -o -n "$INTERACTIVE" ] ; then # only target might be unset, so make sure the INTERACTIVE flag is set as well INTERACTIVE=1 interactive_mode fi # }}} # architecture setup {{{ if [ -n "$ARCH" ] ; then ARCHCMD="--arch $ARCH" ARCHINFO=" (${ARCH})" else ARCH="$(dpkg --print-architecture)" ARCHCMD="--arch $ARCH" ARCHINFO=" (${ARCH})" fi # }}} checkconfiguration # finally make sure at least $TARGET is set [the partition for the new system] {{{ if [ -n "$TARGET" ] ; then SHORT_TARGET="${TARGET##*/}" else eerror "Please adjust $CONFFILES/config or..." eerror "... use the interactive version for configuration before running ${0}" ; eend 1 bailout 1 fi # }}} # stages setup {{{ if [ -z "$STAGES" ] ; then STAGES="/var/cache/grml-debootstrap/stages_${SHORT_TARGET}" [ -d "$STAGES" ] || mkdir -p "$STAGES" fi if [ -r "$STAGES"/grml-debootstrap ] ; then if grep -q done $STAGES/grml-debootstrap ; then eerror "Error: grml-debootstrap has been executed already, won't continue therefore." eerror "If you want to re-execute grml-debootstrap just manually remove ${STAGES}" ; eend 1 fi fi # }}} # partition handling {{{ PARTITION='' DIRECTORY='' set_target_directory(){ # assume we are installing into a directory, don't run mkfs and grub related stuff therefore DIRECTORY=1 MNTPOINT="$TARGET" MKFS='' TUNE2FS='' FSCK='' GRUB='' # make sure we normalise the path to an absolute directory name so something like: # mkdir -p foo/a bar/a; (cd foo; grml-debootstrap -t a)&; (cd bar; grml-debootstrap -t a)&; wait # works TARGET="$(readlink -f $TARGET)" } if [ -b "$TARGET" ] || [ -n "$VIRTUAL" ] ; then PARTITION=1 else set_target_directory fi # }}} # make sure we have the right syntax when using an iso image {{{ if [ -n "$ISO" ] ; then case $ISO in file*) # do nothing ;; *) ISO=file:$ISO ;; esac fi ISODIR=${ISO##file:} ISODIR=${ISODIR%%/} # }}} # Debian ISOs do not contain signed Release files {{{ if [ -n "$ISO" ] ; then DEBOOTSTRAP_OPT="$DEBOOTSTRAP_OPT --no-check-gpg" fi # }}} # create filesystem {{{ mkfs() { if [ -n "$DIRECTORY" ] ; then einfo "Running grml-debootstrap on a directory, skipping mkfs stage." else if grep -q "$TARGET" /proc/mounts ; then eerror "$TARGET already mounted, exiting to avoid possible damage. (Manually unmount $TARGET)" ; eend 1 bailout 1 fi if [ -n "$MKFS" ] ; then einfo "Running $MKFS on $TARGET" $MKFS $TARGET ; RC=$? # make sure /dev/disk/by-uuid/... is up2date, otherwise grub # will fail to detect the uuid in the chroot if echo "$TARGET" | grep -q "/dev/md" ; then blockdev --rereadpt "${TARGET}" elif ! [ -n "$VIRTUAL" ] ; then blockdev --rereadpt "${TARGET%%[0-9]*}" fi # give the system 2 seconds, otherwise we might run into # race conditions :-/ sleep 2 eval $(blkid -o udev $TARGET 2>/dev/null) [ -n "$ID_FS_UUID" ] && TARGET_UUID="$ID_FS_UUID" || TARGET_UUID="" eend $RC fi fi } # }}} # modify filesystem settings {{{ tunefs() { if [ -n "$TUNE2FS" ] && echo "$MKFS" | grep -q "mkfs.ext" ; then einfo "Disabling automatic filesystem check on $TARGET via tune2fs" $TUNE2FS $TARGET eend $? fi } # }}} # mount the new partition or if it's a directory do nothing at all {{{ mount_target() { if [ -n "$DIRECTORY" ] ; then einfo "Running grml-debootstrap on a directory, nothing to mount." else if grep -q $TARGET /proc/mounts ; then ewarn "$TARGET already mounted, continuing anyway." ; eend 0 else if ! [ -d "${MNTPOINT}" ] ; then [ -n "$VIRTUAL" ] || mkdir -p "${MNTPOINT}" fi einfo "Mounting $TARGET to $MNTPOINT" mkdir -p "$MNTPOINT" mount -o rw,suid,dev $TARGET $MNTPOINT eend $? fi fi if [ -n "$ISODIR" ] ; then einfo "Mounting Debian image loopback to $MNTPOINT/$ISODIR." mkdir -p "$MNTPOINT/$ISODIR" mount --bind "$ISODIR" "$MNTPOINT/$ISODIR" eend $? fi } # }}} # prepare VM image for usage with debootstrap {{{ prepare_vm() { if [ -z "$VIRTUAL" ] ; then return 0 # be quite by intention fi if [ -b "$TARGET" ] ; then eerror "Error: specified virtual disk target ($TARGET) is an existing block device." eend 1 bailout 1 fi ORIG_TARGET="$TARGET" # store for later reuse qemu-img create -f raw "${TARGET}" "${VMSIZE}" echo 4 66 | /usr/share/grml-debootstrap/bootgrub.mksh -A | dd of="$TARGET" conv=notrunc dd if=/dev/zero bs=1 conv=notrunc count=64 seek=446 of="$TARGET" parted -s "${TARGET}" 'mkpart primary ext3 2M -1' # if dm-mod isn't available then kpartx will fail with # "Is device-mapper driver missing from kernel? [...]" if ! kpartx -av $TARGET >/dev/null 2>&1 || ! grep -q device-mapper /proc/misc >/dev/null 2>&1 ; then einfo "Device-mapper not ready yet, trying to load dm-mod module." modprobe dm-mod ; eend $? fi # make sure loop module is present if ! losetup -f >/dev/null 2>&1; then einfo "Can not find a usable loop device, retrying after loading loop module." modprobe loop if losetup -f >/dev/null 2>&1; then einfo "Found a usable loop device now, continuing." else eerror "Error finding usable loop device" ; eend 1 bailout 1 fi fi DEVINFO=$(kpartx -av $TARGET) # 'add map loop1p1 (253:0): 0 6289408 linear /dev/loop1 2048' if [ -z "${DEVINFO}" ] ; then eerror "Error setting up loopback device." ; eend 1 bailout 1 fi # hopefully this always works as expected LOOP=$(echo ${DEVINFO} | sed 's/.* linear //; s/ [[:digit:]]*//') # '/dev/loop1' BLOCKDEV=$(echo "${DEVINFO}" | sed -e 's/.* (\(.*:.*\)).*/\1/') # '253:0' LOOP_PART="$(echo ${DEVINFO##add map } | sed 's/ .*//')" # '/dev/loop1p1' export TARGET="/dev/mapper/$LOOP_PART" # '/dev/mapper/loop1p1' blockdev --rereadpt "${LOOP}" if [ -z "$TARGET" ] ; then eerror "Error: target could not be set to according /dev/mapper/* device." ; eend 1 bailout 1 fi } # }}} # make VM image bootable and unmount it {{{ finalize_vm() { if [ -z "${VIRTUAL}" ] ; then return 0 fi if ! mount "${TARGET}" "${MNTPOINT}" ; then eerror "Error: Mounting ${TARGET} failed, can not continue." ; eend 1 bailout 1 fi einfo "Installing Grub as bootloader." mount -t proc none "${MNTPOINT}"/proc mount -t sysfs none "${MNTPOINT}"/sys mount --bind /dev "${MNTPOINT}"/dev mkdir -p "${MNTPOINT}/boot/grub" if ! [ -d "${MNTPOINT}"/usr/lib/grub/i386-pc/ ] ; then eerror "Error: grub not installed inside Virtual Machine. Can not install bootloader." ; eend 1 bailout 1 fi cp "${MNTPOINT}"/usr/lib/grub/i386-pc/* "${MNTPOINT}/boot/grub/" chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2 dd if="${MNTPOINT}/tmp/core.img" of="${ORIG_TARGET}" conv=notrunc seek=4 rm -f "${MNTPOINT}/tmp/core.img" einfo "Updating grub configuration file." if [ -n "$BOOT_APPEND" ] ; then sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" "${MNTPOINT}"/etc/default/grub fi chroot "${MNTPOINT}" update-grub umount "${MNTPOINT}"/proc umount "${MNTPOINT}"/sys umount "${MNTPOINT}"/dev einfo "Adjusting grub.cfg for successful boot sequence." # ugly but needed to boot grub acordingly sed -i "s;set root=.*;set root='(hd0,msdos1)';" "${MNTPOINT}"/boot/grub/grub.cfg sed -i "s;root=[^ ]\+;root=/dev/sda1;" "${MNTPOINT}"/boot/grub/grub.cfg umount "${MNTPOINT}" kpartx -d "${ORIG_TARGET}" >/dev/null } # }}} # install main chroot {{{ debootstrap_system() { if [ "$_opt_nodebootstrap" ]; then einfo "Skipping debootstrap as requested." return fi if grep -q "$MNTPOINT" /proc/mounts || [ -n "$DIRECTORY" ] ; then : else eerror "Error: $MNTPOINT not mounted, can not continue." eend 1 ; exit 1 fi if [ -n "$ISO" ] ; then einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${ISO}" einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO" $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO RC=$? else einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}" einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR" $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR RC=$? fi if [ $RC -ne 0 ] ; then if [ -r "$MNTPOINT/debootstrap/debootstrap.log" ] && \ [ -s "$MNTPOINT/debootstrap/debootstrap.log" ] ; then einfo "Presenting last ten lines of debootstrap.log:" tail -10 $MNTPOINT/debootstrap/debootstrap.log einfo "End of debootstrap.log" fi fi eend $RC } # }}} # prepare chroot via chroot-script {{{ preparechroot() { einfo "Preparing chroot system" # provide variables to chroot system CHROOT_VARIABLES="/var/cache/grml-debootstrap/variables_${SHORT_TARGET}" touch $CHROOT_VARIABLES chmod 600 $CHROOT_VARIABLES # make sure nobody except root can read it echo "# Configuration of ${PN}" > $CHROOT_VARIABLES [ -n "$ARCH" ] && echo "ARCH=\"$ARCH\"" >> $CHROOT_VARIABLES [ -n "$BACKPORTREPOS" ] && echo "BACKPORTREPOS=\"$BACKPORTREPOS\"" >> $CHROOT_VARIABLES [ -n "$CHROOT_SCRIPTS" ] && echo "CHROOT_SCRIPTS=\"$CHROOT_SCRIPTS\"" >> $CHROOT_VARIABLES [ -n "$CONFFILES" ] && echo "CONFFILES=\"$CONFFILES\"" >> $CHROOT_VARIABLES [ -n "$DEBCONF" ] && echo "DEBCONF=\"$DEBCONF\"" >> $CHROOT_VARIABLES [ -n "$DEBIAN_FRONTEND" ] && echo "DEBIAN_FRONTEND=\"$DEBIAN_FRONTEND\"" >> $CHROOT_VARIABLES [ -n "$DEBOOTSTRAP" ] && echo "DEBOOTSTRAP=\"$DEBOOTSTRAP\"" >> $CHROOT_VARIABLES [ -n "$DEFAULT_LOCALES" ] && echo "DEFAULT_LOCALES=\"$DEFAULT_LOCALES\"" >> $CHROOT_VARIABLES [ -n "$EXTRAPACKAGES" ] && echo "EXTRAPACKAGES=\"$EXTRAPACKAGES\"" >> $CHROOT_VARIABLES [ -n "$FALLBACK_MIRROR" ] && echo "FALLBACK_MIRROR=\"$FALLBACK_MIRROR\"" >> $CHROOT_VARIABLES [ -n "$FORCE" ] && echo "FORCE=\"$FORCE\"" >> $CHROOT_VARIABLES [ -n "$GRMLREPOS" ] && echo "GRMLREPOS=\"$GRMLREPOS\"" >> $CHROOT_VARIABLES [ -n "$GRUB" ] && echo "GRUB=\"$GRUB\"" >> $CHROOT_VARIABLES [ -n "$HOSTNAME" ] && echo "HOSTNAME=\"$HOSTNAME\"" >> $CHROOT_VARIABLES [ -n "$INITRD" ] && echo "INITRD=\"$INITRD\"" >> $CHROOT_VARIABLES [ -n "$INSTALL_NOTES" ] && echo "INSTALL_NOTES=\"$INSTALL_NOTES\"" >> $CHROOT_VARIABLES [ -n "$ISODIR" ] && echo "ISODIR=\"$ISO\"" >> $CHROOT_VARIABLES [ -n "$ISO" ] && echo "ISO=\"$ISO\"" >> $CHROOT_VARIABLES [ -n "$KEEP_SRC_LIST" ] && echo "KEEP_SRC_LIST=\"$KEEP_SRC_LIST\"" >> $CHROOT_VARIABLES [ -n "$LOCALES" ] && echo "LOCALES=\"$LOCALES\"" >> $CHROOT_VARIABLES [ -n "$MIRROR" ] && echo "MIRROR=\"$MIRROR\"" >> $CHROOT_VARIABLES [ -n "$MKFS" ] && echo "MKFS=\"$MKFS\"" >> $CHROOT_VARIABLES [ -n "$NOPASSWORD" ] && echo "NOPASSWORD=\"true\"" >> $CHROOT_VARIABLES [ -n "$PACKAGES" ] && echo "PACKAGES=\"$PACKAGES\"" >> $CHROOT_VARIABLES [ -n "$PRE_SCRIPTS" ] && echo "PRE_SCRIPTS=\"$PRE_SCRIPTS\"" >> $CHROOT_VARIABLES [ -n "$RECONFIGURE" ] && echo "RECONFIGURE=\"$RECONFIGURE\"" >> $CHROOT_VARIABLES [ -n "$RELEASE" ] && echo "RELEASE=\"$RELEASE\"" >> $CHROOT_VARIABLES [ -n "$RM_APTCACHE" ] && echo "RM_APTCACHE=\"$RM_APTCACHE\"" >> $CHROOT_VARIABLES [ -n "$ROOTPASSWORD" ] && echo "ROOTPASSWORD=\"$ROOTPASSWORD\"" >> $CHROOT_VARIABLES [ -n "$SCRIPTS" ] && echo "SCRIPTS=\"$SCRIPTS\"" >> $CHROOT_VARIABLES [ -n "$SECURE" ] && echo "SECURE=\"$SECURE\"" >> $CHROOT_VARIABLES [ -n "$SELECTED_PARTITIONS" ] && echo "SELECTED_PARTITIONS=\"$SELECTED_PARTITIONS\"" >> $CHROOT_VARIABLES [ -n "$TARGET" ] && echo "TARGET=\"$TARGET\"" >> $CHROOT_VARIABLES [ -n "$UPGRADE_SYSTEM" ] && echo "UPGRADE_SYSTEM=\"$UPGRADE_SYSTEM\"" >> $CHROOT_VARIABLES [ -n "$TARGET_UUID" ] && echo "TARGET_UUID=\"$TARGET_UUID\"" >> $CHROOT_VARIABLES [ -n "$TIMEZONE" ] && echo "TIMEZONE=\"$TIMEZONE\"" >> $CHROOT_VARIABLES [ -n "$TUNE2FS" ] && echo "TUNE2FS=\"$TUNE2FS\"" >> $CHROOT_VARIABLES [ -n "$VMSIZE" ] && echo "VMSIZE=\"$VMSIZE\"" >> $CHROOT_VARIABLES cp $VERBOSE $CONFFILES/chroot-script $MNTPOINT/bin/chroot-script chmod 755 $MNTPOINT/bin/chroot-script [ -d "$MNTPOINT"/etc/debootstrap/ ] || mkdir "$MNTPOINT"/etc/debootstrap/ # make sure we have our files for later use via chroot-script cp $VERBOSE $CONFFILES/config $MNTPOINT/etc/debootstrap/ # make sure we adjust the configuration variables accordingly: sed -i "s#RELEASE=.*#RELEASE=\"$RELEASE\"#" $MNTPOINT/etc/debootstrap/config sed -i "s#TARGET=.*#TARGET=\"$TARGET\"#" $MNTPOINT/etc/debootstrap/config sed -i "s#GRUB=.*#GRUB=\"$GRUB\"#" $MNTPOINT/etc/debootstrap/config # install notes: if [ -n "$INSTALL_NOTES" ] ; then [ -r "$INSTALL_NOTES" ] && cp "$INSTALL_NOTES" $MNTPOINT/etc/debootstrap/ fi # package selection: cp $VERBOSE ${_opt_packages:-$CONFFILES/packages} \ $MNTPOINT/etc/debootstrap/packages # debconf preseeding: _opt_debconf=${_opt_debconf:-$CONFFILES/debconf-selections} [ -f $_opt_debconf -a "$DEBCONF" = 'yes' ] && \ cp $VERBOSE $_opt_debconf $MNTPOINT/etc/debootstrap/debconf-selections # copy scripts that should be executed inside the chroot: _opt_chroot_scripts=${_opt_chroot_scripts:-$CONFFILES/chroot-scripts/} [ -d $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && { mkdir -p $MNTPOINT/etc/debootstrap/chroot-scripts cp -a $VERBOSE $_opt_chroot_scripts/* $MNTPOINT/etc/debootstrap/chroot-scripts/ } # notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead! cp $VERBOSE $CHROOT_VARIABLES $MNTPOINT/etc/debootstrap/variables cp $VERBOSE -a -L $CONFFILES/extrapackages/ $MNTPOINT/etc/debootstrap/ # make sure we can access network [relevant for cdebootstrap] [ -f "$MNTPOINT/etc/resolv.conf" ] || cp $VERBOSE /etc/resolv.conf $MNTPOINT/etc/resolv.conf # provide system's /etc/hosts to the target: if ! [ -f "$MNTPOINT/etc/hosts" ] ; then cp $VERBOSE /etc/hosts $MNTPOINT/etc/hosts fi # setup default locales [ -n "$LOCALES" ] && cp $VERBOSE $CONFFILES/locale.gen $MNTPOINT/etc/locale.gen # MAKEDEV is just a forking bomb crap, let's do it on our own instead :) ( cd $MNTPOINT/dev && tar zxf /etc/debootstrap/devices.tar.gz ) # copy any existing files to chroot [ -d $CONFFILES/bin ] && cp $VERBOSE -a -L $CONFFILES/bin/* $MNTPOINT/bin/ [ -d $CONFFILES/boot ] && cp $VERBOSE -a -L $CONFFILES/boot/* $MNTPOINT/boot/ [ -d $CONFFILES/etc ] && cp $VERBOSE -a -L $CONFFILES/etc/* $MNTPOINT/etc/ [ -d $CONFFILES/sbin ] && cp $VERBOSE -a -L $CONFFILES/sbin/* $MNTPOINT/sbin/ [ -d $CONFFILES/share ] && cp $VERBOSE -a -L $CONFFILES/share/* $MNTPOINT/share/ [ -d $CONFFILES/usr ] && cp $VERBOSE -a -L $CONFFILES/usr/* $MNTPOINT/usr/ [ -d $CONFFILES/var ] && cp $VERBOSE -a -L $CONFFILES/var/* $MNTPOINT/var/ # copy local network setup to chroot if [ -r /etc/network/interfaces -a ! -r "${MNTPOINT}"/etc/network/interfaces ] ; then [ -d $MNTPOINT/etc/network ] || mkdir $MNTPOINT/etc/network cp $VERBOSE /etc/network/interfaces $MNTPOINT/etc/network/interfaces fi # install config file providing some example entries if [ -r /etc/network/interfaces.examples -a ! -r "$MNTPOINT/etc/network/interfaces.examples" ] ; then cp /etc/network/interfaces.examples "$MNTPOINT/etc/network/interfaces.examples" fi eend 0 } # }}} # execute all scripts in /etc/debootstrap/pre-scripts/ {{{ execute_pre_scripts() { # make sure we have $MNTPOINT available for our scripts export MNTPOINT if [ -d "$_opt_pre_scripts" ] || [ "$PRE_SCRIPTS" = 'yes' ] ; then [ -d "$_opt_pre_scripts" ] && pre_scripts="$_opt_pre_scripts" || pre_scripts="$CONFFILES/pre-scripts/" for script in ${pre_scripts}/* ; do if [ -x "$script" ] ; then einfo "Executing pre-script $script" $script ; eend $? fi done fi } # }}} # execute all scripts in /etc/debootstrap/scripts/ {{{ execute_scripts() { # make sure we have $MNTPOINT available for our scripts export MNTPOINT if [ -d "$_opt_scripts" ] || [ "$SCRIPTS" = 'yes' ] ; then [ -d "$_opt_scripts" ] && scripts="$_opt_scripts" || scripts="$CONFFILES/scripts/" for script in ${scripts}/* ; do if [ -x "$script" ] ; then einfo "Executing script $script" $script ; eend $? fi done fi } # }}} # execute chroot-script {{{ chrootscript() { if ! [ -r "$MNTPOINT/bin/chroot-script" ] ; then mount_target fi if ! [ -x "$MNTPOINT/bin/chroot-script" ] ; then eerror "Fatal: $MNTPOINT/bin/chroot-script could not be found." eend 1 else einfo "Executing chroot-script now" mount --bind /dev "$MNTPOINT"/dev chroot "$MNTPOINT" /bin/chroot-script ; RC=$? umount "$MNTPOINT"/dev eend $RC fi # finally get rid of chroot-script again, there's no good reason to # keep it on the installed system if grep -q GRML_CHROOT_SCRIPT_MARKER "${MNTPOINT}/bin/chroot-script" ; then einfo "Removing chroot-script again" rm -f "${MNTPOINT}/bin/chroot-script" eend $? else einfo "Keeping chroot-script as string GRML_CHROOT_SCRIPT_MARKER could not be found" eend 0 fi } # }}} # unmount $MNTPOINT {{{ umount_chroot() { # display installation notes: if [ -n "$INSTALL_NOTES" ] ; then [ -r "${MNTPOINT}/${INSTALL_NOTES}" ] && cat "${MNTPOINT}/${INSTALL_NOTES}" fi if [ -n "$ISODIR" ] ; then if grep -q "$ISODIR" /proc/mounts ; then einfo "Unmount $MNTPOINT/$ISODIR" umount "$MNTPOINT/$ISODIR" eend $? fi fi if grep -q "$MNTPOINT" /proc/mounts ; then if [ -n "$PARTITION" ] ; then einfo "Unmount $MNTPOINT" umount $MNTPOINT eend $? fi fi } # }}} # execute filesystem check {{{ fscktool() { if [ -n "$VIRTUAL" ] ; then einfo "Skipping filesystem check because we deploy a virtual machine." return 0 fi if [ "$FSCK" = 'yes' ] ; then [ -n "$FSCKTOOL" ] || FSCKTOOL="fsck.${MKFS#mkfs.}" einfo "Checking filesystem on $TARGET using $FSCKTOOL" $FSCKTOOL $TARGET eend $? fi } # }}} # now execute all the functions {{{ for i in prepare_vm mkfs tunefs mount_target debootstrap_system \ preparechroot execute_pre_scripts chrootscript execute_scripts \ umount_chroot finalize_vm fscktool ; do if stage "${i}" ; then $i && ( stage "${i}" done && rm -f "${STAGES}/${i}" ) || bailout 2 "$i" fi done cleanup # }}} # end dialog of autoinstallation {{{ if [ -n "$AUTOINSTALL" ] ; then if dialog --title "${PN}" --pause "Finished execution of ${PN}. Automatically rebooting in 10 seconds. Choose Cancel to skip rebooting." 10 60 10 ; then noeject noprompt reboot fi else einfo "Finished execution of ${PN}. Enjoy your Debian system." ; eend 0 fi # }}} ## END OF FILE ################################################################# # vim: ai tw=100 expandtab foldmethod=marker shiftwidth=2 grml-debootstrap-0.59/chroot-script0000755000000000000000000004240112240423727014354 0ustar #!/bin/sh # Filename: /etc/debootstrap/chroot-script # Purpose: script executed in chroot when installing Debian via grml-debootstrap # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ # GRML_CHROOT_SCRIPT_MARKER - do not remove this line unless you want to keep # this script as /bin/chroot-script on your new installed system ################################################################################ . /etc/debootstrap/config || exit 1 . /etc/debootstrap/variables || exit 1 [ -r /proc/1 ] || mount -t proc none /proc # variable checks {{{ # use aptitude only if it's available if [ -x /usr/bin/aptitude ] ; then APTUPDATE='aptitude update' # Debian ISOs do not contain signed Release files if [ -n "$ISO" ] ; then APTINSTALL="aptitude -y --allow-untrusted --without-recommends install $DPKG_OPTIONS" APTUPGRADE='aptitude -y --allow-untrusted safe-upgrade' else APTINSTALL="aptitude -y --without-recommends install $DPKG_OPTIONS" APTUPGRADE='aptitude -y safe-upgrade' fi else APTINSTALL="apt-get --force-yes -y --no-install-recommends install $DPKG_OPTIONS" APTUPDATE='apt-get update' APTUPGRADE='apt-get --force-yes -y upgrade' fi if [ -z "$STAGES" ] ; then STAGES='/etc/debootstrap/stages' [ -d "$STAGES" ] || mkdir -p "$STAGES" fi # }}} # helper functions {{{ stage() { if [ -n "$2" ] ; then echo "$2" > "$STAGES/$1" return 0 elif grep -q done "$STAGES/$1" 2>/dev/null ; then echo " [*] Notice: stage $1 has been executed already, skipping execution therefore.">&2 return 1 fi echo " Executing stage ${1}" return 0 } askpass() { # read -s emulation for dash. result is in $resp. set -o noglob [ -t 0 ] && stty -echo read resp [ -t 0 ] && stty echo set +o noglob } # }}} # define chroot mirror {{{ chrootmirror() { if [ -n "$KEEP_SRC_LIST" ] ; then echo "KEEP_SRC_LIST has been set, skipping chrootmirror stage." return fi if [ -z "$COMPONENTS" ] ; then COMPONENTS='main contrib non-free' fi echo "Using repository components $COMPONENTS" if [ -n "$ISO" ] ; then echo "Adjusting sources.list for ISO (${ISO})." echo "deb $ISO $RELEASE $COMPONENTS" > /etc/apt/sources.list echo "Adding mirror entry (${MIRROR}) to sources.list." [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list || true else if [ -n "$MIRROR" ] ; then echo "Adjusting sources.list for mirror (${MIRROR})." echo "deb $MIRROR $RELEASE $COMPONENTS" > /etc/apt/sources.list fi fi # add security.debian.org: case "$RELEASE" in unstable|sid) ;; # no security pool available *) echo "Adding security.debian.org to sources.list." echo "deb http://security.debian.org ${RELEASE}/updates $COMPONENTS" >> /etc/apt/sources.list ;; esac } # }}} # remove local chroot mirror {{{ remove_chrootmirror() { if [ -n "$KEEP_SRC_LIST" ] ; then echo "KEEP_SRC_LIST has been set, skipping remove_chrootmirror stage." return fi if [ -n "$ISO" ] ; then echo "Removing ISO (${ISO}) from sources.list." TMP_ISO=$(echo "$ISO" |sed 's#/#\\/#g') sed -i "/deb $TMP_ISO $RELEASE $COMPONENTS/ D" /etc/apt/sources.list else if [ -n "$MIRROR" -a -n "$(echo $MIRROR|grep file:)" ] ; then echo "Removing local mirror (${MIRROR}) from sources.list." TMP_MIRROR=$(echo "$MIRROR" |sed 's#/#\\/#g') sed -i "/deb $TMP_MIRROR $RELEASE $COMPONENTS/ D" /etc/apt/sources.list echo "Adding fallback mirror entry (${FALLBACK_MIRROR}) to sources.list instead." echo "deb $FALLBACK_MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list fi fi } # }}} # set up grml repository {{{ grmlrepos() { if [ -n "$GRMLREPOS" ] ; then # user might have provided their own apt sources.list if ! grep -q grml /etc/apt/sources.list.d/grml.list 2>/dev/null ; then cat >> /etc/apt/sources.list.d/grml.list << EOF # grml: stable repository: deb http://deb.grml.org/ grml-stable main deb-src http://deb.grml.org/ grml-stable main # grml: testing/development repository: deb http://deb.grml.org/ grml-testing main deb-src http://deb.grml.org/ grml-testing main EOF fi if apt-get update ; then apt-get -y --allow-unauthenticated install grml-debian-keyring apt-get update else # make sure we have the keys available for aptitude gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 gpg --export F61E2E7CECDEA787 | apt-key add - || true # not yet sure # why it's necessary, sometimes we get an error even though it works [mika] fi # make sure we install packages from Grml's pool only if not available # from Debian! if ! grep -q grml /etc/apt/preferences 2>/dev/null ; then cat >> /etc/apt/preferences << EOF // debian pool (default): Package: * Pin: release o=Debian Pin-Priority: 996 // main grml-repository: Package: * Pin: origin deb.grml.org Pin-Priority: 991 EOF fi fi } # }}} # check available backports release version {{{ checkbackports() { wget -q -O/dev/null http://backports.debian.org/debian-backports/dists/${1}-backports/Release } # }}} # feature to provide Debian backports repos {{{ backportrepos() { if [ -n "$BACKPORTREPOS" ] ; then if ! checkbackports $RELEASE ; then echo "Backports for ${RELEASE} are not available." >&2 exit 1 else # user might have provided their own apt sources.list if ! grep -q backports /etc/apt/sources.list.d/backports.list 2>/dev/null ; then cat >> /etc/apt/sources.list.d/backports.list << EOF # debian backports: ${RELEASE}-backports repository: deb http://backports.debian.org/debian-backports ${RELEASE}-backports main deb-src http://backports.debian.org/debian-backports ${RELEASE}-backports main EOF fi fi fi } # }}} # set up kernel-img.conf {{{ kernelimg_conf() { if ! [ -r /etc/kernel-img.conf ] ; then echo "Setting up /etc/kernel-img.conf" cat > /etc/kernel-img.conf << EOF # Kernel Image management overrides # See kernel-img.conf(5) for details do_initrd = Yes do_symlinks = Yes EOF fi } # }}} # make sure services do not start up {{{ install_policy_rcd() { if ! [ -r /usr/sbin/policy-rc.d ] ; then export POLICYRCD=1 cat > /usr/sbin/policy-rc.d << EOF #!/bin/sh exit 101 EOF chmod 775 /usr/sbin/policy-rc.d fi } # }}} # make sure we have an up2date system {{{ upgrade_system() { if [ "$UPGRADE_SYSTEM" = "yes" ] ; then echo "Running update + upgrade" $APTUPDATE $APTUPGRADE else echo "Not running update + upgrade as \$UPDATE_AND_UPGRADE is not set to 'yes'." fi } # }}} # remove now useless apt cache {{{ remove_apt_cache() { if [ "$RM_APTCACHE" = 'yes' ] ; then echo "Cleaning apt cache." apt-get clean else echo "Not cleaning apt cache as \$RM_APTCACHE is unset." fi } # }}} # install additional packages {{{ packages() { # Pre-seed the debconf database with answers. Each question will be marked # as seen to prevent debconf from asking the question interactively. [ -f /etc/debootstrap/debconf-selections ] && { echo "Preseeding the debconf database, some lines might be skipped..." cat /etc/debootstrap/debconf-selections | debconf-set-selections } if [ "$PACKAGES" = 'yes' ] ; then if ! [ -r /etc/debootstrap/packages ] ; then echo "Error: /etc/debootstrap/packages (inside chroot) not found, exiting." >&2 exit 1 else $APTUPDATE DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(grep -v '^#' /etc/debootstrap/packages) $GRMLPACKAGES fi fi } # }}} # install extra packages {{{ extrapackages() { if [ "$EXTRAPACKAGES" = 'yes' ] ; then PACKAGELIST=$(find /etc/debootstrap/extrapackages -type f -name '*.deb') if [ -n "$PACKAGELIST" ]; then dpkg -i $PACKAGELIST # run apt again to resolve any deps DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL fi fi } # }}} # check if the specified Debian package exists package_exists() { output=$(apt-cache show "$1" 2>/dev/null) [ -n "$output" ] return $? } # determine the kernel version postfix get_kernel_version() { # do not override $KERNEL if set via config file if [ -n "$KERNEL" ] ; then echo "$KERNEL" return 0 fi case $ARCH in i386) KARCH=686 ;; amd64) KARCH=amd64 ;; *) echo "Only i386 and amd64 are currently supported" >&2 return 1 esac for KPREFIX in "" "2.6-" ; do # iterate through the kernel prefixes, # currently "" and "2.6-" if package_exists linux-image-${KPREFIX}${KARCH} ; then echo ${KPREFIX}${KARCH} return 0 fi done } # install kernel packages {{{ kernel() { $APTUPDATE KVER=$(get_kernel_version) if [ -n "$KVER" ] ; then # note: install busybox to be able to debug initramfs KERNELPACKAGES="linux-image-$KVER linux-headers-$KVER busybox firmware-linux-free firmware-linux" DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $KERNELPACKAGES else echo "Warning: Could not find a kernel for your system. Your system won't be able to boot itself!" fi } # }}} # reconfigure packages {{{ reconfigure() { if [ -n "$RECONFIGURE" ] ; then for package in $RECONFIGURE ; do if dpkg --list $package >/dev/null 2>&1 | grep -q '^ii' ; then DEBIAN_FRONTEND=$DEBIAN_FRONTEND dpkg-reconfigure $package || \ echo "Warning: $package does not exist, can not reconfigure it." fi done fi } # }}} # set password of user root {{{ passwords() { if [ -n "$NOPASSWORD" ] ; then echo "Skip setting root password as requested." return 0 fi echo "Activating shadow passwords." shadowconfig on CHPASSWD_OPTION= if chpasswd --help 2>&1 | grep -q -- '-m,' ; then CHPASSWD_OPTION='-m' fi if [ -n "$ROOTPASSWORD" ] ; then echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION export ROOTPASSWORD='' else a='1' b='2' echo "Setting password for user root:" while [ "$a" != "$b" ] ; do echo -n "Enter new UNIX password for user root: " askpass a="$resp" unset resp echo echo -n "Retype new UNIX password for user root: " askpass b="$resp" unset resp echo if [ "$a" != "$b" ] ; then echo "Sorry, passwords do not match. Retry." a='1' b='2' else echo root:"$a" | chpasswd $CHPASSWD_OPTION unset a unset b fi done fi } # }}} # set up /etc/hosts {{{ hosts() { if [ -f /etc/hosts ] ; then sed -i "s#127.0.0.1 .*#127.0.0.1 localhost $HOSTNAME#" /etc/hosts [ -n "$HOSTNAME" ] && sed -i "s/grml/$HOSTNAME/g" /etc/hosts else cat > /etc/hosts << EOF 127.0.0.1 localhost $HOSTNAME #127.0.0.1 localhost #127.0.1.1 $HOSTNAME.example.org $HOSTNAME # The following lines are desirable for IPv6 capable hosts #::1 ip6-localhost ip6-loopback $HOSTNAME ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts EOF fi } # }}} # set up /etc/network/interfaces {{{ interfaces() { if ! [ -r /etc/network/interfaces ] || ! grep -q "auto lo" /etc/network/interfaces ; then echo "Setting up /etc/network/interfaces" cat >> /etc/network/interfaces << EOF # loopback device: iface lo inet loopback auto lo # eth0: # iface eth0 inet dhcp # auto eth0 EOF fi } # }}} # set default locales {{{ default_locales() { if [ -n "$DEFAULT_LOCALES" ] ; then if ! [ -x /usr/sbin/update-locale ] ; then echo "Warning: update-locale executable not available (no locales package installed?)" echo "Ignoring request to run update-locale for $DEFAULT_LOCALES therefore" return 0 fi /usr/sbin/update-locale LANG="$DEFAULT_LOCALES" fi } # }}} # adjust timezone {{{ timezone() { if [ -n "$TIMEZONE" ] ; then echo "Adjusting /etc/localtime" ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime fi } # }}} # helper function for fstab() {{{ createfstab(){ echo "Setting up /etc/fstab" if [ -n "$TARGET_UUID" ] ; then echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults,errors=remount-ro 0 1" > /etc/fstab else echo "${TARGET} / auto defaults,errors=remount-ro 0 1" > /etc/fstab fi cat >> /etc/fstab << EOF proc /proc proc defaults 0 0 /dev/cdrom /mnt/cdrom0 iso9660 ro,user,noauto 0 0 # some other examples: # /dev/sda2 none swap sw,pri=0 0 0 # /dev/hda1 /Grml ext3 dev,suid,user,noauto 0 2 # //1.2.3.4/pub /smb/pub smbfs defaults,user,noauto,uid=grml,gid=grml 0 0 # linux:/pub /beer nfs defaults 0 0 # tmpfs /tmp tmpfs size=300M 0 0 # /dev/sda5 none swap sw 0 0 EOF } # }}} # generate /etc/fstab {{{ fstab() { # set up /etc/fstab if file is not present (cdebootstrap) if [ ! -f /etc/fstab ] ; then createfstab fi # set up /etc/fstab if file is UNCONFIGURED (debootstrap) if grep -q UNCONFIGURED /etc/fstab ; then createfstab fi } # }}} # set up hostname {{{ hostname() { if [ -n "$HOSTNAME" ] ; then echo "Setting hostname to ${HOSTNAME}." echo "$HOSTNAME" > /etc/hostname # adjust postfix configuration if [ -r /etc/postfix/main.cf ] ; then # adjust hostname related options: sed -i "s/grml/$HOSTNAME/g" /etc/postfix/main.cf # listen on loopback interface only: sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf grep -q inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf fi fi } # }}} # generate initrd/initramfs {{{ initrd() { # assume the first available kernel as our main kernel KERNELIMG=$(ls -1 /boot/vmlinuz-* 2>/dev/null | head -1) if [ -z "$KERNELIMG" ] ; then echo 'No kernel image found, skipping initrd stuff.'>&2 return fi KERNELVER=${KERNELIMG#/boot/vmlinuz-} # generate initrd if [ -n "$INITRD" ] ; then echo "Generating initrd." update-initramfs -c -t -k $KERNELVER fi } # }}} # grub configuration/installation {{{ grub_install() { if [ -z "$GRUB" ] ; then echo "Notice: \$GRUB not defined, will not install grub inside chroot at this stage." return 0 fi if ! dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then echo "Notice: grub option set but no grub-pc package, installing it therefore." DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL grub-pc fi if ! [ -x "$(which grub-install)" ] ; then echo "Error: grub-install not available. (Error while installing grub package?)" >&2 return 1 fi if [ -n "$SELECTED_PARTITIONS" ] ; then # using sw-raid for device in $SELECTED_PARTITIONS ; do GRUB="${device%%[0-9]}" echo "Installing grub on ${GRUB}:" grub-install --no-floppy "$GRUB" done else echo "Installing grub on ${GRUB}:" grub-install --no-floppy "$GRUB" fi echo "Adjusting grub configuration for use on ${GRUB}." # finally install grub if [ -x /usr/sbin/update-grub ] ; then UPDATEGRUB='/usr/sbin/update-grub' elif [ -x /sbin/update-grub ] ; then UPDATEGRUB='/sbin/update-grub' else echo "Error: update-grub not available, can not execute it." >&2 return 1 fi $UPDATEGRUB } # }}} # execute all scripts present in /etc/debootstrap/chroot-scripts/ {{{ custom_scripts() { [ -d /etc/debootstrap/chroot-scripts/ ] || return 0 for script in /etc/debootstrap/chroot-scripts/* ; do echo "Executing script $script" $script && echo "done" || echo "failed" done } # }}} # make sure we don't have any running processes left {{{ services() { for service in ssh mdadm mdadm-raid ; do if [ -x /etc/init.d/"$service" ] ; then /etc/init.d/"$service" stop || true fi done } # }}} # unmount /proc and make sure nothing is left {{{ finalize() { # make sure we don't leave any sensible data rm -f /etc/debootstrap/variables [ -n "$POLICYRCD" ] && rm -f /usr/sbin/policy-rc.d umount /proc >/dev/null 2>/dev/null || true } # }}} # signal handler {{{ signal_handler() { finalize [ -n "$1" ] && EXIT="$1" || EXIT="1" exit "$EXIT" } # }}} # set signal handler {{{ trap signal_handler HUP INT QUIT TERM # }}} # execute the functions {{{ # always execute install_policy_rcd install_policy_rcd for i in chrootmirror grmlrepos backportrepos kernelimg_conf \ kernel packages extrapackages reconfigure hosts interfaces \ default_locales timezone fstab hostname initrd grub_install passwords \ custom_scripts upgrade_system remove_apt_cache services \ remove_chrootmirror; do if stage $i ; then $i && stage $i done || exit 1 fi done # always execute the finalize stage: finalize # }}} # finally exit the chroot {{{ echo "Finished chroot installation, exiting." exit 0 # }}} ## END OF FILE ################################################################# # vim: ai tw=80 expandtab foldmethod=marker