[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SOLVED] Some issues with live-build 2.0.7-1 in ubuntu mode



Hi Folks,

On Wed, Dec 8, 2010 at 5:59 AM, Robert Key <robertkey@telkomsa.net> wrote:
I have solved the issues with using ubuntu mode and the debian installer as follows:

1. lb_binary_debian-installer changes required:

The script /usr/share/live/build/scripts/build/lb_binary_debian-installer uses the wrong name for the linux-image.
It tries to install linux-image-2.6-generic for i386 and amd64. This image does not exist.

linux-image-2.6-generic     must become    linux-image-generic

for all casper segments for i386 and amd64.

I've attached a patch to fix the package names to be used for Ubuntu for all arches in lb_binary_debian-installer.

(This being mostly a mechanical change, I hope you don't mind I went ahead and submitted this patch Robert - I know you mentioned you'd like to take this opportunity to start contributing to live-build).

2. lb_binary_disk changes required:

the line: for INITRD in binary/casper/initrd.img*         should read:    for INITRD in binary/casper/initrd*

the line: mv conf/uuid.conf "../binary/.disk/casper-uuid${INITRD#binary/casper/initrd.img}"

should read: mv conf/uuid.conf "../binary/.disk/casper-uuid${INITRD#binary/casper/initrd1.img}"

These changes for lb_binary_disk are necessary because "initrd1.img" gets generated in the casper directory. The build will fail at this step if the changes are not made.

Although this code could definitely be improved, the reason it stopped working in the common case for Ubuntu appears to be caused by git commit 762c3a0fc79b72a763ce24f641f4c227fb7932e9 and git commit 07dae8b0a3a285906afd6c32009fe72e4487f265. It appears this was to fix bug #581252. However the fix makes it so that live-build will no longer abstain from adding the numbering to the filenames for the first kernel/initrd that gets installed into the binary image but instead abstain from adding the numbering to the filenames when there are only two sets of kernel+initrd left to install.

In reality, all the code involved here (ie. both lb_binary_syslinux and lb_binary_disk) is broken/doesn't work right when it comes to handling multiple kernels for the live system (this is masked since the bug produces the correct results in the common case for Debian which installs two kernels and uses live-initramfs instead of casper). Unfortunately, the changes to properly fix this are too invasive to be able to take care of in time for the end of the week when, from what I understand it, the 2.x series freezes. However, I do want to make it so that the case where we're installing a single kernel results in no numbering in the filenames which will make lb_binary_disk work and thus make the common case for Ubuntu functional again.

Daniel: Do you have a preferred way to make this work? In the mean time, I'll whip something up and send it in too.

Cheers,

--
Cody A.W. Somerville
Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1 781 850 2087
Cell: +1 613 401 5141
Fax: +1 613 687 7368
Email: cody.somerville@canonical.com
=== modified file 'scripts/build/lb_binary_debian-installer'
--- scripts/build/lb_binary_debian-installer	2010-11-22 19:56:31 +0000
+++ scripts/build/lb_binary_debian-installer	2010-12-13 15:15:49 +0000
@@ -328,7 +328,7 @@
 
 			case "${LB_MODE}" in
 				ubuntu)
-					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-generic"
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic"
 					;;
 
 				*)
@@ -343,7 +343,7 @@
 
 			case "${LB_MODE}" in
 				ubuntu)
-					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-generic"
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic"
 					;;
 
 				*)
@@ -354,12 +354,28 @@
 
 		sparc)
 			DI_REQ_PACKAGES="silo"
-			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-sparc64 linux-image-2.6-sparc64-smp"
+			case "${LB_MODE}" in
+				ubuntu)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-sparc64"
+					;;
+
+				*)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-sparc64 linux-image-2.6-sparc64-smp"
+					;;
+			esac
 			;;
 
 		powerpc)
 			DI_REQ_PACKAGES="yaboot"
-			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-powerpc linux-image-2.6-powerpc64 linux-image-2.6-powerpc-smp"
+			case "${LB_MODE}" in
+				ubuntu)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc linux-image-powerpc64-smp"
+					;;
+
+				*)
+					DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-powerpc linux-image-2.6-powerpc64 linux-image-2.6-powerpc-smp"
+					;;
+			esac
 			;;
 	esac
 


Reply to: