[CLUE-Tech] modifying .iso filesystem when mounted -o loop? - info

Dave Price davep at kinaole.org
Thu Aug 29 13:55:53 MDT 2002


On Thu, Aug 29, 2002 at 01:01:21PM -0600, Jim Ockers wrote:
> 
> You should send the outputs of the following commands to me or the list:
> 
> mount
> cat /proc/mounts
> df
> 
Before:
dp:~# mount
/dev/hda1 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda2 on /boot type ext2 (rw)
/dev/hda3 on /home type ext2 (rw)
/dev/hda4 on /var type ext2 (rw)
/dev/sda1 on /usr type ext2 (rw)
/dev/hdb1 on /local type ext2 (rw)
/dev/hdd1 on /bay type ext2 (rw)
none on /proc/bus/usb type usbdevfs (rw)

dp:~# cat /proc/mounts
/dev/root / ext2 rw 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda2 /boot ext2 rw 0 0
/dev/hda3 /home ext2 rw 0 0
/dev/hda4 /var ext2 rw 0 0
/dev/sda1 /usr ext2 rw 0 0
/dev/hdb1 /local ext2 rw 0 0
/dev/hdd1 /bay ext2 rw 0 0
none /proc/bus/usb usbdevfs rw 0 0

dp:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1               141483     98692     35485  74% /
/dev/hda2                94667     11892     77887  14% /boot
/dev/hda3              5657591   4388716    975900  82% /home
/dev/hda4              2082603   1608350    366599  82% /var
/dev/sda1              1813784   1770515         0 100% /usr
/dev/hdb1             19188725  17088200   1100047  94% /local
/dev/hdd1             13073816   2943460   9466240  24% /bay

dp:~# mount -o rw,loop /bay/seat_of_the_soul.iso /iso

After:
dp:~# mount
/dev/hda1 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda2 on /boot type ext2 (rw)
/dev/hda3 on /home type ext2 (rw)
/dev/hda4 on /var type ext2 (rw)
/dev/sda1 on /usr type ext2 (rw)
/dev/hdb1 on /local type ext2 (rw)
/dev/hdd1 on /bay type ext2 (rw)
none on /proc/bus/usb type usbdevfs (rw)
/bay/seat_of_the_soul.iso on /iso type iso9660 (rw,loop=/dev/loop0)

dp:~# cat /proc/mounts
/dev/root / ext2 rw 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda2 /boot ext2 rw 0 0
/dev/hda3 /home ext2 rw 0 0
/dev/hda4 /var ext2 rw 0 0
/dev/sda1 /usr ext2 rw 0 0
/dev/hdb1 /local ext2 rw 0 0
/dev/hdd1 /bay ext2 rw 0 0
none /proc/bus/usb usbdevfs rw 0 0
/dev/loop0 /iso iso9660 ro 0 0

dp:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1               141483     98692     35485  74% /
/dev/hda2                94667     11892     77887  14% /boot
/dev/hda3              5657591   4388716    975900  82% /home
/dev/hda4              2082603   1608350    366599  82% /var
/dev/sda1              1813784   1770515         0 100% /usr
/dev/hdb1             19188725  17088200   1100047  94% /local
/dev/hdd1             13073816   2943460   9466240  24% /bay
/bay/seat_of_the_soul.iso
                        177088    177088         0 100% /iso
dp:~# cp /home/davep/seat.lst /iso
cp: cannot create regular file `/iso/seat.lst': Read-only file system
dp:~# 

dp:~# ls -l /
<snip>
drwxrwxr-x    6 davep    davep        2048 May 28 23:38 iso
</snip>

dp:~# ls -l /bay/se*.iso
-rwxrwxr-x    1 davep    davep    181338112 May 28 23:41
/bay/seat_of_the_soul.iso

> Run those commands before & after you mount the ISO image via loop, and
> send the before & after output.
> 
> I can only think of a few reasons why this would be the case:
> 
> 1. The filesystem on which the .ISO image resides is full or corrupt.
/bay has 9gb free  ...
dp:~# umount /bay
dp:~# fsck /dev/hdd1
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
/dev/hdd1: clean, 11665/1661376 files, 788007/3320596 blocks
dp:~# mount /bay

> 2. The filesystem on which the .ISO image resides is mounted read-only.
> 	(Or, maybe you are actually mounting a CD-ROM, not a .ISO image.
> 	Or, perhaps it's on a read-only network share - NFS, SMB, etc.)
 /bay is a removable ide drive - ext2, mounted rw - I have full
permissions on the drive under my normal userid, and download to it all
the time.

> 3. The ISO9660 filesystem driver in your kernel doesn't support read-
> 	write.  This would be unusual, but maybe not for an old kernel?

Newly built 2.4.18 kernel - debian woody source package.

dp:~# uname -a
Linux dp 2.4.18 #2 Wed Aug 28 10:47:04 MDT 2002 i686 unknown

> 4. You are doing something wrong in specifying the rw option.  If you
> 	did a remount, maybe you didn't specify the remount option?

Not sure how to check this ... my mount command is above. 

> 5. The .ISO image file that you are mounting as loop has the immutable
> 	attribute set on the host ext[23] filesystem.  (chattr +i)

the iso was built with a syntax like this:

mkisofs -J -R  -graft-points -path-list {file}  -o {file.iso}

> 6. Or, for some other reason (file ownership/permissions) the 
> 	filesystem is not permitting changes to be made to the 
> 	image file.

As above, I own the iso, which is rw and the mount point (also chmod
775)

cp into the /iso loop system fails whether as user=davep or root

aloha,
dave




More information about the clue-tech mailing list