Wim Lewis | 6 May 2009 09:15

Booting with root fs on another partition

I've installed NetBSD 4.0.1, and more recently 5.0, on a PPC Mac  
Mini. 4.0.1 works fine. And the 5.0 kernel seems to be fine. However,  
I can't figure out how to boot 5.0 so that its root filesystem is the  
partition containing the 5.0 userland --- it always mounts partition  
'a' as root, which holds 4.0.1. What I want to do is have partition  
'e' be the root when booting into 5.0. Is there  a way to do this?  
I've tried various likely-seeming permutations of open firmware  
commands to no avail.

Looking through the kernel sources, I found these lines in  
ofw_autoconf.c:

   186                 /* booted_partition = *p - '';         XXX  
correct? */

   353                 booted_partition = 0; /* XXX -- should be  
extracted from bootpath */

which kind of make me think that there is no way to specify the  
rootfs partition at boot time.

Any ideas? Am I barking up the wrong tree? I'd rather not wipe 4.0.1  
off of partition 'a' just yet.

Christos Zoulas | 6 May 2009 19:03

Re: Booting with root fs on another partition

In article <C05524E8-847A-4DFB-B7DF-22D40A653EA9 <at> hhhh.org>,
Wim Lewis  <wiml <at> hhhh.org> wrote:
>I've installed NetBSD 4.0.1, and more recently 5.0, on a PPC Mac  
>Mini. 4.0.1 works fine. And the 5.0 kernel seems to be fine. However,  
>I can't figure out how to boot 5.0 so that its root filesystem is the  
>partition containing the 5.0 userland --- it always mounts partition  
>'a' as root, which holds 4.0.1. What I want to do is have partition  
>'e' be the root when booting into 5.0. Is there  a way to do this?  
>I've tried various likely-seeming permutations of open firmware  
>commands to no avail.
>
>Looking through the kernel sources, I found these lines in  
>ofw_autoconf.c:
>
>   186                 /* booted_partition = *p - '';         XXX  
>correct? */
>
>   353                 booted_partition = 0; /* XXX -- should be  
>extracted from bootpath */
>
>which kind of make me think that there is no way to specify the  
>rootfs partition at boot time.
>
>Any ideas? Am I barking up the wrong tree? I'd rather not wipe 4.0.1  
>off of partition 'a' just yet.

Can you boot netbsd -a and type the root partition manually? Or create
a custom kernel with hard-coded root?

Someone who knows ofw, should fix it...
(Continue reading)

Wim Lewis | 9 May 2009 09:39

Re: Booting with root fs on another partition


On May 6, 2009, at 10:03 AM, Christos Zoulas wrote:
> Can you boot netbsd -a and type the root partition manually?

Good idea, but apparently not. (At first I had trouble passing boot  
flags to the kernel at all --- I think the problem was I was using an  
old version of ofwboot.xcf from 4.0.1.) The problem now is that the  
kernel doesn't recognize keyboard input when it's prompting for the  
root partition or for the path to init. Oddly, it does recognize the  
keyboard earlier in the boot process, if I pass -c to get the kernel  
config prompt; and of course it also has no trouble with the keyboard  
later, when the machine has finished booting up.

I guess that in between those points, the open firmware I/O routines  
are no longer being used but netbsd's own USB keyboard support isn't  
working yet.

What I'm doing is:
    At the open firmware '0>' prompt, typing 'boot -a' to get to the  
ofwboot 'Boot:' prompt
    At that prompt, typing '/netbsd5.gz -a' to boot the 5.0-GENERIC  
kernel downloaded from netbsd.org

The kernel then boots, and prompts for the name of the root  
partition, but doesn't respond to keyboard input; I have to power- 
cycle. Passing '-c' results in a functional ukc> dialogue, and  
passing no flag at all boots into multiuser mode w/o any problems  
(other than using the wrong partition for the root filesystem).

> Or create a custom kernel with hard-coded root?
(Continue reading)

Thor Lancelot Simon | 9 May 2009 20:51

Re: Booting with root fs on another partition

On Sat, May 09, 2009 at 12:39:50AM -0700, Wim Lewis wrote:
>
> I think I'll try to get a custom kernel to work. Does anyone know if it 
> *should* be possible to compile a working 5.0 kernel using 4.0.1's  
> tools?

Sure, if you use build.sh: build.sh tools kernel=FOO.

--

-- 
Thor Lancelot Simon	                                   tls <at> rek.tjls.com
    "Even experienced UNIX users occasionally enter rm *.* at the UNIX
     prompt only to realize too late that they have removed the wrong
     segment of the directory structure." - Microsoft WSS whitepaper

Wim Lewis | 9 May 2009 23:06

Re: Booting with root fs on another partition


On May 9, 2009, at 12:39 AM, Wim Lewis wrote:
> The problem now is that the kernel doesn't recognize keyboard input  
> when it's prompting for the root partition or for the path to init.

4.0.1 has a similar problem too, now that I test it. It prints the  
prompts for the root fs, dump/swap partition, and file system type,  
but does not pause for input, and just continues past that point,  
using the default values.

With 4.0.1:
   -a : prints prompts for disk partitions, but does not wait for  
input, boots multiuser
   -c : reaches a working UKC prompt; boots successfully if I type quit
   -s : prompts for path to init, responds to keyboard input, works  
normally

With 5.0-release:
   -a : prints prompts for disk partitions, but does not wait for  
input; then prompts for path to init, and does not respond to  
keyboard. must power-cycle.
   -c : working UKC, followed by successful boot to multiuser
   -s : prompts for path to init, responds to keyboard input, works  
normally

In all cases I'm now using the ofwboot.xcf from the 5.0(rc2) release  
(which prints a version number of 1.11), since it appears to have  
some bug fixes w.r.t. passing boot flags to the kernel.

Regarding my difficulty building a custom kernel, it looks like my  
(Continue reading)

Havard Eidnes | 13 May 2009 10:14
Picon

Package binaries for NetBSD/macppc 3.1 / pkgsrc-2009Q1

Hi,

I've uploaded the new results of a bulk rebuild of pkgsrc-2009Q1
done on NetBSD/macppc 3.1_STABLE to

   ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/powerpc/3.1_2009Q1/

A total of 5.8GB of packages were uploaded for a total of 6561
packages.

The source tree this was built from was updated Ap4 7, 2009.  For
now I'll continue updating and rebuilding for the pkgsrc-2009Q1
branch for this arch/os/os-version.

For the packages which are not architecture-specific (should be
the vast majority), these packages should also be usable on other
powerpc ports.

Regards,

- Håvard

Havard Eidnes | 15 May 2009 14:35
Picon

Re: Package binaries for NetBSD/macppc 5.0 / pkgsrc-2009Q1

Hi,

I've uploaded the results of a bulk rebuild of pkgsrc-2009Q1 done
on NetBSD/macppc 5.0_RC3 to

   ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/powerpc/5.0_2009Q1/

A total of 891MB packages were uploaded for a total of 505
packages.

The source tree this was built from was updated May 11, 2009, and the
list of the packages available in new versions or which were not
available earlier is: cdrtools-2.01.01alpha58.2nb1, dovecot-1.1.13nb1,
freetype2-2.3.9nb1, ghostscript-8.64nb3, gnutls-2.6.6,
instiki-0.9.2nb4, lcms-1.18nb2, libmodplug-0.8.7, mit-krb5-1.4.2nb8,
opensc-0.11.8, opensc-signer-0.11.8, p5-Catalyst-Devel-1.10,
p5-CatalystX-CRUD-YUI-0.015, phpmyadmin-2.11.9.5, poppler-0.10.6,
poppler-includes-0.10.6, poppler-qt-0.10.6, poppler-qt4-0.10.6,
poppler-utils-0.10.6, ruby-1.8.7.160, ruby-mode-1.8.7.160,
ruby18-1.8.7.160, ruby18-base-1.8.7.160, ruby18-curses-1.8.7.160,
ruby18-gdbm-1.8.7.160, ruby18-readline-1.8.7.160, ruby18-tk-1.8.7.160,
typolight-2.6.7nb2, xine-lib-1.1.16.2nb1, and xpdf-3.02pl3.

As indicated above, the build was done on a machine running
NetBSD 5.0_RC3.  For the packages which are not architecture-
specific (should be the vast majority), these packages should
also be usable on other powerpc ports.

Regards,

(Continue reading)

Havard Eidnes | 16 May 2009 13:53
Picon

Re: Package binaries for NetBSD/macppc 4.0 / pkgsrc-2009Q1

Hi,

I've uploaded the new results of a bulk rebuild of pkgsrc-2009Q1
done on NetBSD/macppc 4.0 to

   ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/powerpc/4.0_2009Q1/

