Subject: Re: Cannot mount root partition
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: None <songcc@VNET.IBM.COM>
List: amiga-dev
Date: 05/23/1994 10:40:16
I finally solve the problem. It is the combination of the way things got
handled in readdisklabel() of disksubr.c and my harddisk. My root is on Seagate
ST-1096N, which has 1 spare sector for each cylinder. So the calculated
sector/cyl is alway 1 more than the specified sector/cyl value. This ends up
causing the kernel to try to mount the root partition started at the wrong
sector. Once I changed to use the specified value, the kernel boot up without
a problem. And I found that most of the binary (bin-0319, I think) work with
the new kernel so I don't need to update the binary yet so I can revert back
to old kernel if there are other problem with the new kernel.
-------------------------------------------------------------------------------
lp->d_secsize = rbp->nbytes;
lp->d_nsectors = rbp->nsectors;
lp->d_ntracks = rbp->nheads;
lp->d_ncylinders = rbp->ncylinders;
>>>> lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks; <<<< Original
>>>> lp->d_secpercyl = rbp->secpercyl; <<<< New
#ifdef DIAGNOSTIC
if (lp->d_secpercyl != rbp->secpercyl)
printf("warning found rdb->secpercyl(%d) != "
"rdb->nsectors(%d) * rdb->nheads(%d)\n", rbp->secpercyl,
rbp->nsectors, rbp->nheads);
#endif
lp->d_secperunit = lp->d_secpercyl * (rbp->highcyl - rbp->lowcyl + 1);
lp->d_sparespercyl = lp->d_sparespertrack = 0;
------------------------------------------------------------------------------
I don't know what is the best way to handle this problem in gerenal. It seems
that lp->d_sparespercyl is intended for this. But I don't think we can specify
this in the Amiga rigid block.
Song.
------------------------------------------------------------------------------