host env leaks into grub

Bug #1166491 reported by aeva black
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
Medium
Sandhya Ganapathy

Bug Description

When building images on a dual-boot host, I noticed that /dev/sda is leaking into the build's grub config. This is visible during the build process (pasted below) and in the resulting /boot/grub/grub.cfg file inside the image.

========================
Example output from the build:

Setting up linux-image-extra-3.5.0-26-generic (3.5.0-26.42) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-26-generic /boot/vmlinuz-3.5.0-26-generic
update-initramfs: Generating /boot/initrd.img-3.5.0-26-generic
df: Warning: cannot read table of mounted file systems
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-26-generic /boot/vmlinuz-3.5.0-26-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.5.0-26-generic /boot/vmlinuz-3.5.0-26-generic
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.5.0-26-generic
Found kernel: /boot/vmlinuz-3.5.0-17-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-26-generic /boot/vmlinuz-3.5.0-26-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-26-generic
Found initrd image: /boot/initrd.img-3.5.0-26-generic
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
Found Windows Recovery Environment (loader) on /dev/sda3
done

aeva black (tenbrae)
Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → Medium
Changed in diskimage-builder:
assignee: nobody → sandhya (sandhya-ganapathy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/107636

Changed in diskimage-builder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/107636
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=697e771e4db7f0a1bbf218c69f146ded6315fc51
Submitter: Jenkins
Branch: master

commit 697e771e4db7f0a1bbf218c69f146ded6315fc51
Author: Sandhya Ganapathy <email address hidden>
Date: Thu Jul 17 15:22:34 2014 +0530

    Fix for host env leak into grub

    While building images in a dual boot host,
    /dev/sda is leaking into build's grub config.
    It is visible in the logs that the commands
    GRUB-INSTALL and GRUB-MKCONFIG probes Host OS environment.
    This is avoided by setting grub_disable_os_prober
    to true in /default/grub config file.

    Change-Id: I7408de7b3bc8a62f8bf103f00a88a596f988353c
    Closes-Bug: 1166491

Changed in diskimage-builder:
status: In Progress → Fix Committed
Jay Dobies (jdob)
Changed in diskimage-builder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.