Loopback mounting FreeBSD ISO

So I was trying to install FreeBSD 6.0 to help out someone on the OpenSolaris NFS interest group and I couldn't burn the second CD:

# ls -la
total 2465222
drwxr-xr-x   2 tdh      staff          4 Mar 21 21:29 .
drwxr-xr-x   7 tdh      sys            7 Mar 22 02:31 ..
-rw-r--r--   1 tdh      staff    578408448 Nov  3 16:13 6.0-RELEASE-i386-disc1.iso
-rw-r--r--   1 tdh      staff    682371072 Nov  3 17:45 6.0-RELEASE-i386-disc2.iso
# cdrw -i 6.0-RELEASE-i386-disc2.iso
Looking for CD devices...
Initializing device...done.
Size required (682371072 bytes) is greater than available space (681986048 bytes).

You don't need it to configure the machine, it just has the extra packages. Well, I tried to install them from an FTP server and had too many things not install. I also forgot how tiring selecting ports on FreeBSD can be at times.

I reinstalled and decided to try to use 'lofiadm' to mount out the 2nd ISO image. I mean, do I really need to burn that many images?

[tdh@wont FreeBSD]> sudo lofiadm -a /zoo/isos/FreeBSD/6.0-RELEASE-i386-disc2.iso /dev/lofi/1
[tdh@wont FreeBSD]> sudo mount -o ro /dev/lofi/1 /zoo/isos/mnt/freebsd/d2
mount: /dev/lofi/1 is not this fstype
[tdh@wont FreeBSD]> sudo mount -F hsfs -o ro /dev/lofi/1 /zoo/isos/mnt/freebsd/d2

I guessed at a 'hsfs' image, it seems to work. Can I export it?

[tdh@wont ~]> sudo share /zoo/isos/mnt/freebsd/d2

And what does a client see?

[tdh@adept ~]> showmount -e wont
Export list for wont:
/export/zfs              (everyone)
/export/zfs/nfsv2        (everyone)
/export/zfs/nfsv3        (everyone)
/export/zfs/nfsv4        (everyone)
/export/zfs/tdh          (everyone)
/zoo/isos/mnt/freebsd/d2 (everyone)

And I was able to do an NFS install on the FreeBSD box for this second set of ports. I could probably pull all of the stuff out of the ISO images and make a single DVD image, but I don't forsee too many FreeBSD installs in my future.


Technorati Tags:
Orginally posted on Kool Aid Served Daily
Copyright (C) 2006, Kool Aid Served Daily
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

tdh

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today