<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://buffalo.nas-central.org/w/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Install Linux From NFS - Revision history</title>
		<link>http://buffalo.nas-central.org/w/index.php?title=Install_Linux_From_NFS&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.1</generator>
		<lastBuildDate>Thu, 23 May 2013 00:33:34 GMT</lastBuildDate>
		<item>
			<title>86.145.172.147 at 13:15, 30 December 2008</title>
			<link>http://buffalo.nas-central.org/w/index.php?title=Install_Linux_From_NFS&amp;diff=26221&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:15, 30 December 2008&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 156:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 156:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The whole business about the loop back mount is dpkg (again) unable to work&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The whole business about the loop back mount is dpkg (again) unable to work&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;over an NFS mounted file system without rpc.lockd.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;over an NFS mounted file system without rpc.lockd.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:LS2]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2013-05-16 09:28:42 --&gt;
&lt;!-- diff cache key nascentral_wiki-mwiki_:diff:version:1.11a:oldid:26036:newid:26221 --&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 30 Dec 2008 13:15:43 GMT</pubDate>			<dc:creator>86.145.172.147</dc:creator>			<comments>http://buffalo.nas-central.org/wiki/Talk:Install_Linux_From_NFS</comments>		</item>
		<item>
			<title>71.194.213.15 at 22:50, 27 December 2008</title>
			<link>http://buffalo.nas-central.org/w/index.php?title=Install_Linux_From_NFS&amp;diff=26036&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:50, 27 December 2008&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{LS2}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;How to upgrade the LinkStation HD-HLANv2 (Mipsel) to 2.6 Linux Debian using NFS&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;How to upgrade the LinkStation HD-HLANv2 (Mipsel) to 2.6 Linux Debian using NFS&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;(edit. This could actually be used for any Server with &amp;quot;debootstrap&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;(edit. This could actually be used for any Server with &amp;quot;debootstrap&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2013-05-16 09:28:42 --&gt;
&lt;!-- diff cache key nascentral_wiki-mwiki_:diff:version:1.11a:oldid:25866:newid:26036 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sat, 27 Dec 2008 22:50:29 GMT</pubDate>			<dc:creator>71.194.213.15</dc:creator>			<comments>http://buffalo.nas-central.org/wiki/Talk:Install_Linux_From_NFS</comments>		</item>
		<item>
			<title>Xray:&amp;#32;How to do a full blown Linux install on the LinkStation using NFS</title>
			<link>http://buffalo.nas-central.org/w/index.php?title=Install_Linux_From_NFS&amp;diff=25866&amp;oldid=prev</link>
			<description>&lt;p&gt;How to do a full blown Linux install on the LinkStation using NFS&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;How to upgrade the LinkStation HD-HLANv2 (Mipsel) to 2.6 Linux Debian using NFS&lt;br /&gt;
