Subject: Re: can't re-mount root, solved
To: Tero Manninen <nix@stekt.oulu.fi>
From: None <mw@eunet.ch>
List: amiga
Date: 01/17/1995 23:24:53
> BTW, the old dostype (BSDR,BSDS,BSDD,BSDE,...) support
> doesn't work perfectly. The 1.0 looses the partition
> order information when converting all BSDD,BSDE,etc.
> types to plain NBU\7 :-(
You might apply the two patches from my recent 1.0a patch-collection. These
were those I rated "religious", because they fix exactly what you described
above. Since they're short, I'm including them here:
diff -2Ncr -x *.o -x *~ -x *.a -x compile sys.orig/arch/amiga/amiga/adosglue.h sys/arch/amiga/amiga/adosglue.h
*** sys.orig/arch/amiga/amiga/adosglue.h Tue Dec 20 09:33:07 1994
--- sys/arch/amiga/amiga/adosglue.h Thu Dec 22 21:12:39 1994
***************
*** 56,63 ****
#define ADT_NETBSDSWAP 3
#define ADT_NETBSDUSER 4
! #define ADT_AMIX 5
#define ISFSARCH_NETBSD(adt) \
! ((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSER)
#endif /* _ADOSGLUE_H_ */
--- 56,64 ----
#define ADT_NETBSDSWAP 3
#define ADT_NETBSDUSER 4
! #define ADT_NETBSDUSPEC 5
! #define ADT_AMIX 6
#define ISFSARCH_NETBSD(adt) \
! ((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSPEC)
#endif /* _ADOSGLUE_H_ */
diff -2Ncr -x *.o -x *~ -x *.a -x compile sys.orig/arch/amiga/amiga/disksubr.c sys/arch/amiga/amiga/disksubr.c
*** sys.orig/arch/amiga/amiga/disksubr.c Tue Dec 20 09:33:07 1994
--- sys/arch/amiga/amiga/disksubr.c Thu Dec 22 21:12:39 1994
***************
*** 154,158 ****
--- 154,167 ----
* I also don't trust rdb->secpercyl
*/
+ #if 0
+ /*
+ * *DONT* pretend to be smarter than the user who configured the
+ * disk!! If the RDB is wrong, fix the RDB, don't propagate problems
+ * instead of fixing them..
+ */
lp->d_secpercyl = min(rbp->secpercyl, lp->d_nsectors * lp->d_ntracks);
+ #else
+ lp->d_secpercyl = rbp->secpercyl;
+ #endif
#ifdef DIAGNOSTIC
if (lp->d_ncylinders != rbp->ncylinders)
***************
*** 259,262 ****
--- 268,289 ----
}
break;
+ case ADT_NETBSDUSPEC:
+ {
+ int idx = (pbp->e.dostype & 0xff) - 'D';
+ if (idx < 0 || idx > 5) {
+ printf("WARN: BSD%c out of bounds! Ignoring.\n", idx+'D');
+ clp->rdblock = RDBNULL; /* invalidate cpulab */
+ continue;
+ }
+ /* skip root, swap and raw partition */
+ idx += 3;
+ pp = &lp->d_partitions[idx];
+ if (pp->p_size) {
+ printf("WARN: more than one %c partition,ignoring\n", idx + 'A');
+ clp->rdblock = RDBNULL; /* invalidate cpulab */
+ continue;
+ }
+ }
+ break;
case ADT_NETBSDUSER:
case ADT_AMIGADOS:
***************
*** 493,496 ****
--- 520,524 ----
return(adt);
case DOST_XXXBSD:
+ #if 0
#ifdef DIAGNOSTIC
printf("found dostype: 0x%x which is deprecated", dostype);
***************
*** 510,513 ****
--- 538,553 ----
#endif
return(getadostype(dostype));
+ #endif /* 0, don't break something very useful */
+ if (b1 == 'R') {
+ adt.archtype = ADT_NETBSDROOT;
+ adt.fstype = FS_BSDFFS;
+ } else if (b1 == 'S') {
+ adt.archtype = ADT_NETBSDSWAP;
+ adt.fstype = FS_SWAP;
+ } else {
+ adt.archtype = ADT_NETBSDUSPEC;
+ adt.fstype = FS_BSDFFS;
+ }
+ return adt;
default:
#ifdef DIAGNOSTIC
-Markus
--
EUnet Switzerland Tel: +41 1 291 45 80 Markus Wild
Zweierstrasse 35 Hotline: +41 1 291 45 60 mw@eunet.ch
CH-8004 Zuerich Fax: +41 1 291 46 42 S=mw;P=EUnet;A=EUnet;C=CH
>Solaris 2 is not an upgrade from Solaris 1. They just want you to THINK it is.