/srv/irclogs.ubuntu.com/2009/03/31/#ubuntu-installer.txt

=== TheMuso_ is now known as TheMuso
loolcjwatson: Around?10:25
loolcjwatson: I need some help to document the next steps on #345534 a bit more verbosely10:25
loolcjwatson: It's not entirely clear to me in what form the last actions should be implemented10:25
loolI'll add an ubiquity task as well10:25
cjwatson"moving stuff out of postinst to a separate script as to allow ubiquity to run it" delete that10:27
cjwatsonit's entirely feasible for ubiquity to just call the postinst10:27
cjwatsonfconfig I don't know about, I'll have to leave that to you guys10:27
cjwatsonI can do a first pass at the ubiquity work10:28
loolcjwatson: Would be happy to have that10:29
loolcjwatson: fconfig is to update the bootscript which has the kernel cmdline10:29
loolThe one we use on the install SD card will be replaced by the one to boot the final system10:29
loole.g. the cmdline with boot=casper in live SD will be replaced with one which has an UUID= and all10:30
cjwatsonok10:30
ogracjwatson, have you seen my updated syslog for the pre-partitioned issue ?10:34
ograi did a try with ext3 as well for which i didnt upload logs (to make sure its no ext4 specific prob) which had the same result10:35
cjwatsonogra: yes, haven't dug into it yet though10:35
ograjust wanted to point out its not caused by selecting the wrong fs10:35
ograbehavior is identical with the right one selected10:36
cjwatsonogra: that just means there are two bugs :-)10:58
cjwatsonogra: there are several places where parted_server might incorrectly decide that the partition table needs to be rewritten; this is why working on a device with busy partitions is so delicate, because a very minor logic flaw in any one of those will cause the whole thing to break10:59
ogracjwatson, yeah, i understand that11:16
CIA-28ubiquity: cjwatson * r3150 ubiquity/ (debian/changelog scripts/install.py): Refactor architecture/subarchitecture detection slightly.11:49
CIA-28ubiquity: cjwatson * r3151 ubiquity/ (7 files in 5 dirs): First pass at flash-kernel integration for armel (LP: #345534).11:59
cjwatsonlool,ogra: ^- that's the general approach but of course may well need adjustment (it's untested); feel free to shout if anything else is needed in ubiquity12:00
ograwill do, i'll test with the next iso12:00
ogranote that there is still someting missing that sets the UUID in flash-kernel-installers postinst12:01
cjwatsonright, happy for you guys to fix that though ;-)12:01
ograi'm working on that today and might need your help later (i have no idea how to find the target device to get the uuid, i guess there is a d-i function or variable))12:01
cjwatsonha, not really12:02
ograoh12:02
cjwatsonit's just reimplemented with mount wherever it's needed12:02
cjwatsonsee the findfs function in grub-installer, for example12:02
ograhow does the grub installation udeb know it ?12:02
cjwatsonfindfs () {12:02
cjwatson        mount | grep "on $ROOT${1%/} " | cut -d' ' -f112:02
cjwatson}12:02
ograyeah, thats what i planned to look at12:02
cjwatsonhardly worth abstracting elsewhere12:03
cjwatsongrub-installer takes $ROOT as a parameter but you can just hardcode it to /target12:03
ograoki12:03
ograthat should suffice12:03
ograjust need to assemble a proper cmdline and add some fconfig glue12:03
cjwatsonand then obviously vol_id -u. Careful of paths though12:04
ograyep12:04
cjwatsonpartman-target does: PATH="/lib/udev:$PATH" vol_id -u blah12:04
ograok12:05
cjwatsonsince it's been variously in /lib/udev/vol_id and /sbin/vol_id IIRC12:05
ograwhy vol_id (which needs root) and not blkid ?12:05
* ogra would have used blkid by default12:06
cjwatsonthe installer is root12:06
ograindeed12:06
cjwatsonalso, blkid has a cache and it doesn't check whether it's up to date12:07
cjwatsonso it can give wrong answers12:07
ograah, ok, that makes sense12:07
cjwatsonespecially when you've just done something like putting a new filesystem on the device ;-)12:07
ograoh, and apparently blkid doesnt have a short output, i would need to parse it12:07
cjwatsonthe installer uses vol_id consistently everywhere12:07
cjwatsonI don't think blkid is available in a udeb in any case12:08
ograah12:08
cjwatsonhmm, the reason why I've been half-dozy all morning is that I FORGOT TO HAVE COFFEE12:08
ograouch and its alreayd past morning ... you have to travle back in time to correct that12:09
ogra*travel12:09
loologra: flash-kernel already has findfs12:09
ogralool, oh, i didnt know ... in the udeb ?12:09
looldebian/flash-kernel-installer.postinst12:10
ograyeah, i see it12:10
ograi should have looked first :)12:10
ograso my patch turns even more trivial12:10
ograthe ugly part is that fconfig turns \n into just \ ... so the quoting is nontrivial12:12
loolUh?12:12
ograthe redboot script needs \ as newline char12:13
ograsilly convention12:13
ograFCONFIG_STRING=" $LOAD_INITRAMFS\ $LOAD_KERNEL\ e -r 0x1000000 -s $INITRAMFS_SIZE -c $CMDLINE"12:13
ograluckily it doesnt break if you add leading spaces to lines12:14
ograso =" $LOAD_INITRAMFS\ $LOAD_KERNEL\ e ..." works12:14
ograugly nontheless12:14
loologra: are the backslashes needed?!12:20
loologra: I see space in the raw config bytes12:20
lool005f030: 0062 6f6f 745f 7363 7269 7074 0066 6973  .boot_script.fis12:20
lool005f040: 206c 6f61 6420 6b65 726e 656c 0a65 202d   load kernel.e -12:20
lool005f050: 6320 2263 6f6e 736f 6c65 3d74 7479 6d78  c "console=ttymx12:20
loolsorry, it's 0a12:20
loolif (*dest == '\\') { *dest = '\n';12:21
loolSo there's a conversion from \\ to \n (0a above)12:21
loolBut you could as well use real newlines  :)12:22
loolAnd on print there's no conversion12:22
loolIt ends with 0a 0012:22
loologra: (I'd personally use \\ instead of \ though)12:24
=== mcasadevall is now known as NCommander
ogralool, using \n makes me end up with something like http://paste.ubuntu.com/141370/12:49
loologra: \n isn't interpreted as 0x0a in bash; you want something like `printf "%s\n%s\n%s\n" "fis load initramfs" "fis load initrd" "exec -c ..."`12:52
ograah, well, escaped backslashes do it as well12:53
loolYeah12:56
loologra: So I guess you're picking this up?12:59
ograworking actively on it already12:59
ograso yes, feel free to assign to me12:59
mvowoah, thanks cjwatson for your super-quick fix for #35154713:05
cjwatsonthat's ok13:09
cjwatsondid it work? :)13:09
CIA-28oem-config: cjwatson * r642 trunk/debian/ (changelog control):13:12
CIA-28oem-config: Suggest checkbox/checkbox-gtk rather than recommending13:12
CIA-28oem-config: hwtest/hwtest-gtk.13:12
loolcjwatson: Looked at the ubiquity changes for flash-kernel, they look really slick and nice, and I saw you patched the place which was patched for beta to allow us to continue without bootloader previouslyt13:20
mvocjwatson: not sure, I have not rsyned a daily yet .) but I will try soon(ish) - my test machines mainboard died today, so I need to wait for the replacement before I can continue13:32
CIA-28partman-partitioning: cjwatson * r705 ubuntu/ (debian/changelog lib/resize.sh):13:44
CIA-28partman-partitioning: When resizing a non-virtual partition, update it after committing13:44
CIA-28partman-partitioning: changes, otherwise we might miss a change of filesystem that was just13:44
CIA-28partman-partitioning: committed (LP: #333356).13:44
CIA-28partman-partitioning: cjwatson * r706 ubuntu/debian/changelog: releasing version 65ubuntu213:47
CIA-28ubiquity: cjwatson * r3152 ubiquity/ (debian/changelog ubiquity/components/usersetup.py): Fix yes/no question text in weak-password warning (LP: #352348).14:00
CIA-28oem-config: cjwatson * r643 trunk/debian/ (64 files in 2 dirs): Update translations from Launchpad.15:26
CIA-28casper: cjwatson * r607 trunk/ (2 files in 2 dirs):15:34
CIA-28casper: Fix writing of "$@" to diverted update-initramfs script (here-documents15:34
CIA-28casper: perform parameter expansion unless the delimiter is quoted).15:34
CIA-28casper: cjwatson * r608 trunk/ (debian/changelog scripts/casper-bottom/24preseed):15:37
CIA-28casper: Don't bring up a temporary network interface while fetching the preseed15:37
CIA-28casper: file when netbooting, as that will disconnect our root filesystem15:37
CIA-28casper: (LP: #351982).15:37
ogracjwatson, for the initramfs size i have: initrd_size=$(wc -c /target/boot/initrd.img-$(uname -r)|cut -d ' ' -f1) in flash-kernel-installer, lool thinks thats not safe enough, but i am not sure the /initrd.img symlink exists at the point where flash-kernel-installer runs, do you know more ?15:39
ogra(i simply assumed $(uname -r) matches our installer kernel anyway)15:39
cjwatsonogra: the symlink should exist; although uname -r should indeed match15:41
cjwatsonwell, in ubiquity it should match otherwise you'll have trouble booting; not necessarily in d-i15:41
cjwatsonso it's probably safer to use the initrd.img symlink15:41
ograok15:41
ograi wasnt sure it exists yet since we're just configuring kernel-img.conf in this place15:42
CIA-28casper: cjwatson * r609 trunk/debian/changelog: releasing version 1.16815:42
cjwatsonin d-i, base-installer sets it up, which runs well before flash-kernel-installer15:42
cjwatsonin ubiquity, it's created by configure_hardware, which runs immediately before configure_bootloader15:43
ograah, good15:43
NCommandercjwatson, did persia's lpia fixes make it in to the last upload? I'm working on the resolving the kernel problems ATM, but its not that useful if we can't install a kernel15:43
cjwatsonbesides, other bootloader installers need the initrd.img symlink15:43
cjwatsonNCommander: which ones? I know I've merged several of his fixes15:43
NCommanderthe one that added lpia to base-installer15:44
* NCommander goes hunting for the bug15:44
cjwatsonapparently not15:44
cjwatsonI'll merge that now15:44
NCommandercjwatson, https://bugs.edge.launchpad.net/ubuntu/+source/base-installer/+bug/29167015:45
ubottuUbuntu bug 291670 in base-installer "LPIA installer missing kernel" [Medium,Triaged]15:45
NCommanderI'm working on resolving #347458 which will make cdrom-detector work, and make installation possible.15:45
loologra: Forget initramfs size calculation, we don't need them anymore15:48
* ogra has http://paste.ubuntu.com/141467/15:49
ogralool, got it booting ?15:49
ograwow15:49
loolYup15:49
loologra: I can actually get it to boot for you without changing your kernel :)15:49
loologra: Pass ramdisk_size=65536 on your kernel command-line and replace flash-kernel with a script I'll hand yuo15:49
ograbut i assume we need a special cmdline15:49
loologra: I'd like to push a new flash-kernel just updating the main flash-kernel script (for that change), ok with you?15:50
ograsure15:50
loologra: i'm using: exec -r 0x01000000 -s 0x00940000 -c "console=ttymxc0,115200 root=/dev/mmcblk0p2 ro rootdelay=2"15:50
loolIt makes booting slower because we're reading from flash (padding)15:51
ograyeah15:51
* NCommander notes something is seriously wrong with his laptop15:51
lool~ 10 M instead of 4 M15:51
CIA-28base-installer: cjwatson * r358 ubuntu/ (11 files in 4 dirs): merge from lp:~persia/base-installer/add-lpia15:51
ogra10M should be fine for the start15:51
CIA-28base-installer: cjwatson * r359 ubuntu/kernel/ (4 files in 2 dirs): try linux-lpia first, as is standard behaviour for Ubuntu15:54
NCommanderthanks cjwatson15:56
CIA-28base-installer: cjwatson * r360 ubuntu/debian/changelog: releasing version 1.98ubuntu515:58
CIA-28oem-config: cjwatson * r644 trunk/ (d-i/manifest debian/changelog):16:06
CIA-28oem-config: Automatic update of included source packages: console-setup 1.28ubuntu7,16:06
CIA-28oem-config: user-setup 1.23ubuntu15.16:06
loologra: I pushed the updated flash-kernel16:07
* ogra waits patiently16:07
ograi cant get it booting16:07
ogra e -r 0x1000000 -s 0x00940000 -c "console=ttymxc0,115200 console=tty1 file=/cdrom/preseed/ubuntu.seed ramdisk_size=65536 boot=casper LIVEMEDIA=/dev/mmcblk0p1 --"16:08
ogragives me a kernel panic ... so i assume you added something special ?16:08
loologra: did you pad your initrd with zeroes?16:08
ograindeed i didnt16:08
loologra: also, check fis list -d16:08
loologra: It should show a datalength of 0x00940000; that was what prevented me using the actually correct padding I had earlier16:09
ograah16:09
loolhttp://people.ubuntu.com/~lool/flash-kernel16:09
loolRun that, and it should just work (tm)16:09
loologra: I pushed that one to the archive, it's much cleaner, but sadly even more complex16:10
ograogra@osiris:/var/build/babbage/images$ sudo fis -d /dev/mmcblk0 -o 0x40000 list|grep initramfs16:10
ogra       initramfs: addr = 0x00560000, size = 0x002e0000, entry = 0x01000000, length = 0x00452133, cksum = 0x1d051f7316:10
loolIt's the only arch where we have to create an intermediate file and it also requires fis partitions instead of mtd16:10
loologra: Oh you need to use -s $size16:10
ograindeed thats not 0x0094000016:10
loologra: Do you have changes in progress for flash-kernel?  Otherwise I could as well do that flash-kernel.conf thingy16:12
loologra: BTW I'm using a fixed kernel16:12
ografeel free, i have http://paste.ubuntu.com/141467/16:13
ograbut that will need modification after your changes16:13
ograi can push my stuff later if all your changes are in16:13
loologra: load_initrd versus ld_initrd16:15
ograthat makes the var name so long16:16
ogra(it was load_initrd load_kernel before :)16:16
ograbut i can indeed change it back16:17
ograah, intresting, with -s $size i get "RAMDISK: ran out of compressed data"16:18
ograhttp://paste.ubuntu.com/141491/16:20
loologra: That's without ramdisk_size?16:27
ograno, still with16:27
loolWith padded ramdisk?16:27
looland correct datalength?16:27
ograno16:27
ograits based on the current image16:27
ograoh, wait, thats with ramdisk_size16:28
loologra: You need to have zeroes in memory, if you just fis load initramfs, it will be random RAM data after the initrd16:28
ograyeah16:28
ograi dont have the intramfs handy since i build the image on antimony ...16:29
ogralool, pad=$(expr $ifissize - $ifilesize) .... pad=$(($ifissize - $ifilesize))16:33
ograsaves you the call to expr16:33
loologra: I copied this from Thecus; I didn't want to diverge from the rest of the file, but now that i look at it, i see that $(()) is used in the file as well16:35
ograyeah, dirty16:35
ograjust noticed the same16:35
CIA-28oem-config: cjwatson * r645 trunk/debian/changelog: releasing version 1.54.1016:36
ogralool, hrm, that flash-kernel change will produce probs for users that already have a babbage install16:43
ograwe would need to repartition the fis setup on the fly16:44
ograinitramfs: addr = 0x00560000, size = 0x002e0000, entry = 0x01000000, length = 0x00452133, cksum = 0x1d051f73 ...16:45
ogra0x002e0000 = 3014656 bytes16:45
loologra: ?16:45
ograogra@osiris:/var/build/babbage/images$ wc -c armel.initrd-imx5116:45
ogra4530483 armel.initrd-imx5116:45
loologra: I will fail on upgrades with the version I just pushed16:46
ogracheck_size "$initrd" $ifilesize $ifissize16:46
ograthat will always fail16:46
loolWhy?16:47
loolOh you're saying your fis entry was too small16:47
loolWell I don't know how you picked your values; mine work   :-P16:47
ograyes, since it doesnt hold anything16:47
loolBut note that it's not a flash-kernel change, it's just an issue with newer kernels and your partition16:47
lool(more modules, not enough space)16:47
ograyours uses addr and size16:48
loologra, NCommander, persia: you should create a /etc/flash-kernel.conf with:16:48
loolfis_dev="/dev/mmcblk0"16:48
loolfis_offset_hex="0x40000"16:48
ograwhile the old way was to use addr and length16:48
loolfis_size_hex="0x1F000"16:48
loologra: Uh?16:48
NCommanderhuh?16:49
ograsize only tells how big the fis entry is ...16:49
loologra: Yes, and I'm padding it in full16:49
ogranot how big the initramfs is16:49
loolYes, I don't care how large it is16:49
loolI'm just checking it fits16:49
ograinto what ? the fis entry only has meta info we dont need it that big16:49
loologra: I think you're confused16:49
loologra: check_size "$initrd" $ifilesize $ifissize is a check to make sure that the initramfs data fits in the initramfs partition16:50
ograi think check_size should check on lenght16:50
lool$ifissize is the size of the initramfs partition, as listed in fis -l output16:50
ograright16:50
loologra: What "length"?16:50
lool$ifilesize is the size of the file we want to write16:51
ograinitramfs: addr = 0x00560000, size = 0x002e0000, entry = 0x01000000, length = 0x00452133, cksum = 0x1d051f7316:51
loollength is the data length of the *old* data16:51
loolIt's irrelevant16:51
loologra: Your fis partition for initramfs is too small; it's 3014656 bytes; my initrd is currently 391357316:52
ograso why did the 4530483bytes big initramfs we use atm ever get loaded at all if it was stored in a 3014656 bytes big partition ?16:52
loologra: Yours?  I don't know16:52
ograthe fis partition only holds metadata16:53
loologra: My partition is large enough; are you sure your ramdisk was loaded?  perhaps it was cut?16:53
ogralool, we released beta with that16:53
ograand yes, i'm sure it wasnt cut16:53
loologra: Perhaps the initrd was smaller?  I don't know16:54
loologra: Did flash-kernel run with the beta image?16:54
loologra: Perhaps you truncated it when creating the SD card image16:54
ogralength = 0x00452133 == 4530483 bytes16:54
loolOuch16:54
loolI know what you did16:54
loolYou wrote past the end of the fis partition for the initramfs16:55
loolfis is really stupid16:55
loologra: You had a fis entry for <-----> and you wrote <-----------> to it16:55
ografis only contains metadata that tells redboot from where to load the actual payload16:55
loologra: This is exactly like a partition table16:55
ograso the fis partition doesnt need to have the actual size of the initramfs16:56
loolerf16:56
ograentry = 0x01000000, length = 0x00452133 are the relevant infos redboot uses ...16:56
loologra: No16:57
loolNot if you fis create16:57
ograi do fis create16:57
loolIt will flash past the end of your partition16:57
loologra: You realize that if anything is after the initramfs partition it will be overwritten?16:57
ograi actually copied your code from flash-kernel to do that16:57
loolYou're lucky to have 20M as the first partition16:58
ograand used the settings the FSL binary blob had as defaults16:58
loologra: No, my code in flash-kernel enforces the size to be large enough16:58
loolYou might have copied the code doing the write, but not copied the test...16:58
loologra: Anyway, done is done; it's a really serious bug for that flavour but fortunately it's used by a handful of people16:59
loologra: let's move it to -arm17:00
ogragrr17:03
ogralool, i always used whats created by default by sd_init_babbage.bin17:04
loologra: I never used that17:04
ograyou never used updater.sh ?17:05
loolNo17:06
ograah17:06
ograwell, everyone else did :)17:06
loologra: I think I mentionned the size of the partitions I created on my 16M SD card17:06
loolAnd mentionned that they were a bit tight, but enough17:06
loologra: The way I created my partition table was by running fis init -f and fis create on a running system; then I did it again by using the fis command17:07
* ogra adjusts the builder script to use 0x00940000 by default from now on17:07
loologra: I think you would have caught that error with a tighter size for the first partition17:08
loologra: Hey let's have a quick phone call17:09
ograone sec17:09
ograready17:10
ogra(we should probably also take that conversation to #ubuntu-arm :) )17:10
NCommanderThis may be a stupid question, but what is a driver update disk, and when do we produce them?18:33
cjwatsonhttps://wiki.ubuntu.com/Ubiquity/DriverUpdates18:34
CIA-28ubiquity: cjwatson * r3153 ubiquity/ (16 files in 9 dirs): bump to 1.1221:21
CIA-28ubiquity: cjwatson * r3154 ubiquity/debian/ (80 files in 2 dirs): Update translations from Launchpad.22:23
CIA-28ubiquity: cjwatson * r3155 ubiquity/ (d-i/manifest debian/changelog):23:17
CIA-28ubiquity: Automatic update of included source packages: base-installer23:17
CIA-28ubiquity: 1.98ubuntu5, flash-kernel 2.13ubuntu5, partman-partitioning 65ubuntu2.23:17
CIA-28ubiquity: cjwatson * r3156 ubiquity/debian/changelog: releasing version 1.12.123:25

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