Err, I don't think you have a "direct" geometry is the problem.
your Grub is trying to load based on where the data was in partition 3 but
your file does not have
the unused space that partitions 1 and 2 used. Grub is trying to skip over
to get to your kernel.
To fix this you can use a sparse file created something like this
use fdisk DEVICE2 to get CYCLINDERS/HEADS/SECTORS
and PARTITION3's CYCLINDERSTART, CYCLINDEREND
and then use dd to copy only the data you need
Master boot record (MBR)
dd if=DEVICE2 of=disk.img bs=512 count=1
and then skipping all the other partitions
dd if=DEVICE2 of=disk.img bs=$(( 512 * HEADS * SECTORS ))
seek=CYCLINDERSTART \
skip=CYCLINDERSTART count=$(( CYCLINDEREND-CYCLINDERSTART ))
this will produce a spase file ( all unallocated cyclinders will read as
zero and not take up space )
which will have the same geometry as your real hard disk.
This will show up in 'ls -l' as being the same size as your hard disk but
'df' will only show that sizeof(PARTITION3) is used
|MBR|unallocated space|Boot sector Grub|Hurd
----- Original Message -----
From: "Ian Duggan" <[EMAIL PROTECTED]>
To: "plex86" <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 12:40 PM
Subject: [plex86] Disk Image Layout
>
> Hi,
>
> I'm trying to create a bootable disk image for plex86 using another
> partition that I have and am looking for assistance. I keep getting
> drive geometry errors from GRUB, which I'm trying to use as a boot
> loader.
>
> Here was the layout of the original partions
>
> DEVICE1: PARTITION1 (NTFS): Windows2k
> DEVICE2: PARTITION1 (ext2): Linux
> PARTITION2:(ext2): Hurd
> PARTITION3:(swap): Swap (linux and hurd)
>
> I had LILO in the MBR of DEVICE1, which booted Win2k, or took you to the
> boot sectors of D2P1 or D2P2. D2P1 had another LILO for booting various
> Linux kernels in D2P1. D2P2 had GRUB for booting various Hurd/Gnumach
> kernels in D2P2.
>
> So, I created an image of D2P2
>
> dd if=/dev/hdb2 of=disk.img
>
> So, I now have an image of D2P2 with Grub in it's boot sector, and
> Hurd/Gnumach. Something like this:
>
> | Boot Sector Grub | Hurd |
>
> I think I need to create something like this:
>
> | MBR | Boot Sector Grub | Hurd |
>
> To try to boot it using plex86 and not have GRUB get the drive
> geometries confused.
>
> Can someone point me to documentation on how I could lay out a proper
> image file to boot with, or provide instructions on how to go about
> creating it?
>
> --Ian
>
>