Lenovo Y700-17ISK Boot Error: Failure writing sector 0x21c8800 to 'hd0'

Bug #1553687 reported by aljosa on 2016-03-06
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)

Bug Description

Lenovo Y700-17ISK (Intel Core i7-6700HQ/RAM 16GB/SSD 512GB/Nvidia GTX960M 4GB)
Operating system: Ubuntu 16.04 (xenial-desktop-amd64.iso 04-Mar-2016, kernel 4.4.0-10-generic, nvidia 361.28)

Boot Error:
failure writing sector 0x21c8800 to 'hd0'
press any key to continue...

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-10-generic 4.4.0-10.25
ProcVersionSignature: Ubuntu 4.4.0-10.25-generic 4.4.3
Uname: Linux 4.4.0-10-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
 /dev/snd/controlC0: aljosa 1776 F.... pulseaudio
CurrentDesktop: Unity
Date: Sun Mar 6 11:11:22 2016
HibernationDevice: RESUME=UUID=ac022671-63df-40ae-bffe-66fff3b35125
InstallationDate: Installed on 2016-03-05 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160304)
MachineType: LENOVO 80Q0
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-10-generic.efi.signed root=UUID=aa4325c4-4b4c-4372-b8ca-a66c3e5b2aa6 ro quiet splash vt.handoff=7
 linux-restricted-modules-4.4.0-10-generic N/A
 linux-backports-modules-4.4.0-10-generic N/A
 linux-firmware 1.156
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/31/2016
dmi.bios.vendor: LENOVO
dmi.bios.version: CDCN30WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: Allsparks 7A
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad Y700-17ISK
dmi.modalias: dmi:bvnLENOVO:bvrCDCN30WW:bd01/31/2016:svnLENOVO:pn80Q0:pvrLenovoideapadY700-17ISK:rvnLENOVO:rnAllsparks7A:rvrNODPK:cvnLENOVO:ct10:cvrLenovoideapadY700-17ISK:
dmi.product.name: 80Q0
dmi.product.version: Lenovo ideapad Y700-17ISK
dmi.sys.vendor: LENOVO

aljosa (aljosa-p) wrote :

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed

Does this bug prevent the system from booting?

When answered, please set this report status back to "confirmed". Thank you.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
aljosa (aljosa-p) wrote :

the answer is no, it doesn't prevent the system from booting. Both if I press and if I don't press any key - system continue to boot up, but showing some other error messages before the background appears when it asks me for username and password.
I didn't have this error when I installed Xenial first time at the beginning of February, it appeared later after some updates (I'm not sure 100% but I think after kernel updates).

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

aljosa, in order to allow additional upstream developers to examine the issue, at your earliest convenience, could you please test the latest upstream kernel available from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D ? Please keep in mind the following:
1) The one to test is at the very top line at the top of the page (not the daily folder).
2) The release names are irrelevant.
3) The folder time stamps aren't indicative of when the kernel actually was released upstream.
4) Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds .

If testing on your main install would be inconvenient, one may:
1) Install Ubuntu to a different partition and then test this there.
2) Backup, or clone the primary install.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the mainline kernel does not fix the issue, please add the following tags:

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Also, you don't need to apport-collect further unless specifically requested to do so.

Once testing of the latest upstream kernel is complete, please mark this report Status Confirmed. Please let us know your results.

Thank you for your understanding.

tags: added: latest-bios-cdcn30ww
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
aljosa (aljosa-p) on 2016-03-09
tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-4.5-rc7
Changed in linux (Ubuntu):
status: Incomplete → Confirmed

aljosa, to clarify, if you boot into the original kernel that came with Xenial, does this issue go away?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
aljosa (aljosa-p) wrote :

I have already uninstalled kernel 4.5-rc7 and am booting only with the original kernel (4.4.0-11-generic) - yes, the problem is still here.

aljosa, to further clarify, the original kernel that came with Xenial when you first installed it wasn't 4.4.0-11. It would have been an earlier version.

aljosa (aljosa-p) wrote :

To clarify everything:

