[opensuse-arm] NFS root fs
Hello Guys, i wonder if it is possible to boot opensuse-arm JeOS, e.g. this image http://download.opensuse.org/ports/armv6hl/factory/images/openSUSE-Factory-A... from an nfs share and what adjustments have to be made to the bootloader or vice versa. Background: i have a pi v1 and want to use my DLink NAS as nfs server to boot from. I found a few tutorials on the net, but none is suitable for opensuse. Can anybody give me a guide to the pi part to accomplish this? so far i have: - A nfs share with no_root_squash and insecure (if necessary) flags, - A small (2gb) sd card, - A pi (obviously) - no glue how i can add boot parameters. Any help appreciated and thanks in advance. markus -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Markus Weber wrote:
Hello Guys,
i wonder if it is possible to boot opensuse-arm JeOS, e.g. this image http://download.opensuse.org/ports/armv6hl/factory/images/openSUSE-Factory-A... from an nfs share and what adjustments have to be made to the bootloader or vice versa.
Background: i have a pi v1 and want to use my DLink NAS as nfs server to boot from. I found a few tutorials on the net, but none is suitable for opensuse. Can anybody give me a guide to the pi part to accomplish this?
so far i have: - A nfs share with no_root_squash and insecure (if necessary) flags, - A small (2gb) sd card, - A pi (obviously) - no glue how i can add boot parameters.
Any help appreciated and thanks in advance. markus
Hi Markus, It is my understanding that the Raspberry Pi v. 1 (at least models A & B) requires an SD card to boot. This is because the ARM core needs to load firmware from the FAT partition to actually enable the CPU. One of the books I have (Raspberry Pi Hacks - O'Reilly) actually says it cannot boot from any other device. And here (http://raspberrypi.stackexchange.com/questions/10489/how-does-raspberry-pi-b...) is a decent explanation of how the Pi boots. However, after the firmware is loaded, we load U-Boot rather than a kernel directly. And U-Boot might be able to load a kernel on a NFS file system. I don't know if this will work for the Pi, but here's the link (http://www.denx.de/wiki/view/DULG/LinuxNfsRoot). I'm guessing the process would look something like: -ARM core loads firmware off SD card -U-Boot is loaded -U-Boot looks for kernel/initrd on NFS You'd still need the SD card for the firmware and U-Boot, but possibly the rest of the system could be over NFS. This is an interesting idea, I'm curious to know how it goes. - Alex A. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Fri 24 Apr 2015 09:36:12 NZST +1200, Alex Armstrong wrote:
I'm guessing the process would look something like: -ARM core loads firmware off SD card -U-Boot is loaded -U-Boot looks for kernel/initrd on NFS
You can't really do that. The kernel is required for your network interfaces and a whole lot of other things. Currently uboot loads kernel and initrd from SD card. Once the kernel is loaded the rootfs is somehow established. The question was for an NFS root fs, not to boot from NFS. That should be possible and probably isn't really different from a desktop NFS rootfs. The network hardware drivers and the NFS fs kernel module need to be in the initrd, plus all your basic network configuration. It's called a thin client, and I thought Linux distros were able to do that some while back. When hardware prices dropped it became unfashionable. I'd probably start with setting this up for a desktop box, then transfer it to the pi. Volker -- Volker Kuhlmann http://volker.top.geek.nz/ Please do not CC list postings to me. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 24.04.2015 um 04:49 schrieb Volker Kuhlmann:
On Fri 24 Apr 2015 09:36:12 NZST +1200, Alex Armstrong wrote:
I'm guessing the process would look something like: -ARM core loads firmware off SD card -U-Boot is loaded -U-Boot looks for kernel/initrd on NFS
You can't really do that. The kernel is required for your network interfaces and a whole lot of other things. Currently uboot loads kernel and initrd from SD card.
Once the kernel is loaded the rootfs is somehow established. The question was for an NFS root fs, not to boot from NFS. That should be possible and probably isn't really different from a desktop NFS rootfs. The network hardware drivers and the NFS fs kernel module need to be in the initrd, plus all your basic network configuration. [...]
What's different from an x86 setup is that you'll need to regenerate the boot.scr file (from boot.script, which defines the bootargs) via mkimage tool. If you feel like tweaking boot.scr more, you could also use uEnv.txt to the same effect, to spare yourself future mkimage calls. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Thanks for all your help and sorry for the late reply (had a busy weekend). If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions? Is it then possible to boot without an tftp server? As i have no experience with booting from nfs, rootfs on nfs (as there might be a difference) and uboot. Can anybody give me a hint on how work from here step by step? -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Mon 27 Apr 2015 20:43:32 NZST +1200, Markus Weber wrote:
Is it then possible to boot without an tftp server?
Yes, from SD card. The boot loader needs to load kernel and initrd. These two then start the rest of the system. IIUC you can load kernel and initrd over the network, but only via tftp, not nfs, provided the boot loader supports it (u-boot does). The RPi has no mass storage so you need to insert an SD card with the boot loader anyway. You might as well save yourself the trouble, at least at first, of the tftp part and store kernel/initrd on the SD card as well. Smaller steps are easier. I'd suggest you use a Linux desktop NFS server first to avoid D-Link induced NFS problems. You can move later. Test the NFS server with another Linux box first! Then you make sure your initrd contains all network and NFS drivers and configure the Linux boot loader (in initrd) to load the rootfs from NFS. Volker -- Volker Kuhlmann http://volker.top.geek.nz/ Please do not CC list postings to me. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 27/04/2015 10:43, Markus Weber a écrit :
Thanks for all your help and sorry for the late reply (had a busy weekend).
If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions?
Is it then possible to boot without an tftp server?
Yes. Kernel and initrd can be downloaded using NFS instead of TFTP. Guillaume -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 27.04.2015 um 15:53 schrieb Guillaume Gardet:
Le 27/04/2015 10:43, Markus Weber a écrit :
Thanks for all your help and sorry for the late reply (had a busy weekend).
If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions?
Is it then possible to boot without an tftp server?
Yes. Kernel and initrd can be downloaded using NFS instead of TFTP.
... if U-Boot were configured to enable such options for all relevant devices. Have you ensured that in our package? In the previous version there was a distro header being prepared for such purposes, I think. Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 27/04/2015 17:46, Andreas Färber a écrit :
Le 27/04/2015 10:43, Markus Weber a écrit :
Thanks for all your help and sorry for the late reply (had a busy weekend).
If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions?
Is it then possible to boot without an tftp server? Yes. Kernel and initrd can be downloaded using NFS instead of TFTP. ... if U-Boot were configured to enable such options for all relevant devices. Have you ensured that in our package? In the previous version
Am 27.04.2015 um 15:53 schrieb Guillaume Gardet: there was a distro header being prepared for such purposes, I think.
U-Boot has a prompt, so you can play with all enabled commands, including NFS. ;) But it could be interesting to have a preconfigured NFS boot where people just update server IP and shared folder. Guillaume -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 27.04.2015 um 18:02 schrieb Guillaume Gardet:
Le 27/04/2015 17:46, Andreas Färber a écrit :
Le 27/04/2015 10:43, Markus Weber a écrit :
Thanks for all your help and sorry for the late reply (had a busy weekend).
If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions?
Is it then possible to boot without an tftp server? Yes. Kernel and initrd can be downloaded using NFS instead of TFTP. ... if U-Boot were configured to enable such options for all relevant devices. Have you ensured that in our package? In the previous version
Am 27.04.2015 um 15:53 schrieb Guillaume Gardet: there was a distro header being prepared for such purposes, I think.
U-Boot has a prompt, so you can play with all enabled commands, including NFS. ;)
Well, that was my question: Do really all u-boot packages we build have the nfs command enabled to play around with? Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 27/04/2015 18:07, Andreas Färber a écrit :
Le 27/04/2015 17:46, Andreas Färber a écrit :
Le 27/04/2015 10:43, Markus Weber a écrit :
Thanks for all your help and sorry for the late reply (had a busy weekend).
If i understand this right, i cant simply supply parameters to uboot and load the rest from NFS, as Volker mentions?
Is it then possible to boot without an tftp server? Yes. Kernel and initrd can be downloaded using NFS instead of TFTP. ... if U-Boot were configured to enable such options for all relevant devices. Have you ensured that in our package? In the previous version
Am 27.04.2015 um 15:53 schrieb Guillaume Gardet: there was a distro header being prepared for such purposes, I think. U-Boot has a prompt, so you can play with all enabled commands, including NFS. ;) Well, that was my question: Do really all u-boot packages we build have
Am 27.04.2015 um 18:02 schrieb Guillaume Gardet: the nfs command enabled to play around with?
Yes, I think so. At least most of them. Guillaume -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
23.04.2015 23:47, Markus Weber пишет:
Hello Guys,
i wonder if it is possible to boot opensuse-arm JeOS, e.g. this image http://download.opensuse.org/ports/armv6hl/factory/images/openSUSE-Factory-A... from an nfs share and what adjustments have to be made to the bootloader or vice versa.
Background: i have a pi v1 and want to use my DLink NAS as nfs server to boot from. I found a few tutorials on the net, but none is suitable for opensuse. Can anybody give me a guide to the pi part to accomplish this?
so far i have: - A nfs share with no_root_squash and insecure (if necessary) flags, - A small (2gb) sd card, - A pi (obviously) - no glue how i can add boot parameters.
Any help appreciated and thanks in advance. markus
I am not sure about RPi, but in general you would need a bootloader with network and tftp support to fetch kernel and initrd. tftp url can be configured either hardcoded in bootloader or supplied in dhcp-reply. The rest is to set root= in kernel cmdline and configure nfs properly. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
2015-04-24 8:58 GMT+02:00 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
23.04.2015 23:47, Markus Weber пишет:
Hello Guys,
i wonder if it is possible to boot opensuse-arm JeOS, e.g. this image
http://download.opensuse.org/ports/armv6hl/factory/images/openSUSE-Factory-A... from an nfs share and what adjustments have to be made to the bootloader or vice versa.
Background: i have a pi v1 and want to use my DLink NAS as nfs server to boot from. I found a few tutorials on the net, but none is suitable for opensuse. Can anybody give me a guide to the pi part to accomplish this?
so far i have: - A nfs share with no_root_squash and insecure (if necessary) flags, - A small (2gb) sd card, - A pi (obviously) - no glue how i can add boot parameters.
Any help appreciated and thanks in advance. markus
I am not sure about RPi, but in general you would need a bootloader with network and tftp support to fetch kernel and initrd. tftp url can be configured either hardcoded in bootloader or supplied in dhcp-reply. The rest is to set root= in kernel cmdline and configure nfs properly.
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
I'm using JeOS images for various board, and you can use the rootfs loaded via NFS, and If your bootloader permits this operation, you can load kernel, device tree (and initrd if you need) via tftpboot command. But, you need of a bootloader. I don't have a RPi, but, AFAIK, needs of SD card in order to load the bootloader. After bootloader is up, if you modify the config environment file (with the boot parameters you may need), you can boot from "network" (tftp + nfs server) If you don't know already, you need to setup this service on your pc (you can do with simple configuration, or you can choose for a DHCP server inside you PC). Remember that you have to tell to uboot all the information about you server (your PC), the image to load, the root to use (ex. root=/dev/nfs). Is not simple the first time, but, using NFS is very useful when you have to develop something inside the OS ( really faster than writing every time a SD). Advice: I think is not a good idea using an external router for your purpose. My 2c Bye Alexjan. -- Alexjan Carraturo -- Twitter/Facebook/Identica/flickr: axjslack Personal site: http://axjslack.wordpress.com -- -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (7)
-
Alex Armstrong
-
Alexjan Carraturo
-
Andreas Färber
-
Guillaume Gardet
-
Markus Weber
-
Matwey V. Kornilov
-
Volker Kuhlmann