Bug#491098: [Patch] packages/debian-installer-utils/fetch-url-methods/http fix for wget404 for latest busybox wget
Package: di-utils Version: 1.60 Tags: patch The wget404 code in packages/debian-installer-utils/fetch-url-methods/http no longer matches the error messages from busybox wget. The attached patch fixes this for the busybox wget in the daily builds of d-i. The attached patch also considers ftp and matches a different error generated by ftp. patch made againt debian-installer svn trunk revision 54394 Regards Alex Owen Index: packages/debian-installer-utils/fetch-url-methods/http === --- packages/debian-installer-utils/fetch-url-methods/http (revision 54394) +++ packages/debian-installer-utils/fetch-url-methods/http (working copy) @@ -3,16 +3,29 @@ url="$1" file="$2" + if [ "$proto" = "http" ] ; then wget404() { # see README.wget404 in the debian-installer-utils udeb source for more info about this local RETVAL=$( { echo 1 wget "$@" 2>&1 >&3 && echo %OK% echo %EOF% - } | ( sed -ne '1{h;d};/server returned error 404/{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1 + } | ( sed -ne '1{h;d};/server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1 ) 3>&1 return $RETVAL } + elif [ "$proto" = "ftp" ] ; then + wget404() { + # see README.wget404 in the debian-installer-utils udeb source for more info about this + local RETVAL=$( { + echo 1 + wget "$@" 2>&1 >&3 && echo %OK% + echo %EOF% + } | ( sed -ne '1{h;d};/bad response to RETR: 550 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1 + ) 3>&1 + return $RETVAL + } + fi # use the proxy for wgets (should speed things up) if db_get mirror/$proto/proxy; then Index: packages/debian-installer-utils/README.wget404 === --- packages/debian-installer-utils/README.wget404 (revision 54394) +++ packages/debian-installer-utils/README.wget404 (working copy) @@ -11,6 +11,20 @@ output does change, the sed will fail safe by returning 1 (i.e. general error) if no specific error is found. +From etch to lenny busybox wget error output did change. +For lenny busybox wget 404 output is for example: +"server returned error: HTTP/1.1 404 Not Found" +This comprises the static string "server returned error: " +followed by the server response which should follow rfc2616 section 6.1. +Thus the output may say HTTP/1.0 instead of HTTP/1.1 and the string "Not Found" +may also change. Thus the regular expression: + /server returned error: HTTP\/1\.[01] 404 / +should catch all possible output for lenny. + +For the ftp method the error sring is different. The following regexp should work: + /bad response to RETR: 550 / + + Here is a copy of the function being documented (since it's bound to get out of sync with the one in the fetch-url-methods/http file, so you might as well see the one that's being documented as well ;-) @@ -20,8 +34,8 @@ local RETVAL=$( { echo 1 wget "$@" 2>&1 >&3 && echo %OK% -echo %EOF% -} | ( sed -ne '1{h;d};/server returned error 404/{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1 +echo %EOF% + } | ( sed -ne '1{h;d};/server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1 ) 3>&1 return $RETVAL } @@ -35,7 +49,7 @@ 1{h;d} -- take the first line (provided by the echo 1) and put it in sed's hold space this will provide a default return value of 1 unless something else happens - /server returned error 404/{p;s/.*/4/;h;d} + /server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d} If we see a 404 error, print it, then turn it into a "4" and stuff it in the sed hold space, and finally, delete the "4" This is where our return value of 4 comes from @@ -86,3 +100,4 @@ STDOUT anyway -- Doh! Phil Hands -- 2008-02-29 +Alex Owen -- 2008-07-16
Re: i386 pxelinux.cfg no-longer serial friendly!
If the prompt.cfg could be split in to using an include so that the menu and timeout and prompt lines were seperate from the display and f1,f2,f3 lines then I think I have a cunning plan... I will e-mail/bug report again if I get a working system. Thanks for your thoughts. Alex Owen 2008/7/12 Joey Hess <[EMAIL PROTECTED]>: > Alex Owen wrote: >> I see that d-i is now using the vesamenu for i386 netboot and has >> dropped the serial pxelinux configuration. >> If I were to produce a clean patch to re-enable production of a serial >> config might it be included for lenny? >> >> I take it the vesamenu config does not work over a serial port? > > I dropped it in the process of splitting up the config files since > supporting it was looking to add a lot of extra complexity. Also since > I'd never considered the use case for it to be compelling -- with or > without the file you still have to manually modify the syslinux > configuration to enable serial console. > > If it can be added back without seriously complicating things, that'd be > fine. I do think that vesamenu is right out for serial console, but have > not actually checked that. > > -- > see shy jo > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFIeOaId8HHehbQuO8RAqbjAJ9UT38PZxTy817epJ4CE1/1OtTTGwCfXLEE > +cumsP0I2O9tLhhZH6vOtMc= > =+hj6 > -END PGP SIGNATURE- > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
i386 pxelinux.cfg no-longer serial friendly!
Hello, I see that d-i is now using the vesamenu for i386 netboot and has dropped the serial pxelinux configuration. If I were to produce a clean patch to re-enable production of a serial config might it be included for lenny? I take it the vesamenu config does not work over a serial port? Thanks for any advice Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Update request for 4.0r2 Errata.
Hello, Perhaps someone knowledgeable on this list can comment: were the d-i netboot and floppy images rebuilt for 4.0r2 ? Up-to-date debian mirrors have netboot and floppy images identical to 4.0r1 (from what I can make out). The 4.0r2 press release [1] says: "The installer has been updated to use and support the updated kernels included in this release. This change causes old netboot and floppy images to stop working; updated versions are available from the regular locations." To my mind (and atleast one other on #debian-boot) this implies that I should expect 4.0r2 netboot and floppy images to have date stamps and file contents different from 4.0r1 images. My observation is that this is not the case. I (and one other on #debian-boot) have completed netboot installs of 4.0r2 using the netboot images identical to 4.0r1. To save confusion I would like to propose the following sentence be added to the Errata [2] under the existing heading "Errata for release 4.0r2": "Despite the release announcement indicating that there are updated netboot and floppy images it should be noted that the netboot and floppy images for 4.0r2 are identical to those for 4.0r1." Perhaps someone knowledgeable can comment on the veracity of the above sentance and if appropriate forward the proposal to the errata editor. Many thanks Alex Owen [1] http://www.debian.org/News/2007/20071227 [2] http://www.debian.org/releases/etch/debian-installer/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.
On 13/09/2007, Alex Owen <[EMAIL PROTECTED]> wrote: > > I have posted to GNU-wget mailing list: > http://www.mail-archive.com/wget%40sunsite.dk/msg10259.html > proposing wget exits with exit status 4 for 404 errors > Reply already... in summary: planning to implement exit codes in the wget version 1.13 time frame. Not willing to do adhoc cases in mean time. upstream wishlist bug here: https://savannah.gnu.org/bugs/index.php?20333 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.
This mail is mostly a note to myself in a safe place! On 08/05/2007, Alex Owen <[EMAIL PROTECTED]> wrote: > On 06/05/07, Joey Hess <[EMAIL PROTECTED]> wrote: > > Alex Owen wrote: > > > + elifgrep "server returned error 404" $log >/dev/null ; > > > then > > > > It's generally not a good idea to rely on command error messages like > > this. > > I agree, > I was thinking that getting wget to give a sensible exit status rather > than parsing the error message. Perhaps that warrents a wishlist bug > on wget? I have posted to GNU-wget mailing list: http://www.mail-archive.com/wget%40sunsite.dk/msg10259.html proposing wget exits with exit status 4 for 404 errors Attached is an untested patch to busybox wget to implement an exit status of 4 for 404 errors. That is all for this update! Alex Owen --- networking/wget.c 2006-04-16 17:27:46.0 +0100 +++ networking/wget.c.rao 2007-09-13 21:36:44.0 +0100 @@ -372,6 +372,11 @@ case 302: case 303: break; +case 404: + bb_default_error_retval = 4; + chomp(buf); +close_delete_and_die("server returned error %d: %s", atoi(s), buf); + /*Never gets here*/ case 206: if (do_continue) break;
Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.
On 06/05/07, Joey Hess <[EMAIL PROTECTED]> wrote: Alex Owen wrote: > # TODO add progress bar > - if wget -q "$url" -O "$file"; then > + if wget -q "$url" -O "$file" 2>$log ; then > + rm -f $log > return 0 > + elifgrep "server returned error 404" $log >/dev/null ; then It's generally not a good idea to rely on command error messages like this. I agree, I was thinking that getting wget to give a sensible exit status rather than parsing the error message. Perhaps that warrents a wishlist bug on wget? Perhaps reducing the grep line to: > + elifgrep "404" $log >/dev/null ; then would be more robust? On 06/05/07, Joey Hess <[EMAIL PROTECTED]> wrote: An alternative way to do this is to first always load the standard preseed file, and then try to fetch the load preseed file, which if it exists, can override settings in the standard file. I used to think that too... untill I discussed the idea with Philip Hands. Alex Owen: " I was thinking that a cleaner approach might be to have all public and all examples under classes then override that by placing stuff in local (or local_classes if you want to keep local for your way of doing things). I have test code which will test for the existance of [presee|subclasses|early_script|late_script] under local and use that and fall back to the equivilent file under classes if that fails." Philip Hands: " That sounds like the way I used to do that, but it has the problem that if you have a network outage, it's possible to have it skip an existing local file, and then carry on regardless, rather than having it complain that it failed to get a file it was expecting to exist -- this possibility, while slight makes the whole thing non-deterministic, so I'd rather avoid it (unless you have a scheme where a file that exists but is temporarily unavailable is distinguished from one that doesn't exist at all, in which case I'm all ears :-) Alex Owen: " If wget (busybox) gives different error code for "not found" response from web server as opposed to no response from server then you can distinguish." I then wrote this patch as parsing the error message was easier than hacking the wget code! Thanks for your comments, Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.
Package: preseed-common Severity: wishlist Version: 1.29 Attached is a patch against d-i SVN trunk so that file_preseed can distinuish between a failure to fetch a file because it does not exist and any other failure. If a file does not exist then exit status is 4 otherwise it is 1. I chose 4 as shorthand for HTTP 404 error. This should be backwards compatable with existing code that just checks for sucsess/fail. New code (I'm thinking custom preseed systems here) can then pase the exit code. A custom preseed setup could have 2 dirs such as: $base/standard $base/local a master preseed script could then try to do "preseed_fetch $base/local/script" and if this exits with status 4 fall back to "preseed_fetch $base/standard/script" If some other failure occurs the master preseed script can act accordingly. I'm thinking of the "Hands-Off" preseed system here. Feel free to change the exit code 4 to someother non-zero value if you will! I'm afraid this code is as yet untested. Regards Alex Owen Index: preseed/fetch-methods/file === --- preseed/fetch-methods/file (revision 46683) +++ preseed/fetch-methods/file (working copy) @@ -1,6 +1,8 @@ protocol_fetch() { FILE="${1#file://*}" - if [ ! -e "$FILE" ] || ! cp "$FILE" $2; then + if [ ! -e "$FILE" ] ; then + return 4 + elif ! cp "$FILE" $2; then return 1 else return 0 Index: preseed/fetch-methods/http === --- preseed/fetch-methods/http (revision 46683) +++ preseed/fetch-methods/http (working copy) @@ -1,6 +1,7 @@ protocol_fetch() { local url="$1" local file="$2" + local log=/tmp/preseed_fetch_http iters=0 # use the proxy for wgets (should speed things up) @@ -10,10 +11,15 @@ while [ $iters -lt 3 ]; do # TODO add progress bar - if wget -q "$url" -O "$file"; then + if wget -q "$url" -O "$file" 2>$log ; then + rm -f $log return 0 + elif grep "server returned error 404" $log >/dev/null ; then + rm -f $log + return 4 fi iters=$(($iters + 1)) done + rm -f $log return 1 } Index: preseed/fetch-methods/floppy === --- preseed/fetch-methods/floppy (revision 46683) +++ preseed/fetch-methods/floppy (working copy) @@ -4,7 +4,9 @@ mountfloppy || true touch /var/run/preseed-usedfloppy - if [ ! -e "$FILE" ] || ! cp "$FILE" $2; then + if [ ! -e "$FILE" ] ; then + return 4 + elif ! cp "$FILE" $2; then return 1 else return 0
Bug#421602: wish d-i could pick dhcp response based on vendor-class-identifier
Package: netcfg Version: 1.36 Severity: wishlist This is a wishlist bug so that this post does not get lost/forgotton: http://lists.debian.org/debian-boot/2007/04/msg00988.html patches may follow as time and motivation allows! The dhcp protocol and many (good) clients allow multiple dhcp servers. The debian-installer dhcp client sends a vendor-class-identifier of "d-i". The debian-installer dhcp client SHOULD be configurable to only accept dhcp leases which come from servers that send a reply containing a vendor-class-identifier of "d-i". If d-i is using dhclient then an /etc/dhclient.conf with a "select-timeout" line and a "require" line should enable this functionality if I have read the man page right. One more debconf key would be needed. If it was set true then ( select-timeout could be made equal to the dhcp timeout and require line could ve set ) . Note: netcfg seems to write out /etc/dhclient.conf just before calling dhclient. /etc/dhclient.conf in the initrd is edited as it is copied to the installed /target system. This editing would need to be updated if the code that writes /etc/dhclient.conf is changed. Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
waking up in the 10.x.x.x network
Michael S. Peek said: If I attempt to set up my own DHCP server then I run into a race condition between my DHCP server and the campus DHCP server. There's no way to tell d-i which server to contact, so it'll listen to the first one that it hears back from. So as near as I can tell, there is just no way to make this work. The DHCP protocol has the "Vendor Class Identifier" which could ne incoperated into the d-i dhcp-client. The dhcp protocol and many (good) clients allow multiple dhcp servers. The debian-installer dhcp client sends a vendor-class-identifier of "d-i". The debian-installer dhcp client SHOULD be configurable to only accept dhcp leases which come from servers that send a reply containing a vendor-class-identifier of "d-i". If d-i is using dhclient then an /etc/dhclient.conf with a "select-timeout" line and a "require" line should enable this functionality if I have read the man page right. It is a shame that http://d-i.alioth.debian.org/manual/en.i386/apbs02.html B.2.5 seems to say that d-i overloads the dhcp filename option to find the location of the preseed file. In my opinion this is better handled using vendor-encapsulated-options. Check out sun solaris install docs for ideas on this front! Mind you I guess there are many "simple" dhcp servers out there thus making overloading the filename option more practical. Hmm... I think there was some talk of changing the dhcpclient engine for lenny... there seemed to be lots of suggestions... my vote is for udhcpc. Anyway making the dhcp client in d-i more featureful with regards multiple dhcp servers perhaps could be added as a lenny release goal??? Just some thoughts! Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#417407: Improve safety of os-prober by ignoring active swap and using "blockdev --setro" when available
OK here is the patch! On 07/04/07, Alex Owen <[EMAIL PROTECTED]> wrote: Attached is a patch to os-prober to: (1) make it ignore active swap [Changes in: os-prober/os-prober] (2) if blockdev is available then use it to set partitions read-only before mounting to work arround a "feature" of ext3 and possible other journaled filesystems! [Changes in: os-prober/os-probes/common/50mounted-tests] Index: os-prober/os-prober === --- os-prober/os-prober (revision 46179) +++ os-prober/os-prober (working copy) @@ -34,6 +34,13 @@ done } +parse_proc_swaps () { + while read line; do + set -- $line + echo "$(mapdevfs $1) swap swap" + done +} + parse_proc_mdstat () { while read line; do for word in $line; do @@ -67,6 +74,7 @@ # Therefore we use mapdevfs to match partitions with mount points # and partitions used in RAID grep "^/dev/" /proc/mounts | parse_proc_mounts >/tmp/mounted-map || true +grep "^/dev/" /proc/swaps | parse_proc_swaps >/tmp/swaps-map || true : >/tmp/raided-map if [ -f /proc/mdstat ] ; then grep "^md" /proc/mdstat | parse_proc_mdstat >/tmp/raided-map || true @@ -84,6 +92,12 @@ continue fi + # Skip partitions used as active swap + if grep -q "^$mapped" /tmp/swaps-map ; then + debug "$partition: is active swap" + continue + fi + if ! grep -q "^$mapped " /tmp/mounted-map ; then for test in /usr/lib/os-probes/*; do if [ -f $test ] && [ -x $test ]; then Index: os-prober/os-probes/common/50mounted-tests === --- os-prober/os-probes/common/50mounted-tests (revision 46179) +++ os-prober/os-probes/common/50mounted-tests (working copy) @@ -20,6 +20,25 @@ fi done + +protect_dev(){ #$1=partition : stdout=dev_rw_flag +dev_rw_flag=0 +if type blockdev >/dev/null 2>&1; then + if [ `blockdev --getro $1` = "0" ] ; then + blockdev --setro $1 + dev_rw_flag=1 + fi +fi +echo $dev_rw_flag +} + +unprotect_dev(){ #$1=partition $2=dev_rw_flag +if [ "$2" = "1" ] ; then + blockdev --setrw $1 +fi +} + +dev_rw_flag=`protect_dev $partition` for type in $types $delaytypes; do if mount -o ro -t $type $partition $tmpmnt 2>/dev/null; then debug "mounted as $type filesystem" @@ -29,6 +48,7 @@ if $test $partition $tmpmnt $type; then debug "os found by subtest $test" umount $tmpmnt + unprotect_dev $partition $dev_rw_flag rmdir $tmpmnt || true exit 0 fi @@ -38,6 +58,7 @@ break fi done +unprotect_dev $partition $dev_rw_flag rmdir $tmpmnt || true
Bug#417407: Improve safety of os-prober by ignoring active swap and using "blockdev --setro" when available
clone 417407 -1 reassign -1 util-linux retitle -1 util-linux: wish there was a blockdev-udeb severity -1 wishlist reassign 417407 os-prober tags 417407 +patch retitle 417407 os-prober: protect partitions with "blockdev --setro" when available thanks Attached is a patch to os-prober to: (1) make it ignore active swap [Changes in: os-prober/os-prober] (2) if blockdev is available then use it to set partitions read-only before mounting to work arround a "feature" of ext3 and possible other journaled filesystems! [Changes in: os-prober/os-probes/common/50mounted-tests] I do not claim to have tested the patch. I have tried to write the patch so that (2) does nothing if blockdev is not there... Perhaps this means the deb should recommend util-linux while the udeb could require blockdev-udeb? I have cloned this bug as a wishlist against util-linux requesting a blockdev-udeb. Regards Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#417407: debian-installer: possible workarounds for "d-i destroyed existing raid device"
Cut and paste from BTS web interface so sorry for the formatting! From: Samuel Thibault <[EMAIL PROTECTED]> Subject: Re: Bug#417407: debian-installer: d-i destroyed existing raid device Date: Tue, 3 Apr 2007 19:26:25 +0200 Hi, martin f krafft, le Tue 03 Apr 2007 10:28:24 +0200, a écrit : And the other question of course is why the kernel decided it had any business doing recovery on an fs that was marked for ro mount. Because it always do so, see linux/fs/ext3/super.c:ext3_load_journal(): even if the mount is read-only, the journal is recovered. If (but only if) the device itself is read-only, then nothing is written back to the disk. Ext3 clearly lacks xfs' norecovery mount option. I can think of two possible workarounds for this. NB: I have not looked at the code but I'm just thinking out loud. [1] at the partitioner stage configure md devices... IIRC this should recognize the preexisting device. Then mark the device to be mounted at /home (or /oldhome for the ultra paranoid) and markit to be left alone (ie not formatted). _Presumably_ os-prober would then ignore the md device and it's components when looking for other OS's. [2] wrap the mount/umount sections of code in os-prober with calls to blockdev to set the block device readonly (and restore old perms on umount). This would side step the deficiencies in the "unconditional ext3 journal recovery code". (but this would need a block-dev udeb added to util-linux source) Just some thoughts... Alex Owen
Bug#416310: [Patch] fix fault in grub_serial_console
This bug lies in the grub-installer script in the function grub_serial_console. Attached is the file grub_serial_console.txt is a replacement grub_serial_console function which parses the kernel command line "console=" argument in a more robust and (I hope) readable manner. A test script test.sh is also attached which can be used to excercise the grub_serial_console function in the file grub_serial_console.txt. I know this is very late in the release cycle but I would like to see this rewrite of grub_serial_console enter d-i for Etch. Regards Alex Owen [For Lenny: While rewriting grub_serial_console I thought I would tidy up the function get_serial_console. Attached is the file get_serial_console.txt which contains a drop-in replacement for the function get_serial_console. This should _not_ be targeted at Etch] grub_serial_console() { #$1=output of get_serial_console local serconsole=${1##console=} local device=${serconsole%%,*} local unit=${device##ttyS} local options=${serconsole##*,} #Handle case when no options given [ "$options" == "$device" ] && local options="" local speed=$(echo $options | sed -e's%^\([0-9]\+\).*%\1%') local parity_word_flow=${options##${speed}} local word_flow=${parity_word_flow#?} local parity=${parity_word_flow%%${word_flow}} local flow=${word_flow#?} local word=${word_flow%%${flow}} case "$parity" in "n") local parity="--parity=no" ;; "e") local parity="--parity=even" ;; "o") local parity="--parity=odd" ;; *) local parity="" ;; esac [ $word ] && local word="--word=$word" [ $speed ] || local speed=9600 #Match Kernel Default echo serial --unit=$unit --speed=$speed $word $parity --stop=1 echo terminal serial } test.sh Description: Bourne shell script #For Lenny get_serial_console() { for x in $(cat /proc/cmdline); do case $x in console=*) local defconsole="${x#*=}" ;; esac done if echo "${defconsole}" | grep -q ttyS; then echo "console=$defconsole" fi }
Bug#416310: My Fault!
On 27/03/07, Frans Pop <[EMAIL PROTECTED]> wrote: On Tuesday 27 March 2007 21:26, Alex Owen wrote: > Perhaps this should be included in the release notes for Etch? No, at most in the D-I errata I would say. Proposed entry for d-i errata: i386: Serial Console setup with GRUB There are some issues with the way the debian-installer tries to setup GRUB to use a serial console. Full details can be found in the bug report http://bugs.debian.org/416310";>#416310. Briefly these issues can be resolved by ensuring that: (1) the "console=" kernel argument is passed after the "--" kernel argument; (2) that the parity and bits options are also passed in the "console=" definition. For most people this will mean that instead of booting with "console=ttyS0,9600" you should boot with "-- console=ttyS0,9600n8". -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#416310: My Fault!
Hello there, I'm afraid this is my fault. I supplied a patch to make grub-installer try to do the right thing in bug http://bugs.debian.org/224641 However the code added there assumes a FULL serial port definition on the kernel command line. eg: for the example Vagrant gives in this bug report "console=ttyS0,38400n8" _should_ work (i tested this when writing the patch) while the shorter "console=ttyS0,38400" will not (and was not tested - opps!). Also it is preferable to add the "console=" argument after the "--" argument that way it will be taken as a user supplied argument that should be added to the "#kopt=" line in the grub.conf Perhaps this should be included in the release notes for Etch? For Lenny the code should parse the "console=" parameter more properly! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Will we be releasing some day?
* To: debian-boot@lists.debian.org * Subject: Re: Will we be releasing some day? * From: Steve Langasek <[EMAIL PROTECTED]> * Date: Tue, 20 Feb 2007 00:48:54 -0800 * Cc: debian-release@lists.debian.org * In-reply-to: <[EMAIL PROTECTED]> * Mail-followup-to: debian-boot@lists.debian.org,debian-release@lists.debian.org * Message-id: <[EMAIL PROTECTED]> "The need for GPL compliance in the face of version skew between the kernel debs and the installer were a major reason why, *pre-sarge*, the kernel packages had support added for rolling back to any previous Debian patchlevel. I've just verified that yes, this code is still present in the current linux-2.6 package: if you install linux-source-2.6.18, you will get a linux-patch/usr/src/kernel-patches/all/2.6.18/apply/debian script that lets you specify, with a -R option, the exact patchlevel you want to recreate, so that reproducing previous versions of the linux-2.6 tree is as trivial as possible." Has anyone tested that this still works post linux-2.6_2.6.18.dfsg.1.orig.tar.gz ie since the DFSG orig.tgz ! Presumably the -R option for post linux-2.6_2.6.18.dfsg.1.orig.tar.gz will only work for revisiones with teh same linux-2.6_2.6.18.dfsg.1.orig.tar.gz ??? Any experts want to comment? Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: live and install in one CD?
At the risk of repeating myself a normal deb that had a gui/text-ui to create a preseed file might be the way to go. This preseed-generator could then be installed in the livecd and could append the generated preseed to the normal d-i initramfs and use kexec to bootinto d-i ... That way we have: [1] one way to install debian: d-i [2] a way to install from live-cd [3] a gui to create preseed files (for free!) Just a thought Alex Owen On 09/01/07, Otavio Salvador <[EMAIL PROTECTED]> wrote: Marco Amadori <[EMAIL PROTECTED]> writes: > The ubiquity approach could be surely be faster than d-i/g-i but I do not > think we want to support a different way of installing debian besides than > the official one. Indeed. The d-i/g-i is far better and easier to maintain since it won't differ too much from the "original" installer ;-) The problematic thing that I see is it'll differ on the initial steps of installation since you'll already have the kernel and kernel modules loaded and it can require some modifications from d-i side to support it well. -- O T A V I OS A L V A D O R - E-mail: [EMAIL PROTECTED] UIN: 5906116 GNU/Linux User: 239058 GPG ID: 49A5F855 Home Page: http://otavio.ossystems.com.br - "Microsoft sells you Windows ... Linux gives you the whole house." ___ Debian-live-devel mailing list Debian-live-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#275360: [Patch] example patch showing where to hook dhcp network config to get dhcp->static config
This patch is in a VERY EARLY state. It inserts into /etc/dhclient-script so that the ip/mask/route etc form dhcp can be captured. This then needs to be put into the debconf database. this will allow development of static net config from a dhcp boot. I did have some code that looked like this but this seemed not to insert the valuses into debconf db... # copy DHCP information into debconf database (wishlist #275360) . /usr/share/debconf/confmodule db_set netcfg/get_ipaddress "$new_ip_address" db_set netcfg/get_netmask "$new_mask" for router in $new_routers; do db_set netcfg/get_gateway "router" break done db_set netcfg/get_nameservers "$new_domain_name_servers" The patch writes debconf-set statements to a file which could later be sourced to set the values in debconf-db. I don't have the knowledge or time to more now so wanted to put this in BTS so others(or me later) can build on it! Regards Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#275360: [Patch] example patch showing where to hook dhcp network config to get dhcp->static config
On 04/01/07, Alex Owen <[EMAIL PROTECTED]> wrote: This patch is in a VERY EARLY state. It inserts into /etc/dhclient-script so that the ip/mask/route etc form dhcp can be captured. This then needs to be put into the debconf database. this will allow development of static net config from a dhcp boot. The patch writes debconf-set statements to a file which could later be sourced to set the values in debconf-db Opps... here is the patch Index: packages/netcfg/dhclient-script === --- packages/netcfg/dhclient-script (revision 43848) +++ packages/netcfg/dhclient-script (working copy) @@ -89,6 +89,16 @@ # Get the domain name into a file suitable for netcfg to read. echo -n "$new_domain_name" > /tmp/domain_name + # copy DHCP information into debconf database (wishlist #275360) + #this does not fully work but I think this is the place to hook the dhcp process +echo /bin/debconf-set netcfg/get_ipaddress '"'"$new_ip_address"'"' >/tmp/net.preseed +echo /bin/debconf-set netcfg/get_netmask '"'"$new_mask"'"' >>/tmp/net.preseed +for router in $new_routers; do +echo /bin/debconf-set netcfg/get_gateway '"'"$router"'"' >>/tmp/net.preseed +break +done +echo /bin/debconf-set netcfg/get_nameservers '"'"$new_domain_name_servers"'"' >>/tmp/net.preseed + ;; EXPIRE|FAIL|RELEASE|STOP)
Bug#224641: [Patch] fixup serial support for grub for etch d-i
Tested patch of 22/11/06 by running d-i in expert mode and copying a patched grub-installer into /usr/bin/ of the running initrd. Grub is installed properly with serial terminal and the "console=" parameter is also added to kopt as it should be. With the current kernel you then hit bug http://bugs.debian.org/378204 which is a kernel bug that will disappear with the 2.6.18 kernel transition. Work arround for 2.6.17 kernels is to remove "console=ttyS..." from kernel command line in grub on first boot then login and either upgrade kernel to 2.6.18 OR echo "blacklist 8250_pnp" >/etc/modprobe.d/local-8250_pnp-off Regards Alex Owen On 22/11/06, Alex Owen <[EMAIL PROTECTED]> wrote: Here is a revised version of the patch which also fixes syslinux.cfg_withgtk as suggested by Otavio Salvador in: http://lists.debian.org/debian-boot/2006/11/msg00959.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#224641: [Patch] fixup serial support for grub for etch d-i
Here is a revised version of the patch which also fixes syslinux.cfg_withgtk as suggested by Otavio Salvador in: http://lists.debian.org/debian-boot/2006/11/msg00959.html Index: installer/build/boot/x86/syslinux.cfg === --- installer/build/boot/x86/syslinux.cfg (revision 42805) +++ installer/build/boot/x86/syslinux.cfg (working copy) @@ -16,22 +16,22 @@ LABEL install kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL linux kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL expert kernel ${KERNEL} - append priority=low ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append priority=low ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL rescue kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} rescue/enable=true -- + append ${VIDEO_MODE} initrd=${INITRD} rescue/enable=true -- ${CONSOLE} LABEL auto kernel ${KERNEL} - append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} PROMPT 1 TIMEOUT 0 Index: installer/build/boot/x86/syslinux.cfg.withgtk === --- installer/build/boot/x86/syslinux.cfg.withgtk (revision 42805) +++ installer/build/boot/x86/syslinux.cfg.withgtk (working copy) @@ -16,34 +16,34 @@ LABEL install kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL linux kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL installgui kernel ${KERNEL} - append ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} ${CONSOLE} -- + append ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} -- ${CONSOLE} LABEL expert kernel ${KERNEL} - append priority=low ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append priority=low ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL expertgui kernel ${KERNEL} - append priority=low ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} ${CONSOLE} -- + append priority=low ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} -- ${CONSOLE} LABEL rescue kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} rescue/enable=true -- + append ${VIDEO_MODE} initrd=${INITRD} rescue/enable=true -- ${CONSOLE} LABEL rescuegui kernel ${KERNEL} - append ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} ${CONSOLE} rescue/enable=true -- + append ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} rescue/enable=true -- ${CONSOLE} LABEL auto kernel ${KERNEL} - append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL autogui kernel ${KERNEL} - append auto=true priority=critical ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} ${CONSOLE} -- + append auto=true priority=critical ${VIDEO_MODE_GTK} initrd=${INITRD_GTK} -- ${CONSOLE} PROMPT 1 TIMEOUT 0 Index: packages/arch/i386/grub-installer/grub-installer === --- packages/arch/i386/grub-installer/grub-installer (revision 42805) +++ packages/arch/i386/grub-installer/grub-installer (working copy) @@ -37,11 +37,29 @@ if echo "${defconsole}" | grep -q console=ttyS; then local PORT="$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')" local SPEED="$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')" - local SERIAL="${PORT},${SPEED}" + local SERIAL="ttyS${PORT},${SPEED}" echo "console=$SERIAL" fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + serial="$(get_serial_console)" # This is copied from update-grub; we've requested that it be moved @@ -428,6 +446,12 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - $ROOT/boot/grub/$menu_file >$ROOT/boot/grub/$menu_file.new + mv $ROOT/boot/grub/$menu_file.new $ROOT/boot/grub/$menu_file +fi + # Generate menu.lst additions for other OSes tmpfi
Bug#224641: [Patch] fixup serial support for grub for etch d-i
Her is an updated (but untested) patch against the d-i/trunk to fix serial support for grub-installer. Please note that the "${CONSOLE}" has been moved to after the "--" so that it is caught as a user param. This saves special casing in the install-grub script (which was the fix in my last revision of the patch). Regards Alex Owen Index: installer/build/boot/x86/syslinux.cfg === --- installer/build/boot/x86/syslinux.cfg (revision 42805) +++ installer/build/boot/x86/syslinux.cfg (working copy) @@ -16,22 +16,22 @@ LABEL install kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL linux kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL expert kernel ${KERNEL} - append priority=low ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append priority=low ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} LABEL rescue kernel ${KERNEL} - append ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} rescue/enable=true -- + append ${VIDEO_MODE} initrd=${INITRD} rescue/enable=true -- ${CONSOLE} LABEL auto kernel ${KERNEL} - append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} ${CONSOLE} -- + append auto=true priority=critical ${VIDEO_MODE} initrd=${INITRD} -- ${CONSOLE} PROMPT 1 TIMEOUT 0 Index: packages/arch/i386/grub-installer/grub-installer === --- packages/arch/i386/grub-installer/grub-installer (revision 42805) +++ packages/arch/i386/grub-installer/grub-installer (working copy) @@ -37,11 +37,29 @@ if echo "${defconsole}" | grep -q console=ttyS; then local PORT="$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')" local SPEED="$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')" - local SERIAL="${PORT},${SPEED}" + local SERIAL="ttyS${PORT},${SPEED}" echo "console=$SERIAL" fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + serial="$(get_serial_console)" # This is copied from update-grub; we've requested that it be moved @@ -428,6 +446,12 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - $ROOT/boot/grub/$menu_file >$ROOT/boot/grub/$menu_file.new + mv $ROOT/boot/grub/$menu_file.new $ROOT/boot/grub/$menu_file +fi + # Generate menu.lst additions for other OSes tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
[Patch] document defaultignore, lvmignore and lvmok in partman-auto-recipe.txt
Patch for d-i/trunk/installer/doc/devel/partman-auto-recipe.txt attached. It documents $defaultignore{ }, $lvmignore{ } and $lvmok{ }. Should probably be sanity checked by someone who knows them backwards though!!! Regards Alex Owen --- partman-auto-recipe.txt.orig 2006-01-18 09:36:21.0 + +++ partman-auto-recipe.txt 2006-08-24 12:11:59.0 +0100 @@ -130,6 +130,21 @@ mountpoint { / } Where to mount the partition. +Other possible specifiers include: +defaultignore{ } + This is used to void a partition definition so that it is ignored + in the default case. That is to say it will be valid in the LVM case. +lvmignore{ } + This is used to void a partition definition so that it is ignored + in the LVM case. That is to say it will be valid in the default case. +lvmok{ } + This indicates that the partition is permitted to be an LVM logical + volume should an LVM partitioning scheme be in use. + +The specifiers defaultignore and lvmignore allow one recipe to define different +handling of say the /boot partition between and LVM partitioning scheme and a +non-LVM scheme. + Here is another example; this time there is a smaller root partition, and a separate /home partition.
Bug#376001: partman-base: humandev chokes on /dev/cciss/c0d0
Package: partman-base Severity: important analysis on IRC showed that humandev function is missing support for /dev/cciss/c0d0 devices. discovered in netboot daily image 20060628 on an HP DL380 -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-1-686 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#288759: Related archived bug...
Seems insmod and lsmod and rmmod were removed from busybox on purpose to fix bug #85642. But this was a bug to fix woody so the reasons to remove insmod from busybox may have now changed!?! Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#288759: related bugs
I think that bugs 288759 and 270087 are related. Perhaps the busybox maintainer will merge them? Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: specifiying a preseed url by dhcp
On Thu, 9 Dec 2004 11:26:41 +0100 Geert Stappers wrote: > What I see, is that it doesn't need the "class construction"[2]. > > For networkbooting, one has to setup two "classes", > one class for downloading a kernel (or pxelinux.0) > and one class for the preseed file. Yes those are the alternatives. I think that the "vendor encapsulated options" route is neater as we can specify a string that maps directly onto the preseed/url string. Usint the class constructor ant the next-server, filename options means we have to make assumptions about the preseed download protocol. That's OK right now but in future we have more than the http option! > Whatever dicisssion we make about how we put the preseed information > in the DHCP packets, there is the question > What to do when our user > appends preseed/url=proto://host/path/to/preseed/file at boot? > > My proposal is to handle it in the netcfg code: > > if preseed/url is not yet set > then > search for preseed url info in DCHP answer > if preseed url found > then >create preseed/url variabele so that preseeder can find it >put found information in preseed/url > fi > fi I'd go a bit further and suggest this should be the overall effect of a d-i run. * Silently try and probe for network and dhcp before asking for any user input. If preseed dhcp response Silently try and get preseed file and preseed debconf. * Then ask language chooser questions... these may be preseeded by now so need no user input. * If earlier dhcp faild try again but now report failure in the selected language. If earlier download of preseed file failed try again and report any error in selected language. In other words I would like to see dhcp moved before language chooser/keyboard questions. I understabnd the current argument that this cannot be done as d-i does not know what language to issue error messages in. That is why I propose a silent dhcp/preseed attempt before language chooser etc and then a verbose dhcp/preseed attempt later when d-i knows what language to issue error messages in! Just my thoughts! Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: specifiying a preseed url by dhcp
Hi, comming to this thread late... I like the idea of using dhcp for the preseed. I think the neatest way to do it is vendor encapsulated options... pxelinux uses them... extract from dhcpd.conf: #info from pxelinux.doc option space pxelinux; option pxelinux.magic code 208 = string; option pxelinux.configfile code 209 = text; option pxelinux.pathprefix code 210 = text; option pxelinux.reboottime code 211 = unsigned integer 32; Suns solaris installer uses them: extract from dhcpd.conf: ## INFO FROM http://docs.sun.com/db/doc/806-4075/6jd69oa8p?a=view option space SUNW; option SUNW.SrootOpt code 1 = text; option SUNW.SrootIP4 code 2 = ip-address; option SUNW.SrootNM code 3 = text; option SUNW.SrootPTH code 4 = text; option SUNW.SswapIP4 code 5 = ip-address; option SUNW.SswapPTH code 6 = text; option SUNW.SbootFIL code 7 = text; option SUNW.Stz code 8 = text; #option SUNW.SbootRS code 9 = uint32; option SUNW.SinstIP4 code 10 = ip-address; option SUNW.SinstNM code 11 = text; option SUNW.SinstPTH code 12 = text; option SUNW.SsysidCF code 13 = text; option SUNW.SjumpsCF code 14 = text; option SUNW.Sterm code 15 = text; host homer { hardware ethernet 00:00:00:00:00:00 ; fixed-address homer.my.com; filename "inetboot9.sun4u"; vendor-option-space SUNW; option SUNW.SbootFIL "inetboot.sun4u"; option SUNW.SrootIP4 boot.my.com; option SUNW.SrootNM "boot.my.com"; option SUNW.SrootPTH "/var/netboot/sol9boot"; option SUNW.SinstIP4 boot.my.com; option SUNW.SinstNM "boot.my.com"; option SUNW.SinstPTH "/var/netboot/sol9boot"; option SUNW.SsysidCF "boot.my.com:/var/netboot/sysidcfg.d/homer"; } In fact the option SUNW.SsysidCF is pritty much the Sun equiivilent to what we want... Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Preliminary rescue mode implementation
Perhaps the rescue mode could have "rescue.d" dir somewhere which lvmcfg and mdcfg could drop scripts into. These scripts could detect and init and software raid and LVM stuff... probably easiest to maintain such code with the rest of the lvm/md code ? Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#224641: Tested and working patch!
OK this patch (grub-installer-1.07-postinst.patch5) is tested and works! Sorry for the many (broken) revisions! Alex Owen --- postinst.orig-rao 2004-11-27 09:32:18.0 + +++ postinst2004-11-27 13:02:48.0 + @@ -28,11 +28,30 @@ if echo "${defconsole}" | grep -q console=ttyS; then local PORT="$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')" local SPEED="$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')" - local SERIAL="${PORT},${SPEED}" + local SERIAL="ttyS${PORT},${SPEED}" echo "console=$SERIAL" fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + + serial="$(get_serial_console)" # This is copied from update-grub. We've requested that it be moved @@ -390,6 +409,22 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + #if this is a serial console ensure #kopts is correct... + #despite posn of "console=" relative to "--" in /proc/cmdline + if ! ( echo "$user_params" | grep -q console=ttyS ) ; then + # Modify menu.lst to include serial console. + sed "s!^\(# kopt=.*\)!\1 $serial!" \ + < /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst + update_grub # again, to add new options to all the Debian kernel entries + fi + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst +fi + + # Generation menu.lst addition for other OSes. tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
Bug#224641: Opps... another update!
grub-installer-1.07-postinst.patch3 is also broken... try this instead. Alex Owen --- postinst.orig 2004-11-27 09:32:18.0 + +++ postinst2004-11-27 09:52:21.0 + @@ -28,11 +28,30 @@ if echo "${defconsole}" | grep -q console=ttyS; then local PORT="$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')" local SPEED="$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')" - local SERIAL="${PORT},${SPEED}" + local SERIAL="ttyS${PORT},${SPEED}" echo "console=$SERIAL" fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + + serial="$(get_serial_console)" # This is copied from update-grub. We've requested that it be moved @@ -390,6 +409,22 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + #if this is a serial console ensure #kopts is correct... + #despite posn of "console=" relative to "--" in /proc/cmdline + if echo "$user_params" | grep -q console=ttyS; then + # Modify menu.lst to include serial console. + sed "s!^\(# kopt=.*\)!\1 $serial!" \ + < /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst + update_grub # again, to add new options to all the Debian kernel entries + fi + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst +fi + + # Generation menu.lst addition for other OSes. tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
Bug#224641: Testing and new patch!
OK I have tested grub-installer-1.07-postinst.patch2 bt it did not work... Here is grub-installer-1.07-postinst.patch3 which is untested but I believe fixes the remaining problems. If I get to test it I'll post again! Alex Owen --- postinst.orig 2004-11-27 09:32:18.0 + +++ postinst2004-11-27 09:30:46.0 + @@ -28,11 +28,30 @@ if echo "${defconsole}" | grep -q console=ttyS; then local PORT="$(echo "${defconsole}" | sed -e 's%^console=ttyS%%' -e 's%,.*%%')" local SPEED="$(echo "${defconsole}" | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's% .*%%')" - local SERIAL="${PORT},${SPEED}" + local SERIAL="ttyS${PORT},${SPEED}" echo "console=$SERIAL" fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + + serial="$(get_serial_console)" # This is copied from update-grub. We've requested that it be moved @@ -390,6 +409,22 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + #if this is a serial console ensure #kopts is correct... + #despite posn of "console=" relative to "--" in /proc/cmdline + if echo "$user_params" | grep -q console=ttyS; then + # Modify menu.lst to include serial console. + sed "s!^\(# kopt=.*\)!\1 $user_params!" \ + < /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst + update_grub # again, to add new options to all the Debian kernel entries + fi + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst +fi + + # Generation menu.lst addition for other OSes. tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
Bug#224641: Better patch!
The serial config needs to go near the top of the file so appending it did not work! This patch puts the serial config at the top of the file! Alex Owen NB: this is still untested as far as a d-i install is concerned. --- postinst.orig 2004-11-02 14:59:09.0 + +++ postinst2004-11-25 21:35:48.0 + @@ -33,6 +33,25 @@ fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + + serial="$(get_serial_console)" # This is copied from update-grub. We've requested that it be moved @@ -390,6 +409,13 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial | cat - /target/boot/grub/menu.lst > /target/boot/grub/menu.lst.new + mv /target/boot/grub/menu.lst.new /target/boot/grub/menu.lst +fi + + # Generation menu.lst addition for other OSes. tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
Bug#224641: [Patch] support for GRUB console on serial port
tags 224641 + patch thanks Here is an un-tested patch to make grub-installer make grub use serial port if doing a serial console install. Alex Owen --- postinst.orig 2004-11-02 14:59:09.0 + +++ postinst2004-11-25 20:55:04.0 + @@ -33,6 +33,25 @@ fi } +grub_serial_console() { + #$1=output of get_serial_console + local unit=$(echo $1 | sed -e 's%^console=ttyS%%' -e 's%,.*%%') + local speed=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,%%' -e 's%[^(0-9)].*%%') + local parity=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+%%' -e 's%[78].*%%') + case "$parity" in + "n") local parity="no" ;; + "e") local parity="even" ;; + "o") local parity="odd" ;; + *) local parity="" ;; + esac + local word=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen]%%' -e 's%r%%') + local flow=$(echo $1 | sed -e 's%^console=ttyS[0-9]\+,[0-9]\+[oen][78]%%') + + echo serial --unit=$unit --speed=$speed --word=$word --parity=$parity --stop=1 + echo terminal serial + } + + serial="$(get_serial_console)" # This is copied from update-grub. We've requested that it be moved @@ -390,6 +409,12 @@ update_grub # again, to add new options to all the Debian kernel entries fi +if [ -n "$serial" ] ; then + # Modify menu.lst so _grub_ uses serial console. + grub_serial_console $serial >>/target/boot/grub/menu.lst +fi + + # Generation menu.lst addition for other OSes. tmpfile=/tmp/menu.lst.extras OLDIFS="$IFS"
install manual
This page has the Install Manual in text, pdf and html formats in many languages... take your pick! (you probably want one of the pdf versions!) http://www.debian.org/releases/stable/installmanual Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Serial console install - Best practice?
Hi, Is the best practice for serial conosle installs with d-i to use "DEBIAN_FRONTEND=text" ? Is the answer to this question arch dependent? Is this/should this be auto-detected? If "DEBIAN_FRONTEND=text" is the best way to do serial installs I'll prepare an svn patch to include this argument to the pxelinux serial netboot "default" file (i386). Currently the stanzas in netboot/debian-installer/i386/pxelinux.cfg.serial-9600/default look like label linux kernel debian-installer/i386/linux append vga=normal initrd=debian-installer/i386/initrd.gz ramdisk_size=9372 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 -- I don't understand the "--" at the end of the append line. Please can someone enlighten me? I can't find a reference to this in the pxelinux docs or the bootprompt-howto... I think I need to understand this to prepare a working patch... Thanks in advance Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#275586: Bug#245704: [PATCH] LVM on Software RAID
On Fri, 15 Oct 2004, Joey Hess wrote: > Alex Owen wrote: > > --- partman/partman-lvm/init.d/lvm (revision 22848) > > +++ partman/partman-lvm/init.d/lvm (working copy) > > @@ -32,6 +34,9 @@ > > > > for id in $partitions; do > > lvm=no > > + if pvdisplay $(cat $dev/device) >/dev/null 2>&1 ; then > > + lvm=yes > > + fi > > open_dialog GET_FLAGS $id > > while { read_line flag; [ "$flag" ]; }; do > > if [ "$flag" = lvm ]; then > > I don't understand the point of checking pvdisplay here. [SNIP] > I do know of one bug: After setting up a md device and marking it to be > used as for lvm, and going into lvmcfg and setting up the lvm, partman > restarts. And at this point it loses track of the method field of the md > device. Hi Joey, I've had a quick look at your patch and as ever it seems a lot neater than my initial hack! I'll try and find time to test it this weekend... I think the 3-line patch hunk above was my simple attempt at fixing the "loses track of the method field of the md device" bug you identified when partman restarts after using lvmcfg. I aggree that for normal partitions this does not work. But for the special case of md devices which are used as a single device (not partitioned) this code, although a hack, should at least work. I guess the real fix lies somewhere in the partman-md code. Random thoughts: The real problem is that we do not (yet) have a consistent method for saving this "lvm" flag meta data. It's OK on a DOS type partition we set the patition type to 0x8E or whatever it is. When this is commited to disk we have a non-voletile canonical source for the "lvm" flag when partman is restarted. For md devices my understanding is that there is nowhere to commit this information. My understanding of partition systems other than DOS is a bit rusty but I can't think of an anaolgy for 0x8E for say an SGI partition table or Mac Partition table. I think we need a way to commit this "lvm" flag to disk in an arch-neutral way. What form this might take I don't know! (pvcreate ?) Bye for now Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#245704: [PATCH] LVM on Software RAID
Here is a patch to pass on the code I've been working on for this problem. Part is for lvmcfg and most for partman-lvm. I have no local udeb repositary so I have not tested this by building the udebs. I have however patched the ramdisk in memory then run partman from the "expert" menu... this seems to work! Anyway here is the diff... comments welcome! NB: the snv patch was made from debian-installer/packages/ Alex OwenIndex: lvmcfg/lvmcfg.sh === --- lvmcfg/lvmcfg.sh(revision 22848) +++ lvmcfg/lvmcfg.sh(working copy) @@ -148,6 +148,25 @@ # get_pvs() { PARTITIONS="" + if [ -f /tmp/lvm-marks ] ; then + for i in `cat /tmp/lvm-marks` ; do + # skip already assigned + found=no + for pv in $(vgdisplay -v | grep "[ ]*PV Name" | sed -e "s/ \+PV Name \+//"); do + [ "$(realpath "$pv")" = "$(realpath "$i")" ] && found=yes + done + [ "$found" = "yes" ] && continue + + addinfos_pv "$i" + i=`printf "%-15s (%s)" "$i" "$RET"` + + if [ -z "$PARTITIONS" ]; then + PARTITIONS="$i" + else + PARTITIONS="${PARTITIONS},$i" + fi + done + else for i in `/usr/lib/partconf/find-partitions --ignore-fstype 2>/dev/null | grep "[[:space:]]LVM[[:space:]]" | cut -f1`; do # skip already assigned found=no @@ -165,6 +184,7 @@ PARTITIONS="${PARTITIONS},$i" fi done + fi } # Index: partman/partman-lvm/choose_method/lvm/choices === --- partman/partman-lvm/choose_method/lvm/choices (revision 22848) +++ partman/partman-lvm/choose_method/lvm/choices (working copy) @@ -8,6 +8,9 @@ cd $dev lvm=no +if cat $dev/model | grep "Software RAID device" >/dev/null ; then +lvm=yes +fi open_dialog VALID_FLAGS $id while { read_line flag; [ "$flag" ]; }; do if [ "$flag" = lvm ]; then Index: partman/partman-lvm/debian/rules === --- partman/partman-lvm/debian/rules(revision 22848) +++ partman/partman-lvm/debian/rules(working copy) @@ -25,6 +25,7 @@ debian/install-rc init.d debian/install-rc undo.d debian/install-rc update.d + debian/install-rc commit.d dh_install parted_names lib/partman rm -rf `find debian/$(PACKAGE) -name CVS` rm -rf `find debian/$(PACKAGE) -name .svn` Index: partman/partman-lvm/init.d/lvm === --- partman/partman-lvm/init.d/lvm (revision 22848) +++ partman/partman-lvm/init.d/lvm (working copy) @@ -6,6 +6,8 @@ . /lib/partman/definitions.sh +[ -f /tmp/lvm-marks ] && rm -f /tmp/lvm-marks + pvscan >>/var/log/messages 2>&1 vgscan >>/var/log/messages 2>&1 @@ -32,6 +34,9 @@ for id in $partitions; do lvm=no + if pvdisplay $(cat $dev/device) >/dev/null 2>&1 ; then + lvm=yes + fi open_dialog GET_FLAGS $id while { read_line flag; [ "$flag" ]; }; do if [ "$flag" = lvm ]; then Index: partman/partman-lvm/commit.d/store_lvm_markers === --- partman/partman-lvm/commit.d/store_lvm_markers (revision 0) +++ partman/partman-lvm/commit.d/store_lvm_markers (revision 0) @@ -0,0 +1,34 @@ +#!/bin/sh + +. /lib/partman/definitions.sh + +#enable_swap +[ -f /tmp/lvm-marks ] && rm -f /tmp/lvm-marks + +for dev in $DEVICES/*; do +[ -d "$dev" ] || continue +cd $dev +partitions= +open_dialog PARTITIONS +while { read_line num id size type fs path name; [ "$id" ]; }; do +partitions="$partitions $id,$num" +done +close_dialog + +for part in $partitions; do +id=${part%,*} +num=${part#*,} + [ -f $id/method ] || continue + method=$(cat $id/method) + case $method in + lvm) + open_dialog PARTITION_INFO $id + read_line x1 x2 x3 x4 x5 device x6 + close_dialog + echo $device >>/tmp/lvm-marks + ;; + esac +done +done + +#disable_swap Property changes on: partman/partman-lvm/commit.d/store_lvm_markers ___ Name: svn:executable + *
Bug#245704: Bug management
If people agree that a commit.d script in partman-lvm to prepare an optional temp file for lvmcfg then this bug can be cloned and the clone assigned to partman-lvm to track that part and the orriginal can remain in lvmcfg to track that part. Good night! Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#275586: partman-lvm: /dev/md/* software RAID partitions should be able to be marked as LVM PV's
Package: partman-lvm Severity: wishlist Hi, Here are a few code fragments that allow the software RAID /dev/md/ partitions to be marked up as LVM PV's patch fragments generated from debian-installer/packages/partman/partman-lvm/ Index: choose_method/lvm/choices === --- choose_method/lvm/choices (revision 22848) +++ choose_method/lvm/choices (working copy) @@ -8,6 +8,9 @@ cd $dev lvm=no +if cat $dev/model | grep "Software RAID device" >/dev/null ; then +lvm=yes +fi open_dialog VALID_FLAGS $id while { read_line flag; [ "$flag" ]; }; do if [ "$flag" = lvm ]; then Index: init.d/lvm === --- init.d/lvm (revision 22848) +++ init.d/lvm (working copy) @@ -32,6 +32,9 @@ for id in $partitions; do lvm=no + if pvdisplay $(cat $dev/device) >/dev/null 2>&1 ; then + lvm=yes + fi open_dialog GET_FLAGS $id while { read_line flag; [ "$flag" ]; }; do if [ "$flag" = lvm ]; then This solves "half the battle" of LVM on Software RAID bug #245704 tracks the other "half" of the problem(making lvmcfg read the lvm "markers" we allow to be set here). Alex Owen -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (400, 'testing'), (300, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.4.27-1-k7 Locale: LANG=C, LC_CTYPE=C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#245704: create seperate LVM marker list
Hi, I have been thinking about this today as I want to do LVM on Software RAID. We need an /lib/partman/commit.d/??get_lvm_maker (in partman-lvm) which when the partition tables are written to disk iterates over the /var/lib/partman/devices/*/* directories looking for method files which contain "lvm" and write out the devfs device names to say /tmp/lvm_markers. lvmcfg can then be modified in function get_pvs to initialise PARTITIONS to the contents of /tmp/lvm_markers should it exist. This way lvmvfg does the current thing if run "standalone" but integrates with partman if run from "within" partman. We would probably be better in get_pvs (from lvmcfg) to do: if [ -f /tmp/lvm_markers ] ; then do_new_stuff else do_old_stuff fi I agree with Martin when he says "I guess lvmcfg-utils and mdcfg-utils should not use /usr/lib/partconf/find-partitions at all, but some other mechanism (look at partman files)." I think the easiest way to safely interogate the partman files is from within the partman framework hence the proposal of a commit.d script and a temporary file to pass the needed info to lvmcfg. Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#270550: Using d-i as rescue disk.
In boot-floppies (bf) the bf kernel was installed in the target system. Is that the case in d-i ? I seem to remember d-i asking me which kernel to install so I suspect this means that the d-i kernel is not installed on the target system. If the d-i kernel ins not installed on the target system then I think that the d-i boot floppy cannot have the "rescue" boot option that bf had as there will be no matching kernel modules in the root filesystem. The d-i can still be used as a rescue system by booting into expert mode and then dropping to a shell to mount and fix your damaged system. Perhaps a rescue mode could be added to d-i which loads up the ramdisk prompts for language and keyboard info then drops to a root shell. This would be a different kind of rescue mode to the old bf rescue mode. If I have got this wrong and we just need to add a rescue stanza to syslinux.cfg (and simmilar for other arches) then do let me know and I'll try to prepare a patch some time next week. Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: i386 pxelinux netboot + serial console
On Tue, 31 Aug 2004, Joey Hess wrote: > Applied in essence, thanks. One thing I was not able to check is whether > f1.txt has the correct number of lines on a serial console. Your version > had it one line too long (should be 23) on regular console. Seems OK to me apart from f3.txt.with26: see attached patch The number of lines on a serial console depends on the console. We could perhaps add an extra line making it 24 lines for a serial console but probably best to leave alone for now as serial output is OK. NB: I have only tested the netboot with serial console for this patch. I have not tested the vga console.Index: installer/build/boot/x86/f3.txt.with26 === --- installer/build/boot/x86/f3.txt.with26 (revision 20540) +++ installer/build/boot/x86/f3.txt.with26 (working copy) @@ -1,4 +1,4 @@ -0fBOOT METHODS07 F3 +0fBOOT METHODS07 09F307 0fAvailable boot methods:07 @@ -20,4 +20,4 @@ If unsure, you should use the default boot method, with no special parameters, by simply pressing enter at the boot prompt. -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Bug#224641: grub-installer serial console problems (still)
severity 224641 important retitle grub-installer does not account for serial console thanks I have performed a serial console install from i386 netboot image of 2004-08-25 and grub-installer did not edit /boot/grub/menu.lst use the serial console. I read in bug #221602 that "grub-installer 0.51 added serial console support" However this is not the case in my experiance! [NB the other half of this original bug report (#215324) is closed and archived] Alex Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#267838: netcfg: DHCP installer -> STATIC target
Package: netcfg Version: 1.00 Severity: wishlist I configure my servers in my DHCP server with static IP's so that I can boot them into a disaster recovery environment. I also use this static DHCP entry to do network configuration during install. I then have to manually copy the information into a static stanza in /etc/network/interfaces. It would be excelent if netcfg could use DHCP to get IP, gateway, netmask, DNS servers... etc but then optionaly write them as static entries in /etc/network/interfaces /etc/resolv.conf etc... Presumably a debconf question in the d-i of low priority defaulting to the current behaviour would do the trick plus some logic to get the answers from the DHCP response for the static config. This would be a great feature! Thanks Alex Owen -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (400, 'testing'), (300, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.4.26-1-k7 Locale: LANG=C, LC_CTYPE=C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: i386 pxelinux netboot + serial console
Hello again... I have found the d-i svn repository and attached is my attampt at patching in the ideas I posted a few days ago. I have changed the syslinux files in d-i/trunk/installer/build/boot/x86/ but I'm assuming these are only relevant to targets in d-i/trunk/installer/buildconfig/x86.cfg The changes are two fold... (1) provide a pxelinux config for using the serial port. (2) make syslinux/isolinux/pxelinux display the corect text on a serial console should they be talking to one. (ie: tell users "ctrl-F " instead on the function keys "F") I have tested this by building and booting a testing/woody pxe-netboot tarball and by building and booting a syslinux boot.img floppy. The floppy boot worked as normal the serial-9600 pxe boot worked and displayed the correct text. Have fun! Alex OwenIndex: console-subst === --- console-subst (revision 0) +++ console-subst (revision 0) @@ -0,0 +1,5 @@ +#!/bin/sh +# replace "${CONSOLE}" on stdin with contents of $1 +set -e +console="$1" +sed -e s/'${CONSOLE}'/"$console"/g Property changes on: console-subst ___ Name: svn:executable + * Index: boot/x86/f1.txt === --- boot/x86/f1.txt (revision 19572) +++ boot/x86/f1.txt (working copy) @@ -16,8 +16,10 @@ <09F807> How to get help. <09F907> About the Debian project. <09F1007> Copyrights and warranties. + +For F1-F9 type control and F then the digit 1-9 +For F10 type control and F then the digit 0 + - - Press F2 through F10 for details, or ENTER to ${BOOTPROMPT} Index: boot/x86/f2.txt === --- boot/x86/f2.txt (revision 19572) +++ boot/x86/f2.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f3.txt === --- boot/x86/f3.txt (revision 19572) +++ boot/x86/f3.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f4.txt === --- boot/x86/f4.txt (revision 19572) +++ boot/x86/f4.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f5.txt === --- boot/x86/f5.txt (revision 19572) +++ boot/x86/f5.txt (working copy) @@ -20,4 +20,4 @@ boot: linux vga=771 noapic nolapic -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f6.txt === --- boot/x86/f6.txt (revision 19572) +++ boot/x86/f6.txt (working copy) @@ -20,4 +20,4 @@ boot: linux sym53c8xx=safe -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f7.txt === --- boot/x86/f7.txt (revision 19572) +++ boot/x86/f7.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f8.txt === --- boot/x86/f8.txt (revision 19572) +++ boot/x86/f8.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/f9.txt === --- boot/x86/f9.txt (revision 19572) +++ boot/x86/f9.txt (working copy) @@ -20,4 +20,4 @@ -Press F1 for the help index, or ENTER to ${BOOTPROMPT} +Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT} Index: boot/x86/syslinux.cfg === --- boot/x86/syslinux.cfg (revision 19572) +++ boot/x86/syslinux.cfg (working copy) @@ -1,3 +1,4 @@ +${SYSLINUX_SERIAL} display ${SYSDIR}syslinux.txt default linux @@ -14,10 +15,10 @@ label linux kernel ${KERNEL} - append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw -- + append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
i386 pxelinux netboot + serial console
Hello... I have just been trying pxelinux netbooting of d-i rc1 and d-i sarge 20040820. I have been doing this on a serial console and would like to suggest 2 additions to the files in pxeboot.tar.gz. (1) ./pxelinux.cfg/serial-9600 alongside ./pxelinux.cfg/default. The current ./pxelinux.cfg/default needs editing to force a serial console both for pxelinux and the d-i(ie linux kernel). I suggest that the default file is left untouched and a second file is added to the tarball called serial-9600 or serial-console (or something). A patch to default to turn it into serial-9600 is attached. (default-serial.patch). Of course this is a patch to show the end results not a patch to the build system I'm afraid. (sorry!) (2) Help text explaining how to get the F1-F10 screens correct for serial console. pxelinux alows the user to press F1-F10 to get usefull information. On a serial console the user must type ctrl and F then a digit 1-9 (or 0 for F10). pxelinux also allows codes to be embeded into its boot-screen text files to tell it to print diferent things on the serial console to the VGA console. Therefore by updating the files debian-installer/boot-screens/syslinux.txt and debian-installer/boot-screens/f1.txt we can give users of serial consoles proper instructions. As these codes are non-printing I don't think patch files will work... However I attache my modified syslinux.txt and f1.txt files as examples. The wording and spacing may need to be tidied up but the concept should be clear enough. Users of the VGA console should not notice any diference while users of serial consoles should get the correct information! Thanks for all your efforts... d-i is great! Alex Owen PS: I also add another stanza to my serial-9600 pxelinux config: LABEL disk LOCALBOOT 0 as this lets me boot the new install without having to mess with bios settings to disable PXE. 0fWelcome to Debian GNU/Linux sarge!07 This is a Debian installation netboot image, built on 20040801. 0fHELP INDEX07 0fKEYTOPIC07 <09F107> This page, the help index. <09F207> Prerequisites for installing Debian. <09F307> Boot methods for special ways of using this netboot image <09F407> Special boot parameters, overview. <09F507> Special boot parameters for special machines. <09F607> Special boot parameters for selected disk controllers. <09F707> Special boot parameters for the install system. <09F807> How to get help. <09F907> About the Debian project. <09F1007> Copyrights and warranties. For F1-F9 type control and F then the digit 1-9 For F10 type control and F then the digit 0 Press F2 through F10 for details, or ENTER to debian-installer/boot-screens/splash.rle Press F1control and F then 1 for help, or ENTER to --- default 2004-08-20 23:18:09.0 +0100 +++ serial-9600 2004-08-21 18:51:08.0 +0100 @@ -1,3 +1,4 @@ +SERIAL 0 9600 0 display debian-installer/boot-screens/syslinux.txt default linux @@ -14,16 +15,16 @@ label linux kernel debian-installer/linux - append vga=normal initrd=debian-installer/initrd.gz ramdisk_size=9169 root=/dev/rd/0 devfs=mount,dall rw -- + append vga=normal initrd=debian-installer/initrd.gz ramdisk_size=9169 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 -- label expert kernel debian-installer/linux - append DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/initrd.gz ramdisk_size=9169 root=/dev/rd/0 devfs=mount,dall rw -- + append DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/initrd.gz ramdisk_size=9169 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 -- label linux26 kernel debian-installer/2.6/linux - append vga=normal initrd=debian-installer/2.6/initrd.gz ramdisk_size=10369 root=/dev/rd/0 devfs=mount,dall rw -- + append vga=normal initrd=debian-installer/2.6/initrd.gz ramdisk_size=10369 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 -- label expert26 kernel debian-installer/2.6/linux - append DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/2.6/initrd.gz ramdisk_size=10369 root=/dev/rd/0 devfs=mount,dall rw -- + append DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/2.6/initrd.gz ramdisk_size=10369 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 -- prompt 1 timeout 0