- I installed 'Xenial' for the first time at the beginning of February (don't remember the exact kernel version, but for sure it was one from the '4.4 series'). Initially I didn't have this error, it appeared later after some updates. Then one day I received a massive update (kernel,nvidia,...) that totally broke my computer;

- So I deleted all partitions and installed 'Windows 10 demo' in order to update bios to the latest version;

- Then one more time I deleted all partitions and installed 'Xenial' again ('xenial-desktop-amd64.iso 04-Mar-2016/kernel 4.4.0-10-generic') with having error right from the very first moment.

aljosa, the next step is to fully commit bisect from kernel 4.4.0-1 to 4.4.0-10 in order to identify the last good kernel commit, followed immediately by the first bad one. This will allow for a more expedited analysis of the root cause of your issue. Could you please do this following https://wiki.ubuntu.com/Kernel/KernelBisection ?

Please note, finding adjacent kernel versions is not fully commit bisecting.

After the offending commit (not kernel version) has been identified, then please mark this report Status Confirmed.

Thank you for your understanding.

Helpful bug reporting tips:

tags: added: needs-bisect regression-release
aljosa (aljosa-p) wrote :

I'm afraid that this is far above my tech level.

aljosa, as it is written for anyone with or without prior knowledge, could you please advise which part you are stuck on?

Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired

I am experiencing the same issue on the related Lenovo Y700-15ISK (same machine, 15" version) with Xubuntu 16.04.

This seems to be an issue in grub, not related to the kernel. The error message string is from grub-core/disk/i386/pc/biosdisk.c in GRUB2. As far as I can understand the code, the BIOS returns some kind of failure code when GRUB attemps to write to the disk during the recordfail command.

Deleting /boot/grub/grubenv works for one reboot, but it is recreated every boot.

After some troubleshooting I have arrived at a workaround: edit /etc/grub.d/00_header and comment out the line "set have_grubenv=true". Disabling this line "tricks" grub into thinking grubenv is missing, so it never tries to write the recordfail data and no error message is displayed. I'm sure there are drawbacks to this, especially if the menu is skipped by default, but I always have a menu shown for dual-boot so I'm not too worried about that.

I have no idea what's happening that causes the write to fail and don't know how to, for example, print the exact error code from the BIOS. The boot device is a 512GB M.2 SSD, if that helps at all.

aljosa (aljosa-p) wrote :

Hi Jeb,
does your subwoofer and rear speakers works?

Could you please check if your dmesg output contains identical/similar problematic lines:

[ 0.858435] [Firmware Bug]: No valid trip found
[ 0.861605] [Firmware Bug]: No valid trip found

[ 1.014162] mmc0: Unknown controller version (3). You may experience problems.

[ 0.000035] ACPI: Core revision 20150930
[ 0.025040] ACPI Error: [\_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20150930/dswload-210)
[ 0.025045] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20150930/psobject-227)
[ 0.025084] ACPI Exception: AE_NOT_FOUND, (SSDT:CB-01 ) while loading table (20150930/tbxfload-193)
[ 0.030567] ACPI Error: 1 table load failures, 7 successful (20150930/tbxfload-214)

[ 0.355622] pci 0000:01:00.0: can't claim BAR 6 [mem 0xfff80000-0xffffffff pref]: no compatible bridge window
[ 0.355647] pci 0000:01:00.0: BAR 6: no space for [mem size 0x00080000 pref]
[ 0.355648] pci 0000:01:00.0: BAR 6: failed to assign [mem size 0x00080000 pref]

[ 1.943569] iwlwifi 0000:08:00.0: Direct firmware load for iwlwifi-8000C-19.ucode failed with error -2
[ 1.943596] iwlwifi 0000:08:00.0: Direct firmware load for iwlwifi-8000C-18.ucode failed with error -2
[ 1.943603] iwlwifi 0000:08:00.0: Direct firmware load for iwlwifi-8000C-17.ucode failed with error -2
[ 1.947507] iwlwifi 0000:08:00.0: Unsupported splx structure

[ 2.752029] Bluetooth: hci0: Failed to send firmware data (-38)

[ 4.755825] Bluetooth: hci0 command 0xfc05 tx timeout
[ 9.634400] usb 1-11: USB disconnect, device number 5
[ 9.634710] Bluetooth: hci0: Reading Intel version information failed (-19)

[ 11.436894] Bluetooth: hci0: Setting Intel event mask failed (-16)

I finally got down to do some debugging. I downloaded the grub source via apt and made some changes to the source code. Specifically, near line 567 of grub-core/disk/efi/efidisk.c, adding the status code to the error message:

"failure writing sector 0x%llx to `%s' [status %lx]" with variable status passed in.

Now I can read the actual error code, which on my machine is [status 80000....0012]. The error code of 12 seemingly corresponds to GRUB_EFI_NO_MEDIA.

Obviously reads and writes from the physical device succeed, as the boot loader runs and the operating system runs. I have no idea why only GRUB's writes are not working (or why NO_MEDIA specifically is the returned error), but I plan to look into that more over the next week or so. The drive itself is reported as using the SATA3 interface by hdparm, smartctl, etc., and I know it is an M.2 chip from specifications.

aljosa (aljosa-p) wrote :

I'm certainly not an expert, so here's some interesting Google results:

'failure writing to sector'
This bug was fixed in the package grub2 - 1.99-21ubuntu3.15

aljosa wrote: "I installed Xenial for the first time at the beginning of February. Initially I didn't have this error."
Christopher wrote: "I finally got down to do some debugging. failure writing sector corresponds to GRUB_EFI_NO_MEDIA."
GRUB patch introduced in February: "GRUB_EFI_NO_MEDIA" https://lists.gnu.org/archive/html/grub-devel/2016-02/msg00018.html

Changed in linux (Ubuntu):
status: Expired → Confirmed
aljosa (aljosa-p) wrote :

Yesterday I experimented installing Ubuntu 16.04.1, 16.10, 17.04 and Fedora 25.
I have again the same annoying error with all Ubuntu versions. What a nice surprise: everything ok with Fedora 25.

tags: added: latest-bios-outdated-cdcn35ww needs-upstream-testing
removed: kernel-bug-exists-upstream latest-bios-cdcn30ww
tags: added: yakkety zesty
aljosa (aljosa-p) wrote :

I forgot to mention, BIOS is updated to the latest version CDCN53WW.

tags: added: latest-bios-cdcn53ww
removed: latest-bios-outdated-cdcn35ww
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Phillip Susi (psusi) wrote :

I wonder if your boot files are actually on another drive, like hd1, but grub is incorrectly looking for grubenv on the non existing hd0?

no longer affects: linux (Ubuntu)
aljosa (aljosa-p) wrote :

Hi, thanks for reply.
This bug was reported on 2016-03-06, and that is quite long time ago. I tried Ubuntu 17.10 and experienced the same problem. Consequently I switched to Solus and this annoying problem has finally magically disappeared :)

Fernando (nando82) wrote :


I have a Lenovo ideapad Y700-15ISK with Ubuntu 20.04 just installed (dual boot with windows) and I have the same issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers