LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   un/mounting loop devices (http://www.linuxquestions.org/questions/linux-software-2/un-mounting-loop-devices-212831/)

box_l 08-03-2004 06:03 AM

un/mounting loop devices
 
hi,

two things really.

1) can an .iso be mounted as read/write not just read only? if not how do i edit an .iso?

2) i have a file that i mount as a loop device but when i try to umount it tells me busy and does not empty the file(mount point)

this is my script

mv linux.2 linux.gz
gzip -d linux.gz
mount -o loop linux New
echo "please do whatever you need to,"
echo "then press any key to continue..."
read $JUNK
echo "copy menu file"
echo "Press any key to continue..."
read $JUNK
cp /home/lawrenb/Documents/linux.2/menu.sh /home/lawrenb/Documents/linux.2/New/bin
echo "menu.sh copied!"
echo "Press any key to continue..."
read $JUNK
umount New
gzip -9c linux > linux.gz
mv linux.gz linux.2

i do close any browser windows etc. before trying to umount so it should not be active.

regards

BoX

jailbait 08-03-2004 06:21 PM

"2) i have a file that i mount as a loop device but when i try to umount it tells me busy and does not empty the file(mount point)"

I think that you have to allocate the loop device with the losetup command just before you mount it and deallocate the loop device with the losetup command just before you umount it. See:
man losetup

---------------------
Steve Stites

box_l 08-04-2004 08:15 AM

thanks,
have tried that now.
but i does not work for me i just get an error.

the problem with the loop not unmounting correctly only happens if i have used konqueror or similar to browse the files.

is the loop being held open in some kind of browser history maybe?

??

BoX

jailbait 08-04-2004 10:48 AM

"the problem with the loop not unmounting correctly only happens if i have used konqueror or similar to browse the files.

is the loop being held open in some kind of browser history maybe?"

Yes, but konqueror should release the files when you close konqueror.

--------------------------
Steve Stites

box_l 08-05-2004 10:03 AM

ah, you say 'close'.
i have just been going up to levels above the mounted file, with other browser windows open too.
i will try closing all browser windows first.

Ta


BoX


All times are GMT -5. The time now is 11:54 PM.