Subject: Re: Now I've done it! Hosed up my boot blocks!
To: <>
From: Eric Schnoebelen <eric@cirr.com>
List: current-users
Date: 01/27/2004 22:18:48
David Laight writes:
- A good guess is that either:
- - you have the bootxx_xxxfs code for thewrong filesystem type

	Nope, I was trying _ffsv1 for an ffs v1 filesystem.

- - the root partition isn't at the start of the bios/fdisk partition.

	Now, this might be it.. (but if that's the case, why did
it work with a previous version?)

My fdisk output:

    Disk: /dev/rsd0d
    NetBSD disklabel disk geometry:
    cylinders: 6962, heads: 12, sectors/track: 212 (2544 sectors/cylinder)
    total sectors: 17783240

    BIOS disk geometry:
    cylinders: 1023, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
    total sectors: 17783240

    Partition table:
    0: <UNUSED>
    1: <UNUSED>
    2: <UNUSED>
    3: NetBSD (sysid 169)
	start 32, size 17783208 (8683 MB, Cyls 0-8683/14/9), Active

My disklabel output:

    # /dev/rsd0d:
    type: unknown
    disk: mydisk
    label: 
    flags:
    bytes/sector: 512
    sectors/track: 212
    tracks/cylinder: 12
    sectors/cylinder: 2544
    cylinders: 6962
    total sectors: 17783240
    rpm: 3600
    interleave: 1
    trackskew: 0
    cylinderskew: 0
    headswitch: 0		# microseconds
    track-to-track seek: 0	# microseconds
    drivedata: 0 

    16 partitions:
    #        size    offset     fstype [fsize bsize cpg/sgs]
     a:    307792        32     4.2BSD   1024  8192    36  #
     b:   4195056    307824       swap                     #
     c:  17783208        32     unused      0     0        #
     d:  17783240         0     unused      0     0        #
     e:  12328224   4502880     4.2BSD   1024  8192    35  #
     f:    952136  16831104     4.2BSD   1024  8192    36  #

As I recall, these labels were generated by sysinstall.

I'm guessing that to fix this, I'll need to:
	boot single user (probably an install disk set);
	dump /dev/sd0a onto a different filesystem (or tape);
	update the disklabel to remove the 32 secotor offsets;
	newfs /dev/sd0a;
	restore from the dump image;
	install the boot blocks;
	try booting off of the disk...

Does anyone see a way that I can do it without the
dump/newfs/restore sequence (and using tar/newfs/tar is the same
thing! :-)  

	Thanks,
		Eric

--
Eric Schnoebelen		eric@cirr.com		http://www.cirr.com
    Software, n.: Formal evening attire for female computer analysts.