Loop device
email.listen at googlemail.com
email.listen at googlemail.com
Wed Jun 7 19:41:13 UTC 2006
Am Wed, 7. June 2006 16:20 schrieb VIGNESH:
> Anything else I can do Shall I create a new loop devie using losetup... I
> have to finish making my livecd guys..So please reply a bit fast..
>
> Thanks in advance
>
> Vignesh
>
> On 6/6/06, VIGNESH <vignesh1986 at gmail.com> wrote:
> > @Karl I `ve tried that its not working... Here you go
> >
> > sudo -s
> > root at ubuntu:/home/vignesh # mount -o loop -t iso9660 my\ ubuntu\
> > 0.2.isomnt mount: could not find any device /dev/loop#
There are syntax errors:
mount -o loop -t iso9660 my\ ubuntu\ 0.2.isomnt
^ ^ ^
wrong spaces ' ' ___________|_______| |
missing space ' ' __________________________|
Either you made a mistake using Kurts example or you made a mistake whilst
posting/copy'n'pasting the command syntax you used.
Hhhm, have to cite your former posting.
:sudo -s
:root at ubuntu:/home/vignesh # mount -o loop -t iso9660 my\ ubuntu\ 0.2.iso mnt
^ ^
also wrong spaces _______________________________________|_______|
:mount: could not find any device /dev/loop#
Do you really get the message 'loop#'?
> >
> > On 6/6/06, Karl Goetz <kamping_kaiser at internode.on.net> wrote:
> > > VIGNESH wrote:
> > > > ubuntu at ubuntu:~$ sudo losetup -d /dev/loop1
> > > > ubuntu at ubuntu:~$ sudo mount ubuntu-live.iso mnt -o loop=/dev/loop1 -t
> > >
> > > why all the extra crap?
> > > shell:path$ sudo mount -o loop -t iso9660
> > > dapperInstallx86.iso/mnt/dapper/ Password:
> > > shell:path$
> > >
> > > kk
> > >
> > > > iso9660mount: wrong fs type, bad option, bad superblock on
> > > > /dev/loop1, missing codepage or other error
> > > > In some cases useful info is found in syslog - try
> > > > dmesg | tail or so
> > > >
> > > > ubuntu at ubuntu:~$ syslog
> > > > bash: syslog: command not found
What is to expect, there is no syslog command.
May be you wanted to have a look to the '/var/log/syslog' file?
(it might be you have to become root first, not every system gives access to
the syslog file for regular users)
This can be done using less:
less /var/log/syslog
or using tail:
tail -f -n100 /var/log/syslog
> > > > ubuntu at ubuntu:~$ dmesg | tail
> > > > VFS: Can't find ext3 filesystem on dev loop1.
> > > > VFS: Can't find ext3 filesystem on dev loop2.
> > > > VFS: Can't find ext3 filesystem on dev loop3.
> > > > VFS: Can't find ext3 filesystem on dev loop4.
> > > > VFS: Can't find ext3 filesystem on dev loop5.
> > > > VFS: Can't find ext3 filesystem on dev loop6.
> > > > VFS: Can't find ext3 filesystem on dev loop7.
> > > > VFS: Can't find ext3 filesystem on dev loop1.
Which says that mount tries to use ext3 file system and not iso9660
(For me an indication for a mistyped or wrong mount command)
> > > > Unable to identify CD-ROM format.
> > > >
> > > > This is what I get The losetup worked . I also added iso9660 to
> > > > /proc/filesystems using modprobe iso9660
Ok, lets start from the beginning....
First we have to know what you've done to your '/dev/loop' directory. This
because it seems to me that you used losetup in a bit irritating way.
(Don't worry, you'r not alone. I've seen much worser examples from other users
than yours ;-)
#1
What says a ' ls -lR /dev/loop* '?
(We have to know the state of you /dev/loop/ directory)
__________________________________
#2
After this, please reboot your machine.
(To have a clean /dev directory again)
If your machine is up again please do a ' ls -lR /dev/loop* ' again and tell
us what it says.
__________________________________
#3
Then open a terminal and just do a 'mount'
(We have to do this to know if there are other loop devices mounted)
What does it say?
__________________________________
#4
After this we will have a closer look to your *iso file.
We need to verify that it is not broken.
Please download from the same site of the original *iso file the according
*md5 file or the file MD5SUMS which has the md5sum of your iso image.
Open a terminal and go (use cd) to the directory of your iso file
Do a:
md5sums nameoftheimage.iso
(this may need some minutes for a dvd image on older machines.)
This should give you _exactly_ the same md5 sum than in the MD5SUMS file.
If not, your iso file is broken!
#4a
If there is no file which has the md3sum of your image use the command 'file'
to check your image.
For this type:
(replace nameofyourimage.iso with the name of your iso file)
file nameofyourimage.iso
example:
If I do this for the dapper dvd iso image:
md5sum dapper-dvd-i386.iso
I get the answer:
d707601cb6b006041c886d38bdf51907 dapper-dvd-i386.iso
This is _exactly_ the same what is in the MD5SUMS file.
If i use the file command I get:
file dapper-dvd-i386.iso
dapper-dvd-i386.iso: ISO 9660 CD-ROM filesystem data 'Ubuntu 6.06 i386'
(bootable)
#5
If we pass all of the above (without errors) we will start to mount a loop
device.
(See this as an exercise or an example. :-)
#5.1
First we have to set up a mount point for the image.
Open a terminal and become root by typing:
sudo -s
Enter your password
#5.2
Go to the /mnt directory by typing:
cd /mnt
Create a new directory named loop1 by typing:
mkdir loop1
#5.3
Go to the directory which has your iso image (use cd).
Mount the iso image:
(replace nameofyourimage.iso with the name of your iso file)
mount -t auto -o loop nameofyourimage.iso /mnt/loop
If you pass #5.1 to #5.3 and don't see an error message your iso image is
mounted to /mnt/loop1.
Congratulations :-))
#6
So now it's time for some polishing.
You know that an /etc/apt/sources.list file has a line which points to the
install cd.
(deb cdrom:[Ubuntu 6.06 _Dapper Drake_ - Release i386 (20060531.2)]/ dapper
main restricted)
So during installation of software sometimes you will be asked to put the cd
into the cd-drive and hit Enter.
In my eyes it is always anoying to search for the cd, open the drive, ..., ...
In short, I don't like to be the disk jokey again and again.
Not to mention that exactly when I'm asked to put in the cd I've mislaid it...
(And there may be a lot of other reasons, my little daughter just used the cd
to tinker a mobile, a friend used it as a beer mat / beer coaster,...)
So let's have the ido image mounted as permanent loop device on boot up.
For this we have to do 4 steps.
1) set up a mount point for the image.
Done, see #5.1
2) then test the image.
Done, see #5.3
3) and last edit the /etc/fstab file so that the image is mounted on boot up.
As user root open the /etc/fstab file in an editor of your choice, e.g. by
pressing 'Alt + F2' key and type:
gksudo gedit /etc/fstab
At the end of the file add a line:
/data/iso/dapper-dvd-i386.iso /mnt/loop1 iso9660 loop 0 0
Where:
/data/iso/dapper-dvd-i386.iso is the full path and the name of your iso
image
/mnt/loop1 is the mount point (directory) of your iso image
iso9660 is the filesystem type
loop says to be a loop image.
(Instead of 'loop' you may use 'loop,noauto' so root has to mount it expicitly
or 'loop,user,noauto' so that every user may mount this device.
The first 'loop,noauto' is an aspect of security. And don't forget you have to
mount the loop image first every time you do an apt-get update or an update
from synaptic.
The later one, 'loop,user,noauto', is interesting to allow users to mount
several cd images. It is a convinient way to establish a cdrom server
whithout having up to 8 drives.)
Also the mount point /mnt/loop1 may be given a more self explaining name,
e.g. /mmnt/dapper or /mnt/install
4) Edit /etc/apt/sources.list and add the loop device
As user root open the /etc/apt/sources.list file in an editor of your choice,
e.g. by pressing 'Alt + F2' key and type:
gksudo gedit /etc/apt/sources.list
At the beginning of the file ther should be a line for the install cd:
(In this example I will refer to the dapper CD)
deb cdrom:[Ubuntu 6.06 _Dapper Drake_ - Release i386 (20060531.2)]/ dapper
main restricted
Add an '#' in the first column, change it to:
#deb cdrom:[Ubuntu 6.06 _Dapper Drake_ - Release i386 (20060531.2)]/ dapper
main restricted
(Now your will not be asked for the cd anymore)
Below this line put a new line for the (loop) iso image:
deb file:/mnt/loop1/ dapper main restricted
Save the file.
Start a terminal and do an:
apt-get update
In the beginning you should see lines like:
Get:1 file: dapper Release.gpg [189B]
Get:2 file: dapper Release [1880B]
Enjoy :-))
regards,
thomas
More information about the ubuntu-users
mailing list