** Description changed:

- For xgene-2 soc on EFI system, flash-kernel is failing:
+ For xgene-2 soc on UEFI system, flash-kernel is failing with:
  
+ root@(none):/# apt-get --reinstall install linux-image-4.2.0-1-arm64; echo $?
+ Reading package lists... Done
+ Building dependency tree
+ Reading state information... Done
+ 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
+ Need to get 0 B/24.2 MB of archives.
+ After this operation, 0 B of additional disk space will be used.
+ dpkg-preconfigure: unable to re-open stdin: No such file or directory
+ (Reading database ... 39873 files and directories currently installed.)
+ Preparing to unpack .../linux-image-4.2.0-1-arm64_4.2.6-1_arm64.deb ...
+ Unpacking linux-image-4.2.0-1-arm64 (4.2.6-1) over (4.2.6-1) ...
+ Setting up linux-image-4.2.0-1-arm64 (4.2.6-1) ...
+ /etc/kernel/postinst.d/initramfs-tools:
+ update-initramfs: Generating /boot/initrd.img-4.2.0-1-arm64
+ flash-kernel: deferring update (trigger activated)
+ /etc/kernel/postinst.d/zz-flash-kernel:
+ flash-kernel: deferring update (trigger activated)
+ /etc/kernel/postinst.d/zz-update-grub:
+ Generating grub configuration file ...
+ Found linux image: /boot/vmlinuz-4.2.0-1-arm64
+ Found initrd image: /boot/initrd.img-4.2.0-1-arm64
+ done
+ Processing triggers for flash-kernel (3.50) ...
  Unsupported platform.
- run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 
1
- dpkg: error processing package initramfs-tools (--configure):
+ dpkg: error processing package flash-kernel (--configure):
   subprocess installed post-installation script returned error exit status 1
- Processing triggers for ureadahead (0.100.0-16) ...
- Processing triggers for ufw (0.34~rc-0ubuntu2) ...
  Errors were encountered while processing:
-  initramfs-tools
+  flash-kernel
+ E: Sub-process /usr/bin/dpkg returned an error code (1)
+ 100
+ 
+ The patch landed in upstream debian's flash-kernel works like this:
+ 
+ If the machine is found to be unsupported (i.e. is not added to the db
+ file), it then checks if the system is EFI and if it is, it prints a
+ warning and exits instead of erroring out.
+ 
+ This enables us to exit gracefully for all EFI systems if they are not
+ added to the db file and will also allow us to enable UEFI systems if we
+ do add them to the db file.
+ 
+ This change needs to be back-ported for MAAS certification for this
+ hardware.
  
  
- 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> 
About Ubuntu
+ [Test Case]
  
- This error surfaced during the deployment of a Wily MAAS arm64 daily
- cloud image.  http://cloud-images.ubuntu.com/daily
+ To test the bug fix, with the patched flash-kernel in place, you should
+ be able to reinstall the current kernel on an xgene-2 SOC system by
+ running:
  
- 2) The version of the package you are using, via 'apt-cache policy
- pkgname' or by checking in Software Center
+ # apt-get --reinstall install linux-image-4.2.0-1-arm64; echo $?
  
- I mounted the root-image that MAAS and overlayroot use as the OverlayFS.
- I located the changlog for flash-kernel and found the package
- information below:
+ You will get a warning message that you are on an unsupported system and
+ that it is an EFI system, instead of erroring out.
  
- flash-kernel (3.0~rc.4ubuntu55) wily
  
- 3) What you expected to happen
+ [Regression Potential]
  
- I expected that postinsts would not fail.
- 
- 4) What happened instead
- 
- postinsts failed.
+ Regression potential is extremely low as this has already been tested
+ and landed upstream in debian's flash-kernel package and most
+ importantly because of where the code change occurs.  The code change
+ occurs where the program is already exiting with an error.  This
+ combination makes it very unlikely for a regression to occur.

** Description changed:

+ [Impact]
+ 
  For xgene-2 soc on UEFI system, flash-kernel is failing with:
  
  root@(none):/# apt-get --reinstall install linux-image-4.2.0-1-arm64; echo $?
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
  Need to get 0 B/24.2 MB of archives.
  After this operation, 0 B of additional disk space will be used.
  dpkg-preconfigure: unable to re-open stdin: No such file or directory
  (Reading database ... 39873 files and directories currently installed.)
  Preparing to unpack .../linux-image-4.2.0-1-arm64_4.2.6-1_arm64.deb ...
  Unpacking linux-image-4.2.0-1-arm64 (4.2.6-1) over (4.2.6-1) ...
  Setting up linux-image-4.2.0-1-arm64 (4.2.6-1) ...
  /etc/kernel/postinst.d/initramfs-tools:
  update-initramfs: Generating /boot/initrd.img-4.2.0-1-arm64
  flash-kernel: deferring update (trigger activated)
  /etc/kernel/postinst.d/zz-flash-kernel:
  flash-kernel: deferring update (trigger activated)
  /etc/kernel/postinst.d/zz-update-grub:
  Generating grub configuration file ...
  Found linux image: /boot/vmlinuz-4.2.0-1-arm64
  Found initrd image: /boot/initrd.img-4.2.0-1-arm64
  done
  Processing triggers for flash-kernel (3.50) ...
  Unsupported platform.
  dpkg: error processing package flash-kernel (--configure):
-  subprocess installed post-installation script returned error exit status 1
+  subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
-  flash-kernel
+  flash-kernel
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  100
  
  The patch landed in upstream debian's flash-kernel works like this:
  
  If the machine is found to be unsupported (i.e. is not added to the db
  file), it then checks if the system is EFI and if it is, it prints a
  warning and exits instead of erroring out.
  
  This enables us to exit gracefully for all EFI systems if they are not
  added to the db file and will also allow us to enable UEFI systems if we
  do add them to the db file.
  
  This change needs to be back-ported for MAAS certification for this
  hardware.
  
- 
  [Test Case]
  
  To test the bug fix, with the patched flash-kernel in place, you should
  be able to reinstall the current kernel on an xgene-2 SOC system by
  running:
  
  # apt-get --reinstall install linux-image-4.2.0-1-arm64; echo $?
  
  You will get a warning message that you are on an unsupported system and
  that it is an EFI system, instead of erroring out.
  
- 
  [Regression Potential]
  
  Regression potential is extremely low as this has already been tested
  and landed upstream in debian's flash-kernel package and most
  importantly because of where the code change occurs.  The code change
  occurs where the program is already exiting with an error.  This
  combination makes it very unlikely for a regression to occur.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1517582

Title:
  flash-kernel causes postinsts to fail when it happens to be installed
  on an unsupported system

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/1517582/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to