after installing Ubuntu I can't access my rescue partition

Bug #19634 reported by Matthew East
42
This bug affects 4 people
Affects Status Importance Assigned to Milestone
debian-installer
New
Undecided
Unassigned
debian-installer (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I received an IBM Thinkpad T43 laptop yesterday (see
https://wiki.ubuntu.com/MatthewEast/LaptopTestingHoary) and have installed
Ubuntu hoary on it. Before installing Ubuntu it was possible to access the IBM
rescue partition and diagnostic utilities by pressing the blue Access IBM button
at the startup screen. During the Ubuntu install I resized the Windows ntfs
partition only (not the rescue partition). The installer added both the Windows
partition and the rescue partition as Grub entries, the former as Windows XP and
the latter as Windows 2000.

The problem is this: when I press the blue Access IBM button at the startup
screen, it does not boot into the rescue partition, instead it simply gives me
the option to access the BIOS or boot normally. When I attempt to boot into the
rescue partition from the Grub entry, I get a BSOD which I have copied into
here: https://wiki.ubuntu.com/MatthewEast/LaptopTestingHoary/bsod

My partition table is:
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 1909 15334011 7 HPFS/NTFS
/dev/sda2 4346 4864 4165560 12 Compaq diagnostics
Partition 2 does not end on cylinder boundary.
/dev/sda3 1910 4242 18739822+ 83 Linux
/dev/sda4 4243 4345 827347+ 5 Extended
/dev/sda5 4243 4345 827316 82 Linux swap / Solaris

Partition table entries are not in disk order

Hope this helps. Fortunately I have made rescue disks which I hope work, so I
_should_ be able to test this again. For any more information, just ask :)

Matt

Revision history for this message
Reinhard Tartler (siretart) wrote :

I resized manually with parted from hoary live cd, and can confirm this behaviour.
However, fdisk does not give any warnings about the partition table as above

Revision history for this message
Matthew East (mdke) wrote :

well then, confirming bug :)

Revision history for this message
Mikael Sennerholm (mikannet) wrote :

I had the same problem with a fresh IBM X41 laptop. I removed the windows
partiotion and installed ubuntu 5.04 on it. I was using XFS and lilo instead of
grub on the master boot record. What I needed to do to get it working was to
restore the master boot record (MBR) with lilo -u and remove the xfs/swap
partition and create a new windows NTFS partition there. So I think that this
maybe is a bug in the IBM software. Maybe the partition layout is hard coded
there somewhere.

Revision history for this message
Paul Sladen (sladen) wrote :
Revision history for this message
Matthew East (mdke) wrote :

