List Info

Thread: Error No NetBSD partition




Error No NetBSD partition
user name
2006-11-26 15:31:43
I _still_ don't have it right.  It's getting rather serious
as the
new disk I'm trying to boot is the only one with a complete
set of
data.

I did the following:

# fdisk -i wd1
# fdisk -0 -c /usr/mdec/mbr -u wd1
# fdisk -a wd1

# disklabel wd0 > protolabel
# vi protolabel
# disklabel -FrR wd1 protolabel

# newfs /dev/wd1a
Error No NetBSD partition
user name
2006-11-26 16:06:21
On Mon, Nov 27, 2006 at 12:31:43AM +0900, Henry Nelson
wrote:
> I _still_ don't have it right.  It's getting rather
serious as the
> new disk I'm trying to boot is the only one with a
complete set of
> data.
> 
> I did the following:
> 
> # fdisk -i wd1
> # fdisk -0 -c /usr/mdec/mbr -u wd1
> # fdisk -a wd1
> 
> # disklabel wd0 > protolabel
> # vi protolabel
> # disklabel -FrR wd1 protolabel
> 
> # newfs /dev/wd1a

Weird, the mail got cut off. Continuing from here I put the
data on the disk, and then executed the commands:

# mount /dev/wd1a /mnt
# cp /usr/mdec/boot /mnt
# umount /mnt
# installboot -o console=com0 -o speed=38400 /dev/rwd1a
/usr/mdec/bootxx_ffsv1

When I try to boot on that disk after moving it to the
master position
(now wd0), nothing comes across on the serial console, and
if I hook up
the monitor to the video card, all I get is "NetBSD MBR
boot    Error
No NetBSD partition".

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
Error No NetBSD partition
user name
2006-11-26 21:21:04
On Mon, Nov 27, 2006 at 01:06:21AM +0900, Henry Nelson
wrote:
> On Mon, Nov 27, 2006 at 12:31:43AM +0900, Henry Nelson
wrote:
> > I _still_ don't have it right.  It's getting
rather serious as the
> > new disk I'm trying to boot is the only one with a
complete set of
> > data.
> > 
> > I did the following:
> > 
> > # fdisk -i wd1
> > # fdisk -0 -c /usr/mdec/mbr -u wd1
> > # fdisk -a wd1
> > 
> > # disklabel wd0 > protolabel
> > # vi protolabel
> > # disklabel -FrR wd1 protolabel
> > 
> > # newfs /dev/wd1a
> 
> Weird, the mail got cut off. Continuing from here I put
the
> data on the disk, and then executed the commands:
> 
> # mount /dev/wd1a /mnt
> # cp /usr/mdec/boot /mnt
> # umount /mnt
> # installboot -o console=com0 -o speed=38400 /dev/rwd1a
/usr/mdec/bootxx_ffsv1
> 
> When I try to boot on that disk after moving it to the
master position
> (now wd0), nothing comes across on the serial console,
and if I hook up
> the monitor to the video card, all I get is
"NetBSD MBR boot    Error
> No NetBSD partition".

The 'mbr' boot code can only output to the bios console
device - which is
why the error message is output there.

You haven't given the output of 'fdisk wd1' or 'disklabel
wd1', but the
text 'No NetBSD partition' ought to be a clue!
The 'mbr' code has booted the active partition, but the
netbsd code in that
partition has failed to find a valid netbsd partition in the
MBR [1]

I suspect that you haven't set the partition type to 169 in
fdisk.

	David

[1] yes, it has to re-read sector zero and search the mbr
partition table
again in order to find the sector number it was read from.

-- 
David Laight: davidl8s.co.uk
Error No NetBSD partition
user name
2006-11-26 22:13:36
On Sun, Nov 26, 2006 at 09:21:04PM +0000, David Laight
wrote:
> On Mon, Nov 27, 2006 at 01:06:21AM +0900, Henry Nelson
wrote:
> > # fdisk -i wd1
> > # fdisk -0 -c /usr/mdec/mbr -u wd1
> > # fdisk -a wd1

So somewhere these commands are wrong or incomplete.

> > When I try to boot on that disk after moving it to
the master position
> > (now wd0), nothing comes across on the serial
console, and if I hook up
> > the monitor to the video card, all I get is
"NetBSD MBR boot    Error
> > No NetBSD partition".
> 
> The 'mbr' boot code can only output to the bios console
device - which is
> why the error message is output there.
> 
> You haven't given the output of 'fdisk wd1' or
'disklabel wd1', but the
> text 'No NetBSD partition' ought to be a clue!

It gave a clue, but I had no clue as to what went wrong. 
Last time it
"just worked".  Also, I was clueless as to the
meaning of the output of
'fdisk wd1' without proding.  NOW I notice there is only a
DOS partition,
but I still don't understand why.  (The disklabel seems to
be okay, other
than the partitions are not aligned on cylinders as
intended.)

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>

> I suspect that you haven't set the partition type to
169 in fdisk.

It appears so.  How is that done?  ("-s 169" ?)

Should the command I ran "# fdisk -0 -c /usr/mdec/mbr
-u wd1" be
"fdisk -0 -s 169 -c /usr/mdec/mbr -u wd1" instead?

I assume all data has on the disk has to be backed up ASAP. 
Should I
be mounting all partitions on that disk as type
"msdos" until I get the
data off?

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
Error No NetBSD partition
user name
2006-11-27 03:54:32
On Sun, Nov 26, 2006 at 09:21:04PM +0000, David Laight
wrote:
> I suspect that you haven't set the partition type to
169 in fdisk.

