* BSD disklabel problem ...
@ 2001-08-13 14:36 Peter Mittermayer
2001-08-13 16:23 ` Michal Jaegermann
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Peter Mittermayer @ 2001-08-13 14:36 UTC (permalink / raw)
To: axp-list
Hi,
Finally I succeeded in installing the ide disk. I booted redhat and
started fdisk.
I created a nsd disklabel (partition c only) taalking default values and
switching type to 8 (ext2). Then I rebooted. The disk was recognized by
the kernel and the partition as hda3. I used mke2fs to format the disk
and (unfortunately) moved data from the old disk to the new one. After
the next reboot however the disk was no longer accessible with the
message 'corrupt partition table'.
What happened? What can I do to repair the partition table? How can I
get my data back??
Please help!!!!
Peter
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: BSD disklabel problem ...
2001-08-13 14:36 BSD disklabel problem Peter Mittermayer
@ 2001-08-13 16:23 ` Michal Jaegermann
2001-08-14 6:58 ` Gregor Maier
2001-08-13 16:36 ` unsubscribe Ing. Mario Alejandro Juárez Gutiérrez
2001-08-13 17:46 ` BSD disklabel problem Falk Hueffner
2 siblings, 1 reply; 11+ messages in thread
From: Michal Jaegermann @ 2001-08-13 16:23 UTC (permalink / raw)
To: axp-list
On Mon, Aug 13, 2001 at 04:36:54PM +0200, Peter Mittermayer wrote:
>
> Finally I succeeded in installing the ide disk. I booted redhat and
> started fdisk.
That would be the first time I heard of that fdisk influences if
a disk is accessible or not (I mean not partitions, which cannot
be seen if they do not exist, but a disk as a whole).
> I created a nsd disklabel (partition c only) taalking default values and
> switching type to 8 (ext2).
Why 'c'? Do you want to imply by that that you put the whole disk
into that partition?
> Then I rebooted. The disk was recognized by
> the kernel and the partition as hda3. I used mke2fs to format the disk
> and (unfortunately) moved data from the old disk to the new one.
Your data still should be there unless you did something truly
destructive. How about backups?
> After
> the next reboot however the disk was no longer accessible with the
> message 'corrupt partition table'.
>
> What happened?
Who knows? Somehow I have an impression that you are telling only a
small part of the story. Did you, by any chance, have done something
like 'swriteboot -f3 ...' without leaving a space for it?
OTOH maybe you simply have a bad disk cable and/or connectors? That
would be consistent with intermitent failures. In case you do not know
IDE specs allow for a maximum cable length of 18" (about 45 cm) but I
heard of cases when cables over 14" were too long. With ATA disks and
80-wire cables this seems to be less popular but lots of older IDE parts
were barely within specs if not below.
> What can I do to repair the partition table?
If you roughly know parameters of your original partition table
then you can rewrite it back to the initial state as many times as
you wish. This does not affect your data at all and, unless you did
something truly weird, your filesystem metadata as well. Also
'gpart' utility (http://home.pages.de/~michab/gpart/) knows about
BSD disk label kind of partitioning as well. Still first make sure
that your hardware actually works.
> How can I
> get my data back??
There are always things like 'mke2fs -S', 'debugfs' and 'dd' when things
are really messed up. But hard disks do fail from time to time
totally irrespective of OS, kinds of partitioning and so on ...
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-13 16:23 ` Michal Jaegermann
@ 2001-08-14 6:58 ` Gregor Maier
2001-08-14 8:08 ` Peter Mittermayer
2001-08-14 15:34 ` Michal Jaegermann
0 siblings, 2 replies; 11+ messages in thread
From: Gregor Maier @ 2001-08-14 6:58 UTC (permalink / raw)
To: axp-list
I also experienced some problems with bsd disklabels. Every time I used BSD
disklabels on the second disk (sdb) it went fine for some time. But after 2 or
3 reboots the partiton table was gone. After restoring the partition table it
was the same again.
I saw this in several AS200 and AS2000 machines. AFAIK never used the c
partition. And I never had any problems with bsd disklabels on the first disk.
I also tried to leave about 5 MB free altough I didn't install aboot there (but
just to make sure it isn't that problem).
Maybe a problem with fdisk?
Because I know of the fdisk bug (I think this is corrected now) that shows to
much sectors in fdisk while in BSD disklabel mode - so I left the last sector
free.
Gregor
On 13-Aug-2001 Michal Jaegermann wrote:
> On Mon, Aug 13, 2001 at 04:36:54PM +0200, Peter Mittermayer wrote:
>>
>> Finally I succeeded in installing the ide disk. I booted redhat and
>> started fdisk.
>
> That would be the first time I heard of that fdisk influences if
> a disk is accessible or not (I mean not partitions, which cannot
> be seen if they do not exist, but a disk as a whole).
>
>> I created a nsd disklabel (partition c only) taalking default values and
>> switching type to 8 (ext2).
>
> Why 'c'? Do you want to imply by that that you put the whole disk
> into that partition?
>
>> Then I rebooted. The disk was recognized by
>> the kernel and the partition as hda3. I used mke2fs to format the disk
>> and (unfortunately) moved data from the old disk to the new one.
>
> Your data still should be there unless you did something truly
> destructive. How about backups?
>
>> After
>> the next reboot however the disk was no longer accessible with the
>> message 'corrupt partition table'.
>>
>> What happened?
>
> Who knows? Somehow I have an impression that you are telling only a
> small part of the story. Did you, by any chance, have done something
> like 'swriteboot -f3 ...' without leaving a space for it?
>
> OTOH maybe you simply have a bad disk cable and/or connectors? That
> would be consistent with intermitent failures. In case you do not know
> IDE specs allow for a maximum cable length of 18" (about 45 cm) but I
> heard of cases when cables over 14" were too long. With ATA disks and
> 80-wire cables this seems to be less popular but lots of older IDE parts
> were barely within specs if not below.
>
>> What can I do to repair the partition table?
>
> If you roughly know parameters of your original partition table
> then you can rewrite it back to the initial state as many times as
> you wish. This does not affect your data at all and, unless you did
> something truly weird, your filesystem metadata as well. Also
> 'gpart' utility (http://home.pages.de/~michab/gpart/) knows about
> BSD disk label kind of partitioning as well. Still first make sure
> that your hardware actually works.
>
>> How can I
>> get my data back??
>
> There are always things like 'mke2fs -S', 'debugfs' and 'dd' when things
> are really messed up. But hard disks do fail from time to time
> totally irrespective of OS, kinds of partitioning and so on ...
>
> Michal
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 14-Aug-2001
Time: 08:52:31
----------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-14 6:58 ` Gregor Maier
@ 2001-08-14 8:08 ` Peter Mittermayer
2001-08-14 9:01 ` Gregor Maier
2001-08-14 15:34 ` Michal Jaegermann
1 sibling, 1 reply; 11+ messages in thread
From: Peter Mittermayer @ 2001-08-14 8:08 UTC (permalink / raw)
To: axp-list
Is there any reason why not to use normal (dos) disklabels instead of
bsd on the second disk if there are problems wihth the bsd labels?
Peter
Gregor Maier wrote:
>
> I also experienced some problems with bsd disklabels. Every time I used BSD
> disklabels on the second disk (sdb) it went fine for some time. But after 2 or
> 3 reboots the partiton table was gone. After restoring the partition table it
> was the same again.
> I saw this in several AS200 and AS2000 machines. AFAIK never used the c
> partition. And I never had any problems with bsd disklabels on the first disk.
> I also tried to leave about 5 MB free altough I didn't install aboot there (but
> just to make sure it isn't that problem).
> Maybe a problem with fdisk?
>
> Because I know of the fdisk bug (I think this is corrected now) that shows to
> much sectors in fdisk while in BSD disklabel mode - so I left the last sector
> free.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-14 8:08 ` Peter Mittermayer
@ 2001-08-14 9:01 ` Gregor Maier
2001-08-14 9:17 ` Peter Mittermayer
0 siblings, 1 reply; 11+ messages in thread
From: Gregor Maier @ 2001-08-14 9:01 UTC (permalink / raw)
To: axp-list
On 14-Aug-2001 Peter Mittermayer wrote:
>
>
> Is there any reason why not to use normal (dos) disklabels instead of
> bsd on the second disk if there are problems wihth the bsd labels?
>
> Peter
>
No. I've done this later to solve my problem. But it took quite some time to
figure out what the real problem was. I just would have prefered bsd labels so
that my system usese just one type.. but nevermind.
I just posted this message to show that there may be some strange behaviour
with disklabels without any reason for this. (Why does it work on the first
disk but not on the second for the SAME hd's with the same partition table...)
Gregor
----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 14-Aug-2001
Time: 10:57:36
----------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-14 9:01 ` Gregor Maier
@ 2001-08-14 9:17 ` Peter Mittermayer
2001-08-14 9:35 ` Gregor Maier
2001-08-14 15:49 ` Michal Jaegermann
0 siblings, 2 replies; 11+ messages in thread
From: Peter Mittermayer @ 2001-08-14 9:17 UTC (permalink / raw)
To: axp-list
Seems not to be so easy. Everytime I want to create a new non-BSD
partition I get a segmentation fault ...
I'm doing the following:
I delete the BSD partition, write the disklabel, change to DOS disklabel
('r') and press 'n' to create a new partition
But when pressing n I get the segmentation fault ...
Peter
Gregor Maier wrote:
>
> On 14-Aug-2001 Peter Mittermayer wrote:
> >
> >
> > Is there any reason why not to use normal (dos) disklabels instead of
> > bsd on the second disk if there are problems wihth the bsd labels?
> >
> > Peter
> >
>
> No. I've done this later to solve my problem. But it took quite some time to
> figure out what the real problem was. I just would have prefered bsd labels so
> that my system usese just one type.. but nevermind.
>
> I just posted this message to show that there may be some strange behaviour
> with disklabels without any reason for this. (Why does it work on the first
> disk but not on the second for the SAME hd's with the same partition table...)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: BSD disklabel problem ...
2001-08-14 9:17 ` Peter Mittermayer
@ 2001-08-14 9:35 ` Gregor Maier
2001-08-14 15:49 ` Michal Jaegermann
1 sibling, 0 replies; 11+ messages in thread
From: Gregor Maier @ 2001-08-14 9:35 UTC (permalink / raw)
To: axp-list
On 14-Aug-2001 Peter Mittermayer wrote:
> Seems not to be so easy. Everytime I want to create a new non-BSD
> partition I get a segmentation fault ...
>
> I'm doing the following:
> I delete the BSD partition, write the disklabel, change to DOS disklabel
> ('r') and press 'n' to create a new partition
>
> But when pressing n I get the segmentation fault ...
Hmm, I've never seen this.
Maybe you can try to exit fdisk after writing the disklabel / switching to dos,
or you could try to go directly to DOS disklabels without deleting the bsd
disklabel.
If all else fails you could overwrite the partion table by hand. (e.g. create a
filesystem on the whole disk or write bogus data /dev/sdX).
But I don't know if this will be a solution - I would say it isn't but if all
else fails...
Gregor
PS: Maybe you can make a low level format (done by the scsi-hostadapter) if you
have scsi disk.
> Gregor Maier wrote:
>>
>> On 14-Aug-2001 Peter Mittermayer wrote:
>> >
>> >
>> > Is there any reason why not to use normal (dos) disklabels instead of
>> > bsd on the second disk if there are problems wihth the bsd labels?
>> >
>> > Peter
>> >
>>
>> No. I've done this later to solve my problem. But it took quite some time to
>> figure out what the real problem was. I just would have prefered bsd labels
>> so
>> that my system usese just one type.. but nevermind.
>>
>> I just posted this message to show that there may be some strange behaviour
>> with disklabels without any reason for this. (Why does it work on the first
>> disk but not on the second for the SAME hd's with the same partition
>> table...)
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 14-Aug-2001
Time: 11:29:48
----------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: BSD disklabel problem ...
2001-08-14 9:17 ` Peter Mittermayer
2001-08-14 9:35 ` Gregor Maier
@ 2001-08-14 15:49 ` Michal Jaegermann
1 sibling, 0 replies; 11+ messages in thread
From: Michal Jaegermann @ 2001-08-14 15:49 UTC (permalink / raw)
To: axp-list
On Tue, Aug 14, 2001 at 11:17:35AM +0200, Peter Mittermayer wrote:
> Seems not to be so easy. Everytime I want to create a new non-BSD
> partition I get a segmentation fault ...
>
> I'm doing the following:
> I delete the BSD partition, write the disklabel, change to DOS disklabel
> ('r') and press 'n' to create a new partition
>
> But when pressing n I get the segmentation fault ...
This is a bug in fdisk which I reported to the author, and to Red Hat,
already a number of times. I even provided some patches (and a list
of steps to cause segmentation fault with a 100% success rate :-).
To workaround that "wipe" an initial portion of the disk writing to it
nulls from /dev/zero with a help of dd. One or two K should be enough.
There is no "magic" in using either kind of partitioning if information
you put there is correct. Both work just fine. BSD-type disklabel
is limited to eight partitions total. With "FAT-style" you may have
more but, for a change, it is so hacky in places and has so many "dark
corners" that you really do not want to know details. :-)
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-14 6:58 ` Gregor Maier
2001-08-14 8:08 ` Peter Mittermayer
@ 2001-08-14 15:34 ` Michal Jaegermann
1 sibling, 0 replies; 11+ messages in thread
From: Michal Jaegermann @ 2001-08-14 15:34 UTC (permalink / raw)
To: axp-list
On Tue, Aug 14, 2001 at 08:58:19AM +0200, Gregor Maier wrote:
>
> Because I know of the fdisk bug (I think this is corrected now) that shows to
> much sectors in fdisk while in BSD disklabel mode - so I left the last sector
> free.
Yes, indeed. There was historically such bug but you have to have a
rather old fdisk to be bitten. A default end value for the last
partition was off by one and you were offered a partition reaching one
sector past a total capacity of your disk (displayed a little bit
earlier on your screen and this value was correct). If you would accept
that bad value this could have nasty consequences but you would have
actually write something into that "wrap-around" area (not that you have
much control where physically you are really writing).
I do not recall when this was fixed but a considerable time ago.
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* unsubscribe
2001-08-13 14:36 BSD disklabel problem Peter Mittermayer
2001-08-13 16:23 ` Michal Jaegermann
@ 2001-08-13 16:36 ` Ing. Mario Alejandro Juárez Gutiérrez
2001-08-13 17:46 ` BSD disklabel problem Falk Hueffner
2 siblings, 0 replies; 11+ messages in thread
From: Ing. Mario Alejandro Juárez Gutiérrez @ 2001-08-13 16:36 UTC (permalink / raw)
To: axp-list
Peter Mittermayer escribió:
> Hi,
>
> Finally I succeeded in installing the ide disk. I booted redhat and
> started fdisk.
>
> I created a nsd disklabel (partition c only) taalking default values and
> switching type to 8 (ext2). Then I rebooted. The disk was recognized by
> the kernel and the partition as hda3. I used mke2fs to format the disk
> and (unfortunately) moved data from the old disk to the new one. After
> the next reboot however the disk was no longer accessible with the
> message 'corrupt partition table'.
>
> What happened? What can I do to repair the partition table? How can I
> get my data back??
>
> Please help!!!!
>
> Peter
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: BSD disklabel problem ...
2001-08-13 14:36 BSD disklabel problem Peter Mittermayer
2001-08-13 16:23 ` Michal Jaegermann
2001-08-13 16:36 ` unsubscribe Ing. Mario Alejandro Juárez Gutiérrez
@ 2001-08-13 17:46 ` Falk Hueffner
2 siblings, 0 replies; 11+ messages in thread
From: Falk Hueffner @ 2001-08-13 17:46 UTC (permalink / raw)
To: axp-list
Peter Mittermayer <p.mittermayer@astro.univie.ac.at> writes:
> I created a nsd disklabel (partition c only) taalking default values
> and switching type to 8 (ext2). Then I rebooted. The disk was
> recognized by the kernel and the partition as hda3. I used mke2fs to
> format the disk and (unfortunately) moved data from the old disk to
> the new one. After the next reboot however the disk was no longer
> accessible with the message 'corrupt partition table'.
Partition c is by convention used to denote the whole disk. It is not
for putting a file system on, since it spans *really* the *whole*
disk, including the partition table. You should make additional
partitions to put filesystems on, even if you want only a single
partition. Remember to leave ~5MB empty before the start of the first
"real" partition to have space for aboot.
> What happened? What can I do to repair the partition table? How can
> I get my data back??
Try mounting the device itself, e. g. sda, instead of sda3.
Falk
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-08-14 15:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-13 14:36 BSD disklabel problem Peter Mittermayer
2001-08-13 16:23 ` Michal Jaegermann
2001-08-14 6:58 ` Gregor Maier
2001-08-14 8:08 ` Peter Mittermayer
2001-08-14 9:01 ` Gregor Maier
2001-08-14 9:17 ` Peter Mittermayer
2001-08-14 9:35 ` Gregor Maier
2001-08-14 15:49 ` Michal Jaegermann
2001-08-14 15:34 ` Michal Jaegermann
2001-08-13 16:36 ` unsubscribe Ing. Mario Alejandro Juárez Gutiérrez
2001-08-13 17:46 ` BSD disklabel problem Falk Hueffner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox