Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have one iso image.When I am trying to mount (trying to mount it on /cdrom) it I get the following error:
[root@betty swd]# mount -o loop image.iso /cdrom/
mount: could not find any device /dev/loop#
ls –Rl /dev/loop* shows nothing. So the loop devices are not being created in /dev. While ideally it should be:
[root@betty swd]# ls -lR /dev/loop*
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop0 -> loop/0
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop1 -> loop/1
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop2 -> loop/2
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop3 -> loop/3
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop4 -> loop/4
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop5 -> loop/5
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop6 -> loop/6
lrwxrwxrwx 1 root root 6 Dec 9 13:41 /dev/loop7 -> loop/7
/dev/loop:
total 0
brw-rw---- 1 root disk 7, 0 Dec 9 13:41 0
brw-rw---- 1 root disk 7, 1 Dec 9 13:41 1
brw-rw---- 1 root disk 7, 2 Dec 9 13:41 2
brw-rw---- 1 root disk 7, 3 Dec 9 13:41 3
brw-rw---- 1 root disk 7, 4 Dec 9 13:41 4
brw-rw---- 1 root disk 7, 5 Dec 9 13:41 5
brw-rw---- 1 root disk 7, 6 Dec 9 13:41 6
brw-rw---- 1 root disk 7, 7 Dec 9 13:41 7
As a workaround I am able to create the loop devices by modprobe loop and then I am able to mount the image successfully.
But where (I mean in which file/script) I need to change in kernel level to get a permanent solution, so the loop devices are created during booting.
I did some sort of googling, but I didn’t get any such satisfactory permanent solution or may be they are tedious.
Will the addition of ‘loop’ in /etc/modules help? So that if I compile the kernel (with the appropriate changes) and NUKE my system with the image, I can mount the image without any workaround (like modprobe or mknod etc..).
I am really in hurry and fast responses will be highly appreciated.
Thanks in advance.
Since you don't mention what distribution you are using, it is difficult for people to assess why your loop module is not being loaded at startup (except for the obvious 'it wasn't in /etc/modules'). If you know how to unpack an initrd (actually probably initramfs) image, have a look at your initrd and see if 'loop' is included there; if it is not, then that is one possible reason why 'loop' isn't loaded at boot time.
I need to know how to compile a new kernel with loop support built-in.
Actually I use the kernel rpms for the smooth running of my application part(related to SIP and VOIP).
I use kernel version of 2.6.14.
Anyways I faced this problem, when we tried to change system to 64 bit and changed the file system to ext3 from xfs type.
i checked the earlier version of my image and found that I dont have 'loop' enlisted in /etc/modules files.
So I ma wondering about the problem and need to know where exactly i need to change in kernel level to get a permanent solution.
If you can modprobe loop, it is already built.
Simply add it to /etc/modules should suffice - no need to compile a kernel just for that. Especially if it's supposedly so urgent.
But if I do that, then I think I will face the same issue when I will mount and install a new image or during the reboot. Actually in my system I need to change the image.iso quite frequently.So I want a permanent solution.
To add-on:-
in my previous images, where I can mount the image successfully, I dont see the 'loop' in /etc/modules.Thats why I am still wondering.as i can do a modprobe loop, so loop module is built in the kernel.
Basiccally my image.iso contains kernel packages + my application C++ codes.So as I change (it may be upgrade or fresh installation) my image.iso very frequently, so I need some thing permanently, so that I dont need this work-around again and again.
Will i go and change my /etc/modules file and compile the kernel to get updated kernel packages.
And if I use this packages for my application code to build a new image.iso, I hope I will not see this issue.
please lemme know
-KD
I think i am not able to bring out my issue or about my system clearly.Here it (overview of my system and my issue) goes :
1)I compile my kernel with some changes, if neccessary and create some packages.
2)I use those packages for/with my application codes ,compile and create a image.iso.
3)then I put it on my system (hardware).and at this step I generally do mount -o loop /image.iso /cdrom
4)here I faced this issue.
As I change my image (kernel codes+application codes)quite frequently, I need some changes at the kernel levels.
So what I need to check or do?
As I am not that much experienced in Linux, so it will be good if you can go into bit details.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.