I'm surprised you didn't get an answer to this - but here goes.
You could try editting the partition table manually. You can boot linux,
so just take the first 512 bytes from each h/d (if you have extended
partitions you should be able to find them from the primary partitions),
open it up in a hex editor (like emacs in hexl mode, or whatever the
equivalent is in vi), and change those 0s to 83s.
The format of a partition table is fairly simple - a boot program,
followed by some space, followed by 4x16 byte entries for the
partitions, followed by a disk ID (which, for me, has always been 55aa -
not sure why). The 16 bytes for the partition entry are:-
bootable? 80-yes 00-no
01 02 03
Start of partition (CHS in the part - not sure how this works in LBA)
Partition type (05-extended 06-fat16 83-Linux 82-Linux swap 85-Linux
05 06 07
08 09 0a 0b
Partition start in LBA
0c 0d 0e 0f
Partition size in sectors
dd off the top 512 bytes from /dev/hd[abcd], edit them to get it right,
and dd them back on. Should work, although it's messy. Maybe someone
knows a cleaner way?
"Breathnach, Proinnsias (Dublin)" wrote:
>> Anyone know how to reset the partition types from within Linux when the type
> was set to 0
>> <Scenario mode=Dumb_Thing_To_Do>
> Decided I had to reinstall NT (dualboot) for various reasons:
> Booted Linux (SuSE 6.4), set all linux partitions to type 0 (so as to avoid
> a problem with NT's loader/installer)
> Ran NT setup, all went well,
> Booted from a rescue CD ... Mounted all original partitions ok (inc the
> reiserFS one)
> opened fdisk .... couldn't see the partitions ...
> The kernel and filesystems see all the partitions, and can mount them, fdisk
> (and friends) don't, so I can't retype them.
> gpart sees the first few (smaller ext2 partitions) but doesn't recognise the
> reiserFS one, and overspecs the swap partition at the end of the disk
>> Anyone out there ... Something like this *always* happens just as I get the
> system into a usable state ...
Software engineer, Informix Dublin.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!