Skip to main content.

2012-12-05

Well my web server rebooted. I don't know why. I will post another story about the significance of this to me. Anyways, my /home (where all my website docs were located) was not mounted.

The disklabel output was strange:

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   8192016        63     4.2BSD   2048 16384 27560  # (Cyl.      0*-   8127*)
 b:   8192016   8192079       swap                     # (Cyl.   8127*-  16254*)
 c: 156299312        63     4.2BSD   2048 16384 28752  # (Cyl.      0*- 155058*)
 d: 156299375         0     unused      0     0        # (Cyl.      0 - 155058*)
disklabel: partitions a and c overlap
disklabel: partitions b and c overlap

The disk is:

Partition table:
0: NetBSD (sysid 169)
    start 63, size 156299312 (76318 MB, Cyls 0-10337/62/30), Active

So I did some math with bc: Size of c is 156299375-63 = 156299312. Size of d is already known (entire disk). Size of e is 156299375-16384095 = 139915280. Start of e is 8192079+8192016 = 16384095 (end of swap plus size of swap).

And did with disklabel -e:

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   8192016        63     4.2BSD   2048 16384 27560  # (Cyl.      0*-   8127*)
 b:   8192016   8192079       swap                     # (Cyl.   8127*-  16254*)
 c: 156299312        63     unused      0     0
 d: 156299375         0     unused      0     0
 e: 139915280  16384095    4.2BSD   2048 16384 28752  # (Cyl.      0*- 155058*)

I guess I could have used disklabel -i for interactive to have it figure out the offsets and sizes for me. Then I fsck'd it. For some reason the fstab had: /dev/wd0c for the home so I changed to wd0e. Then "mount -a" and another reboot to verify it again. Odd that this weird disklabel was in working and in use for long time.