Date: Wed, 23 Mar 2011 19:48:49 +0000 From: four.harrisons@googlemail.com To: editor@d3photography.com Cc: freebsd-questions@freebsd.org Subject: Re: Automating mounting of ISO images Message-ID: <4d8b7112.9155df0a.0c42.049b@mx.google.com>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----=0D=0AHash: SHA1=0D=0A=0D=0AOn 3/23/11 = 2:49 PM, Ryan Coleman wrote:=0D=0A> I have a folder full of ISOs that we'= re sharing on the network instead of having the discs available (seems li= ke a good idea, right?)=0D=0A>=20=0D=0A> But I want to automate the proce= ss on boot instead of having to write a static script to do the work.=0D= =0A>=20=0D=0A> Disc images are located in /mount/disc_images/ (all are IS= Os)=0D=0A> They need to mount into /mount/office_files/images/FILENAME [w= ithout the .iso extension]=0D=0A>=20=0D=0A> How can I do this? I've alway= s been given these types of scripts in the past at an old job but I don't= have access to those examples anymore.=0D=0A=0D=0AHi Ryan,=0D=0A=0D=0AYo= u can put something like this in /etc/rc.conf to get the device files=0D=0A= created automatically:=0D=0A=0D=0Amdconfig_md0=3D"-t vnode -f /mount/disc= _images/Image1.iso"=0D=0Amdconfig_md1=3D"-t vnode -f /mount/disc_images/I= mage2.iso"=0D=0Amdconfig_md2=3D"-t vnode -f /mount/disc_images/Image3.iso= "=0D=0A=0D=0ABecause these devices (/dev/md0, /dev/md1, /dev/md2) will be= created=0D=0Abefore /etc/fstab is processed, you can then add the follow= ing entries=0D=0Ain that file:=0D=0A=0D=0A/dev/md0 /mount/office_files= /images/Image1 cd9660 ro 0 0=0D=0A/dev/md1 /mount/office_f= iles/images/Image2 cd9660 ro 0 0=0D=0A/dev/md2 /mount/offi= ce_files/images/Image3 cd9660 ro 0 0=0D=0A=0D=0ACheck out the= rc(8) man page (http://bit.ly/fuwn5n) for more information=0D=0Aabout ho= w the startup scripts work, as well as the one that processes=0D=0Athe de= vice creation directives above - /etc/rc.d/mdconfig=0D=0A=0D=0AFinally, y= ou can always add your own custom startup scripts to=0D=0A/usr/local/etc/= rc.d if you need to do something that the standard=0D=0Astartup scripts c= an't handle.=0D=0A=0D=0AHope that helps,=0D=0AGreg=0D=0A- --=20=0D=0AGreg= Larkin=0D=0A=0D=0Ahttp://www.FreeBSD.org/ - The Power To Serve= =0D=0Ahttp://www.sourcehosting.net/ - Ready. Set. Code.=0D=0Ahttp://t= witter.com/sourcehosting/ - Follow me, follow you=0D=0A-----BEGIN PGP SIG= NATURE-----=0D=0AVersion: GnuPG v1.4.11 (Darwin)=0D=0AComment: Using GnuP= G with Mozilla - http://enigmail.mozdev.org/=0D=0A=0D=0AiEYEARECAAYFAk2KT= n4ACgkQ0sRouByUApCAiwCfZzO8jnaKIFxuOoZotU8Ac49I=0D=0AMMIAni1KMFDqLe1YeMaS= /LZUsgrV1PfY=0D=0A=3DJUk3=0D=0A-----END PGP SIGNATURE-----=0D=0A_________= ______________________________________=0D=0Afreebsd-questions@freebsd.org= mailing list=0D=0Ahttp://lists.freebsd.org/mailman/listinfo/freebsd-ques= tions=0D=0ATo unsubscribe, send any mail to "freebsd-questions-unsubscrib= e@freebsd.org"=0D=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d8b7112.9155df0a.0c42.049b>