Index of /nbd-http/src/
Name Last modified Size Description
Parent Directory 08-Feb-2013 13:39 -
nbd-http-0.2.tgz 10-May-2006 03:39 8k
nbd-http-0.2.2.tgz 08-Feb-2013 13:42 16k
nbd-http-0.2.1.tgz 10-May-2006 03:39 8k
nbd-http-0.1.tgz 10-May-2006 03:39 8k
If you have NBD support enabled in your kernel, you can use this
to read a file over HTTP as a block device. The most obvious use
for me was (is) to mount ISO images without having to download
them entirely. If your linux distribution installer allows early
console access, you should be able to even install the OS from
a CD ISO over HTTP.
Building and running
The homepage is:
Newer patches are available at:
To use it, compile (you need kernel headers and pthreads
installed), load the kernel module and run nbd-http:
./nbd-http /dev/nbd0 http://mirror.org/file.iso
(and in another console)
mount /dev/nbd0 /mnt/cdrom
Depending on your 'net connection you might want to try different
read-ahead time limits or different thread numbers. You can change
those in the first lines of main.c. On my 512kbps cable modem, a
2..4sec read-ahead limit and 1..2 threads seem to be reasonable.
Caching is done on disk. So if your fs does not support holes in
files it'll create a 2.7G file when you start serving the Fedora
The reusing of HTTP connections to fetch pages of the file may
or may not be smart enough. When reading a reasonably large file
(say, larger than 4K) it should be ok.
Due to the nbd driver using the userland process to make block
requests, there is apparently no other way to stop the nbd
userland helper other than ``killall -9 nbd-http''.
Verbosity is set to maximum since the code is still buggy. To
get rid of most stuff, use '-v 1'. To get rid of everything
except errors, use '-v 0'.
Since closing useless HTTP connections and opening new ones
occasionally happens (especially with weird (not iso9660) formats
and less-than-smart installers), you might get banned from
your favourite mirror for excessive connections. As an example,
installing Slackware 10.2 should require one connection when
determining ISO size, one when reading the directory tree and
several more when installing packages.
Think that whenever you skip a package the HTTP connection may
become useless if when reading-ahead it doesn't reach the next
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sebastian Pipping maintains an ebuild and patches of NBD-http at
Gentoo Betagarden (see the links at the top).
Feedback is also welcome at reverse(moc.liamg@cojrah) - Harjoc Bogdan.
Proudly Served by LiteSpeed Web Server at patraulea.com Port 443