How is this done?

I've read the manual for fdisk over and over and cannot see
what option
is used to set the "partition type".  What other
types of partitions are
there besides 169?

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
Error No NetBSD partition
user name
2006-11-27 12:53:39
On 27 Nov 2006, at 12:54, Henry Nelson wrote:

> On Sun, Nov 26, 2006 at 09:21:04PM +0000, David Laight
wrote:
> > I suspect that you haven't set the partition type
to 169 in fdisk.
> 
> How is this done?
> 
> I've read the manual for fdisk over and over and cannot
see what option
> is used to set the "partition type".  What
other types of partitions are
> there besides 169?

'fdisk -l' gives list of possible types

Try 'fdisk -u wd0' which should take you through interactive
mode, one of options stepped through is to set partition
type. Last question is to confirm or otherwise if you want
changes written to disk so safe to go through a few times so
long as you answer N(o).


I've just had a nightmare upgrade of notebook from 30G to
80G hdd and 
find none of OS (Novell Dos, Ubuntu, XP, NetBSD), to be
consistent in 
partitioning, apart from need to use 255c x 63s to allow use
of 
Novell Dos 7. Worse is that mbr is changed by several
utilities even 
though option to leave mbr unchanged was selected. Ububtu
also now by 
default attempts to mount all partitions then on bootup
misidentifies 
type 169 (netbsd) as type 6 (dos) and after fsck proudly
announced it 
has corrected the errors it found :-(.

Anyway now just left with reinstall of NetBSD 3.0rc1 from
the vfat 
partition that holds the Acronis backup of XP and dumps of
NetBSD 
system. Currently NetBSD-4-beta is installed to see what
extra 
hardware is usable but original has lots of packages
installed and 
working nicely.

David

Error No NetBSD partition
user name
2006-11-27 21:57:21
On Mon, Nov 27, 2006 at 12:53:39PM -0000, David Lord wrote:
> On 27 Nov 2006, at 12:54, Henry Nelson wrote:
> > On Sun, Nov 26, 2006 at 09:21:04PM +0000, David
Laight wrote:
> > > I suspect that you haven't set the partition
type to 169 in fdisk.
> > 
> > How is this done?

It would be nice to get a "cookbook recipe" for
this.  (Preferably from
as many people as possible.  It's not as if it's
irresponsible to reveal
a dangerous command or anything to the clueless.  --  I just
got through
the 8 or so variations of "howto zero out a disk"
that I have in my notes,
many from rather well-known NetBSD gurus.  It became clear
that the bs
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've read the manual for fdisk over and over and
cannot see what option
> > is used to set the "partition type". 
What other types of partitions are
> > there besides 169?
> 
> 'fdisk -l' gives list of possible types

Thanks for confirming that.  I wasn't 100% sure that
"sysid" meant
"partition type".

> 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 had a nightmare upgrade of notebook from 30G
to 80G hdd and 

If you happen to have digitalized (not on scraps of paper
like me)
notes on this upgrade process that you can make public, they
would be
nice to have (on or off list, or web page).

> type 169 (netbsd) as type 6 (dos) and after fsck
proudly announced it 
> has corrected the errors it found :-(.

If you have cataracts, a lot of times you miss these
"proud announcements".
(Also one reason for shying away from interactive mode.)

> partition that holds the Acronis backup of XP and dumps
of NetBSD 
> system. Currently NetBSD-4-beta is installed to see
what extra 
> hardware is usable but original has lots of packages
installed and 
> working nicely.

Thanks for sharing this.  It really broadens the horizons
for me.

-- 
henry nelson
  WWW_HOME=http://yuba(dot)ne(dot)jp/(tilde)home
/
Error No NetBSD partition
user name
2006-11-28 18:41:23
On Tue, Nov 28, 2006 at 06:57:21AM +0900, Henry Nelson
wrote:
> 
> > 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).

Why?
fdisk has a lot more sanity check when run interactively,
and it will
give defaults for values that may be the ones you want.
The non-interactive version is really for scripts.
(Although nothing in the documentaton suggests this!)

	David

-- 
David Laight: davidl8s.co.uk
Error No NetBSD partition
user name
2006-11-28 22:15:44
On Tue, Nov 28, 2006 at 06:41:23PM +0000, David Laight
wrote:
> On Tue, Nov 28, 2006 at 06:57:21AM +0900, Henry Nelson
wrote:
> > > 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).
> 
> Why?

Mostly for reasons of poor eyesight and incoordination.  (=
the brain
doesn't get all the information it needs, and the fingers
don't move
the way the brain intended them too.)

> fdisk has a lot more sanity check when run
interactively, and it will
> give defaults for values that may be the ones you want.

I think for sectors and cylinder values (the -s option) that
is true.
(But I sure wish the default for NetBSD's fdisk would be a
single and
active NetBSD partition, and not DOS of all things.)

It seems clear that fdisk was intended to be run
interactively.  In my
case, unfortunately, that means more time required, more
care, and more
chance for error.

> The non-interactive version is really for scripts.

For me, scripts are the way to go.  Once it's finally done
correctly,
I get the expected results, no surprises.

> (Although nothing in the documentaton suggests this!)

There's a LOT missing from the fdisk and disklabel
documentation.
(I'm still stumped on the cylinder alignment business, but
I'll wait
for that until I get back to old scsi drives on sparc -- the
next
project.)

Thanks for all your help.  I think I've made some real
progress.

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

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