Ok, problem solved (in a dirty way)

First things first...

The segfault came from the following line in genkd:
# PARTDEV=`echo $KDDEV | tr -d [1-8]`
tr did not trim /dev/hda1 into /dev/hda.

So far this segfault will not disable genkd because it continued to
work as expected.
However....

when reaching for the sfdisk part:
Note: $PARTDEV value is /dev/hda
# if `echo ";" | sfdisk $PARTDEV /dev/null 2> /dev/null
sfdisk did nothing, in fact running it manually gives:
"seek error; wanted 0x0000000000000000, got 0x0000000000000000"

Obviously if it does not create the partition correctly the script will die.

sfdisk -g /dev/hda output
/dev/hda: 77520 cyl, 16 heads, 63 sec/track

Solution:
a- use fdisk to create the 40 gig partition (/dev/hda1)
b- use "mke2fs -L ASTKD /dev/hda1"
c- ran "genkd /dev/hda" as it will now work due to reutilization of
existing partition (no sfdisk involved)

after all this i ran "sfdisk -l" to list the partitions and this was the output:
# sfdisk -l /dev/hda
"seek error; wanted 0x0000000000000000, got 0x0000000000000000"
"no partitions found"

So it seems that sfdisk does not play along with my WesternDigital 2.5
inch hard disk.
I googled a lot and found no reference of a sfdisk limitation due to
disk geometry, however I must say that my USB key (1 gig) and my CF
card (256meg) were perfectly written by genkd (genkd /dev/hdc and
genkd /dev/sda).
So I'm thinking it does have some geometry limitation

Is sfdisk 3.07 990908 (looks like a 1999 year build) the latest available?


As for the root(2,0) part: extract from the root parameter in grub.conf

Command: root device [hdbias]

    Set the current root device to the device device, then attempt to
mount it to get the partition size (for passing the partition
descriptor in ES:ESI, used by some chain-loaded boot loaders), the BSD
drive-type (for booting BSD kernels using their native boot format),
and correctly determine the PC partition where a BSD sub-partition is
located. The optional hdbias parameter is a number to tell a BSD
kernel how many BIOS drive numbers are on controllers before the
current one. For example, if there is an IDE disk and a SCSI disk, and
your FreeBSD root partition is on the SCSI disk, then use a `1' for
hdbias.


Hope it help someone.....


On 12/13/06, Darrick Hartman <[EMAIL PROTECTED]> wrote:
> Erick Perez wrote:
> > Sorry for the late reply but here are my findings.
> > remember:
> > hdc is my cf card
> > hda is my ide disk (no partitions defined), its a western digital set
> > to master by jumper
> >
> > i attached a usb disk to see if genkd segfaulted, but doing genkd
> > /dev/sda1 ran ok, however doing genkd /dev/hda showed the segfault.
> >
> > My boot order in BIOS is :
> > ch1 master: kodak ata flash
> > ch0 master: western digital hard disk
> > usb_hdd: usb key
> >
> > I also manually created a partition on /dev/hda (hda1) and then ran
> > genkd, it also segfaulted.
> >
> > I'm clueless.....
> >
> When you attempted to use 'genkd' on the hard drive AFTER manually
> creating the partition, did you use 'genkd /dev/hda1' or 'genkd
> /dev/hda'?  Also, you _may_ have to manually create the partition,
> reboot, then run genkd (shouldn't have to, but some hardware can be
> funny with re-reading partition tables).
>
> genkd is a script.  If you look at it, it will grep the command line to
> see if astkd is defined.  If it is, executing genkd with no options will
> generate the key disk on that partition.  Note that genkd is designed to
> work with a partition, not a disk.
>
> If you are getting a segfault, it's because the script tried to do
> something that's not allowed.  (like mounting a drive instead of a
> partition).  There could be some additional error checking implemented,
> but it's usually not an issue.
>
> Darrick
>
> --
> Darrick Hartman
> DJH Solutions, LLC
> http://www.djhsolutions.com
>
> _______________________________________________
> Astlinux-users mailing list
> [email protected]
> http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
> PROTECTED]
>


-- 
------------------------------------------------------------
Erick Perez
Panama Sistemas
Integradores de Telefonia IP y Soluciones Para Centros de Datos
Panama, Republica de Panama
Cel Panama. +(507) 6694-4780
------------------------------------------------------------
_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to