=== 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 | ||
jerom1 | Hi Colin, | 10:20 |
---|---|---|
jerom1 | I convert my bash post script to an sh script, but i have two problems : | 10:21 |
jerom1 | cat > /etc/network/if-up.d/forcingspeed.tmp << EOF | 10:23 |
jerom1 | #!/bin/bash | 10:23 |
jerom1 | if [ "$IFACE" != "lo" ] ; then | 10:23 |
jerom1 | /usr/sbin/ethtool -s $IFACE speed 100 duplex full autoneg off | 10:23 |
jerom1 | fi | 10:23 |
jerom1 | EOF | 10:23 |
jerom1 | in bash my $IFACE is preserved but it interpreted in sh | 10:23 |
jerom1 | sorry my script : | 10:24 |
jerom1 | cat > /etc/network/if-up.d/forcingspeed.tmp << EOF | 10:25 |
jerom1 | #!/bin/bash | 10:25 |
jerom1 | if [ "IFACE" != "lo" ] ; then | 10:25 |
jerom1 | /usr/sbin/ethtool -s IFACE speed 100 duplex full autoneg off | 10:25 |
jerom1 | fi | 10:25 |
jerom1 | EOF | 10:25 |
jerom1 | cat /etc/network/if-up.d/forcingspeed.tmp | sed -e 's#IFACE#\$IFACE#g' > /etc/network/if-up.d/forcingspeed | 10:25 |
jerom1 | do you know an sh equivalent to "let" bash command ? | 10:45 |
cjwatson | give me an example | 11:24 |
cjwatson | IFACE without a preceding $ looks wrong. What's that script supposed to do? | 11:25 |
cjwatson | oh, I see | 11:25 |
cjwatson | no, don't do that silly sed thing. use <<'EOF' instead | 11:25 |
jerom1 | i would create a target file contains : | 11:26 |
jerom1 | /usr/sbin/ethtool -s $IFACE speed 100 duplex full autoneg off | 11:26 |
jerom1 | my problem is $IFACE is interpreted | 11:27 |
jerom1 | and i want preserved $IFACE because the target file is a shelle script | 11:27 |
cjwatson | <<'EOF' not << EOF | 11:28 |
cjwatson | quoting the here-doc delimiter suppresses parameter expansion inside the here-doc | 11:28 |
jerom1 | ok cool | 11:29 |
jerom1 | and i have another problem : do you know an sh equivalent to "let" bash command ? | 11:29 |
jerom1 | an example : | 11:29 |
jerom1 | HNTP=$RANDOM | 11:29 |
jerom1 | let "HNTP %= 23" | 11:29 |
cjwatson | yes, normal arithmetic evaluation will do just fine. HNTP="$(($RANDOM % 23))" | 11:31 |
cjwatson | $((...)) does arithmetic expansion | 11:31 |
jerom1 | it doesn't work, when i test in my portable (on ubuntu edgy) is it normal ? | 11:33 |
jerom1 | jeromeb@bodega:~/dev/scripts$ more sh-test-colin | 11:33 |
jerom1 | #!/bin/sh | 11:33 |
jerom1 | HNTP="$(($RANDOM % 23))" | 11:33 |
jerom1 | echo "$HNTP - $MNTP" | 11:33 |
jerom1 | jeromeb@bodega:~/dev/scripts$ sh sh-test-colin | 11:33 |
jerom1 | sh-test-colin: 3: arithmetic expression: syntax error: " % 23" | 11:33 |
cjwatson | oh, that's not the fault of the arithmetic syntax; $RANDOM is a bashism | 11:34 |
cjwatson | if you really need $RANDOM, you could write out an executable #! /bin/bash script somewhere in /target and call it ... | 11:36 |
jerom1 | i am in %post with chroot, is it possible ? | 11:39 |
cjwatson | sure, if you're chrooted then you don't need to worry about writing it in /target - just put it somewhere and call it | 11:40 |
jerom1 | oki thanks | 11:41 |
jerom1 | i found this command : dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " for generate random | 11:45 |
cjwatson | that would work, yes | 12:17 |
=== cr3 [n=marc@pdpc/supporter/bronze/cr3] has joined #ubuntu-installer | ||
=== verwilst [n=verwilst@212.123.1.32] has joined #ubuntu-installer | ||
verwilst | hi! | 02:18 |
verwilst | cjwatson: ping | 02:18 |
verwilst | i'm trying to setup kickstart for ubuntu | 02:18 |
verwilst | we're already using it with fedora | 02:18 |
verwilst | would be nice to have ubuntu like that too | 02:18 |
verwilst | but it seems like it's not really stable/supported/working yet? | 02:19 |
cjwatson | should be, we've had it since 5.04 ;-) | 03:02 |
cjwatson | verwilst: 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 Fedora | 03:02 |
cjwatson | in some cases there are moderately straightforward workarounds | 03:02 |
verwilst | well | 03:05 |
verwilst | euh | 03:05 |
verwilst | for one, it keeps nagging there is no cd available :) | 03:05 |
verwilst | then refuses to mount from nfs | 03:05 |
verwilst | while fedora mounts perfectly from the same path | 03:05 |
verwilst | networking isn't up when it tries nfs | 03:06 |
cjwatson | NFS is one of the things that isn't supported, I'm afraid | 03:06 |
cjwatson | well, sort of | 03:06 |
cjwatson | you can get the kickstart file over nfs | 03:06 |
verwilst | oh | 03:06 |
verwilst | cjwatson: is it much work to implement support for that? | 03:06 |
cjwatson | but the Ubuntu installer itself doesn't support NFS, so that's of limited use | 03:06 |
verwilst | so | 03:07 |
cjwatson | it's non-trivial - customer demand would help to get it scheduled | 03:07 |
cjwatson | not huge, but not a ten-liner or anything either | 03:07 |
verwilst | cjwatson: well, i could always to get my ceo to pay for the implementation ;) | 03:07 |
verwilst | + try | 03:07 |
cjwatson | basically write an nfs-retriever and then run around everything else | 03:07 |
cjwatson | if that's a serious possibility, please do e-mail me | 03:07 |
cjwatson | you can install from HTTP or FTP, though | 03:08 |
cjwatson | no CD available> can you elaborate on that? | 03:08 |
verwilst | cjwatson: back :) | 03:10 |
verwilst | well, we'll probably use http | 03:10 |
verwilst | it pxe boots | 03:11 |
verwilst | loads installer | 03:11 |
verwilst | hold on, i'll rerun my pxe boot | 03:11 |
cjwatson | if I can get the exact error message, I can probably nail it down fairly easily | 03:11 |
verwilst | okido | 03:12 |
verwilst | hold on | 03:12 |
verwilst | it's booting | 03:12 |
verwilst | it's detecting hardware to find cdrom first | 03:12 |
verwilst | then it gives a messagebox | 03:12 |
verwilst | [!!] Configuring net | 03:12 |
verwilst | as title | 03:12 |
verwilst | "Your installation CD-ROM couldn't be mounted, ... Try again to mount the cdrom?" | 03:12 |
verwilst | console shows it's trying to access /dev/hdc | 03:13 |
cjwatson | ok, and you don't want it to touch the CD? | 03:13 |
verwilst | yip | 03:13 |
verwilst | haven't found a trigger for it yet though :) | 03:13 |
cjwatson | where did you get the initrd you're using? | 03:13 |
verwilst | <cdroot>/install/vmlinuz | 03:14 |
cjwatson | right, the initrds are different - you need to use the netboot one | 03:14 |
cjwatson | dapper or edgy? | 03:14 |
verwilst | edgy | 03:14 |
verwilst | and feisty | 03:15 |
cjwatson | http://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-i386/current/images/netboot/ | 03:15 |
cjwatson | fetch the bits from there | 03:15 |
verwilst | ah | 03:15 |
verwilst | they're not on the cd | 03:15 |
cjwatson | netboot.tar.gz is the simplest, but you can take individual pieces if you prefer | 03:15 |
verwilst | so that's why i don't have a net connection either? | 03:15 |
cjwatson | actually, they are on the CD, in /install/netboot/ | 03:16 |
cjwatson | right - the cdrom initrd expects to be able to fetch the bits needed to bring up the network from the CD | 03:16 |
verwilst | cjwatson: ah cool, i usually just mount the cd and symlink the kernels :) | 03:16 |
cjwatson | whereas the netboot initrd has them built-in | 03:16 |
verwilst | explains a lot :) | 03:16 |
verwilst | install/netboot/ubuntu-installer/i386/{linux,initrd.gz} ? | 03:17 |
cjwatson | yes | 03:18 |
verwilst | let me try ;) | 03:18 |
verwilst | i can just share kickstart file and iso through http | 03:19 |
verwilst | so i can do away with nfs alltogether | 03:19 |
verwilst | hm | 03:20 |
cjwatson | well, not the ISO | 03:20 |
cjwatson | erm, maybe | 03:20 |
verwilst | network autoconfiguration failed | 03:20 |
cjwatson | it needs an actual archive | 03:20 |
verwilst | ah | 03:20 |
verwilst | heh | 03:20 |
cjwatson | mounting the ISO and making that visible over HTTP might work | 03:21 |
verwilst | it's more different from fedora than i though :) | 03:21 |
cjwatson | it's something I loosely try to support, but haven't tested since breezy; a real mirror is more stable | 03:21 |
verwilst | but i can just specify like ftp://be.archive.ubuntu.com/ ... for example | 03:21 |
cjwatson | (there are CD space pressures) | 03:21 |
cjwatson | right | 03:22 |
cjwatson | a big squid cache can often be just as good | 03:22 |
cjwatson | network autoconfiguration> that's just DHCP | 03:22 |
verwilst | yeah | 03:22 |
verwilst | but i need an ip in order to get the kickstart eh ;) | 03:23 |
verwilst | oh wait | 03:23 |
verwilst | must be my playing with ksdevice | 03:23 |
verwilst | btw ksdevice=link isn't supported, correct? | 03:23 |
cjwatson | it should DHCP itself in order to get the Kickstart file ... | 03:24 |
verwilst | yeah | 03:25 |
verwilst | but that fails | 03:25 |
cjwatson | ksdevice=link> I don't think that existed when I ported Kickstart. Do you have a reference? | 03:25 |
verwilst | i do see eth0: link up in dmesg | 03:25 |
verwilst | hm let me find the reference | 03:25 |
verwilst | http://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v2.pdf | 03:26 |
verwilst | this is where it's explained | 03:26 |
verwilst | not really a redhat reference | 03:26 |
verwilst | but still :) | 03:26 |
verwilst | hm, i removed ksdevice=bootif | 03:27 |
verwilst | and now it finds an ip :) | 03:27 |
cjwatson | I was about to say, just leaving out ksdevice should be equivalent to ksdevice=link | 03:28 |
verwilst | oh | 03:28 |
cjwatson | wonder how bootif works ... | 03:29 |
cjwatson | ah, I see | 03:30 |
cjwatson | ok, supporting that would be possible if netcfg were taught how to be preseeded with a mac address | 03:30 |
cjwatson | I noticed a wishlist bug asking for that the other day | 03:30 |
cjwatson | I've made ksdevice=link equivalent to just leaving it out in my development branch | 03:32 |
cjwatson | can't support bootif just yet, but I can at least make that emit a warning rather than silently misbehaving | 03:33 |
cjwatson | (done) | 03:35 |
verwilst | cool :) | 03:35 |
verwilst | i work for hostbasket.com btw, if you ever heard from it :) | 03:36 |
verwilst | we give most dedicated/colocated customers fedora installs | 03:36 |
verwilst | but i want to change that to ubuntu | 03:37 |
verwilst | so having a working pxe-ubuntu environment is pretty essential ;) | 03:37 |
cjwatson | ah right, indeed | 03:38 |
cjwatson | I hadn't, but my knowledge of the Belgian hosting industry is ... a bit rusty so that's to be expected :) | 03:38 |
verwilst | hehe | 03:38 |
verwilst | we're the biggest private webhosting company in belgium | 03: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 [] | ||
verwilst | cjwatson: seems to work like a charm | 04:32 |
cjwatson | hooray | 04:35 |
verwilst | you've been a great help ;) | 04:39 |
verwilst | cjwatson: oh! | 04:42 |
verwilst | one thing | 04:42 |
verwilst | i read raid isn't supported? | 04:42 |
verwilst | raid / --level 1 --device md1 raid.11 raid.12 | 04:44 |
verwilst | stuff like that | 04:44 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!