Pixel wrote:

"John Danielson, II" <[EMAIL PROTECTED]> writes:


Something that just happened to me made me think that documenting a particular
recovery process would help many people:

How to get your /etc/fstab file edited from a floppy boot when your
partitioning is set up to have a separate /usr part:

Go into maintenance shell, as the e2fsck fails due to it thinking from the
/etc/fstab that a partition is /dev/hda5 when it is /dev/hda6 (or some such
radically wrong number, part 5 should always be the extended part table).

[...]


Just a thought, but could flesh out the procedure if wanted for newbie to know
how to edit /etc/fstab from what a floppy boot drops to when an unrecoverable
bad superblock error is triggered by diskdrake assigning /dev/hda5 to first
extended part and not allowing for the extended part table(and then erroring
as it is created, but still offering to write the /etc/fstab, which I did let
it do last night at 1 AM). diskdrake defaults optional things like
/cookermirror to extended\logical type, but fails to set up an exclusion of
part 5 for the extended part table and writes a /dev/hda5 entry in /etc/fstab
for the new part if it is the first logical created on a physical disk--
sheesh. Then it decides the extended part table has a bad superblock because
is trying to use it as a partition that can be read to and written to directly.

i'm missing something. what is this "part 5 being special"?



Any system that has EVER had a file system with Windows or DOS on it has the following part structure.

Part #s 1-4 can be primary.
Part #5 is always an extended part table to hold logical drives.
Parts 6 and up can be logicals.

Anyone with a multiboot box which has windows, or who never wiped the HD to retain data they wanted to still use with that data on FAT or FAT32 parts will end up using partition managers based on what they have. Things like PM 8, PM 7, anything based on a FAT O/S host, will indeed renumber a part 5 to 6 and encapsulate it in a part 5 that is a table showing start and end points of the logical drives within the extended partition.

Relevance to us??? We have one HECK of a lot of migrators who like the GUI of Mandrake better than RedHat or others.

Even Ranish Part does this, when you tell it you want a logical part it builds an extended shell for the logical, then builds the logical inside it. Diskdrake does not, and this is a migration issue not a pure Linux only issue-- but how many of us are discussing growth, the need for revenue, and the need to meet the needs of migrators to get more users???

Diskdrake offers a preference, and lists logical and primary. When I try to build a second part on a drive with one primary part, and the part name is one I type in, the following happens:

1. Part shows in display of parts as second part in line (fine, but I did not tell ti what kind, I let it default to whatever). I have told it type Ext3FS.
2. When I then tell it to format, it says you have to reboot before you can do this.
3. When it asks if you want the changes written to /etc/fstab, what will a newbie do??? Say ok, let it do that, probably-- nothing obvious tells him not to, he does not know the reason for or consequences of the failure to format.
4. Now, we have a problem-- the part table has a begin and end mark for an Ext type part (but everything I can use other than Diskdrake says it is actually a marked as type EXt2 in the part table itself on HD, not an Ext3 and /etc/fstab got written as if the part was there and valid as a type Ext3 as part 5(it assumed logical type, used part 5)).
5. So, newbie then gets out his faithful floppy bootable toolkit, the one he knows how to use-- the one that has DOS based Part tools in it.
6. He looks at his part, sees his tools not only think is wrong type, but that they will not format it, because no extended part table surrounds it. None of those tools have the ability to slightly relocate the existing part, encapsulate in an extended table, and make the table unnumbered, they all number it 5 in the master part table and do a chain pointer to begin of extended part table as begin of part 5 which to their eyes has no data except that table for logicals. So, he wipes it and reboots and runs into this catch 22 where fstab is now out if sync, or he creates the part in an extended as a logical and then the extended table start point ends up being primary 5 in the resulting part table, but Linux at boot is looking still for a data part in 5 because the fstab got written for a part that no longer exists.
7. Linux runs Ext2fs, Ext2fs fails because the extended part TABLE has no superblock and therefore it MUST be invalid.
8. Boot fails, newbie is caught in the catch 22 I proposed a document solution to get out of.
9. I, as a migrating newbie, lost about 300 hours of time (and about 5 GIG of data 6 times) figuring out what the heck was going on. I have been using computers since they were as big as closets and literally used TTYs (teletypes that had paper tape readers, ours were literally Western Union retreads).

I cannot sell a migration that cannot be phased and is has the worst catch-22s doced at minimum. At best, the software migrated to should get along with the software being migrated FROM if possible. what I do now to get around this, is to make and format parts in PM 8.0, then mount in Diskdrake afterwards. The very worst thing for a newbie is no video, the second is a radical crash at boot because he was not told the differences relevant to him in at least general terms.

Either the differences between the Unix and DOS file systems need to be doced in print-- plus diskdrake needs to NOT mod /etc/fstab after an error like this (it needs to absolutely NOT write anything that causes a boot dump under these circs, and if it is to behave like anything a newbie would understand it should also say "I am sorry, I cannot do this this way." and roll back to the previous part table by writing same from a backup of the old part table) OR the way out linuxwise needs to be in a printed getting started manual's troubleshooting section AND diskdrake needs a printed mini-manual that can be used for reference if boot fails, and the procedure above needs to be in the troubleshooting area.

I will even tell you why this is done, the extended part table-- Windows and DOS based tools can resize the extended and keep the logicals intact if the extended area is not fully allocated. If the logicals are shrunk, then the whole extended are can be shrunk to the new total sizes plus slack for CHS boundary imposition. I do things this way all the time now, but a newbie is not going to spend many hours figuring out what happened-- most will just stay with what they have and tell 17 friends that Linux stinks. That gives Linux Evangelists something ELSE to overcome. And a fix now(or a higher priority fix) would eliminate the problem sooner that more and more newbies will face as they migrate.

Capishe???

John.






Reply via email to