You are not logged in.

#1 2012-09-23 19:16:56

replabrobin
Member
Registered: 2010-05-06
Posts: 151

mount issue

I'm trying to modify a boot image on a thinkpad, I have obtained a disk image from the relevant lenovo .iso and can mount this ok on one machine, on the target I'm seeing a mount error

# ls -al /mnt
total 8
drwxr-xr-x  2 root root 4096 Aug 27 20:56 .
drwxr-xr-x 21 root root 4096 Sep 23 18:24 ..
root@everest /home/robin/tmp:
# ls -al disk.img
-rw-r--r-- 1 root root 33871872 Sep 23 16:03 disk.img
root@everest /home/robin/tmp:
# fdisk -l disk.img

Disk disk.img: 33 MB, 33871872 bytes
64 heads, 32 sectors/track, 32 cylinders, total 66156 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
disk.img1   *          32       65535       32752    4  FAT16 <32M
# mount -v -t vfat -oro,loop,offset=16384 /home/robin/tmp/disk.img /mnt
mount: /mnt: mount failed: No such file or directory
root@everest /home/robin/tmp:

I assume I'm missing some utility or package. I checked the disk.img md5sum on the system which works and the failing one (it has the CD drive) and they both check. What am I missing?

Offline

#2 2012-09-23 19:33:43

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 684
Website

Re: mount issue

there is no need to use offset in these days... just use:

losetup --partscan --find --show disk.img
mount /dev/loop0p1 /mnt

do you reboot your system after kernel upgrade? Or are using an older kernel? (if later, then you need to load loop module manually)

Offline

#3 2012-09-23 19:39:26

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,017

Re: mount issue

What if you create a directory in /mnt or in your home and try to mount to that?

Offline

#4 2012-09-23 22:21:17

replabrobin
Member
Registered: 2010-05-06
Posts: 151

Re: mount issue

djgera wrote:

there is no need to use offset in these days... just use:

losetup --partscan --find --show disk.img
mount /dev/loop0p1 /mnt

do you reboot your system after kernel upgrade? Or are using an older kernel? (if later, then you need to load loop module manually)

When I try your first command I'm seeing an error eg

# losetup --partscan --find --show disk.img
losetup: failed to setup loop device: No such file or directory

I tried modprobe loop, but that didn't seem to make any difference. I guess my loop devices are bust on this machine somehow. The kernel is 3.5.3-1.

Offline

#5 2012-09-23 22:23:13

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 684
Website

Re: mount issue

again, do you reboot your machine after kernel upgrade?, is loop module loaded?

Offline

#6 2012-09-23 22:48:10

replabrobin
Member
Registered: 2010-05-06
Posts: 151

Re: mount issue

djgera wrote:

again, do you reboot your machine after kernel upgrade?, is loop module loaded?

the loop module appears not to be loaded, I have rebooted and it's there now and the mount command works again. Thanks very much. I suspect I left an upgrade going when I left the machine on Friday.

Offline

Board footer

Powered by FluxBB