|
|
| Problem with a corrupted disklabel |

|
2006-05-11 09:50:08 |
Hi all,
I am trying to re-install NetBSD following a crash or
something which
caused my Jornada 720 to stop working.
I have followed the instructions from the Palmtop NetBSD
article by
Michael Lucas as I did previously. I am able to disklabel,
format and
install everything using NetBSD running in a QEMU emulator
on a Linux host.
The problem comes when I try to then boot my Jornada. It
starts out OK,
hpcboot loads and starts the kernel, but then I get the
following
errors reported:
wd0: disklabel corrupted
no file system for wd0 (dev 0x1000)
cannot mount root, error = 79
It seems odd that the disklabel could be corrupted since I
can
read/write the flash disk just fine from the QEMU machine.
Doing a disklabel -e on the QEMU machine I see the
following:
# /dev/wd2d
type: ESDI
disk: SAMSUNG CF/ATA
label: netbsd
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 1010
total sectors: 1018080
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 1001696 16384 4.2BSD 1024 8192 45536 # (Cyl.
16*- 1009)
c: 1001696 16384 unused 0 0 # (Cyl.
16*- 1009)
d: 1018080 0 unused 0 0 # (Cyl.
0 - 1009)
e: 16321 63 MSDOS # (Cyl.
0*- 16*)
Since I had this system working on this CF card once before
I am sure it
can be made to work again, I am just not sure what is wrong.
Anyone see a problem with the info above?
Any suggestions what else I may need to look at to get this
going again?
Any help is much appreciated!
Thanks
Rich
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 10:25:16 |
Richard Danter wrote:
>I am trying to re-install NetBSD following a crash or
something which
>caused my Jornada 720 to stop working.
>I have followed the instructions from the Palmtop NetBSD
article by
>Michael Lucas as I did previously. I am able to
disklabel, format and
>install everything using NetBSD running in a QEMU
emulator on a Linux host.
>The problem comes when I try to then boot my Jornada. It
starts out OK,
>hpcboot loads and starts the kernel, but then I get the
following
>errors reported:
> wd0: disklabel corrupted
> no file system for wd0 (dev 0x1000)
> cannot mount root, error = 79
>It seems odd that the disklabel could be corrupted since
I can
>read/write the flash disk just fine from the QEMU
machine.
>Doing a disklabel -e on the QEMU machine I see the
following:
># /dev/wd2d
>type: ESDI
>disk: SAMSUNG CF/ATA
>label: netbsd
>flags:
>bytes/sector: 512
>sectors/track: 63
>tracks/cylinder: 16
>sectors/cylinder: 1008
>cylinders: 1010
>total sectors: 1018080
>rpm: 3600
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0 # microseconds
>track-to-track seek: 0 # microseconds
>drivedata: 0
>16 partitions:
># size offset fstype [fsize bsize cpg/sgs]
> a: 1001696 16384 4.2BSD 1024 8192 45536 #
(Cyl. 16*- 1009)
> c: 1001696 16384 unused 0 0 #
(Cyl. 16*- 1009)
> d: 1018080 0 unused 0 0 #
(Cyl. 0 - 1009)
> e: 16321 63 MSDOS #
(Cyl. 0*- 16*)
>Since I had this system working on this CF card once
before I am sure it
>can be made to work again, I am just not sure what is
wrong.
>Anyone see a problem with the info above?
Your problem is that NetBSD/i386 uses 16 partitions,
NetBSD/hpcarm only
8, so the disklabels don't match up.
Robert Swindells
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 10:46:02 |
Robert Swindells said the following:
> Your problem is that NetBSD/i386 uses 16 partitions,
NetBSD/hpcarm only
> 8, so the disklabels don't match up.
Thanks Robert. How do I recover this? I tried to edit the
disklabel to
give it just 8 partitions but that did not work (same
error). Is there
something else I need to do? Did I miss something when I set
this up to
end up with 16 instead of 8 partitions??
Thanks
Rich
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 10:52:13 |
On Thursday 11 May 2006 11:46, Richard Danter wrote:
> Robert Swindells said the following:
> > Your problem is that NetBSD/i386 uses 16
partitions, NetBSD/hpcarm only
> > 8, so the disklabels don't match up.
>
> Thanks Robert. How do I recover this? I tried to edit
the disklabel to
> give it just 8 partitions but that did not work (same
error). Is there
> something else I need to do? Did I miss something when
I set this up to
> end up with 16 instead of 8 partitions??
Hi,
This is how i disklabeled my flash disk.
http://wiki.onetbsd.org/index.php/How_to_inst
all_NetBSD_on_a_hpcarm
Hope that helps.
Mark
--
The NetBSD CVS Digest http://digest.coris.org.uk
RSS feed http://d
igest.coris.org.uk/feeds/cvs-rss.xml
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 14:35:19 |
Mark Kirby said the following:
> On Thursday 11 May 2006 11:46, Richard Danter wrote:
>> Robert Swindells said the following:
>>> Your problem is that NetBSD/i386 uses 16
partitions, NetBSD/hpcarm only
>>> 8, so the disklabels don't match up.
>> Thanks Robert. How do I recover this? I tried to
edit the disklabel to
>> give it just 8 partitions but that did not work
(same error). Is there
>> something else I need to do? Did I miss something
when I set this up to
>> end up with 16 instead of 8 partitions??
>
> Hi,
>
> This is how i disklabeled my flash disk.
>
> http://wiki.onetbsd.org/index.php/How_to_inst
all_NetBSD_on_a_hpcarm
>
Hi Mark,
Thanks for the link. Problem is that my partitions are
already made and
disklabel does not seem to let me delete them. Is there a
way to get the
CF back to how it was before I installed NetBSD on it so I
can go
through the process again?
Could it be that there is something else wrong with the disk
label?
Thanks
Rich
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 14:58:04 |
On Thursday 11 May 2006 15:35, Richard Danter wrote:
> Hi Mark,
>
> Thanks for the link. Problem is that my partitions are
already made and
> disklabel does not seem to let me delete them. Is there
a way to get the
> CF back to how it was before I installed NetBSD on it
so I can go
> through the process again?
According to the man page you can do disklabel -D which
should delete all
labels.
-D
Delete all existing labels (by 1's complimenting the magic
number) before
writing any labels to their default location. Implies -r If
-D is specified
without a request to write the label, then existing labels
are just deleted.
If that doesnt work im afraid i dont know. This is a bit too
low level for
me
Mark
--
The NetBSD CVS Digest http://digest.coris.org.uk
RSS feed http://d
igest.coris.org.uk/feeds/cvs-rss.xml
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 16:04:34 |
Mark Kirby said the following:
> On Thursday 11 May 2006 15:35, Richard Danter wrote:
>> Hi Mark,
>>
>> Thanks for the link. Problem is that my partitions
are already made and
>> disklabel does not seem to let me delete them. Is
there a way to get the
>> CF back to how it was before I installed NetBSD on
it so I can go
>> through the process again?
>
> According to the man page you can do disklabel -D which
should delete all
> labels.
>
> -D
> Delete all existing labels (by 1's complimenting the
magic number) before
> writing any labels to their default location. Implies
-r If -D is specified
> without a request to write the label, then existing
labels are just deleted.
>
Thanks Mark. For some reason my version of disklabel does
not have the
-D option. <sigh>
Rich
|
|
| Problem with a corrupted disklabel |

