# Editing freebsd 7 bootable iso



## wshpoon (Sep 11, 2012)

Greetings,

I have a bootable FreeBSD 7 iso, which I would like to edit. However, after the edit and recreation of the new iso, the bootable image seems corrupt. I can't login as root unless I change the shell from csh(1) to sh(1) and can't get DHCP since some file systems are not writable anymore. When I burn the original iso, all seems fine.

Here is what I have done.

```
mkdir bsdimage
cd bsdimage
tar xvf ../freebsd7.iso
<add new file to bin directory>
mkisofs -b boot/cdboot -no-emul-boot -J -o ../newfreebsd7.iso -R -V BSD_RECOVERY_DISK -iso-level 3 .
```
Now, when I burn the new image on a CD and try to boot, it has the problems mentioned earlier.

Any ideas? Maybe the tar(1) command corrupts something...

Thanks


----------



## numpad5 (Sep 11, 2012)

Have a look at "-p" option in tar manpage, just a guess but that might be the problem.


----------



## wshpoon (Sep 11, 2012)

*That didn't work*



			
				numpad5 said:
			
		

> Have a look at "-p" option in tar manpage, just a guess but that might be the problem.



Thanks for the replay, but I still have the same problems. It still complains that /var/db is readonly and I can't login as root and I can't get a dhcp address.


----------



## Majorix (Sep 11, 2012)

Is there a particular reason you want to install a legacy version of FreeBSD? 7.x will soon become unsupported. Also, what are you adding to your .iso?


----------



## Beastie (Sep 12, 2012)

Perhaps it has to do with a certain game server starting with the letter "M"...


----------



## wshpoon (Sep 12, 2012)

Majorix said:
			
		

> Is there a particular reason you want to install a legacy version of FreeBSD? 7.x will soon become unsupported. Also, what are you adding to your .iso?



This is just a boot recovery disk and not an installation disk and I don't think it will make a difference about the version. I am just adding a shell script to the bin directory.


----------



## wshpoon (Sep 12, 2012)

Beastie said:
			
		

> Perhaps it has to do with a certain game server starting with the letter "M"...



Not sure what you mean, but it doesn't have anything to do with any gaming. I just want to add a shell script to hardened freebsd 7 bootable iso and then burn it. 

I work for a information security company and we don't do anything illegal


----------



## Beastie (Sep 12, 2012)

wshpoon said:
			
		

> Not sure what you mean, but it doesn't have anything to do with any gaming. [...] I work for a information security company and we don't do anything illegal


All good then. I take back what I said.


----------



## mamalos (Sep 12, 2012)

Maybe you could post the steps/commands you're following one-by-one so someone could identify where the problem might be.


----------



## numpad5 (Sep 12, 2012)

This is my last idea on this for now, but try to modify the iso, instead of going through all the tar steps, with this from ports:

http://www.freebsd.org/cgi/url.cgi?ports/sysutils/isomaster/pkg-descr

EDIT: You will obviously want to work on a copy of the original iso, this program is supposed to let you add files to an existing iso, so it might work easier than mkisofs, I haven't tried it myself though.

The hope is that if its something wrong with the way the iso is being made or with permissions that this will be easier to preserve the properties of the original boot iso.


----------

