*BSD News Article 73326


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!oleane!tank.news.pipex.net!pipex!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!icrt.demon.co.uk!lerland
From: "Lars G. Erlandsen" <lerland@icrt.demon.co.uk>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Help: FreeBSD 2.1 'mount' fails on a 2.0 SCSI partition
Date: Wed, 10 Jul 1996 19:46:56 +0100
Organization: Inter-Connect RealTime Ltd
Lines: 147
Distribution: world
Message-ID: <Hc3d6BAgq$4xEwMa@icrt.demon.co.uk>
NNTP-Posting-Host: icrt.demon.co.uk
X-NNTP-Posting-Host: icrt.demon.co.uk
MIME-Version: 1.0
X-Newsreader: Turnpike Version 1.11 <0$M+ltNrbQ$Y$ryVKqcUZpyKB5>

[This mail was recently sent to questions@free_bsd.org as well]

I've grown up on Sun Workstations, and developed a strong liking for BSD
Unix. During my ten years of developing software for various companies,
it was the one dependable and solid workhorse that always got the job
done. FreeBSD was the ultimate dream: BSD Unix at home. It has run for
over 2 years (first version 1.5, and over the last 2 years, version
2.0), and there are very few things it can't do. It's a superb
environment, and one I've grown to like and respect.

The system I have successfully run an maintained, is a FreeBSD 2.0
system that has been uncomfortably straddled across one IDE and one SCSI
disk on my home computer. It started its life as a 2nd partition on the
IDE drive (Messy-Dross and Windows 'Paines' occupying the first), but
quickly ran out of space. I used '/stand/sysinstall' to partition up a
bigger Conner 1 Gbyte SCSI disk (controlled from an Adaptek 2942 board)
later, then 'mkfs' to format the partitions, then tar'ed over the
original partitions. However, as I've learned later, tar is no good on
special files, so I never managed to boot from the SCSI disk. In the
end, I booted from the IDE disk, but had /usr mounted on the SCSI disk
(and importantly, the /usr/home partition for all my software).

Recently I acquired a bigger IDE disk, and decided it was time to do the
job properly, and for starters use the better partition naming to have
swap, root, usr and home partitions on separate slices. Also, my FreeBSD
was more than 2 years old, and in need of a facelift (not the least
because of the FreeBSD version 2.1 support for SoundBlaster Panasonic
CD-ROM drives). I've also since installed both Linux,  OS/2 and Boot
Manager for curiosity reasons, but that is not part of the story.

All has gone well, except that FDISK decided to pick its own default and
try and grab the whole IDE drive, FreeBSD and all, for partitioning, on
my old IDE drive. Of course this was discovered only during DOS FORMAT
later. The FreeBSD partitionwas lost. I wasn't unduly worried, as I had
disconnected the SCSI disk during this, knowing the generally mean
behaviour of FDISK. Hence the /usr portion (and more importantly
/usr/home) should be OK.

FreeBSD 2.1 was installed from CD-ROM without problems on the new IDE
drive. However, shock horror, it gets into fits when I'm manually trying
to mount the SCSI disk, complaining about overlapping partitions, in
particular '/dev/sd1s1d' (yes, I've got two SCSI disks as well, now!).
===============================================================
sd1s1: rejecting partition in BSD label: it isn't entirely within the
slice
sd1s1: start 32, end 1435647, size 1435616
sd1s1d: start 0, end 2110811, size 2110812
===============================================================

Ironically, it then mounts the root partition, which is -- a) the
partition that is not in a fit state, anyway after just a tar, and b)
not the one I need. The usr partition is not accessible. But 'fsck'
finds everything, and reports no problems when I run it on the unmounted
SCSI slice, though (I think).

The slice looks like (in the eyes of 'disklabel'):
===============================================================
# /dev/sd1s1:
type: SCSI
disk:
label: MBR based label
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 700
sectors/unit: 1435616
rpm: 0
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    61440        0    4.2BSD     1024  8192    16   # (Cyl.    0 -
29)
  b:   163840    61440    4.2BSD     1024  8192    16   # (Cyl.   30 -
109)
  c:  1435616        0    unused        0     0         # (Cyl.    0 -
700*)
  e:  1210336   225280    4.2BSD     1024  8192    16   # (Cyl.  110 -
700*)

===============================================================

At this point, I can see that I have 6 different options for digging out
the home partition (the 7th one - scrapping everything - is for now a
non-starter), but for all of them there are vital pieces in the jigsaw
puzzle missing:

1. Assume that I partitioned it wrongly when I made it. Action: Use
'disklabel -w -r <disk>' to handpatch it. Problem: I haven't got enough
knowledge to change the values and get it right, and if I get it wrong,
the partitions **REALLY** are busted.

2. Assume the FreeBSD 2.1 team have changed the partitioning software
sufficiently to make it non-portable between 2.0 and 2.1 (not
unreasonable given the added functionality it now offers on the
partitioning). Action: Rely on some migration
tool/information/procedures to change the layout sufficiently. Problem:
Don't know where to find it. Action II: Mount in a 2.0-ish compatible
fashion? Problem: Don't know how.

3. Mount individual partitions within the SCSI slice to rescue the /usr
portion. Problem: Don't know how.

4. Ask 'mount' to ignore errors, and try and make the best of it,
anyway. With such large partitions (500 Mbyte /usr), there should be
several super-blocks to read and make sense of. I only need one lucky
break to tar the interesting bits to a DOS partition or something.
Problem: Don't know how to inform 'mount' to do that.

5. Try and 'hide' all other BSD partitions (set the type to something
unknown), and try and force it to boot from the SCSI disk. Tried it -
boot program can't find /kernel, so the partition isn't sane enough to
boot.

6. Re-create a BSD 2.0 installation again, and see if it understands the
partitioning on the SCSI disk when I mount it manually later. Action:
Build from CD-ROM again. Problem: My FreeBSD 2.0 CD-ROM has a damaged
boot floppy image. I didn't have the patience to return the CD-ROM to
Walnut Creek and wait for a replacement when I got it, so last time I
dug out an old 5.25" floppy drive and managed to get it to boot on the
1.2M floppy image. Action II: Get new boot floppy image from Walnut
Creek. Problem: Tried that this morning, but version 2.0 now seems so
old that they don't hold an image of the CD-ROM any more.

So, where do I go from here? Could somebody please give me a few clues
about how to use various system utilities to mend the slice? or to ask
FreeBSD 2.1 to be forgiving when mounting? Any documentation on the
slicing changes between 2.0 and 2.1?

Failing all that, does anybody know of an ftp site where I can download
a FreBSD 2.0 boot and cpio floppy?

Thanks for all help.

Regards,



Lars G. Erlandsen, Inter-Connect RealTime Ltd.
email lerland@icrt.demon.co.uk