Ubuntu

linux-image-virtual does not include ahci module, prevents virtualbox from booting an Ubuntu guest

Reported by Steve Beattie on 2010-04-27
104
This bug affects 24 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Leann Ogasawara
Lucid
Medium
Leann Ogasawara
Maverick
Medium
Leann Ogasawara
Natty
Medium
Leann Ogasawara
Oneiric
Medium
Leann Ogasawara

Bug Description

Lucid SRU Justification:
Impact: In Karmic the ahci driver was built in by default in the kernel. However, in Lucid, this driver is now enabled as a module. Refer to:

commit 99380e40c725fbb737e1fbf30c9c54e4c6285455
Author: Andy Whitcroft <email address hidden>
Date: Tue Feb 9 16:07:33 2010 +0000

    UBUNTU: [Config] de-modularise SATA disk controllers

As a result we need to add the ahci module to the virtual sub-flavour .

Testcase:
Install the virtual kernel package and confirm virtualbox guests using virtual sata drives within virtualbox do not boot properly. Install the updated virtual kernel flavor and confirm virtualbox guests using virtual sata drives within virtualbox are now able to boot.

=====

The linux-image-2.6.32-21-virtual kernel package does not include the ahci module:

  $ dpkg-deb -c linux-image-2.6.32-21-virtual_2.6.32-21.32_amd64.deb | grep ahci
  $

this is unfortunately the driver that virtualbox guests need to use virtual sata devices (rather than ide) within virtualbox, meaning that virtualbox guests with the virtual kernel installed won't boot. Installing the ahci.ko from the corresponding linux-image-2.6.32-21-server kernel and updating depmod and the initramfs lets the system boot under virtualbox.

(It doesn't look to be a regression from karmic, as that version's virtual kernel also didn't include the ahci, though I haven't tested it for sure -- it's possible ahci could have been a built-in module).

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-21-virtual 2.6.32-21.32
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-21.32-server 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-server x86_64
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
CurrentDmesg: [ 14.287307] eth0: no IPv6 routers present
Date: Mon Apr 26 22:47:56 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100426.1)
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: innotek GmbH VirtualBox
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-server root=UUID=662bedea-1340-4f5a-909f-03cacdd3b29c ro quiet
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

Steve Beattie (sbeattie) wrote :
tags: added: iso-testing
Changed in linux (Ubuntu Lucid):
importance: Undecided → Medium
milestone: none → lucid-updates
status: New → Triaged

Hi Steve,

Indeed this indeed looks like this was built in for Karmic and only enabled as a module for Lucid. We'll try to get this fixed up in a Lucid SRU. Thanks.

ogasawara@emiko:~/ubuntu-karmic/debian.master/config$ grep -rn "AHCI" *
config.common.ports:2576:CONFIG_SATA_AHCI=m
config.common.ubuntu:2942:CONFIG_SATA_AHCI=y

ogasawara@emiko:~/ubuntu-lucid/debian.master/config$ grep -rn "AHCI" *
config.common.ports:2698:CONFIG_SATA_AHCI=m
config.common.ubuntu:3110:CONFIG_SATA_AHCI=m

description: updated
Changed in linux (Ubuntu Lucid):
assignee: nobody → Leann Ogasawara (leannogasawara)
status: Triaged → In Progress

Hi Steve,

I quickly built a test package which has added the ahci driver to the virtual flavour.

http://people.canonical.com/~ogasawara/lp570452/

$ dpkg-deb -c linux-image-2.6.32-22-virtual_2.6.32-22.33~lp570542v1_amd64.deb | grep 'ahci'
-rw-r--r-- root/root 77856 2010-04-27 13:23 ./lib/modules/2.6.32-22-server/kernel/drivers/ata/ahci.ko

I've also sent the patch to the Ubuntu kernel-team mailing list and have received the required number of Ack's for getting this approved as a Lucid SRU:

https://lists.ubuntu.com/archives/kernel-team/2010-April/010303.html

Steve Beattie (sbeattie) wrote :

Hi Leann,

I've tested the kernel you posted at http://people.canonical.com/~ogasawara/lp570452/ and can confirm that it boots within virtualbox.

Thanks!

