Hi
This is my first post, I have some experience with Unix, but not FreeBSD itself, it's the first time that I'm playing with FreeBSD and I will be very thankful if you could help.
I have a FreeBSD system that I want to customize, I used Linux tools to mount the FreeBSD file system offline (UFS2) and I found something like this:
Until here all is good, the loader.gz is similar to initrd.gz or vmlinuz.gz for Linux that is decompressed on the fly and in this case contains all files of the file system. I want to edit it, for example, edit default configuration files, add new binaries, and save it to use with my customization.
It's .gz, so I extracted with gzip and all is fine, however I'm unable to mount it or find a way easy way to modify its contents. From the .gz extracted:
How to "mount" this ELF to edit the configuration files and replace binaries and pack it again?
Can you help me please? If you could provide detailed guidance I will be very thankful.
Have a good day.
This is my first post, I have some experience with Unix, but not FreeBSD itself, it's the first time that I'm playing with FreeBSD and I will be very thankful if you could help.
I have a FreeBSD system that I want to customize, I used Linux tools to mount the FreeBSD file system offline (UFS2) and I found something like this:
Code:
Ricks-MacBook-2:ufs root# ls -lha /Volumes/FreeBSD/
total 198352
drwxr-xr-x 7 root wheel 512B Oct 15 2012 .
drwxrwxrwt@ 5 root wheel 170B Jul 9 14:02 ..
-rw-r--r-- 1 root wheel 0B Oct 15 2012 sps
drwxr-xr-x 3 root wheel 512B Oct 15 2012 boot
-rwxr-xr-x 1 root wheel 130M Oct 14 2012 loader.gz
drwxr-xr-x 2 root wheel 512B Nov 4 2009 usr
drwxr-xr-x 2 root wheel 512B Nov 4 2009 var
Ricks-MacBook-2:ufs root#
It's .gz, so I extracted with gzip and all is fine, however I'm unable to mount it or find a way easy way to modify its contents. From the .gz extracted:
Code:
Ricks-MacBook-2:ufs root# file loader-no-gz
loader-no-gz: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped
Can you help me please? If you could provide detailed guidance I will be very thankful.
Have a good day.