(In reply to comment #3)
{snip}
> partition and create a new windows NTFS partition there. So I think that this
> maybe is a bug in the IBM software. Maybe the partition layout is hard coded
> there somewhere.

I don't think so, I've done a little more testing on this as follows:

I restored the machine to factory settings, then resized the Windows partition
with Partition Magic, leaving about 25GB free space unallocated. I then tried to
reboot into my rescue partition and did so successfully.

I then installed Ubuntu Hoary on the unallocated space. After it installed grub
in the MBR and rebooted, the bug is reproduced exactly as above.

Hope this helps.

Matt

Revision history for this message
Paul Sladen (sladen) wrote :

This could be HPA (Host Protected Area) related. I have a feeling the
bootloader/bootsector (BEER) that does the nvram Access IBM detection is also
responsible for enabling/disabling the HPA. Windows maybe barfing if this
hasn't been done---possible ways to test are to change the settings in the BIOS
and see if that affects the ability to proceed.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Could you please attach the output of

sudo fdisk -l /dev/hda

(or sda as appropriate). If it's something like "Compaq diagnostic partition",
edit /boot/grub/menu.lst and in the entry for the recover partition add

unhide(hd0,3)

above the chainloader line. Change hd0,3 for the appropriate partition. Does
that then make any difference?

Revision history for this message
Paul Sladen (sladen) wrote :

The partition does indeed show up as Compaq Diagnostics, and 'fdisk -l' produces
the warning:

  Partition 2 does not end on a cylinder boundary.

The unhide(hd0,1), update-grub doesn't appear to help and produces the same BSOD
error:

  STOP: c000021a {Fatal System Error}
  The Session Manager Initialization system process terminated unexpectedly with
a status of 0xc000003a (0x00000000 0x00000000).
  The system has been shut down.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Can you try hiding the Windows partition, unhiding the recover partition and
then booting it?

Revision history for this message
Paul Sladen (sladen) wrote :

After various attempts involving trying to load various '*ldr' things directly,
the following is all that is needed:

  title IBM Rescue and Recovery
  chainloader (hd0,1)+1

A dos-based "PC-Doctor" program can also be loaded with:

  title IBM Rescue PC-Doctor
  root (hd0,1)
  chainloader (hd0,1)/bootsect.dos

Revision history for this message
Matthew East (mdke) wrote :

(In reply to comment #10)
> After various attempts involving trying to load various '*ldr' things directly,
> the following is all that is needed:
>
> title IBM Rescue and Recovery
> chainloader (hd0,1)+1

I tried setting this in /boot/grub/menu.lst but this did not help: I still get
the BSOD when booting into it from grub, and I cannot access it via the correct
method by pressing Access IBM on the boot screen. I will test the ideas posted
above by Matthew Garrett ASAP.

M

Revision history for this message
Matthew East (mdke) wrote :

(In reply to comment #7)
> Could you please attach the output of
>
> sudo fdisk -l /dev/hda

I attached it in the first post of the bug report. ^^

> (or sda as appropriate). If it's something like "Compaq diagnostic partition",
> edit /boot/grub/menu.lst and in the entry for the recover partition add
>
> unhide(hd0,3)
>
> above the chainloader line. Change hd0,3 for the appropriate partition. Does
> that then make any difference?

Nope this hasn't helped me either.

Revision history for this message
Matthew Garrett (mjg59) wrote :

We've got a copy of the pristine MBR now, so with luck we'll work this out. I
fear the answer may be horrible.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Paul, you claim to have this working at the moment. What does your partition
table look like, and what does your grub config look like?

Revision history for this message
Michael Baumann (michael-baumann) wrote :

I also experienced the problem after installing Breezy (together with the issue
that the AccessIBM button does not boot into Rescue&Recovery anymore, but that
seems to be caused by overwriting the original MBR) and found the following
comment :
http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165

Basically this guy suggests to change the partition type of the rescue partition
from "compaq diagnostics" (0x12) to "fat 32" (0x0b). For me this works fine,
Rescue&Recovery does boot again without a blue screen.

I don't know whats the real reason for this (it did work before the install with
the old partition type) but maybe it can give some additional hints.

Revision history for this message
Tony Yarusso (tonyyarusso) wrote :

I am running a T43, and the blue button does nothing at all. However, at first my grub entry for the recovery partition produced similar results. Running fdisk and changing the type from "Compaq diagnostics" (0x12) to "Fat 32" (0x0b) worked for me as well and it boots flawlessly now, so I'll confirm that fix.

Colin Watson (cjwatson)
Changed in debian-installer:
assignee: kamion → nobody
Revision history for this message
Daniel C. Axelrod (daxelrod) wrote :

ThinkWiki has some more information on this:
http://thinkwiki.org/wiki/Predesktop_Area
which links to
http://thinkwiki.org/wiki/Hidden_Protected_Area
http://thinkwiki.org/wiki/Rescue_and_Recovery

The basic gist is that there's a hidden part of the hard drive (at the end) that can be booted into which contains backups and diagnostics.

The tricky part is that the implementation has actually changed over time.

Here's a summary of what I've been able to figure out.

On older ThinkPads, this is implemented with the BIOS hiding that part of the hard drive (by reporting a smaller hard drive to the OS). In this case, the MBR contains a special ThinkPad bootloader which monitors the blue button. If the blue button is not pressed, it boots the first partition on the drive regardles of active bit. If the blue button is pressed, it does something magical to boot into the hidden part of the hard drive.

On newer ThinkPads, the hidden part of the hard drive is a standard hidden partition, and the ThinkPad bootloader unhides it and boots into it when the button is pressed. In this case, it is possible to have GRUB replace the ThinkPad bootloader.

Installing any bootloader into the MBR that is not the ThinkPad bootloader will result in difficulty booting into the predesktop area. Depending on your model, you may be able to configure grub to do the same thing.

Revision history for this message
tgillett (terry-gillett) wrote :

I have the same problem on several T41 laptops.

Before I blow away the last hidden recovery partition to allow the dual boot to work correctly, is it possible to make a Recovery CD from the data in this hidden partition, or some other way?

My intention is to just use a CD instead of the recovery stuff on the hard disc, thereby avoiding the problem and recovering another 3-4Gb of disc space.

Matt
I note you refer to making a recovery CD in your original post. Did it work, and if so how did you create it?

Thanks

joskam (joskam)
Changed in debian-installer:
status: Confirmed → New
Revision history for this message
Tor Håkon Haugen (torh) wrote :

I'm not sure if this helps, but I've encountered the "Partition 2 does not end on a cylinder boundary." message before. Thus on another distribution, and not on a ThinkPad, and with another partition with its own bootloader that didn't want to boot up after grub. Anyway. Are you able to mount the diagnostic partition? Because in my experience I could mount the partition that didn't want to boot. And when I removed the newly created partition with parted, things started to happen again.
But as I said. This might be a complete different case, but I'm thinking about a bad partition table that might be corrected if the partition in question is removed.

Revision history for this message
tgillett (terry-gillett) wrote :

The problem with the Recovery/Rescue partition on the IBM T41 and similar machines turns out to be the way that IBM set up the Recovery partition. This varies with the date of manufacture and model of machine, but on my machines they have set up some code in the BIOS that makes the hard disc look about 5Gb smaller to the Operating System than actual eg 35Gb instead of 40Gb. There are some settings controlling this in teh Security section of the BIOS set up screens.

This "protected partition" approach all works OK while you have only Windows on the machine as the manufactturer intended, but when you install Ubuntu with Grub managing the dual boot, Windows thinks that there is some problem with the partition table and refuses to boot.

The simple cure I found which allows everything to work normally (including the using the blue IBM button to launch the Recovery Utilities at start up), is to go into the BIOS setup screen, Security section, and switch off the security setting on the Recovery partition. You are warned that this action makes this partition visible to the Operating System and thus it can be overwritten if you re-partition the disc with a partition editor. This has not proved to be any real issue for me.

I did not work out how to build the Recovery CDs. What I did instead was to get the specific hardware drivers and utility software for the T41 machines from the IBM/Lenovo download site, and used a generic XP/SP2 installation CD to install Windows normally, then loaded the required device drivers for chipset, WLAN card etc. This results in a nice clean installation.

My standard approach to setting up a machine for Ubuntu use is to have Windows installed first, on a small partition (eg 5 - 10Gb) with the rest of the disc free. Then I install Ubuntu and tell it to use the free area of disc. This automatically sets up Grub to give the dual boot menu at machine startup. Very simple and reliable.

The Windows and the Recovery partition only get used rarely now on the machines I look after, so it has become something of a moot point, and on a couple of machines, only Ubuntu is installed. The users seem to have made the migration across to Ubuntu quite happily.

Revision history for this message
MFauzilkamil Zainuddin (apogee) wrote :

This bug has duplicates and have been confirmed. So, I mark this as confirmed.

Changed in debian-installer:
status: New → Confirmed
Changed in libdebian-installer:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Rejecting bogus libdebian-installer task. (The bug remains open.)

Changed in libdebian-installer:
status: Confirmed → Invalid
robi (ro-bir)
Changed in libdebian-installer (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 19634] Re: after installing Ubuntu I can't access my rescue partition

On Wed, Sep 09, 2009 at 12:22:30PM -0000, robi wrote:
> ** Changed in: libdebian-installer (Ubuntu)
> Status: Invalid => Incomplete

I'm reverting this status change, as it came without an explanation, and
I'm quite certain that this bug has nothing to do with
libdebian-installer.

 status invalid

Changed in debian-installer (Ubuntu):
status: Confirmed → Invalid
Colin Watson (cjwatson)
Changed in debian-installer (Ubuntu):
status: Invalid → Confirmed
Changed in libdebian-installer (Ubuntu):
status: Incomplete → Invalid
no longer affects: libdebian-installer (Ubuntu)
Revision history for this message
Magnus Dicander (magnus-dicander) wrote :

I can confirm this bug. My PC has a 160 GB sata harddisc patitioned inte 1 NTFS-partition (31 GB) which i use for microsoft xp and a Linux-partition (130 GB) which i just upgraded to Ubuntu 12.10 . Before this update, Ubuntu had no problem accessing the NTFS-partition. Now when i try to access the NTFS-partition from Ubuntu, i get the error-message: "Failed to mount the 31 GB volume. Adding read ACL for uid 1000 '/media/magnus' failed. Operation not supported. "

Dinessh (dkumar9616)
Changed in debian-installer (Ubuntu):
status: Confirmed → In Progress
robert (robertpickard76)
Changed in debian-installer (Ubuntu):
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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