Andy Whitcroft (apw) on 2010-05-04
Changed in linux (Ubuntu Lucid):
status: In Progress → Fix Committed
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Andy Pont (andy-pont) wrote :

Is there a timescale for this fix to be released?

I have updated my x86 Ubuntu 10.04 VirtualBox guest this morning with all the currently available updates and it doesn't appear to fix this issue as it still only boots from IDE and not SATA.

$ dpkg-deb -c linux-image-2.6.32-22-virtual_2.6.32-22.36_i386.deb | grep ahci
tar: Record size = 8 blocks
$

Is it possible to get an interim kernel build for x86 rather than AMD64?

Thanks,

A.

Martin Pitt (pitti) on 2010-06-11
Changed in linux (Ubuntu Maverick):
milestone: lucid-updates → maverick-alpha-2

Accepted linux into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

The patch to fix this issue is already incorporated into the Maverick kernel. I'm therefore marking the Maverick task as Fix Released. Thanks.

Changed in linux (Ubuntu Maverick):
status: Fix Committed → Fix Released
Steve Beattie (sbeattie) wrote :

I have reproduced the problem with the version of the kernel in linux-updates, linux-image-2.6.32-22-virtual 2.6.32-22.36, and can confirm that the version in lucid-proposed, linux-image-2.6.32-23-virtual 2.6.32-23.37, includes the ahci module in both the i386 and amd64 versions. I have also run the kernel regression tests from the lp:qa-regression-testing bzr tree which showed no regressions for any of its tests.

Marking verification-done.

tags: added: verification-done
removed: verification-needed
Andy Pont (andy-pont) wrote :

I have installed the linux-image-2.6.32-23-virtual_2.6.32-23.37_i386.deb package and can confirm that my Ubuntu 10.04 x86 installation now boots correctly within VirtualBox 3.2.2 with my disks connected to the VirtualBox SATA controller.

A.

sendai (logrado) on 2010-06-16
Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Olaf Lenz (olenz) wrote :

Stupid question: how can I get the fixed kernel into the machine that I cannot boot without any major pain? Or where do I get an updated ISO-image of ubuntu-10.04-server?

Launchpad Janitor (janitor) wrote :
Download full text (25.2 KiB)

This bug was fixed in the package linux - 2.6.32-23.37

---------------
linux (2.6.32-23.37) lucid-proposed; urgency=low

  [ Alex Deucher ]

  * SAUCE: drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0
    - LP: #564559

  [ Andy Whitcroft ]

  * [Config] ports -- build in dm-mod to enable LVM boot
    - LP: #560717
  * tools -- fix perf version extraction for multi-part flavours
    - LP: #555130
  * SAUCE: ACPI: EC: Allow multibyte access to EC (v3)
    - LP: #526354
  * [Config] enforce -- ensure dm_mod is built-in for LVM
    - LP: #560717
  * update to ubuntu-debian:7e708d33054c373faf41da23b73e8b48c342d958
    - LP: #570500, #576274

  [ Chase Douglas ]

  * Revert "(pre-stable): input: ALPS - Add signature for HP Pavilion dm3
    laptops"
    - LP: #550625
  * Enable ftrace function profiler
    - LP: #570389
  * enforce CONFIG_TMPFS_POSIX_ACL=y
    - LP: #575940

  [ Leann Ogasawara ]

  * Revert "staging/comdi -- disable"
    - LP: #563436
  * [Config] Enable multicast routing for sparc
    - LP: #416266
  * [Config] Add ahci.ko to virtual sub-flavour
    - LP: #570542

  [ Stefan Bader ]

  * Revert "SAUCE: drm/i915: Disable FBC on 915GM and 945GM"
    - LP: #588832

  [ Tim Gardner ]

  * ubuntu: rtl8192se -- update to version 0015.0127.2010
    - LP: #567016
  * [Config] Add atl1c to nic-modules udeb
    - LP: #557130

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) iwlwifi: fix nfreed--"
    - LP: #575853
  * Revert "backlight: mbp_nvidia_bl - add five more MacBook variants"
    - LP: #575853
  * Revert "(pre-stable) pata_via: Add VIA VX900 support"
    - LP: #575853
  * Revert "(pre-stable) x86-32, resume: do a global tlb flush in S4
    resume"
    - LP: #575853
  * Revert "x86: disable IOMMUs on kernel crash"
    - LP: #575853
  * Revert "sunrpc: fix peername failed on closed listener"
    - LP: #575853
  * Revert "sunrpc: move the close processing after do recvfrom method"
    - LP: #575853
  * Revert "(pre-stable) drm/edid: allow certain bogus edids to hit a fixup
    path rather than fail"
    - LP: #575853
  * Revert "drm/radeon/kms: don't print error on -ERESTARTSYS."
    - LP: #575853
  * Revert "ath9k: fix lockdep warning when unloading module" on stable
    kernels
    - LP: #588832
  * Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
    - LP: #483343
  * fat: fix buffer overflow in vfat_create_shortname()
    - LP: #575853
  * xfs: simplify inode teardown
    - LP: #575853
  * xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
    - LP: #575853
  * xfs: I/O completion handlers must use NOFS allocations
    - LP: #575853
  * xfs: Wrapped journal record corruption on read at recovery
    - LP: #575853
  * xfs: Fix error return for fallocate() on XFS
    - LP: #575853
  * xfs: check for not fully initialized inodes in xfs_ireclaim
    - LP: #575853
  * xfs: fix timestamp handling in xfs_setattr
    - LP: #575853
  * xfs: Don't flush stale inodes
    - LP: #575853
  * xfs: Ensure we force all busy extents in range to disk
    - LP: #575853
  * xfs: reclaim inodes under a write lock
    - LP: #575853
  * xfs: Avoid inodes in reclaim when flushing from inode cache
    - LP: #575853
  * xfs: recla...

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Andy Pont (andy-pont) wrote :

