[ltp] Can't hibernate (SMAPI BIOS error)

Vivek linux-thinkpad@www.bm-soft.com
Sat, 25 Aug 2001 11:23:27 +0100 (BST)


On Sat, 25 Aug 2001, Markus Alt wrote:

> > Woohoo! Success! Ok - I finally got my A20p to hibernate - I zapped the
> > partition, recreated it with mkfs.msdos -F 16, set the partition type
> > to 06 (FAT 16) and flagged it as bootable [didn't work as a hidden
> > partition type], Booted off the phdisk floppy, and selected 'Create file',
> > And this time hibernate worked.
> >
> > I'm not sure what went wrong before, but it only ever gave me the choice of
> > creating a partition, not a file.
>
> Really strange. My hibernation partition is marked as hidden:
>
> root@altmark: root (9) # fdisk -l /dev/hda | grep hda2
> /dev/hda2           256       327    544320   16  Hidden FAT16
>
> But IIRC, it was not hidden when I created the hibernation file on it.
> OTOH, I didn't set it to hidden explicitly afterwards ... Does this
> happen automagically?

vivek@narf:~$ sudo fdisk -l /dev/hda | grep hda2
/dev/hda2   *      2310      2343    257040    6  FAT16

So no, Linux at least has not caused the partition to become hidden in any
way, and the phdisk image, when booted, did not recognise the partition when
it was marked as hidden.

As a interesting side note: The partion is primary, but is located at the
end of the disk, becuase that's where i happened to have some space - this
doesn't appear to have cause phdisk any problems.

I think maybe phdisk's 'create partition' option does not work right, or
something, because, well, here's what I did before:

*************************************************
* This is an account of an attempt which failed *
*************************************************

 Create FAT 16 partition, /dev/hda2 [primary, tried both hidden and not]
 mkfs.msdos -F 16 /dev/hda2
 shutdown -r now
 <BOOT FROM PHDISK>
 I have 2 options:

 1) Create Partition
 2) Reboot

 1) Gives me a choice of partitions: I choose the one I know is /dev/hda2
    [I've noted all the different addressing thingies cfdisk used to
     describe the table, at least one of them is similar enough to phdisk's
     method  that I can match them up]

 phdisk rumbles along for a while, writing to the disk, and then rolls
 around to the first menu, with a partiotn creation message

 I reboot from option 2

 <BACK TO LINuX>

 Hmmm - the partition is no longer mountable as vfat, and I still a SMAPI
 error when trying to hibernate.

 Lather, rinse, repeat....

 **********************************************************

Ok, I think what happened was, the partition was not marked as bootable,
and  as a result, phdisk did not recognise it. The partition that phdisk
created was then

a) Not valid or mountable, at least under linux
b) Not something that phdisk recognised as a place where it could
   put a hibernation file
c) Not something the BIOS could use to hibernate.

And since I never saw a 'create file' option, I never realised that's
what I needed to do. [I was under the impression that creating a
partition from within phdisk was enough - I would have thought mangling
a raw partiton was easier for a BIOS than reading/writing to a filesystem
but evidently, this is not what happens]

Now if I can just beat irda into submission...

-- 
"As you point out, EFAULT situations are `undefined' which means the
machine is entitled to grow wings an launch itself towards the sun..."
 -- Chris Wedgwood on the linux-kernel mailing list


----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html