Return to BSD News archive
Xref: sserve comp.os.386bsd.misc:1228 comp.os.386bsd.questions:5939 Path: sserve!newshost.anu.edu.au!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!ucsvc.ucs.unimelb.edu.au!lugb!latcs1!ipc4.lat.oz.au!wongm Newsgroups: comp.os.386bsd.misc,comp.os.386bsd.questions Subject: I lost my disklabel and hence my 386bsd root [was :disklabel problem, please help! [URGENT]] Message-ID: <CEvysJ.F9E@latcs1.lat.oz.au> From: wongm@ipc4.lat.oz.au (M.C. Wong) Date: Thu, 14 Oct 1993 12:02:42 GMT Sender: news@latcs1.lat.oz.au (news) Organization: Comp Sci, La Trobe Uni, Australia Nntp-Posting-Host: ipc4.lat.oz.au Lines: 87 Hi, I posted this tragedy before but only got one reply, and it doesn't answer the 2 questions I asked, and I think I should repost it since the ACTUAL questions I am asking are further down the page . In summary, I thrash/lost my disklabel on my wd0 (CP3544 IDE), and when doing disklabel -r wd0, it wil give some disk geometry followed by NO 386bsd partition information. ^^ Sorry for the repost but I am in real deep shit and I need to restore my system urgently! Below is the thing in details as posted orginally! Here is my config : - OS : 386bsd-0.1 + pk-0.2.4 - Hard disk : Conner Peripheral 3544 (544MB) with following partitions : FDISK partition ---------------- Partition Type Volume-Label Mbytes System Usage --------------------------------------------------------- C:1 PRI-DOS DOS6 150 FAT16 30% 2 NON-DOS 350 70% (386bsd) PFDISK partition ---------------- geometry 1023 16 63 (cyls heads sectors) # ID First(cyl) Last(cyl) Name # start,length(sectors) --------------------------------------------------------------------------- 1 6 0 304 DOSbig # 63, 307377 2 0 0 0 empty # 0, 0 3 0 0 0 empty # 0, 0 4 165 305 1022 unkown # 307440, 723744 (386bsd) # note : last(4): phys=(1023, 15, 63) logical=(1022, 15, 63) - Within the 386bsd partition I had parition a: followed by b: of 5 Mb, ie a: is about 345Mb, ie : a: (cyl. 305 - X) , 4.2BSD, [fsize = 1024, bsize = 8192, cpg = 16] b: (cyl. X - 1022), swap. c: (cyl. 305 - 1022), note I reserve cyl 1023 unused! I am not too sure if the size and offset field can be derived from the PFDISK information ? I can't remember what is X. Also, sec/cyl = 1008, bytes/sec = 512 bytes. But with a bit of calculation in backward, I get the following : (Am I correct ?) size(sect) begin(sect) end(sect) begin(cyl) end(cyl) -------------------------------------------------------------------- a: 713504 307440 1019936 305 1011.84127 b: 10240 (5Mb) 1019936 1030176 1011.84127 1022 c: 1030176 307440 1030176 305 1022 Why did I get end cyl 1011.84127 for a: ? Can I simply round it up to 1012 without losing any data? I edited the disklabel last night (disklabel -e -r wd0) to attempt to add in an entry e: for my MSDOS partition, but somehow it screwed up and I lost all the disklabel, ie my system will no longer boot from wd0. If I boot from the fixit floppy, I can no longer mount wd0a, as it comlaint wd0a not configured, even though it is there, and disklabel -r wd0 gives me all the disk geometry without BSD partition info at all. And the worst thing is I can't quite remeber the offset and end cylinders (sectors) in the original disklabel. All I know is that, my swap (b:) is still the original 5Mb, and the rest is a:. My questions are : 1) If I figure out all of the missing figures in the above disklabel entries correctly and re-disklabel wd0 from floppy. will I be able to restore my system ? Are the above backward calculation correct ? If re-disklabel doesn't work, is there any other alternative ? 2) I only have 1 fixit floppy which is read only, without the right mount that can remount my root to writable, no termcap file in /etc. So I am stuck with no other alternative. I wonder can someone help me out with this problem, ie verify if 1) will work , and if so please can you send me a bootable floppies (raw format) with the right tools (vi, termcap, mount etc) to fix the problem ? Many thanks in advance and email replies please as I am in deep shit! - wongm@latcs1.lat.oz.au (M.C Wong) -- - wongm@latcs1.lat.oz.au -- - wongm@latcs1.lat.oz.au