List Info

Thread: Error No NetBSD partition




Error No NetBSD partition
user name
2006-11-28 11:49:34
On Tue, Nov 28, 2006 at 03:35:16AM -0000, David Lord wrote:
> On 28 Nov 2006, at 6:57, Henry Nelson wrote:
> > field is somewhat of preference, and that there is
no "best" way, _but
> > there is a "right" way_.  It would be
nice to have the same guide for
> > fdisk, too.  Otherwise, I will spend another some
weeks going through all
> > the possible permeations.  TIA)
> 
> I'm not so sure there is one right way as mostly there
are several 
> different methods that will work.

You're absolutely right.  (My English suffers a bit.)

> > > Try 'fdisk -u wd0' which should take you
through interactive mode, one of
> > 
> > This is where my troubles have begun, I would like
to run fdisk on the
> > command line NON-interactively (use the -f
option).
> > 
> > So far I have one example on how to do this:
"/sbin/fdisk -v -v -f -u -0
> >  -s 169/63/2001825 wd1".  Somehow I managed
to botch this, but I hope to
> > re-try Saturday night.  (Although I still don't
understand why two "-v"s
> > would be necessary  --  the reason for wanting
multiple real-life examples.)
> 
> I've just looked back through the thread and see you
mention disk has 
> data on it and fdisk indicated it to have a dos
partition.
> Did you try to mount the dos partition to see if any
data was there?

It says DOS partition, but it sure acts and feels like
NetBSD.  Anyway,
all of the data has been backed up on another disk and
compared (diff).
No need to worry about the data (except that all the
partitions on the
backup disk (wd0) are like 96-98% capacity.  When I have
more time I will
zero out the whole disk (the new one, wd1) and start over.

> I also noted that your fdisk -s option doesn't
correspond to the
> 12594897 of the dos partition. You didn't give the full
fdisk output 

Right, that was another person's example.  For the
particular disk of this
thread, I _thought_ the -s option should have been: "-s
169/63/12596850",
for the disk which probed as (`dmesg | grep wd1`):
wd1 at atabus0 drive 1: <ST36421A>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 6150 MB, 13330 cyl, 15 head, 63 sec, 512 bytes/sect x
12596850 sectors

This information agrees with the manufacturer's
specification.

Sorry about not posting all of the fdisk output:  For the
record, it is:
============================================================
===============
% fdisk wd1
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 13330, heads: 15, sectors/track: 63 (945
sectors/cylinder)
total sectors: 12596850

BIOS disk geometry:
cylinders: 784, heads: 255, sectors/track: 63 (16065
sectors/cylinder)
total sectors: 12594960

Partition table:
0: Primary DOS with 32 bit FAT - LBA (sysid 12)
    start 63, size 12594897 (6150 MB, Cyls 0-784), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
============================================================
===============

Ah-ha.  So fdisk uses the "BIOS disk geometry" and
disklabel uses the
"NetBSD disklabel disk geometry".  I think this
explains why I've been
having troubles.  I used the "NetBSD disklabel disk
geometry" parameters
for fdisk. :(

If that is true, it really needs to be in the man pages for
both fdisk
and disklabel.

> I don't have the procedure mapped out as there were too
many 
> disasters and much backtracking along the way so very
messy. I'll try 
> to write something up then post a link. I restored
NetBSD 3.0 earlier 

Those "disasters and much backtracking along the way so
very messy" is
exactly what is needed to gleen knowledge of how to
troubleshoot.

> tonight so job completed except from size of /netbsd 
I'd guess I've 

Congratulations!

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
Error No NetBSD partition
user name
2006-11-28 16:37:52
On 28 Nov 2006, at 20:49, Henry Nelson wrote:

> > I've just looked back through the thread and see
you mention disk has 
> > data on it and fdisk indicated it to have a dos
partition.
> > Did you try to mount the dos partition to see if
any data was there?
> 
> It says DOS partition, but it sure acts and feels like
NetBSD.  Anyway,
> all of the data has been backed up on another disk and
compared (diff).
> No need to worry about the data (except that all the
partitions on the
> backup disk (wd0) are like 96-98% capacity.  When I
have more time I will
> zero out the whole disk (the new one, wd1) and start
over.

You might find it easier to use  NetBSD install cd or
floppies to 
fdisk and partition the new disk with just single new disk
as wd0 so 
you don't risk the existing data. You can crash out before
actually 
installing or go through install to check you have a working

destination system. Then fit old disk back as wd0 and new as
wd1 and 
newfs then restore to destination partitions on wd1.
 
> > I also noted that your fdisk -s option doesn't
correspond to the
> > 12594897 of the dos partition. You didn't give the
full fdisk output 
> 
> Right, that was another person's example.  For the
particular disk of this
> thread, I _thought_ the -s option should have been:
"-s 169/63/12596850",
> for the disk which probed as (`dmesg | grep wd1`):
> wd1 at atabus0 drive 1: <ST36421A>
> wd1: drive supports 16-sector PIO transfers, LBA
addressing
> wd1: 6150 MB, 13330 cyl, 15 head, 63 sec, 512
bytes/sect x 12596850 sectors
> 
> This information agrees with the manufacturer's
specification.
> 
> Sorry about not posting all of the fdisk output:  For
the record, it is:
>
============================================================
===============
> % fdisk wd1
> Disk: /dev/rwd1d
> NetBSD disklabel disk geometry:
> cylinders: 13330, heads: 15, sectors/track: 63 (945
sectors/cylinder)
> total sectors: 12596850

If with your -s option you start at offset 63 you need to
subtract 63 
from the total sectors or possibly use '$' in place of size
in order 
to autosize to end of disk.

David

Error No NetBSD partition
user name
2006-11-28 22:26:20
On Tue, Nov 28, 2006 at 04:37:52PM -0000, David Lord wrote:
> On 28 Nov 2006, at 20:49, Henry Nelson wrote:
> You might find it easier to use  NetBSD install cd or
floppies to 
> fdisk and partition the new disk with just single new
disk as wd0 so 
> you don't risk the existing data. You can crash out
before actually 

Until I had a disk give out on me suddenly this summer with
extremely
important data on it, that is the way I always did it.  It
was just a
stroke of luck that the new disk was prepared in time.  I
really need
a script that will let me prepare a new disk in a matter of
minutes
--  not hours or days that the install always ends up as (my
fault,
not the install disk).

> If with your -s option you start at offset 63 you need
to subtract 63 
> from the total sectors or possibly use '$' in place of
size in order 
> to autosize to end of disk.

Yes, I think '$' is the way to go.  It seems that the last
sector on
some disks isn't accessable, so it sometimes has to be
[(total sectors)
-63 -1].

Thanks again.

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )