bao.mengqian | 15 Oct 2011 01:51
Picon

booting the Gdium

Dear list, I am trying to run NetBSD on my Gdium and cannot seem to get
the booting process right. I have succesfully booted OpenBSD on this
machine before so I am aware of the eccentricities of the PMON
bootloader. The OpenBSD devs solved this problem by passing the OpenBSD
loader as the kernel and the real OpenBSD kernel as the initrd to PMON.
In the case of NetBSD however, I was unable to find a bootloader binary
for the evbmips/GDIUM platform.

Logs tell me that Manuel Bouyer and Macallan are lead developers of this
port. And since Macallan announced in a blog post he was now able to
run NetBSD in multiuser mode on the Gdium, I am hoping he would share
his method of actually booting this machine.

Up till now I have been succesful in running the NetBSD kernel only, by
directly passing it to PMON as the kernel file. Of course, when the
kernel finishes loading, it cannot find its rootfs as I did not specify
any (can this be passed with a 'root=' parameter, like Linux uses?).

Thank you for your efforts in keeping the Gdium platform alive ;)

-bmq (what's in a handle anyway?)

Manuel Bouyer | 17 Oct 2011 12:33

Re: booting the Gdium

On Sat, Oct 15, 2011 at 01:51:19AM +0200, bao.mengqian <at> gmail.com wrote:
> Dear list, I am trying to run NetBSD on my Gdium and cannot seem to get
> the booting process right. I have succesfully booted OpenBSD on this
> machine before so I am aware of the eccentricities of the PMON
> bootloader. The OpenBSD devs solved this problem by passing the OpenBSD
> loader as the kernel and the real OpenBSD kernel as the initrd to PMON.
> In the case of NetBSD however, I was unable to find a bootloader binary
> for the evbmips/GDIUM platform.

I've a plan to port the OpenBSD boot loader to NetBSD, but this is
not done yet (for several reasons I've been distracted from loongson
developements, but I still intend to work on this).

> 
> Logs tell me that Manuel Bouyer and Macallan are lead developers of this
> port. And since Macallan announced in a blog post he was now able to
> run NetBSD in multiuser mode on the Gdium, I am hoping he would share
> his method of actually booting this machine.
> 
> Up till now I have been succesful in running the NetBSD kernel only, by
> directly passing it to PMON as the kernel file. Of course, when the
> kernel finishes loading, it cannot find its rootfs as I did not specify
> any (can this be passed with a 'root=' parameter, like Linux uses?).

No (in fact, if it doesn't find its root device, it's probably because
it can't get anything from the pmon variables. It does find its root
device on the fuulong). But you can build a kernel where the root device is
hardcoded: in the config file, change:
config          netbsd  root on ? type ?
to match your root device, e.g.
(Continue reading)

Manuel Bouyer | 17 Oct 2011 22:05

Re: booting the Gdium

On Mon, Oct 17, 2011 at 09:24:36PM +0200, ??? wrote:
> > No (in fact, if it doesn't find its root device, it's probably because
> > it can't get anything from the pmon variables. It does find its root
> > device on the fuulong). But you can build a kernel where the root device is
> > hardcoded: in the config file, change:
> > config          netbsd  root on ? type ?
> > to match your root device, e.g.
> > config          netbsd  root on sd0 type ?
> >
> > That is neat! So, in fact NetBSD scans available media for BSD-style
> partitions upon boot? That is sweet!

Yes it does, but it doesn't use this to select automatically a boot device,
only to (eventually) find a boot partition once the boot device is
known.

> 
> It is however trivial to configure new variables in PMON, so if you could
> quote some that Fuloong uses, that could also prove useful.

The problem is that, from what I understood, gdium's pmon is so brocken
it's impossible to read pmon variables or command line from the os.

> 
> Am I correct in concluding that NetBSD will not find its rootfs when that is
> placed on an ext2-formatted partition? Since the kernel seems so flexible
> in locating its rootfs, I am betting that was what I observed this weekend.

if you use 'type ?' the root filesystem can be on any filesystem type that
the kernel knwos about. So ext2 should work.
(Continue reading)

Manuel Bouyer | 18 Oct 2011 22:19

Re: booting the Gdium

On Tue, Oct 18, 2011 at 10:22:53PM +0200, bao.mengqian <at> gmail.com wrote:
> >
> Then I change my hypothesis to NetBSD not recognizing its rootfs when it is
> installed on a non-BSD partition type. Since I prepared the "boot disk" on a
> Linux system, I was unable to create the BSD-style partitions hierarchy which
> is native to BSD. My next move is to find a way to create a flash drive which
> holds one ext2-formatted, Linux-style partition  to hold the kernel (for PMON)
> and besides that the BSD-style partitions which will hold the rootfs. 

The install kernel should allow you to do that, but you'll have to do it by
hand. there's no support in sysinst for that yet.

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

bao.mengqian | 18 Oct 2011 22:22
Picon

Re: booting the Gdium

On 22:05 17 Oct 11, Manuel Bouyer wrote:
> On Mon, Oct 17, 2011 at 09:24:36PM +0200, ??? wrote:
> > > No (in fact, if it doesn't find its root device, it's probably because
> > > it can't get anything from the pmon variables. It does find its root
> > > device on the fuulong). But you can build a kernel where the root device is
> > > hardcoded: in the config file, change:
> > > config          netbsd  root on ? type ?
> > > to match your root device, e.g.
> > > config          netbsd  root on sd0 type ?
> > >
> > > That is neat! So, in fact NetBSD scans available media for BSD-style
> > partitions upon boot? That is sweet!
> 
> Yes it does, but it doesn't use this to select automatically a boot device,
> only to (eventually) find a boot partition once the boot device is
> known.
> 
> > 
> > It is however trivial to configure new variables in PMON, so if you could
> > quote some that Fuloong uses, that could also prove useful.
> 
> The problem is that, from what I understood, gdium's pmon is so brocken
> it's impossible to read pmon variables or command line from the os.
> 
> > 
> > Am I correct in concluding that NetBSD will not find its rootfs when that is
> > placed on an ext2-formatted partition? Since the kernel seems so flexible
> > in locating its rootfs, I am betting that was what I observed this weekend.
> 
> if you use 'type ?' the root filesystem can be on any filesystem type that
(Continue reading)


Gmane