Aloha
I'm looking for a little direction (instructions or reading) that
could point me the right way. 

I have a box with an 18G scsi hd that has win98 loaded on slice 1,
FreeBSD 5.2RC loaded on slice 2 and I had a couple of linux distros
loaded in extended partitions. I had blown away one of the linux 
distros a while back. and that partition is idle.

Here is my problem. I ran out of space in /usr. 

Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/da1s2a    253678   75170  158214    32%    /
devfs               1       1       0   100%    /dev
/dev/da1s2e    253678     202  233182     0%    /tmp
/dev/da1s2f   2421616 2419590 -191702   109%    /usr
/dev/da1s2d    253678   32722  200662    14%    /var
/dev/fd0         1424       9    1415     1%    /tmp/floppy


My thoughts were to redo that idle slice (4.5Gig) to a UFS 
and cp usr to it. Then I could change my /etc/fstab to find 
/usr on the new slice. Is this possible?

I've been doing a lot of research (handbook, man bsdlabel, man ccd, 
etc.) and I haven't had much luck.

I first used sysinstall to fdisk the idle slice to a primary slice 
and set it as a type 165. I used the disk label editor in sysinstall
to try to create a single file system as FS and /usr. When trying to 
write this I got an error but the handbook says to ignore any errors.

After reboot, ls -l /dev/da* shows my new slice as da1s4f;

crw-r-----  1 root  operator    4,  12 May 19 12:59 /dev/da0
crw-r-----  1 root  operator    4,  14 May 19 12:59 /dev/da0s4
crw-r-----  1 root  operator    4,  13 May 19 12:59 /dev/da1
crw-r-----  1 root  operator    4,  15 May 19 12:59 /dev/da1s1
crw-r-----  1 root  operator    4,  16 May 19 12:59 /dev/da1s2
crw-r-----  1 root  operator    4,  19 May 19 02:59 /dev/da1s2a
crw-r-----  1 root  operator    4,  20 May 19 12:59 /dev/da1s2b
crw-r-----  1 root  operator    4,  21 May 19 12:59 /dev/da1s2c
crw-r-----  1 root  operator    4,  22 May 19 02:59 /dev/da1s2d
crw-r-----  1 root  operator    4,  23 May 19 02:59 /dev/da1s2e
crw-r-----  1 root  operator    4,  24 May 19 02:59 /dev/da1s2f
crw-r-----  1 root  operator    4,  17 May 19 12:59 /dev/da1s3
crw-r-----  1 root  operator    4,  18 May 19 12:59 /dev/da1s4
crw-r-----  1 root  operator    4,  27 May 19 12:59 /dev/da1s4c
crw-r-----  1 root  operator    4,  28 May 19 12:59 /dev/da1s4f
crw-r-----  1 root  operator    4,  25 May 19 12:59 /dev/da1s5
crw-r-----  1 root  operator    4,  26 May 19 12:59 /dev/da1s6

And doing an fdisk shows this

****** Working on device /dev/da1 *******
parameters extracted from in-core disklabel are:
cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
    start 63, size 4883697 (2384 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 303/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 4883760, size 8594775 (4196 Meg), flag 80 (active)
        beg: cyl 304/ head 0/ sector 1;
        end: cyl 838/ head 254/ sector 63
The data for partition 3 is:
sysid 5 (0x05),(Extended DOS)
    start 22458870, size 13092975 (6393 Meg), flag 0
        beg: cyl 1023/ head 254/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 13478535, size 8980335 (4384 Meg), flag 0
        beg: cyl 839/ head 0/ sector 1;
        end: cyl 1023/ head 254/ sector 63

but when trying "mount /dev/da1s4f /tmp/foo" I get;

bsd-desktop# mount /dev/da1s4f /tmp/foo
mount: /dev/da1s4f on /tmp/foo: incorrect super block

When I tried using bsdlabel without any options I got an error.
So I then did a "bsdlabel -w da1s4" and the a "bsdlabel -e da1s4" 
and edited what I believe are the correct numbers for this slice. 
Now when I do the "bsdlabel da1s4" with no options, I get

# /dev/da1s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:  8980335        0    unused        0     0         # "raw" part, don't edit
  f:  8980319       16    4.2BSD     2048 16384 28552 


I still get the above error when trying to mount this slice.

To sum it up. 

Is it possible to mount, copy and change the /usr partition?

If so, how do I correct the super block problem so I can mount?

Or, is there a much easier way and I have been spinning my wheels for 
the last 6 hours? 

TIA

Robert

P.S. Here's what bsdlabel on da1s2 looks like;

bsd-desktop# bsdlabel da1s2
# /dev/da1s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   524288        0    4.2BSD     2048 16384 32776
  b:  2012752   524288      swap
  c:  8594775        0    unused        0     0         # "raw" part, don't edit
  d:   524288  2537040    4.2BSD     2048 16384 32776
  e:   524288  3061328    4.2BSD     2048 16384 32776
  f:  5009159  3585616    4.2BSD     2048 16384 28552



_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to