|
2006-05-11 20:44:21 |
On Thu, May 11, 2006 at 05:04:34PM +0100, Richard Danter
wrote:
> Thanks Mark. For some reason my version of disklabel
does not have the
> -D option. <sigh>
That only got added post 3.0
If you hexdump the start of the disk, the label is
(probably) in sector
0 (or maybe sector 1, or maybe the first (or second) sector
of a netbsd
mbr partition). In any case writing zeros to the sector
with 'dd'
will zap it (but you might have to use disklabel -W to make
the label
unprotected [1]).
David
[1] run 'sleep 9999 </dev/rwdxd' in another window (or
with &) to keep the
diak open.
--
David Laight: david l8s.co.uk
|
|
| Problem with a corrupted disklabel |

|
2006-05-12 17:31:09 |
David Laight said the following:
> On Thu, May 11, 2006 at 05:04:34PM +0100, Richard
Danter wrote:
>> Thanks Mark. For some reason my version of
disklabel does not have the
>> -D option. <sigh>
>
> That only got added post 3.0
>
> If you hexdump the start of the disk, the label is
(probably) in sector
> 0 (or maybe sector 1, or maybe the first (or second)
sector of a netbsd
> mbr partition). In any case writing zeros to the
sector with 'dd'
> will zap it (but you might have to use disklabel -W to
make the label
> unprotected [1]).
>
> David
>
> [1] run 'sleep 9999 </dev/rwdxd' in another window
(or with &) to keep the
> diak open.
>
Still no luck... I dd'd a load of zeros and then
re-disklabeled it,
format and installed. When I put the CF card in the Jornada
though WinCE
says that the card needs to be formatted. Now I can't seem
to get back
to a state where I can even see the DOS partitions on both
WinCE and NetBSD.
Feels like it is getting worse.
I tried letting WinCE format, then going back to NetBSD and
re-disklabeling and formatting again. When I put the card
back in the
Jornada it does not complain about needing to be formatted,
but it also
does not see the files I copied to the DOS partition.
Any other ideas?
Many thanks
Rich
|
|
| Problem with a corrupted disklabel |

|
2006-05-16 09:57:43 |
Richard Danter said the following:
> David Laight said the following:
>> On Thu, May 11, 2006 at 05:04:34PM +0100, Richard
Danter wrote:
>>> Thanks Mark. For some reason my version of
disklabel does not have the
>>> -D option. <sigh>
>> That only got added post 3.0
>>
>> If you hexdump the start of the disk, the label is
(probably) in sector
>> 0 (or maybe sector 1, or maybe the first (or
second) sector of a netbsd
>> mbr partition). In any case writing zeros to the
sector with 'dd'
>> will zap it (but you might have to use disklabel -W
to make the label
>> unprotected [1]).
>>
>> David
>>
>> [1] run 'sleep 9999 </dev/rwdxd' in another
window (or with &) to keep the
>> diak open.
>>
>
> Still no luck... I dd'd a load of zeros and then
re-disklabeled it,
> format and installed. When I put the CF card in the
Jornada though WinCE
> says that the card needs to be formatted. Now I can't
seem to get back
> to a state where I can even see the DOS partitions on
both WinCE and NetBSD.
I fixed it! Woo hoo! The DOS partition table had also become
corrupted
and I was able to fix that using fdisk. So between fdisk and
disklabel I
can now get the kernel running.
There is a new problem, I will start a new thread for that
though.
Thanks to all who helped with this one!
Rich
|
|