I am trying to create a customised version of the FreeBSD boot ISO. I have tried a number of methods and nothing quite seems to work. One problem I have is extracting the contents of the original ISO. I have tried these methods:
This command seems to produce some errors while extracting the files, although they whiz past too quickly to see properly, one error reporting it was ignoring a file, and maybe something about out of sequence, as well as some 'can't create' messages.
And
Then I modify one of the scripts in these folders and then I try and create my modified ISO from the contents of the folder I have modified.
However, the ISO file I create always seems to be much larger than the original ISO, even if I just add one extra word to an existing script. E.g. original ISO is 652,998,656 bytes, my new ISO is 841,009,152 bytes!
My original (mounted) ISO folder is showing a size of 796,377k (using the du command) and the copied folder (mounting and copying) is 842,648k. It looks like the original iso is compressing the contents somehow, and that the copy process is also adding extra stuff in there. The tar extraction method yields a folder size of 639,852k.
As a result my new ISO is too big to fit on a CD when I use the mount and copy method, despite the original being well short of the maximum size. If I use the tar extraction method I end up with an ISO that can fit onto CD but this doesn't seem to work properly, the initial boot is okay, but after selecting the boot option 'multi-user' the boot goes most of the way through but then reports repeated MEDIUM_ERRORS and at the end reports that it fails with error 19.
I am basing my attempts on these articles:
http://www.freebsd.org/doc/en_US.ISO885 ... anced.html
viewtopic.php?f=4&t=39187&p=217349&hilit=mkisofs#p217349
Any ideas where these processes are going wrong? I was wondering if the original ISO has symlinks or something which the copy process is expanding or the tar process is not handling properly, but I don't know enough about FreeBSD and CD file systems to go any further with this.
tar -C /path/to/isofolder/ -pxvf /path/to/iso
This command seems to produce some errors while extracting the files, although they whiz past too quickly to see properly, one error reporting it was ignoring a file, and maybe something about out of sequence, as well as some 'can't create' messages.
And
mdconfig -a -t vnode -f file.iso -u 0
mount_cd9660 /dev/md0 /mnt/freebsd_install/
cp -R /mnt/freebsd_install/* /path/to/isofolder/
Then I modify one of the scripts in these folders and then I try and create my modified ISO from the contents of the folder I have modified.
mkisofs -J -R -V "Custom" -no-emul-boot -b boot/cdboot -o ~/mycustom.iso /path/to/isofolder/
However, the ISO file I create always seems to be much larger than the original ISO, even if I just add one extra word to an existing script. E.g. original ISO is 652,998,656 bytes, my new ISO is 841,009,152 bytes!
My original (mounted) ISO folder is showing a size of 796,377k (using the du command) and the copied folder (mounting and copying) is 842,648k. It looks like the original iso is compressing the contents somehow, and that the copy process is also adding extra stuff in there. The tar extraction method yields a folder size of 639,852k.
As a result my new ISO is too big to fit on a CD when I use the mount and copy method, despite the original being well short of the maximum size. If I use the tar extraction method I end up with an ISO that can fit onto CD but this doesn't seem to work properly, the initial boot is okay, but after selecting the boot option 'multi-user' the boot goes most of the way through but then reports repeated MEDIUM_ERRORS and at the end reports that it fails with error 19.
I am basing my attempts on these articles:
http://www.freebsd.org/doc/en_US.ISO885 ... anced.html
viewtopic.php?f=4&t=39187&p=217349&hilit=mkisofs#p217349
Any ideas where these processes are going wrong? I was wondering if the original ISO has symlinks or something which the copy process is expanding or the tar process is not handling properly, but I don't know enough about FreeBSD and CD file systems to go any further with this.