question: deleting/undeleting disk partitions 

Newsgroups: alt.solaris.x86,comp.os.misc,comp.os.linux.misc,comp.unix.solaris

>Can anyone recommend/ point to some source where I can get info on
>reading/editing disk partition tables?

I guess I'm answering my own question here, but what the hell — thanks to all who replied anyway. Andries Brower at http://www.win.tue.nl/~aeb/partitions/partition_tables.html has lots of useful info. Also I found a shareware program DiskEdit from Vinoj Software that lets you edit partition tables in hex. I used it to zero out everything from x1BE through x1FD, in effect deleting the master partition table, then created a solaris overlay (without overwriting existing partitions, and then restored the appropriate entries in the partition table by hand. Easy enough!

question: deleting/undeleting disk partitions 

>partitions.  Rather than backing up and restoring very large
>partitions, I've saw a post (via deja) about a workaround which
>involves effectively hiding surrounding partitions by temporarily
>deleting them.  Later one can undelete them by restoring some entries
>in the partition table.

I've done this using Linux fdisk, but only on systems which had Windows and Linux, so I can't speak to what Solaris might do.

The Linux fdisk program (as of a couple of years ago anyway) was non-destructive, as least as far as Linux goes. (I had a disk that had 20 partitions on it —don't ask— and RedHat and SuSe installers would crash when they saw that many. I had to delete them, do the install (on a partition =< 16), then put them back with Linux fdisk. The filesystems on those "high" partitions were unaffected.

I've also "re-typed" partitions to hide them from Windows and Linux installers. Windows looks for the signature byte on booting and applies letters to the drives. RedHat looks for Linux signatures when you do an update (although now, I believe it lists the ones it finds and asks which is the partition to update). Linux fdisk has a number of signatures you can put on a partition which are ignored by Windows, etc.

Dave Brown Austin, TX

question: deleting/undeleting disk partitions 

>on pc type systems with the dos partition scheme the mbr can only
>define 4 partitions and each extended partition (dos format anyways)
>was restricted to 4 additional.  this would allow up to 16 usable
>partiotions and 4 extended ("real") partitions. this in concept allows
>20 partitions with the first 4 allways used as extended.  it would be
>concievably possible to have extended within extended to get more,
>however I don't know if this is possible.
>
>comment?

Uh-uh. There can only be one extended partition, but said extended partition can contain any number of logical partitions[0]. The first extended partition in the MBR points to a certain sector on the drive, which contains another 446-byte boot record and a 64-byte partition table.

The partition table in this sector contains an entry describing a logical partition, and a pointer to the next 512-byte sector that contains the next logical partition.[1] This is the standard in the x86 world; other architectures have very different ways of doing things, and certain x86 OSes like *BSD can use a "whole disk" way of doing things that is incompatible with a standard PC partition table. The standard is there so that the x86 BIOS can find a valid partition and start a bootloader without straining its little mind.

[0] Sort of. In Linux, an IDE disk with more than 63 partitions will have all partitions after the 63rd unusable. The limit is 15 for SCSI disks. Most people find they can live with these limits. [1] The details may be wrong here; it's late and I can't find my technical reference on this crud.

Matt G