Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 1998 20:13:38 +1000
From:      Robert Chalmers <robert@chalmers.com.au>
To:        freebsd-questions <freebsd-questions@FreeBSD.ORG>, scsi-questions@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Complex question about partitions, disktabs, magic and slices. HDD Guru needed.
Message-ID:  <358B8B52.58B89942@chalmers.com.au>

next in thread | raw e-mail | index | archive | help
Well, I thought I had the disktab right.... silly me. Anyway, this is what
shows up now in the bootlog, and is almost self explainitary;

Jun 20 17:51:12 nanguo /kernel: sd1: invalid primary partition table: no magic
Jun 20 17:51:12 nanguo /kernel: sd1: raw partition size != slice size
Jun 20 17:51:12 nanguo /kernel: sd1: start 0, end 4109999, size 4110000
Jun 20 17:51:12 nanguo /kernel: sd1c: start 0, end 4158233, size 4158234
Jun 20 17:51:12 nanguo /kernel: sd1: truncating raw partition


sd1 is a second drive. It is not bootable, containing only usr2, var2, var3
partitions

Question 1:  What is meant by "sd1: invalid primary partition table: no magic"
in this case.

Question 2:  This is the size returned by scsiformat,
                sd1: start 0, end 4109999, size 4110000. 
	     yet this is the size returned by the disklabel when applied,
                sd1c: start 0, end 4158233, size 4158234.
          So the question is, which is the 'correct' size? 

I believe 4110000 to be the correct size, because I can not get a partition
table made that is _actually_ 4158234 in size.

This is the disktab entry that I have built. It works, but obviously is not
correct yet, because it produces the results you see above.

Personally I think there just may be an error here in the algorithm that
calculates pc#4158234. or that calculates the figure reached by scsiformat,
4110000.

 ns*nt*nc = 4158234, however, and not 4110000

#
c2490a|Compaq C2490A SCSI:\
	:ty=winchester:rm#6400:dt=SCSI:ns#107:nt#18:nc#2159:\
	:se#512:\
	:oa#0:pa#2055000:ba#8192:fa#1024:ta=4.2BSD:\
	:ob#2055000:pb#336640:bb#8192:fb#1024:tb=swap:\
	:oc#0:pc#4158234:bc#8192:fc#1024:\
        :od#2391640:pd#894873:bd#8192:fd#1024:td=4.2BSD:\
	:oe#3286513:pe#823487:be#8192:fe#1024:te=4.2BSD:


Anyway, now, if I go into 'disklabel -e -r sd1' and get the label up, I can
edit the c partition back to the correct size, 411000 and save it, and it saves
without complaint. 

I can't reboot yet, so wont know for some time if it still gives the partition
!= slice error.

But I havent a clue what it wants for the magic number part.!!! I can find no
references to this anywhere.

Oh well, if anyone can offer any pointers, I'm happy to experiment further.

cheers
Bob




-- 
  Support Whirled Peas.       Business in China?    China House
  robert@chalmers.com.au      ph:61 7 49440357 fx:61 7 49578425 
   China House Uses Webposition to ensure Top Spot in Searches      
   http://www.chalmers.com.au/ChinaHouse/Business/webposition

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?358B8B52.58B89942>