#1  
Old 27th November 2008, 20:20
realshock realshock is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default mount loop device?

This is my first post here and i hope you guys can help me out. I'm following instructions in this link http://boink.pbwiki.com/LinuxP2V and i'm hitting a major road bump. All i'm trying to do is to add BusLogic support to initrd image so kernel won't panic when i boot the Virtual Machine.

Here is the error message that i'm getting:


Code:
cd /boot
gzip -dc initrd-2.4.20-8.img > /tmp/initrd.ext2
mkdir /mnt/initrd
mount -o loop /tmp/initrd.ext2 /mnt/initrd
mount: you must specify the filesystem type
How do i resolve the filesystem issue. I tried to add -t ext3 and -t ext2 and that didn't work. /dev/loop0 > 7 exist and lsmod lists loop as a module.
Any ideas?

Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 28th November 2008, 12:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

I think you cannot mount a gzipped file.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th November 2008, 17:35
realshock realshock is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you falko for your response. Originally i was trying the mount -o loop command on the VMware machine using a live CD. I decided to give the mount command a shot on the physical machine and for no apparent reason It worked but it's mounting loop as read only:

Code:
# mkdir /mnt/initrd
# mount -0 loop /boot/initrd.img.2.6.24
loop: module loaded
# ls /mnt/initrd
bin   dev2   keyscripts  linuxrc.conf  proc    scripts  usr
bin2  devfs  lib         loadmodules   sbin    sys      var
dev   etc    linuxrc     mnt           script  tmp
#touch /mnt/initrd/test
touch: cannot touch `/mnt/initrd/test': Read-only file system
#mount 
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/boot/initrd.img-2.6.24-default1 on /mnt/initrd type cramfs (rw,loop=/dev/loop/0)
#
The reason for all i'm doing is to add lines into linuxrc to insert modules at boot time. I can not edit linuxrc when filesystem is mounted read only. Do you need to install an additional package for debian to make it read cramfs read-write?
I checked on the file permissions for loop (i'm logged in root anyways):
Code:
#ls -al /dev/loop*
brw-rw---- 1 root disk 7, 0 2008-11-27 17:17 /dev/loop0
brw-rw---- 1 root disk 7, 1 2008-11-27 17:17 /dev/loop1
brw-rw---- 1 root disk 7, 2 2008-11-27 17:17 /dev/loop2
brw-rw---- 1 root disk 7, 3 2008-11-27 17:17 /dev/loop3
brw-rw---- 1 root disk 7, 4 2008-11-27 17:17 /dev/loop4
brw-rw---- 1 root disk 7, 5 2008-11-27 17:17 /dev/loop5
brw-rw---- 1 root disk 7, 6 2008-11-27 17:17 /dev/loop6
brw-rw---- 1 root disk 7, 7 2008-11-27 17:17 /dev/loop7
All i need to do as add two insmod lines to include BusLogic modules. I tried to use mkinitrd but in debian it seems that the command is very limited and doesn't allow inserting modules on the fly. the man page said that mkinitrd can insert modules into new image and i think lines needs to be added /etc/mkinitrd/modules and i'm not sure how since the file i have is almost empty except some commented lines.

So two questions for you here:
- Is there a way i can mount the loop file system on "true" read-write?
- How do i use mkinitrd properly under debain? The documentation that i found was regarding redhat in which mkinitrd gives a lot more options it seems ... there are -f and -v options that don't exist with debian ( I updated mkinitrd-tool with apt-get to newest version)

Last edited by realshock; 28th November 2008 at 21:03.
Reply With Quote
  #4  
Old 29th November 2008, 18:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

You can build a new initrd with the needed modules as follows:

Add your modules to /etc/modules, then run
Code:
depmod 2.6.24
mkinitrd -v -f /boot/initrd.img.2.6.24 2.6.24
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 2nd December 2008, 02:35
realshock realshock is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

problem revolved by creating ram disk image using initramfs instead of mkinitrd ... that added required scsi modules

Thanks a lot for the help
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mandriva 2008.1 Spring squealing miodragz Installation/Configuration 6 17th May 2008 23:41
error: Unable to mount loop filesystem, CENTO 5.1 leeeonardo Installation/Configuration 3 15th March 2008 18:09
ISPConfig Installation error linuxuser1 Installation/Configuration 4 26th February 2008 06:38
Slow connection to FC6 system post-LAMP install? cfspence Installation/Configuration 8 29th January 2008 19:09
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05


All times are GMT +2. The time now is 13:51.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.