Page 1 of 1

/rescue use 1 GB

Posted: Sun Jul 26, 2015 4:56 am
by ASX
Just realized that there is an error in our ISOs, related to /rescue.

The fact is that the many binary under /rescue should have been hard links to /rescue/id (that's the way FreeBSD ship them in their base.txz, in our ISOs those links doesn't exists anymore, and have been replaced with a copy of the file.

The result clearly is an unneeded huge /rescue.

I'm currently investigating the problem, although I suspect it was introduced from when we started fetching kernel and base.

FreeBSD base:
$ tar tvf base.txz | grep rescue
drwxr-xr-x 0 root wheel 0 Nov 11 2014 ./rescue/
-r-xr-xr-x 0 root wheel 8022232 Nov 11 2014 ./rescue/id
hr-xr-xr-x 0 root wheel 0 Nov 11 2014 ./rescue/nc link to ./rescue/id
hr-xr-xr-x 0 root wheel 0 Nov 11 2014 ./rescue/echo link to ./rescue/id
hr-xr-xr-x 0 root wheel 0 Nov 11 2014 ./rescue/kldstat link to ./rescue/id
...

Re: /rescue use 1 GB

Posted: Sun Jul 26, 2015 3:22 pm
by ASX
I made a few test, that's what I have found so far:
- extracting /rescue as part of the base.txz, result in a valid structure, one file and 140 links, this is confirmed from the fact that the command 'ls -li' return the same inode number for all links.

- creating the iso image of /rescue only, either using mkisofs or using grub-mkrescue result in an iso of sizes consistent with a normal size of /rescue, respectively 8 MB and 12 MB.

The interesting part is that mounting the iso (by means of mdconfig) list the files in /rescue with different inode each one. I don't know yet if this is correct, incorrect, or a side effect of mdconfig.

What I know is that copying the file from the mounted iso to the hard disk result in the expansion of each linked file.

- work in progress -

Re: /rescue use 1 GB

Posted: Sun Jul 26, 2015 5:22 pm
by ASX
finally at least reached a conclusion: the ISO is correct, the extraction process is failing:

extracting the file from the ISO, using 'tar' does work correctly.

Code: Select all

tar xvf /home/as/Downloads/GhostBSD10.1-BETA2-20150712-0019-xfce-amd64.iso ./rescue
# du -s rescue
7892 rescue
# ls -li rescue | more
total 1094224
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 [
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 atmconfig
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 badsect
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 bsdlabel
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 bunzip2
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 bzcat
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 bzip2
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 camcontrol
6662463 -r-xr-xr-x 139 root wheel 8022232 Jul 12 04:40 cat
...
Next, looking into extraction/installation utilities