NFS Root: Difference between revisions

From Xenon Wiki
Jump to navigation Jump to search
imported>Gamewizard71
mNo edit summary
imported>Gamewizard71
mNo edit summary
Line 1: Line 1:
{{cleanup}}
{{cleanup}}
HOW TO WIP:
HOW TO WIP:
This tutorial assumes that you already have xell and a toolchain.
This tutorial assumes that you already have Xell and a toolchain.


First compile the kernel that you want to use. Do the following:
=== Compile the kernel that you want to use ===
get the kernel sources from kernel.org 2.6.33 not 2.6.33.1 at time of writing (in the future this might change)
get the patches and the kernel config from http://vserver.13thfloor.at/Stuff/XBOX360/ at the time of writing v0.10 was the latest make sure that your kernel config and your patch are the same version.


extract your kernel with the following command
Do the following:
 
Get the kernel sources from kernel.org 2.6.33 not 2.6.33.1 at time of writing (in the future this might change)
 
Get the patches and the kernel config from [http://vserver.13thfloor.at/Stuff/XBOX360/ here].
 
NOTE: At the time of writing v0.10 was the latest make sure that your kernel config and your patch are the same version.
 
Extract your kernel with the following command:


tar -xvjf linux-2.6.33.tar.bz2
tar -xvjf linux-2.6.33.tar.bz2


then patch it with the following commands
Then patch it with the following commands:
 
cd linux-2.6.33
cd linux-2.6.33
patch -p1 --dry-run <../patch-2.6.33-xbox0.10.diff ## assumes that the patch is in the directory above the kernel folder that you just changed into
patch -p1 --dry-run <../patch-2.6.33-xbox0.10.diff ## assumes that the patch is in the directory above the kernel folder that you just changed into
## pause here make sure there were no errors is not do the following
## pause here make sure there were no errors is not do the following
patch -p1 <../patch-2.6.33-xbox0.10.diff
patch -p1 <../patch-2.6.33-xbox0.10.diff


now you have to edit the kernel config file.
Now you have to edit the kernel config file.
 
Look for a line simular to this:


look for a line simular to this
CONFIG_CMDLINE="root=/dev/nfs video=xenonfb nfsroot=192.168.1.100:/nfs ip=dhcp panic=60"
CONFIG_CMDLINE="root=/dev/nfs video=xenonfb nfsroot=192.168.1.100:/nfs ip=dhcp panic=60"
edit the nfsroot to be your ip address
Edit the NFSroot to be your IP address.
 
The build the kernel by doing the following:


the build the kernel by doing the following
make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- menuconfig
make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- menuconfig
load up your config file that you just edited and then exit and run the following command.
Load up your config file that you just edited and then exit and run the following command:
 
make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- all
make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- all
you might get an error if so you might need to edit  arch/powerpc/kernel/pci_64.c line 149 and change the lh to llh both occurrences.
You might get an error if so you might need to edit  arch/powerpc/kernel/pci_64.c line 149 and change the lh to llh both occurrences.
rerun the last command and you should have a kernel. It will be in arch/powerpc/boot/zImage.xenon
Rerun the last command and you should have a kernel. It will be in arch/powerpc/boot/zImage.xenon


Second you will need to configure xell to boot from your computer via tftp.
=== Configure Xell to boot from your computer via tftp ===


To do this you need to recompile xell. I assume that you already have a toolchain, I used the one from libxenon. You will need to edit the xell source file network.c changing the default ip address to your ip address. Then compile xell.
To do this you need to recompile Xell. I assume that you already have a toolchain, I used the one from libxenon. You will need to edit the Xell source file network.c changing the default IP address to your IP address. Then compile Xell.


Now to setup tftp.
=== Setup tftp ===
I used atftp on gentoo just type emerge -v atftp. Then nano /etc/conf.d/atftp I changed mine to look like this TFTPD_ROOT="/tftpboot" just edit the TFTPD_ROOT= line and leave the rest the way that it is as it is already correct.
I used atftp on gentoo just type emerge -v atftp. Then nano /etc/conf.d/atftp I changed mine to look like this TFTPD_ROOT="/tftpboot" just edit the TFTPD_ROOT= line and leave the rest the way that it is as it is already correct.
When done with that make the directory /tftpboot and put your kernel into it and name it xenon.
When done with that make the directory /tftpboot and put your kernel into it and name it xenon.


you can try to boot now but you will get an error from the kernel saying that it cant find your nfs so we will set that up now.
You can try to boot now but you will get an error from the kernel saying that it cant find your nfs so we will set that up now.
 
=== Install an nfs server ===


Step three install an nfs server to do this you may have to edit your kernel on your host machine to enable nfs. This is what I followed to set up NFS so here is the link I will not repeat what they said. http://en.gentoo-wiki.com/wiki/NFS/Server only difference is that your /etc/exports should look like this /nfs 192.168.1.*(rw,no_root_squash,no_subtree_check,async) change the ip scheme to fit your network.
To do this you may have to edit your kernel on your host machine to enable nfs. This is what I followed to set up NFS so [http://en.gentoo-wiki.com/wiki/NFS/Server here is the link]. The only difference is that your /etc/exports should look like this /nfs 192.168.1.*(rw,no_root_squash,no_subtree_check,async) change the IP scheme to fit your network.


make the /nfs directory and copy the image.squashfs into it. Then exrtract it as root by doing unsquashfs image.squashfs then copy everything from the squashfs-root folder to /nfs by typing cd /nfs/squashfs-root && cp * -vaR /nfs
Make the /nfs directory and copy the image.squashfs into it. Then exrtract it as root by doing unsquashfs image.squashfs. Then copy everything from the squashfs-root folder to /nfs by typing cd /nfs/squashfs-root && cp * -vaR /nfs


Now if everything worked correctly you should be able to boot your 360 via nfs.
Now if everything worked correctly you should be able to boot your 360 via NFS.

Revision as of 20:10, 31 July 2010

HOW TO WIP: This tutorial assumes that you already have Xell and a toolchain.

Compile the kernel that you want to use

Do the following:

Get the kernel sources from kernel.org 2.6.33 not 2.6.33.1 at time of writing (in the future this might change)

Get the patches and the kernel config from here.

NOTE: At the time of writing v0.10 was the latest make sure that your kernel config and your patch are the same version.

Extract your kernel with the following command:

tar -xvjf linux-2.6.33.tar.bz2

Then patch it with the following commands:

cd linux-2.6.33

patch -p1 --dry-run <../patch-2.6.33-xbox0.10.diff ## assumes that the patch is in the directory above the kernel folder that you just changed into

    1. pause here make sure there were no errors is not do the following

patch -p1 <../patch-2.6.33-xbox0.10.diff

Now you have to edit the kernel config file.

Look for a line simular to this:

CONFIG_CMDLINE="root=/dev/nfs video=xenonfb nfsroot=192.168.1.100:/nfs ip=dhcp panic=60" Edit the NFSroot to be your IP address.

The build the kernel by doing the following:

make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- menuconfig Load up your config file that you just edited and then exit and run the following command:

make ARCH=powerpc CROSS_COMPILE=/usr/local/xenon/bin/xenon- all You might get an error if so you might need to edit arch/powerpc/kernel/pci_64.c line 149 and change the lh to llh both occurrences. Rerun the last command and you should have a kernel. It will be in arch/powerpc/boot/zImage.xenon

Configure Xell to boot from your computer via tftp

To do this you need to recompile Xell. I assume that you already have a toolchain, I used the one from libxenon. You will need to edit the Xell source file network.c changing the default IP address to your IP address. Then compile Xell.

Setup tftp

I used atftp on gentoo just type emerge -v atftp. Then nano /etc/conf.d/atftp I changed mine to look like this TFTPD_ROOT="/tftpboot" just edit the TFTPD_ROOT= line and leave the rest the way that it is as it is already correct. When done with that make the directory /tftpboot and put your kernel into it and name it xenon.

You can try to boot now but you will get an error from the kernel saying that it cant find your nfs so we will set that up now.

Install an nfs server

To do this you may have to edit your kernel on your host machine to enable nfs. This is what I followed to set up NFS so here is the link. The only difference is that your /etc/exports should look like this /nfs 192.168.1.*(rw,no_root_squash,no_subtree_check,async) change the IP scheme to fit your network.

Make the /nfs directory and copy the image.squashfs into it. Then exrtract it as root by doing unsquashfs image.squashfs. Then copy everything from the squashfs-root folder to /nfs by typing cd /nfs/squashfs-root && cp * -vaR /nfs

Now if everything worked correctly you should be able to boot your 360 via NFS.