Date: Sat, 18 Jun 2005 23:07:35 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Wojciech Puchar <wojtek@tensor.3miasto.net> Cc: Chris Huff <chuff@digifonica.com>, freebsd-questions@freebsd.org Subject: Re: Making a custom FreeBSD iso Message-ID: <20050618200735.GA1445@gothmog.gr> In-Reply-To: <Pine.NEB.4.62.0506182111230.3917@chylonia.3miasto.net> References: <42B3108B.9070801@digifonica.com> <Pine.NEB.4.62.0506182111230.3917@chylonia.3miasto.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-06-18 21:12, Wojciech Puchar <wojtek@tensor.3miasto.net> wrote: >> Im ripping the iso image from the cd with dd >> >> dd if=/dev/acd0 of=file.iso bs=2048 >> >> Then, Im mounting the iso image >> >> mdconfig -a -t vnode -f /usr/iso-orig/file.iso -u 0 >> >> mount -t cd9660 /dev/md0 /iso >> >> ..and copying its contents to disk with cp -R > > tar cf - .|(cd /newdir;tar xpf -) would be better and copy all dev's > etc properly. True. This will also copy hard links as hard links, which seems to be bitting the previous poster. Just using cp(1) is not enough some times: % gothmog:/tmp/foo$ mkdir src dst % gothmog:/tmp/foo$ echo hello world > src/0 % gothmog:/tmp/foo$ for linkcount in `jot 100 1 100`; do link src/0 src/$linkcount; done % gothmog:/tmp/foo$ du -sk src dst % 4 src % 2 dst % gothmog:/tmp/foo$ cp -Rp src/* dst/ % gothmog:/tmp/foo$ du -sk src dst % 4 src % 204 dst On the other hand, tar(1) can help a lot: % gothmog:/tmp/foo$ mkdir dst2 % tar: Error opening archive: Empty input file: Inappropriate file type or format % gothmog:/tmp/foo$ tar -c -C src -f - . | tar -xv -C dst2 -f - % x . % x 0 % [...] % x 98 % x 99 % x 100 % gothmog:/tmp/foo$ du -sk src dst* % 4 src % 204 dst % 4 dst2 % gothmog:/tmp/foo$ > >Now, all of the sudden, the /rescue dir grows from 3.5M to 455M so after i > >copy my scripts to the extracted iso filesystem on my hard disk and try to > >make an iso I cannot burn the ISO because its way too big. Can anyone help > >me with this? > > iso9660 doesn't have links marked as links. just relink them all > same-sized files to one Or just scratch the existing (cp -R) copy of the ISO files and start over with tar, cpio or any tool that knows how to deal with hard links :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050618200735.GA1445>