Results 1 to 4 of 4
This is my first post here and i hope you guys can help me out. I'm following instructions in this link boink wiki / LinuxP2V and i'm hitting a major ...
- 11-27-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 1
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 boink wiki / 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 VM.
Here is the error message that i'm getting:
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.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
Any ideas?
Thanks in advanc
- 11-29-2008 #2
Read the man pages!
Mount doesn't have a "-o loop" option. You should probably just try "mount" without extra options (but with device and directory of course). If that doesn't work tryCode:man mount man initrd less /usr/src/linux/Documentation/initrd.txt
Otherwise RTFMCode:mount -t ramfs /tmp/initrd.ext2 /mnt/initrd
- 11-29-2008 #3Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
@Realshock:
That error is telling you it doesn't recognise the image type. What happens when you run 'file' against your image?
@_madman_Code:chris@angua:~/dev/scratch$ file test.img test.img: Linux rev 1.0 ext2 filesystem data
Code:man mount
Perhaps not every version of mount supports the loop option, but mine certainly does and I don't think I'm in the minority. Also, I'd expect the error for an unknown option to be different.THE LOOP DEVICE
One further possible type is a mount via the loop device. For example,
the command
mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024
Note that the steve option is the invalid one here, loop works by itself.Code:chris@angua:~/dev/scratch$ sudo mount -o loop,steve test.img tmp/ mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or soTo be good, you must first be bad. "Newbie" is a rank, not a slight.
- 11-30-2008 #4
I apologize, I didn't see 'THE LOOP DEVICE' section towards the bottom of the man page myself. I sort of get this steam buildup in my head whenever someone asks a good question like this. I have personally been tied up with other things (besides the forums) and I tend to be short, because I cannot spend the time I need/wish to on a good problem like this.
So anyway I think you are trying to access the file system inside your initrd image. This is my first real crack at this (I use a monolithic kernel). You don't actually mount this file if you want to modify it. Use this command line instead to extract its contents into the current directory (so use a new/tmp one):
More information can be found at : Modifying initrd imageCode:gzip -dc ../initrd.gz |cpio -id


Reply With Quote