A total of 1.3GB of packages were uploaded for a total of 739
packages.  The packages available in new versions, or which were
not available earlier are: dovecot-1.1.13nb1, drupal-5.16,
freetype2-2.3.9nb1, ghostscript-8.64nb3, gnutls-2.6.6, imp-4.3.3,
instiki-0.9.2nb4, libmodplug-0.8.7, mapserver-4.0nb5,
mit-krb5-1.4.2nb8, ntop-3.3.8, opensc-0.11.8,
opensc-signer-0.11.8, phpmyadmin-2.11.9.5, poppler-0.10.6,
poppler-includes-0.10.6, poppler-qt-0.10.6, poppler-qt4-0.10.6,
poppler-utils-0.10.6, ruby-1.8.7.160, ruby-mode-1.8.7.160,
ruby18-1.8.7.160, ruby18-base-1.8.7.160, ruby18-curses-1.8.7.160,
ruby18-gdbm-1.8.7.160, ruby18-readline-1.8.7.160,
ruby18-tk-1.8.7.160, sarg-2.1nb3, typolight-2.6.7nb2,
xine-lib-1.1.16.2nb1, and xpdf-3.02pl3.

The source tree this was built from was updated May 11, 2009.
For now I'll continue updating and rebuilding for the
pkgsrc-2009Q1 branch for this arch/os/os-version.

For the packages which are not architecture-specific (should be
the vast majority), these packages should also be usable on other
powerpc ports.

Regards,
(Continue reading)

Niels S. Eliasen | 20 May 2009 15:48
Picon

pmset alternative on NetBSD

Hi guys
In searching for the possibility to have my NetBSD box autorestart  
after powerfailure....
I stumbled upon the "pmset" utility.... which is MacOSX/Darwin  
only......

What similar utility is there on NetBSD ?

kind regards

nse

"Ach, crivens, what a wee snotter....."

Quote from "The Wee Free Men" by Terry Pratchett

Havard Eidnes | 21 May 2009 13:28
Picon

Re: Package binaries for NetBSD/macppc 3.1 / pkgsrc-2009Q1

Hi,

I've uploaded the new results of a bulk rebuild of pkgsrc-2009Q1
done on NetBSD/macppc 3.1_STABLE to

   ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/powerpc/3.1_2009Q1/

A total of 1.1GB of packages were uploaded for a total of 750
packages.  The packages available in new versions or which were not
available before are: cdrtools-2.01.01alpha58.2nb1, clamav-0.95.1nb1,
digikam-doc-0.9.5, dovecot-1.1.13nb1, drupal-5.16, freetype2-2.3.9nb1,
ghostscript-8.64nb3, gnutls-2.6.6, gwenview-1.4.2nb2, imp-4.3.3,
instiki-0.9.2nb4, k3b-1.0.5nb1, kadu-0.5.0nb2, kdeartwork-3.5.10nb1,
kdebase-3.5.10nb2, kdemultimedia-3.5.10nb1, lcms-1.18nb2,
libkdcraw-0.1.8, libkipi-0.1.6, libmodplug-0.8.7,
libnbcompat-20090413, mapserver-4.0nb5, mit-krb5-1.4.2nb8, ntop-3.3.8,
opensc-0.11.8, opensc-signer-0.11.8, p7zip-4.65, parrot-1.0.0,
pbzip2-1.0.5, phpmyadmin-2.11.9.5, pkg_install-20090406,
poppler-0.10.6, poppler-includes-0.10.6, poppler-qt-0.10.6,
poppler-utils-0.10.6, randrproto-1.3.0, ruby-1.8.7.160,
ruby-mode-1.8.7.160, ruby18-1.8.7.160, ruby18-base-1.8.7.160,
ruby18-curses-1.8.7.160, ruby18-gdbm-1.8.7.160,
ruby18-readline-1.8.7.160, ruby18-tk-1.8.7.160, sarg-2.1nb3,
seamonkey-gtk1-1.1.16, taskjuggler-2.4.1, typolight-2.6.7nb2,
unrealircd-3.2.7nb2, xine-arts-1.1.16.2, xine-lib-1.1.16.2nb1,
xpdf-3.02pl3, and xscreensaver-5.08.

The source tree this was built from was updated May 13, 2009.  For
now I'll continue updating and rebuilding for the pkgsrc-2009Q1
branch for this arch/os/os-version.
(Continue reading)


Gmane