I have upgraded my Ubuntu installation in my VirtualBox environment from 10.4LTS to 10.10 and this bug has reappeared with the following message:

Starting up...
FATAL: Error inserting ahci (/lib/modules/2.6.35-22-virtual/kernel/drivers/ata/ahci.ko): Unknown symbol in module, or unknown parameter.

Andy.

The Loeki (the-loeki) wrote :

I second that.
Both upgrade and clean install result in same error as Andy.

Got hit by #659084 at the same time.
The two issues seem to have some similarities between them in that they're both broken kernel modules in the -virtual that should've been available and seem to have been compiled in, or the build at least should've tried.

I've noticed that the -headers packages contain the same files overall, but the -image-virtual packages are missing both libahci.ko and the mentioned .ko's in #659084.

Patrick G. (elgato) wrote :

  [ Leann Ogasawara ]
  * [Config] Add ahci.ko to virtual sub-flavour

Please fix the other missing modules from bug #659084 too.

Noorez (noorez-kassam) wrote :

This bug still appears in Ubuntu 10.10 amd64 after a clean install on virtual box.

Paul van Genderen (paulvg) wrote :

I just upgraded 10.04.1 to 10.10 using do-release-upgrade and got hit by this bug.

tags: added: lucid2maverick
summary: linux-image-virtual does not include ahci module, prevents virtualbox
- from booting minimal vm install
+ from booting an Ubuntu guest

With the bug re-appearing in Maverick final, and persisting, shouldn't this bug be re-opened for Maverick current? The problem remains up to, and including the latest 2.6.35-24-virtual kernel.

Ian Taylor (ibtaylor) wrote :

This does not seemed fixed. I encountered this with both maverick and natty.

The Loeki (the-loeki) wrote :

Natty still doesn't include it. Please reopen.

The Loeki (the-loeki) wrote :

Neither does Oneiric. Please reopen.

Examining the contents of the debs, the module is available in the latest Lucid, Maverick, Natty, and Oneiric -virtual kernel flavors.

Lucid:
$ dpkg -c linux-image-2.6.32-34-virtual_2.6.32-34.77_amd64.deb | grep "ahci"
-rw-r--r-- root/root 79400 2011-09-13 17:03 ./lib/modules/2.6.32-34-server/kernel/drivers/ata/ahci.ko

Maverick:
$ dpkg -c linux-image-2.6.35-30-virtual_2.6.35-30.60_amd64.deb | grep "ahci"
-rw-r--r-- root/root 54680 2011-09-19 15:07 ./lib/modules/2.6.35-30-virtual/kernel/drivers/ata/ahci.ko

