[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

No subject



run-init starts, the system just hangs. Maybe the sed script is not correct
or not enough. Any suggestions/comments/questions are welcome.

TODO list:
1. Make it work :) seriously - just solve the existing problems.
2. Improve live-initramfs handling/parsing. What you call http:// httpfs://
cifs:// nfs:// support...
3. Enhance httpfs:
3.1. Disk caching
3.2  Preloading (boot profile, like accelerated knoppix)
3.3  Load balancing - allow simultaneous connections to multiple mirrors
3.4  Network recovery - do not hang/panic when there's no network connection
and be able to continue working when the  connection is back again.
3.5  Sparse image (squashfs feature) and plain directories

And there's probably more...

Cheers,
Hadar




On 5/24/07, RJ Ent. <rjent at rjent.pair.com> wrote:
>
>
> Greetings,
>
> I would like to request a feature for netbooting, namely to have the
> ability be able to get the netboot folder via http or even https.
>
> Also then to consider the netboot param to act as examples below:
>
> netboot=nfs://xxx.xxx.xxx.xxx/path
> netboot=cifs://xxx.xxx.xxx.xxx/path
> netboot=http://xxx.xxx.xxx.xxx/path
> netboot=https://xxx.xxx.xxx.xxx/path
>
> I am unsure how much work this would take but I think having the ability
> to  make a boot cd (or pxe setup or whatever) and just type in the web
> address that you wanted it to continue booting from. Then at the server
> you could just tune the netboot folders shared out via http. Not to
> mention a secure session via https.
>
> Ok ideas and petition for the feature welcome.
>
> Thx.
>
> ----------
> RJEnt. - Linux Solutions & Consulting
>
> _______________________________________________
> Debian-live-devel mailing list
> Debian-live-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel
>