(edit. This could actually be used for any Server with &amp;quot;debootstrap&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
It took me a couple of fits and starts to plow my way through this procedure.&lt;br /&gt;
Hopefully this write-up will help someone else.&lt;br /&gt;
&lt;br /&gt;
Before starting, we need to have &amp;quot;telnet&amp;quot; access to the LinkStation and have&lt;br /&gt;
NFS installed on it as well.&lt;br /&gt;
Get the U-Boot package and install it. I have to compliment the developers of&lt;br /&gt;
u-boot and say what a great bit of software it is. It's like having an OpenBoot&lt;br /&gt;
PROM on the LinkStation and probably the last time flashing is required on the&lt;br /&gt;
box. Being able to run a full scale OS on this little box makes you realize how&lt;br /&gt;
powerful this thing really is. Again, my compliments.&lt;br /&gt;
&lt;br /&gt;
On the LinkStation, create a &amp;quot;/boot&amp;quot; directory and copy both a 2.4 and a 2.6&lt;br /&gt;
kernel there as well as add the 2.6 modules to the /lib/modules directory.&lt;br /&gt;
In the /boot directory :&lt;br /&gt;
        rename the original 2.4.20 kernel to vmlinux-2.4.20_mipsel_linkstation.gz&lt;br /&gt;
        ln -s vmlinux-2.4.20_mipsel_linkstation.gz vmlinuz&lt;br /&gt;
&lt;br /&gt;
U-boot is hardcoded to use addresses 192.168.11.150 and 192.168.11.149.&lt;br /&gt;
If the network is not 192.168.11.0, re-compile u-boot OR add logical addresses&lt;br /&gt;
to the servers, i.e. &amp;quot;ifconfig eth0:0 192.168.11.149 up&amp;quot; for the console&lt;br /&gt;
server and any other address on the &amp;quot;11&amp;quot; subnet for the NFS server if they are&lt;br /&gt;
not one and the same.&lt;br /&gt;
&lt;br /&gt;
Setup NFS on a Linux Server box and apt-get install &amp;quot;debootstrap&amp;quot;.&lt;br /&gt;
Just to make it easier, here is an example /etc/exports file :&lt;br /&gt;
        /mnt/export1    *(rw,sync,no_subtree_check,no_root_squash)&lt;br /&gt;
        /mnt/export2    *(rw,sync,no_subtree_check,no_root_squash)&lt;br /&gt;
        /mnt/export3    *(rw,sync,no_subtree_check,no_root_squash)&lt;br /&gt;
&lt;br /&gt;
On the Linkstation, mount &amp;quot;/mnt/export3&amp;quot; and copy the root filesystem to there.&lt;br /&gt;
        - mkdir /mnt/servername&lt;br /&gt;
        - mount serveraddress:/mnt/export3 /mnt/servername&lt;br /&gt;
        - cd /&lt;br /&gt;
        - tar -cf - (*list of directories*) | (cd /mnt/servername ; tar -xvf -)&lt;br /&gt;
          *list of directories* is everything except &amp;quot;mnt, proc and sys&amp;quot; and any&lt;br /&gt;
          other mounted file system. We just want what's on the root partition.&lt;br /&gt;
          i.e. - bin boot dev etc home ...&lt;br /&gt;
        - cd /mnt/servername&lt;br /&gt;
        - mkdir proc sys&lt;br /&gt;
Recreate the mount points from /etc/fstab.&lt;br /&gt;
        - mkdir -p mnt/existing_mounting_points&lt;br /&gt;
        - edit etc/fstab and comment out the &amp;quot;/&amp;quot; mount point       # Not /etc/fstab but /mnt/servername/etc/fstab&lt;br /&gt;
        - cd boot&lt;br /&gt;
        - rm vmlinuz&lt;br /&gt;
        - ln -s vmlinux-2.6.22.gz vmlinuz&lt;br /&gt;
&lt;br /&gt;
NFS boot the OS from /mnt/export3&lt;br /&gt;
        - Launch u-boot.&lt;br /&gt;
# My NFS server is different from my Console server&lt;br /&gt;
        - setenv serverip 192.168.11.148&lt;br /&gt;
        - setenv rootpath /mnt/export3&lt;br /&gt;
        - setenv nfsfile boot/vmlinuz&lt;br /&gt;
        - run nfsload&lt;br /&gt;
# And my network block is different than u-boot defaults&lt;br /&gt;
        - setenv bootargs root=/dev/nfs rw nfsroot=192.168.178.148:${rootpath} ip=192.168.178.150:192.168.178.148:192.168.178.254:255.255.255.0:LShostname::off&lt;br /&gt;
        - bootm&lt;br /&gt;
&lt;br /&gt;
At this stage you should be running exactly the same except booting via NFS&lt;br /&gt;
and we have the ability to recover, whatever happens to the system.&lt;br /&gt;
We are also running a 2.6 kernel which we need in order to be able to run&lt;br /&gt;
the bootstrap from a chroot environment.&lt;br /&gt;
&lt;br /&gt;
Make sure you have backups !.&lt;br /&gt;
&lt;br /&gt;
Make sure you have backups !.&lt;br /&gt;
&lt;br /&gt;
Make sure you have backups !.&lt;br /&gt;
&lt;br /&gt;
Go back to the NFS server and create a soon to be exported partition&lt;br /&gt;
        &amp;quot;/mnt/export1&amp;quot;.&lt;br /&gt;
Create a 2Gig file in the /mnt/export1 directory.&lt;br /&gt;
        - cd /mnt/export1&lt;br /&gt;
        - dd if=/dev/zero of=./file bs=1k count=1000k&lt;br /&gt;
Create a filesystem on that file.&lt;br /&gt;
        - mkfs -t ext3 ./file&lt;br /&gt;
Loop mount the file.&lt;br /&gt;
        - mount -o loop ./file /mnt/export2&lt;br /&gt;
Add the base installation packages.&lt;br /&gt;
        - debootstrap --arch mipsel lenny /mnt/export2 http://ftp.us.debian.org/debian&lt;br /&gt;
&lt;br /&gt;
debootstrap will exit with an error :&lt;br /&gt;
                        &amp;quot;Unable to chroot /mnt/export2 mount -t proc proc /proc&amp;quot;&lt;br /&gt;
It's expected.&lt;br /&gt;
&lt;br /&gt;
Mkdir /mnt/export2/boot and copy the 2.6 Mipsel kernel to /mnt/export2/boot&lt;br /&gt;
and the modules to /lib/modules/&amp;quot;kernel name and version&amp;quot;.&lt;br /&gt;
In the /mnt/export2/boot directory.&lt;br /&gt;
        - cd /mnt/export2/boot&lt;br /&gt;
        - ln -s vmlinux-2.6.22.gz vmlinuz&lt;br /&gt;
&lt;br /&gt;
Copy the bootstrap files to /mnt/export1&lt;br /&gt;
        - cd /mnt/export2&lt;br /&gt;
        - tar -cf - * | (cd /mnt/export1 ; tar -xvf -)&lt;br /&gt;
Export both /mnt/export1 and /mnt/export2&lt;br /&gt;
        - exportfs -av&lt;br /&gt;
&lt;br /&gt;
Telnet into the LinkStation and let's get ready to rumble :&lt;br /&gt;
        - mkdir /mnt/servername&lt;br /&gt;
        - mount serveraddress:/mnt/export1 /mnt/servername&lt;br /&gt;
        - mkdir /mnt/servername/proc&lt;br /&gt;
        - mkdir -p /mnt/servername/dev/pts&lt;br /&gt;
        - chroot /mnt/servername mount -t proc proc /proc&lt;br /&gt;
        - chroot /mnt/servername mount -t devpts devpts /dev/pts&lt;br /&gt;
        - chroot /mnt/servername&lt;br /&gt;
&lt;br /&gt;
        - mkdir /mnt/bootstrap&lt;br /&gt;
        - mount -o loop ./file /mnt/bootstrap&lt;br /&gt;
        - mkdir /mnt/bootstrap/proc&lt;br /&gt;
        - mkdir -p /mnt/bootstrap/dev/pts&lt;br /&gt;
        - chroot /mnt/bootstrap mount -t proc proc /proc&lt;br /&gt;
        - chroot /mnt/bootstrap mount -t devpts devpts /dev/pts&lt;br /&gt;
        - chroot /mnt/bootstrap&lt;br /&gt;
        - touch /var/lib/dpkg/diversions&lt;br /&gt;
        - touch /var/lib/dpkg/statoverride&lt;br /&gt;
&lt;br /&gt;
Edit /etc/apt/sources.list and insert :&lt;br /&gt;
        deb http://ftp.us.debian.org/debian/ lenny main contrib non-free&lt;br /&gt;
        deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free&lt;br /&gt;
We can also edit this file from the NFS server side at /mnt/export2/etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
We now need to install the package &amp;quot;aptitude&amp;quot; using dpkg which will complain&lt;br /&gt;
about unresolved packages. Give it what it needs till aptitude is able to run.&lt;br /&gt;
&lt;br /&gt;
Run aptitude, select whatever packages we think we need and&lt;br /&gt;
don't forget to install telnet, openbsd-inetd, ssh and login.&lt;br /&gt;
&lt;br /&gt;
Reboot but this time use /mnt/export2 as our rootpath.&lt;br /&gt;
        - setenv rootpath /mnt/export2&lt;br /&gt;
&lt;br /&gt;
Do realize that we can look at all the log files on servername:/mnt/export2 in&lt;br /&gt;
order to debug the installation if we need to, which in some ways is almost&lt;br /&gt;
better than having a console and no access to the filesystem.&lt;br /&gt;
&lt;br /&gt;
When everything works to our liking, overwrite /dev/hda1 which is our original&lt;br /&gt;
root filesystem.&lt;br /&gt;
        - mkfs -t ext3 /dev/hda1&lt;br /&gt;
        - mount /mnt/hda1 /dev/hda1&lt;br /&gt;
        - cd /&lt;br /&gt;
        - tar -cf - (*list of directories*) | (cd /mnt/servername ; tar -xvf -)&lt;br /&gt;
        - mkdir /mnt/hda1/proc /mnt/hda1/sys&lt;br /&gt;
&lt;br /&gt;
Reboot.&lt;br /&gt;
&lt;br /&gt;
Congratulations! That little box is now a full blown Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
N.B.&lt;br /&gt;
We need to create the files diversions and statoverride because dpkg will&lt;br /&gt;
complain and be unable to continue at some point.&lt;br /&gt;
We also mount /dev/pts because though dpkg would work, it will whine about it.&lt;br /&gt;
The whole business about the loop back mount is dpkg (again) unable to work&lt;br /&gt;
over an NFS mounted file system without rpc.lockd.&lt;/div&gt;</description>
			<pubDate>Wed, 03 Dec 2008 19:43:01 GMT</pubDate>			<dc:creator>Xray</dc:creator>			<comments>http://buffalo.nas-central.org/wiki/Talk:Install_Linux_From_NFS</comments>		</item>
	</channel>
</rss>