back to partition tables, gpart http://www.stud.uni-hannover.de/user/76201/gpart/ has been reported as good. It guesses where the partition boundaries should be from analysing the disk, it ignores the partition table, ie it is for situations where the pert table is known to be buggered.
heres a sample output from my box (hangs head in shame whil revealing fat partition) and a fdisk -l from the same partition. gpart /dev/hda Begin scan... Possible partition(DOS FAT), size(9538mb), offset(0mb) Possible partition(Linux swap), size(956mb), offset(9538mb) Possible partition(Linux ext2), size(27666mb), offset(10495mb) End scan. Checking partitions... Partition(DOS or Windows 95 with 32 bit FAT, LBA): primary Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Ok. Guessed primary partition table: Primary partition(1) type: 012(0x0C)(DOS or Windows 95 with 32 bit FAT, LBA) size: 9538mb #s(19534977) s(63-19535039) chs: (0/1/1)-(1023/254/63)d (0/1/1)-(1215/254/63)r Primary partition(2) type: 130(0x82)(Linux swap or Solaris/x86) size: 956mb #s(1959928) s(19535040-21494967) chs: (1023/254/63)-(1023/254/63)d (1216/0/1)-(1337/254/61)r Primary partition(3) type: 131(0x83)(Linux ext2 filesystem) size: 27666mb #s(56661248) s(21494970-78156217) chs: (1023/254/63)-(1023/254/63)d (1338/0/1)-(4864/254/56)r Primary partition(4) type: 000(0x00)(unused) size: 0mb #s(0) s(0-0) chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r fdisk -l /dev/hda Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 1216 9767488+ c Win95 FAT32 (LBA) /dev/hda2 1217 1338 979965 82 Linux swap /dev/hda3 1339 4865 28330627+ 83 Linux On Tue, 28 Oct 2003 13:04:59 +1300 Volker Kuhlmann <[EMAIL PROTECTED]> wrote: > > I am happy to be corrected, but that's what I'd do. i.e. remove linux's > > partitions and re-install if that's in any way practical. > > I mostly agree. The partition table needs to be fixed up, the only way > to change partition entries is to delete them first, then to recreate > them. There is no need to back up any data before doing this, if you > recreate a partition which is wrong, just change it back. For testing > whether a partition might be correctly created in the parition table, > mount it read-only. If it doesn't barf, you're go. If it barfs, > probably the partition boundaries don't correlate with the file system, > or (less likely) the filesystem is corrupted, e.g. missing superblock. > A corrupted filesystem needs to be fsck'ed, there's a minor risk this > does it in completely. > > Obviously, before doing this you send fdisk -l to the printer. > > Even more obviously, you are just experiencing first-hand what "back up > your partition table" means, and what happens if you don't. A while > back I sternly told a friend to back it up, a few months later, he > comes and says you know, you were right - I just spent 2 days finding > the files I really needed. > > Be very careful with off-by-one errors, some fdisk programs start > counting at 1, some at 0. > > There's no need with any fancy purpose-built rescue tom's bla bla stuff > (unless you don't have a cdrom drive). Distros have a bootable rescue > system on their CDs. SuSE has a good one, RH has a crappy one, and > Knoppix has one too - of course one can say Knoppix *is* a rescue > system... ;) Booting one of these will make your life much easier than > booting some whatever from a floppy. > > Volker > > -- > Volker Kuhlmann is possibly list0570 with the domain in header > http://volker.dnsalias.net/ Please do not CC list postings to me. > -- Nick Rout <[EMAIL PROTECTED]>