Natty:
$ dpkg -c linux-image-2.6.38-11-virtual_2.6.38-11.50_amd64.deb | grep "ahci"
-rw-r--r-- root/root 50688 2011-09-12 15:51 ./lib/modules/2.6.38-11-virtual/kernel/drivers/ata/ahci.ko

Oneiric:
$ dpkg -c /var/cache/apt/archives/linux-image-3.0.0-12-virtual_3.0.0-12.20_amd64.deb | grep "ahci"
-rw-r--r-- root/root 51504 2011-10-07 14:53 ./lib/modules/3.0.0-12-virtual/kernel/drivers/ata/ahci.ko

phil (fongpwf) wrote :

I just tried with 11.04 in Virtual Box.
The module is included but it doesn't work. Dmesg shows lots of ahci: Unknown symbol errors. See bug #658461 which is marked as a duplicate of this one.

toobuntu (toobuntu) wrote :

Please reopen. Seems to require libahci.ko in addition to ahci.ko in order to resolve this bug.

The Loeki (the-loeki) wrote :

The ahci.ko needs libahci to work, which is included in linux-image-extra-virtual (along with everything but the kitchen sink). It *SHOULD* be included in linux-image-virtual IMHO, because ahci.ko is next to worthless without it, and installing an additional 120MB of drivers, modules and cruft to get a 47KiB module to get SATA to work is just plain silly (bug #658461)

Workaround (I guarantee nothing :-P ):
###########
cd /tmp
apt-get download linux-image-extra-3.0.0-12-virtual
cd /
dpkg --fsys-tarfile /tmp/linux-image-extra-3.0.0-12-virtual*.deb | tar --wildcards -xf - */libahci.ko
depmod -a
update-initramfs -u
shutdown -r now
############

<presto>

The Loeki (the-loeki) wrote :

On a side note, something appears not right there anyways;
modules.dep doesn't list libahci.ko as a dependency for ahci.ko, while modinfo does
so either depmod -a silently fails the dependency and doesn't list it, or something strange is going on with the dependency resolution.

Michael Bloom (mabloom) wrote :

Well I THOUGHT I was preparing to use virtualbox on oneiric when I apparently downloaded that virtual kernel. Now the system I was going to use as host is failing to boot with those ahci: unknown symbol messages, as well as getting "HDIO_GET_IDENTITY failed for /dev/sda: Invalid Argument" messages.

How do you get the workaround above to work when the host won't boot?

Michael Bloom (mabloom) wrote :

I had written: "How do you get the workaround above to work when the host won't boot?"

Duh! I just had to scroll down to the generics that were just off screen, so now I can install the workaround.

Selecting the package "linux-virtual" fortunately does not de-install linux-generic, but it does cause the host system's grub config to be updated to boot linux-virtual by default.

Was the current linux-virtual released without first trying to boot a host system? If someone had tried a simple "reboot" after installing linux-virtual, they would have noticed that the host could no longer boot! Unless they had manually installed the "workaround" as well, simply "knowing" that it was needed rather than relying on the dependency mwechanism.

Someone will probably respond that you are not supposed to install linux-virtual on a host machine. And it's probably even documented somewhere. But if that's the case, shouldn't there be some check performed to prevent (or at least warn about) it's installation on a host machine?

I've built test kernels for Natty 11.04 and Oneiric 11.10 which add the libahci driver to the virtual kernel flavor. Please test and let me know your results, I can then submit this for a Stable Release Update for the Natty and Oneiric releases. For Precise 12.04 this should be a non issue as the ahci and libahci drivers are built in for Precise (ie CONFIG_SATA_AHCI=y). Thanks.

http://people.canonical.com/~ogasawara/lp570542/

Changed in linux (Ubuntu Natty):
assignee: nobody → Leann Ogasawara (leannogasawara)
status: New → In Progress
Changed in linux (Ubuntu Oneiric):
assignee: nobody → Leann Ogasawara (leannogasawara)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu Natty):
importance: Undecided → Medium
dino99 (9d9) on 2013-05-18
Changed in linux (Ubuntu Natty):
status: In Progress → Invalid
Changed in linux (Ubuntu Oneiric):
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers