Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-12-2004, 05:42 PM   #1
LQ Newbie
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
writing a loopback device

I am definietly a newbie when it comes to kernel hacking. I need to write a loopback device that uses a file as the underlying block device. It sounds simple enough, but I am having trouble getting started. Can anyone point me in the right direction just so I can get started?
Old 03-12-2004, 06:00 PM   #2
Registered: Jul 2003
Location: England
Distribution: Debian Jessie, FreeBSD 10.1 anything *nix to get my fix
Posts: 329

Rep: Reputation: Disabled
Im not able to help you with your query. But if i were trying to do what your trying to do, i would post to the kernel developers mailing list as your question is probably on topic there.

I think the url is
Old 03-12-2004, 06:12 PM   #3
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
you could try as root

dd if=/dev/zero of=~/block_file count=1440 bs=1024 #creates block device os size 1440Megs
losetup /dev/loop0 ~/block_file # sets up loopback
mke2fs /dev/loop0 #formats filesystem
mkdir ~/block_dir #creates mount point
mount /dev/loop0 ~/block_dir #mounts directory as block device
then continue to work in the mounted directory

this should work


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PCAP on LOOPBACK Device johnnyde Programming 4 03-05-2009 05:05 AM
loopback device praveenv Linux - Newbie 2 08-23-2004 08:27 AM
no loopback device in routing table KingNothing Linux - Networking 3 05-02-2004 03:08 AM
loopback device in 2.5.47 broken markus1982 Linux - General 3 11-13-2002 12:52 PM
loopback adapter --> unamanaged device sc300t Linux - General 0 01-17-2002 11:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration