PC won't boot, Trashed partition table? Help required

Brian Somers brian at awfulhak.org
Tue Jun 6 15:04:20 BST 2000


> Brian Somers wrote:
> > 
> > This sounds bad - as you say, it looks like FreeBSD has trashed your
> > boot record.
> > 
> > You can still boot from a FreeBSD fixit and run fdisk -u ad0 (or da0)
> 
> What exactly does ``fdisk -u'' do (since I don't have access to the
> manpages).

It allows you to edit the partition table, prompting you for 
start/offset sectors, system ids and boot bits.

> One thing I would like, if someone will do it, is the output of
> 
> 	dd if=/dev/rda0s2 of=/tmp/foobar bs=512 count=8
> 
> (obviously changing rda0s2 to the appropriate slice where / is) to
> hopefully identify the start of the BSD slice (I've got Norton's
> diskedit).

You're looking for /boot/boot1.  I'll mail you a copy seperately.

> I have found a sector with "da0s3" near the start which is the correct
> slice number, so I'm guessing that this is the start of the FreeBSD
> slice. Also, is the total number of sectors in the slice stored anywhere
> within the slice at a known location (it must be somewhere so that
> FreeBSD knows where the slice ends).
> 
> Finally, is there a way of stopping fsck running at boot if it finds
> something wrong?, just in case I do get it to boot, but have the end of
> the slice wrong in the partition table.
> 
> Thanks
> 
> > if you can remember the partition sizes, but it's hard to say how
> > much of the NT loader has been kak'd on.
> > 
> > > Apologies if this is rather long but I've lost 'net access at home so am
> > > sending this from work and want to include as much info as I can since I
> > > can't check things.
> > >
> > > My PC will no longer boot due, I believe, to a trashed partition table.
> > >
> > > I triple boot Win95, NT4, Freebsd 4-STABLE using the NT boot manager.
> > > The system is spread over 2 disks:
> > >
> > >       Disk 0  512MB FAT - Win95
> > >               ~320MB UFS - /, var, swap
> > >               rest of disk is NTFS in an extended partition
> > >
> > >       Disk 1
> > >               Whole disk is UFS, /usr (*not* dangerously dedicated)
> > >
> > > To allow FreeBSD to boot from the NT loader I copy /boot/boot1 to
> > > C:\BOOTSECT.BSD and add an entry to C:\BOOT.INI. This has been set up
> > > this way for years.
> > >
> > > After doing a make world I check if /boot/boot1 has changed by
> > > diff(1)'ing it against C:\BOOTSECT.BSD and if different copying the
> > > former to the latter.
> > >
> > > Last night I did this (copied boot1) and re-booted. I have a habit of
> > > selecting FreeBSD from the NT menu and hitting RETRUN 3 times to start
> > > it booting and bypass the "twirling baton" and 10-second countdown.
> > > Instead of booting I saw:
> > >
> > >       F5 Drive 1
> > >
> > >       Default F5
> > >
> > >       _
> > >
> > > It took me a couple of minutes to realize that I'd copied boot0, not
> > > boot1. OK, just re-boot and copy the old BOOTSECT.BSD back (yes, I'd
> > > backed it up), however on reboot, instead of the NT loader menu I just
> > > got the "F5 Drive 1" display and no boot. It took a while to realize
> > > that the FreeBSD boot manager remembers the last partition booted and
> > > the only place it can store this info is in the MBR, so it had written a
> > > copy of itself to the MBR.
> > >
> > > No problem, just boot from the NT setup disks, select Repair and tell it
> > > to repair the boot sector (the NT equivalent of FDISK /MBR). NT
> > > complained that it couldn't find a valid NT install to repair, unless I
> > > had the Emergency Repair Disk (I had made one, but can't find it :( ).
> > >
> > > Booting from a DOS floppy resulted in "Invalid drive specification" when
> > > trying to change to C:.
> > >
> > > I booted from another floppy which has the command line version of
> > > Partition Magic on it. PM saw the whole of the first disk as free space
> > > (yes it can recognize UFS partitions).
> > >
> > > The only option left was to FDISK /MBR, but now all I get is "PRESS A
> > > KEY TO REBOOT" when booting from the HD.
> > >
> > > All this suggests that the partition table is trashed, but why? Surely
> > > boot0 should only affect the MBR, not the partition table.
> > >
> > > Any idea what has happened here?
> > >
> > > Is it the partition table that is trashed?
> > >
> > > Is there a way of recovering without having to re-install everything?
> > >
> > > Can anyone help me here please?
> > >
> > > Please Cc: me as I've no access to my list e-mail at the moment.
> > >
> > > TIA.
> > >
> > > ------ FreeBSD UK User's Group  -  Mailing List ------
> > > http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users

-- 
Brian <brian at Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !






More information about the Ukfreebsd mailing list