/srv/irclogs.ubuntu.com/2006/12/14/#ubuntu-installer.txt

=== loise [n=loise@200.105.91.251] has joined #ubuntu-installer
=== loise [n=loise@200.105.91.251] has left #ubuntu-installer []
=== cr3 [n=marc@pdpc/supporter/bronze/cr3] has joined #ubuntu-installer
=== cr3 [n=marc@pdpc/supporter/bronze/cr3] has joined #ubuntu-installer
=== cjwatson_ [n=cjwatson@82-69-40-219.dsl.in-addr.zen.co.uk] has joined #ubuntu-installer
=== jerom1 [n=jeromeb@LAubervilliers-151-12-90-25.w193-252.abo.wanadoo.fr] has joined #ubuntu-installer
jerom1Hi Colin,10:20
jerom1I convert my bash post script to an sh script, but i have two problems :10:21
jerom1cat > /etc/network/if-up.d/forcingspeed.tmp << EOF10:23
jerom1#!/bin/bash10:23
jerom1if [ "$IFACE" != "lo" ] ; then10:23
jerom1/usr/sbin/ethtool -s $IFACE speed 100 duplex full autoneg off10:23
jerom1fi10:23
jerom1EOF10:23
jerom1in bash my $IFACE is preserved but it interpreted in sh10:23
jerom1sorry my script :10:24
jerom1cat > /etc/network/if-up.d/forcingspeed.tmp << EOF10:25
jerom1#!/bin/bash10:25
jerom1if [ "IFACE" != "lo" ] ; then10:25
jerom1/usr/sbin/ethtool -s IFACE speed 100 duplex full autoneg off10:25
jerom1fi10:25
jerom1EOF10:25
jerom1cat /etc/network/if-up.d/forcingspeed.tmp | sed -e 's#IFACE#\$IFACE#g' > /etc/network/if-up.d/forcingspeed10:25
jerom1do you know an sh equivalent to "let" bash command ?10:45
cjwatsongive me an example11:24
cjwatsonIFACE without a preceding $ looks wrong. What's that script supposed to do?11:25
cjwatsonoh, I see11:25
cjwatsonno, don't do that silly sed thing. use <<'EOF' instead11:25
jerom1i would create a target file contains :11:26
jerom1 /usr/sbin/ethtool -s $IFACE speed 100 duplex full autoneg off11:26
jerom1my problem is $IFACE is interpreted11:27
jerom1and i want preserved $IFACE because the target file is a shelle script11:27
cjwatson<<'EOF' not << EOF11:28
cjwatsonquoting the here-doc delimiter suppresses parameter expansion inside the here-doc11:28
jerom1ok cool11:29
jerom1and i have another problem : do you know an sh equivalent to "let" bash command ?11:29
jerom1an example :11:29
jerom1HNTP=$RANDOM11:29
jerom1let "HNTP %= 23"11:29
cjwatsonyes, normal arithmetic evaluation will do just fine. HNTP="$(($RANDOM % 23))"11:31
cjwatson$((...)) does arithmetic expansion11:31
jerom1it doesn't work, when i test in my portable (on ubuntu edgy) is it normal ?11:33
jerom1jeromeb@bodega:~/dev/scripts$ more sh-test-colin11:33
jerom1#!/bin/sh11:33
jerom1HNTP="$(($RANDOM % 23))"11:33
jerom1echo "$HNTP - $MNTP"11:33
jerom1jeromeb@bodega:~/dev/scripts$ sh sh-test-colin11:33
jerom1sh-test-colin: 3: arithmetic expression: syntax error: " % 23"11:33
cjwatsonoh, that's not the fault of the arithmetic syntax; $RANDOM is a bashism11:34
cjwatsonif you really need $RANDOM, you could write out an executable #! /bin/bash script somewhere in /target and call it ...11:36
jerom1i am in %post with chroot, is it possible ?11:39
cjwatsonsure, if you're chrooted then you don't need to worry about writing it in /target - just put it somewhere and call it11:40
jerom1oki thanks11:41
jerom1i found this command : dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " for generate random11:45
cjwatsonthat would work, yes12:17
=== cr3 [n=marc@pdpc/supporter/bronze/cr3] has joined #ubuntu-installer
=== verwilst [n=verwilst@212.123.1.32] has joined #ubuntu-installer
verwilsthi!02:18
verwilstcjwatson: ping02:18
verwilsti'm trying to setup kickstart for ubuntu02:18
verwilstwe're already using it with fedora02:18
verwilstwould be nice to have ubuntu like that too02:18
verwilstbut it seems like it's not really stable/supported/working yet?02:19
cjwatsonshould be, we've had it since 5.04 ;-)03:02
cjwatsonverwilst: anything particular you're having problems with? it's certainly stable and supported, but there are a few things we acknowledge that it doesn't do with respect to Fedora03:02
cjwatsonin some cases there are moderately straightforward workarounds03:02
verwilstwell03:05
verwilsteuh03:05
verwilstfor one, it keeps nagging there is no cd available :)03:05
verwilstthen refuses to mount from nfs03:05
verwilstwhile fedora mounts perfectly from the same path03:05
verwilstnetworking isn't up when it tries nfs03:06
cjwatsonNFS is one of the things that isn't supported, I'm afraid03:06
cjwatsonwell, sort of03:06
cjwatsonyou can get the kickstart file over nfs03:06
verwilstoh03:06
verwilstcjwatson: is it much work to implement support for that?03:06
cjwatsonbut the Ubuntu installer itself doesn't support NFS, so that's of limited use03:06
verwilstso03:07
cjwatsonit's non-trivial - customer demand would help to get it scheduled03:07
cjwatsonnot huge, but not a ten-liner or anything either03:07
verwilstcjwatson: well, i could always to get my ceo to pay for the implementation ;)03:07
verwilst+ try03:07
cjwatsonbasically write an nfs-retriever and then run around everything else03:07
cjwatsonif that's a serious possibility, please do e-mail me03:07
cjwatsonyou can install from HTTP or FTP, though03:08
cjwatsonno CD available> can you elaborate on that?03:08
verwilstcjwatson: back :)03:10
verwilstwell, we'll probably use http03:10
verwilstit pxe boots03:11
verwilstloads installer03:11
verwilsthold on, i'll rerun my pxe boot03:11
cjwatsonif I can get the exact error message, I can probably nail it down fairly easily03:11
verwilstokido03:12
verwilsthold on03:12
verwilstit's booting03:12
verwilstit's detecting hardware to find cdrom first03:12
verwilstthen it gives a messagebox03:12
verwilst[!!]  Configuring net03:12
verwilstas title03:12
verwilst"Your installation CD-ROM couldn't be mounted, ... Try again to mount the cdrom?"03:12
verwilstconsole shows it's trying to access /dev/hdc03:13
cjwatsonok, and you don't want it to touch the CD?03:13
verwilstyip03:13
verwilsthaven't found a trigger for it yet though :)03:13
cjwatsonwhere did you get the initrd you're using?03:13
verwilst<cdroot>/install/vmlinuz03:14
cjwatsonright, the initrds are different - you need to use the netboot one03:14
cjwatsondapper or edgy?03:14
verwilstedgy03:14
verwilstand feisty03:15
cjwatsonhttp://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-i386/current/images/netboot/03:15
cjwatsonfetch the bits from there03:15
verwilstah03:15
verwilstthey're not on the cd03:15
cjwatsonnetboot.tar.gz is the simplest, but you can take individual pieces if you prefer03:15
verwilstso that's why i don't have a net connection either?03:15
cjwatsonactually, they are on the CD, in /install/netboot/03:16
cjwatsonright - the cdrom initrd expects to be able to fetch the bits needed to bring up the network from the CD03:16
verwilstcjwatson: ah cool, i usually just mount the cd and symlink the kernels :)03:16
cjwatsonwhereas the netboot initrd has them built-in03:16
verwilstexplains a lot :)03:16
verwilstinstall/netboot/ubuntu-installer/i386/{linux,initrd.gz} ?03:17
cjwatsonyes03:18
verwilstlet me try ;)03:18
verwilsti can just share kickstart file and iso through http03:19
verwilstso i can do away with nfs alltogether03:19
verwilsthm03:20
cjwatsonwell, not the ISO03:20
cjwatsonerm, maybe03:20
verwilstnetwork autoconfiguration failed03:20
cjwatsonit needs an actual archive03:20
verwilstah03:20
verwilstheh03:20
cjwatsonmounting the ISO and making that visible over HTTP might work03:21
verwilstit's more different from fedora than i though :)03:21
cjwatsonit's something I loosely try to support, but haven't tested since breezy; a real mirror is more stable03:21
verwilstbut i can just specify like ftp://be.archive.ubuntu.com/ ... for example03:21
cjwatson(there are CD space pressures)03:21
cjwatsonright03:22
cjwatsona big squid cache can often be just as good03:22
cjwatsonnetwork autoconfiguration> that's just DHCP03:22
verwilstyeah03:22
verwilstbut i need an ip in order to get the kickstart eh ;)03:23
verwilstoh wait03:23
verwilstmust be my playing with ksdevice03:23
verwilstbtw ksdevice=link isn't supported, correct?03:23
cjwatsonit should DHCP itself in order to get the Kickstart file ...03:24
verwilstyeah03:25
verwilstbut that fails03:25
cjwatsonksdevice=link> I don't think that existed when I ported Kickstart. Do you have a reference?03:25
verwilsti do see eth0: link up in dmesg03:25
verwilsthm let me find the reference03:25
verwilsthttp://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v2.pdf03:26
verwilstthis is where it's explained03:26
verwilstnot really a redhat reference03:26
verwilstbut still :)03:26
verwilsthm, i removed ksdevice=bootif03:27
verwilstand now it finds an ip :)03:27
cjwatsonI was about to say, just leaving out ksdevice should be equivalent to ksdevice=link03:28
verwilstoh03:28
cjwatsonwonder how bootif works ...03:29
cjwatsonah, I see03:30
cjwatsonok, supporting that would be possible if netcfg were taught how to be preseeded with a mac address03:30
cjwatsonI noticed a wishlist bug asking for that the other day03:30
cjwatsonI've made ksdevice=link equivalent to just leaving it out in my development branch03:32
cjwatsoncan't support bootif just yet, but I can at least make that emit a warning rather than silently misbehaving03:33
cjwatson(done)03:35
verwilstcool :)03:35
verwilsti work for hostbasket.com btw, if you ever heard from it :)03:36
verwilstwe give most dedicated/colocated customers fedora installs03:36
verwilstbut i want to change that to ubuntu03:37
verwilstso having a working pxe-ubuntu environment is pretty essential ;)03:37
cjwatsonah right, indeed03:38
cjwatsonI hadn't, but my knowledge of the Belgian hosting industry is ... a bit rusty so that's to be expected :)03:38
verwilsthehe03:38
verwilstwe're the biggest private webhosting company in belgium03:39
verwilst( apart from the isp's eh :) )03:39
=== jerom1 [n=jeromeb@LAubervilliers-151-12-90-25.w193-252.abo.wanadoo.fr] has left #ubuntu-installer []
verwilstcjwatson: seems to work like a charm04:32
cjwatsonhooray04:35
verwilstyou've been a great help ;)04:39
verwilstcjwatson: oh!04:42
verwilstone thing04:42
verwilsti read raid isn't supported?04:42
verwilstraid / --level 1 --device md1 raid.11 raid.1204:44
verwilststuff like that04:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!