------=_Part_81679_24326245.1180361498325
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><br>I&#39;ll try to describe my efforts to integrate http filesystem into casper. There is more work to be done and help is welcome.<br><br>First, bear in mind the following when dealing with http filesystems:<br>1. AFAIK there are two implementations for http filesystems: 
<a href="http://httpfs.sourceforge.net/";>httpfs</a> and <a href="http://unit.aist.go.jp/itri/knoppix/http-fuse/index-en.html";>http-fuse-cloop</a>. Both projects are not part of Debian and IMHO are still immature and not ready for production use. There are several filesystems out there that can be used as well, such as davfs and curlftpfs.
<br><br>2. DHCP is a must, similar to nfsroot and cifsroot.<br><br>3. As you can imagine, the performance can be really bad when the network connection is not fast. There are few ways to optimize the performance such as local disk caching, preloading of blocks/files and compression. httpfs lacks the disk caching and preloading.
<br><br>4. These filesystems are bloat because of their dependencies, namely glibc and fuse. Inserting them into the initramfs, makes the cpio image bigger (important in some scenarios).<br><br>5. Both filesystem does not support plain directories (this is another feature I would like to see sometime). httpfs hooks to a single image file such as iso or squashfs, while http-fuse-cloop uses an index file and a set of blocks files.
<br><br>6. This feature does not replace the boot itself. The system must be booted from a local device or a PXE server! I don&#39;t know any BIOS that fetches boot images over http. Maybe linuxbios? :)<br><br>We (<a href="http://neocleus.com";>
neocleus.com</a>) decided to use http fuse cloop (fs_wrapper) for the first version of the product, so we can have disk caching and preloading. In the future we hope to use a better httpfs + squashfs. Here&#39;s the code we&#39;ve used in casper:
<br><br>* Added this function:<br>do_httpmount() {<br>&nbsp;&nbsp;&nbsp; rc=1<br>&nbsp;&nbsp;&nbsp; if [ -x &quot;/sbin/fs_wrapper&quot; ]; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [ &quot;$quiet&quot; != &quot;y&quot; ] &amp;&amp; log_begin_msg &quot;Trying fs_wrapper -f ${NFSROOT} ${mountpoint}&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modprobe &quot;${MP_QUIET}&quot; fuse&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mkdir -p /cow/blocks<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fs_wrapper -f &quot;${mountpoint}&quot; &quot;${NFSROOT}&quot;&nbsp; &amp;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13; do
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if [ -f &quot;${mountpoint}&quot;/* ]; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rc=0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; log_begin_msg &quot;waiting for fs_wrapper:&quot;$i<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sleep 1
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fi<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; done<br>&nbsp;&nbsp;&nbsp; fi<br>&nbsp;&nbsp;&nbsp; return ${rc}<br>}<br><br>* Changed netboot function to call do_httpmount instead of cifs - an ugly hack ;)<br><br>* Added support for cloop which is necessary when using http-fuse-cloop, see the attached patch.
<br><br>* Added this code to the end of casper:<br><br>+++ &nbsp;&nbsp; #ugly hack to keep fs_wrapper running...<br>+++ &nbsp;&nbsp; sed -i &#39;s/killall5/ps axwww \| grep -v fs_wrapper \| grep -v PID \| grep -v rc \| grep -v init \| awk &quot;\{print \\\$1\}&quot; \|&nbsp; xargs +++ -n1 kill/g&#39; /root/etc/init.d/sendsigs
<br>+++&nbsp;&nbsp;&nbsp; sed -i &#39;s/ES\=\$?/ES\=\$?;\/usr\/bin\/killall -15 fs_wrapper; \/bin\/sleep 3/&#39; /root/etc/init.d/umountroot<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; exec 1&gt;&amp;6 6&gt;&amp;-<br>&nbsp;&nbsp;&nbsp; exec 2&gt;&amp;7 7&gt;&amp;-<br>&nbsp;&nbsp;&nbsp; cp casper.log
 &quot;${rootmnt}/var/log/&quot;<br>&nbsp;}<br><br>* Switched losetup! The current casper uses &quot;losetup&quot; which is the one supplied from busybox. This losetup didn&#39;t work well for me. Therefore, I switch to /sbin/losetup which is included in the first place. Attached a patch for that change. Again this patch is required only for http-fuse cloop. 
<br><br>* Last change was to add cloop, fuse and fs_wrapper modules to the hooks/casper file. Make sure to have those modules in the live image.<br><br>As I wrote earlier, when the kernel switches from initramfs to the real filesystem, run-init kills all the processes. 
<br>This hacky sed suppose to prevent the kill of the http filesystem.<br><br>From my experiments, at the initramfs phase, the filesystem works. When run-init starts, the system just hangs. Maybe the sed script is not correct or not enough. Any suggestions/comments/questions are welcome.
<br><br>TODO list:<br>1. Make it work :) seriously - just solve the existing problems.<br>2. Improve live-initramfs handling/parsing. What you call http:// httpfs:// cifs:// nfs:// support...<br>3. Enhance httpfs:<br>3.1. Disk caching
<br>3.2&nbsp; Preloading (boot profile, like accelerated knoppix)<br>3.3&nbsp; Load balancing - allow simultaneous connections to multiple mirrors<br>3.4&nbsp; Network recovery - do not hang/panic when there&#39;s no network connection and be able to continue working when the&nbsp; connection is back again.
<br>3.5&nbsp; Sparse image (squashfs feature) and plain directories<br><br>And there&#39;s probably more...<br><br>Cheers,<br>Hadar<br><br><br><br><br><div><span class="gmail_quote">On 5/24/07, <b class="gmail_sendername">RJ Ent.
</b> &lt;<a href="mailto:rjent at rjent.pair.com">rjent at rjent.pair.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Greetings,<br><br>I would like to request a feature for netbooting, namely to have the<br>ability be able to get the netboot folder via http or even https.<br><br>Also then to consider the netboot param to act as examples below:
<br><br>netboot=nfs://xxx.xxx.xxx.xxx/path<br>netboot=cifs://xxx.xxx.xxx.xxx/path<br>netboot=<a href="http://xxx.xxx.xxx.xxx/path";>http://xxx.xxx.xxx.xxx/path</a><br>netboot=<a href="https://xxx.xxx.xxx.xxx/path";>https://xxx.xxx.xxx.xxx/path
</a><br><br>I am unsure how much work this would take but I think having the ability<br>to&nbsp;&nbsp;make a boot cd (or pxe setup or whatever) and just type in the web<br>address that you wanted it to continue booting from. Then at the server
<br>you could just tune the netboot folders shared out via http. Not to<br>mention a secure session via https.<br><br>Ok ideas and petition for the feature welcome.<br><br>Thx.<br><br>----------<br>RJEnt. - Linux Solutions &amp; Consulting
<br><br>_______________________________________________<br>Debian-live-devel mailing list<br><a href="mailto:Debian-live-devel at lists.alioth.debian.org">Debian-live-devel at lists.alioth.debian.org</a><br><a href="http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel";>
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel</a><br></blockquote></div><br>

------=_Part_81679_24326245.1180361498325--

------=_Part_81678_27310965.1180361498325
Content-Type: text/x-patch; name=cloop.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_f290x7qz
Content-Disposition: attachment; filename="cloop.patch"

LS0tIC9ob21lL2hhZGFyL2Rldi9jYXNwZXIvY2FzcGVyLTEuODErZGViaWFuL3NjcmlwdHMvY2Fz
cGVyIAorKysgL2hvbWUvaGFkYXIvZGV2L25lb2xpdmUvY2FzcGVyL2Nhc3Blci0xLjgxK2RlYmlh
bi9zY3JpcHRzL2Nhc3BlciAKQEAgLTEyMyw2ICsxMjMsNyBAQAogICAgIHBhdGg9JDEKICAgICBp
ZiBbIC1kICIkcGF0aC9jYXNwZXIiIF07IHRoZW4KICAgICAgICAgaWYgWyAiJChlY2hvICRwYXRo
L2Nhc3Blci8qLnNxdWFzaGZzKSIgIT0gIiRwYXRoL2Nhc3Blci8qLnNxdWFzaGZzIiBdIHx8Cisg
ICAgICAgICAgICB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J5L2Nhc3Blci8qLmRpciI7IHRoZW4KICAgICAgICAg
c2V0dXBfdW5pb25mcyAiJGRpcmVjdG9yeS9jYXNwZXIiICIkcm9vdG1udCIKICAgICBlbHNlCkBA
IC00MTgsNyArNDIzLDcgQEAKICAgICAgICAgZG9uZQogICAgIGVsc2UKICAgICAgICAgIyBJZiAk
e01PRFVMRX0ubHN0IGRvZXMgbm90IGV4aXN0LCBjcmVhdGUgYSBsaXN0IG9mIGltYWdlcwotICAg
ICAgICBmb3IgaW1hZ2VfdHlwZSBpbiAiZXh0MiIgInNxdWFzaGZzIiAiZGlyIjsgZG8KKyAgICAg
ICAgZm9yIGltYWdlX3R5cGUgaW4gImV4dDIiICJzcXVhc2hmcyIgImNsb29wIiAiZGlyIjsgZG8K
ICAgICAgICAgICAgIGZvciBpbWFnZSBpbiAiJHtpbWFnZV9kaXJlY3Rvcnl9Ii8qLiIke2ltYWdl
X3R5cGV9IjsgZG8KIAkgICAgICAgIGlmIFsgLWUgIiR7aW1hZ2V9IiBdOyB0aGVuCiAJCSAgICBp
bWFnZV9zdHJpbmc9IiR7aW1hZ2Vfc3RyaW5nfSAke2ltYWdlfSI7Cg==
------=_Part_81678_27310965.1180361498325
Content-Type: text/x-patch; name=losetup.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_f2917q8m
Content-Disposition: attachment; filename="losetup.patch"

LS0tIC9ob21lL2hhZGFyL2Rldi9jYXNwZXIvY2FzcGVyLTEuODErZGViaWFuL3NjcmlwdHMvY2Fz
cGVyIAorKysgL2hvbWUvaGFkYXIvZGV2L25lb2xpdmUvY2FzcGVyL2Nhc3Blci0xLjgxK2RlYmlh
bi9zY3JpcHRzL2Nhc3BlciAKQEAgLTE1LDYgKzE1LDggQEAKIFVTRVJGVUxMTkFNRT0iTGl2ZSBz
ZXNzaW9uIHVzZXIiCiBIT1NUTkFNRT0ibGl2ZSIKIEJVSUxEX1NZU1RFTT0iQ3VzdG9tIgorCits
b3NldHVwPSIvc2Jpbi9sb3NldHVwIgogCiBta2RpciAtcCAkbW91bnRwb2ludAogCkBAIC0zMjIs
NyArMzI0LDcgQEAKIAogICAgICAgICBybWRpciAiJHt0b21vdW50fSIKICAgICAgICAgaWYgZWNo
byAke2Zyb21kZXZ9IHwgZ3JlcCAtcXMgbG9vcDsgdGhlbgotICAgICAgICAgICBsb3NldHVwIC1k
ICIke2Zyb21kZXZ9IgorICAgICAgICAgICAke2xvc2V0dXB9IC1kICIke2Zyb21kZXZ9IgogICAg
ICAgICBmaQogICAgICAgICByZXR1cm4gMAogICAgIGVsc2UKQEAgLTM2NSw3ICszNjcsNyBAQAog
ICAgICAgICBpZiBbIC1iICR7ZGV2fSBdOyB0aGVuCiAgICAgICAgICAgICBpZiBlY2hvICIke2Rl
dn0iIHwgZ3JlcCAtcXMgbG9vcDsgdGhlbgogICAgICAgICAgICAgICAgICMgc3RyYW5nZSB0aGlu
Z3MgaGFwcGVucywgdXNlciBjb25mdXNlZD8KLSAgICAgICAgICAgICAgICBzbmFwbG9vcD0kKCBs
b3NldHVwICR7ZGV2fSB8IGF3ayAne3ByaW50ICQzfScgfCB0ciAtZCAnKCknICkKKyAgICAgICAg
ICAgICAgICBzbmFwbG9vcD0kKCAke2xvc2V0dXB9ICR7ZGV2fSB8IGF3ayAne3ByaW50ICQzfScg
fCB0ciAtZCAnKCknICkKICAgICAgICAgICAgICAgICBzbmFwZmlsZT0kKGJhc2VuYW1lICR7c25h
cGxvb3B9KQogICAgICAgICAgICAgICAgIHNuYXBkZXY9JChjYXQgL3Byb2MvbW91bnRzIHwgYXdr
ICd7cHJpbnQgJDIsJDF9JyB8IGdyZXAgLWVzICJeJCggZGlybmFtZSAke3NuYXBsb29wfSApIiB8
IGN1dCAtZjIgLWQgJyAnKQogICAgICAgICAgICAgZWxzZQpAQCAtNTI3LDcgKzUyOSw3IEBACiAg
ICAgZmkKIAogICAgIGlmIFsgLW4gIiR7TElWRU1FRElBX09GRlNFVH0iIF07IHRoZW4KLSAgICAg
ICAgbG9zZXR1cCAtZCAiJHtsb29wZGV2bmFtZX0iCisgICAgICAgICR7bG9zZXR1cH0gLWQgIiR7
bG9vcGRldm5hbWV9IgogICAgIGZpCiAgICAgcmV0dXJuIDEKIH0K
------=_Part_81678_27310965.1180361498325--



Reply to: