[Solved] Network booting

This forum is for all other ARMv5 devices

[Solved] Network booting

Postby BuffaloM » Mon Mar 05, 2012 1:56 am

Has anyone set up netbooting on an oxnas pogoplug? Searching iPXE didn't come up with anything, but I thought I'd ask in case there was a way I didn't know to search for. I'd rather not have to spin up a harddrive if I don't have to.
Last edited by BuffaloM on Sun Mar 11, 2012 4:15 am, edited 1 time in total.
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am

Re: Network booting

Postby WarheadsSE » Mon Mar 05, 2012 2:00 am

uboot + tftp + nfs.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Network booting

Postby BuffaloM » Wed Mar 07, 2012 3:14 am

Thanks. This gave me the starting point I was looking for.
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am

Re: Network booting

Postby BuffaloM » Fri Mar 09, 2012 2:07 am

So...
$this->bbcode_second_pass_code('', '>>setenv bootargs root=/dev/nfs rw nfsroot=192.168.0.1:/var/exports/pogoplug-root console=ttyS0,115200 elevator=cfq mem=128M
>>tftp 61000000 uImage.nopci
>>bootm 61000000')

Results in this message and then a kernel panic:
VFS: cannot open root device "nfs" or unknown-block(0,255)

Do I need to compile a new kernel? I thought before I start down that path I'd ask (since it won't be tonight).
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am

Re: Network booting

Postby WarheadsSE » Fri Mar 09, 2012 2:12 am

Hmm, true.. I just realized I don't have NFS built in.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Network booting

Postby BuffaloM » Sat Mar 10, 2012 4:40 am

I'm reasonable close at this point. There's still some work to do because it's not able to actually load the root filesystem over nfs. I see it making a mount request in the server's log, but it's too late to debug. In case anyone else is trying to figure this out at some point in the future and I forget to give a full status update, at least here's what helped so far.

I started with WareheadSE's PRO.config file and:

added
CONFIG_ROOT_NFS=y
CONFIG_IP_PNP=y
CONFIG_EXTRA_FIRMWARE="gmac_copro_firmware"
CONFIG_EXTRA_FIRMWARE_DIR="/var/exports/progoplug-root/lib/firmware/"

changed
CONFIG_SYNOPSYS_GMAC=m
to
CONFIG_SYNOPSYS_GMAC=y

and I also unset CONFIG_PCI


Then I cross-compiled a new uImage against the modified .config

There were also some additional options needed in the uBoot
$this->bbcode_second_pass_code('', '
setenv ipaddr 192.168.0.3
setenv serverip 192.168.0.2
setenv gatewayip 192.168.0.1
setenv netmask 255.255.255.0
setenv hostname pogoplug
setenv ip ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off
setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:/var/exports/pogoplug-root console=ttyS0,115200 mem=128M
')
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am

Re: Network booting

Postby BuffaloM » Sun Mar 11, 2012 4:24 am

$this->bbcode_second_pass_quote('BuffaloM', 'I')'m reasonable close at this point. There's still some work to do because it's not able to actually load the root filesystem over nfs.

Fresh eyes showed it was mounting the filesystem, but then failing later when trying to access it. The issue turned out to be set-oxnas-mac which brings down eth0, sets the mac and then brings it back up. Or in the case of a nfsroot netboot, fails to bring it back up.

editing /etc/rc.conf to stop loading of set-oxnas-mac solves this. E.g., editing DAEMONS to have !set-oxnas-mac as in:
DAEMONS=(!set-oxnas-mac !hwclock syslog-ng network netfs crond sshd openntpd)

Alternately, editing /etc/rc.d/set-oxnas-mac to comment out ifconfig eth0 down seems to work too plus it can still set the mac without taking the interface down (arp tables show the mac change takes) and it fixes the led.

Thanks WarheadsSE and crimsonredmk for pointing me in the right direction from the beginning. That saved a lot of time hunting down a net boot solution.
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am

Re: Network booting

Postby BuffaloM » Tue Oct 09, 2012 3:00 am

$this->bbcode_second_pass_quote('BuffaloM', '
')There were also some additional options needed in the uBoot


This was missing the ip argumet in the bootargs. It should be:
$this->bbcode_second_pass_code('', '
setenv ipaddr 192.168.0.3
setenv serverip 192.168.0.2
setenv gatewayip 192.168.0.1
setenv netmask 255.255.255.0
setenv hostname pogoplug
setenv ip ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off
setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:/var/exports/pogoplug-root ${ip} console=ttyS0,115200 mem=128M
')

or to speed up the pasting, which seems to only like one line at a time (but can take some length):
$this->bbcode_second_pass_code('', '
setenv ipaddr 192.168.0.3; setenv serverip 192.168.0.2; setenv gatewayip 192.168.0.1; setenv netmask 255.255.255.0; setenv hostname pogoplug

setenv ip ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off; setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:/var/exports/pogoplug-root ${ip} console=ttyS0,115200 mem=128M

tftp 61000000 uImage; bootm 61000000
')
BuffaloM
 
Posts: 17
Joined: Tue Jan 10, 2012 3:23 am


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 32 guests

cron