Sabayon spinbase+nwipe

If you are using the daily ISO, please report issues here to keep confusion down in other forums. Questions or issues with Molecule also here

Moderator: Moderators

Sabayon spinbase+nwipe

Postby imaginasys » Thu Jan 30, 2014 18:28

Hi,

I'm a TOTAL newbie in regard of "molecule". So excuse me if I'm asking obvious stuff.

My project (to learn molecule) consist to build a livedvd that would boot the strict minimum, start a nwipe in a console ready to erase any disk connected. The objective is to have an easy product that could be use just to wipe disks.

So I have downloaded the SpinBase iso and would like to remaster it.

First step I have succeded in recreating the iso with molecule without modifying it... Not usefull, but It's a first step.

Second step, I want to add nwipe on the iso. But "app-crypt/nwipe" is on gentoo but not on sabayon repository.
Since it's a rather simple product with few dependencies. I want to emerge it from gentoo to add it on the remastered ISO.

Actually I have build a spec file to add 2 missing dependencies directly from sabayon : dev-util/pkgconfig, virtual/pkgconfig. Then I would like to add "apt-crypt/nwipe" with portage. And that's where I have problems...


Here is may spec file:
sabayhon-x86-nwipe.spec
Code: Select all
# Execution strategy
execution_strategy: iso_remaster

# pre chroot command, example, for 32bit chroots on 64bit system, you always
# have to append "linux32" this is useful for inner_chroot_script
prechroot: linux32

# Path to source ISO file (MANDATORY)
source_iso: /home/trebe03/molecule/isos/x86/Sabayon_Linux_14.01_x86_SpinBase.iso

# Outer chroot script command, to be executed outside destination chroot before
# before entering it (and before inner_chroot_script)
outer_chroot_script: /home/trebe03/molecule/spin/remaster_pre.sh

# Extra mkisofs parameters, perhaps something to include/use your bootloader
extra_mkisofs_parameters: -b isolinux/isolinux.bin -c isolinux/boot.cat

# Destination directory for the ISO image path (MANDATORY)
destination_iso_directory: /home/trebe03/molecule/sabayon


# List of packages that would be added from chrooted system (comma separated)
packages_to_add: dev-util/pkgconfig, virtual/pkgconfig


# Determine whether repositories update should be run (if packages_to_add is set)
# (default is: no), values are: yes, no.
execute_repositories_update: yes

# Inner chroot script command, to be executed inside destination chroot after
# packages installation and removal
inner_chroot_script_after: /home/trebe03/molecule/spin/inner_chroot_script_after.sh


Remaster_pre.sh
Code: Select all
#!/bin/sh
PKGS_DIR="/home/trebe03/molecule/sabayon/remaster/pkgs"
CHROOT_PKGS_DIR="${CHROOT_DIR}/var/lib/entropy/client/packages"
[[ ! -d "${PKGS_DIR}" ]] && mkdir -p "${PKGS_DIR}"
[[ ! -d "${CHROOT_PKGS_DIR}" ]] && mkdir -p "${CHROOT_PKGS_DIR}"
echo "Mounting packages over"
rm -rf "${CHROOT_PKGS_DIR}"/*
cp ${PKGS_DIR}/* "${CHROOT_PKGS_DIR}"/ -Ra
exit 0


inner_chroot_script_after.sh
Code: Select all
#!/bin/sh
PKGS_DIR="/home/trebe03/molecule/sabayon/remaster/pkgs"
CHROOT_PKGS_DIR="${CHROOT_DIR}/var/lib/entropy/client/packages"
[[ ! -d "${PKGS_DIR}" ]] && mkdir -p "${PKGS_DIR}"
[[ ! -d "${CHROOT_PKGS_DIR}" ]] && mkdir -p "${CHROOT_PKGS_DIR}"
echo "Mounting packages over"
rm -rf "${CHROOT_PKGS_DIR}"/*
cp ${PKGS_DIR}/* "${CHROOT_PKGS_DIR}"/ -Ra
exit 0


The project in its actual state is producing an ISO, but without app-crypt/nwipe.

Here is an extract of the messages I get from the command : sudo molecule sabayon-x86-nwipe.spec

(I have cut some obviously not usefull messages)

Code: Select all
<snip>
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-crypt/nwipe-0.14  148 kB

Total: 1 package (1 new), Size of downloads: 148 kB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-crypt/nwipe-0.14
openpty failed: 'out of pty devices'
>>> Downloading 'http://ftp.heanet.ie/pub/gentoo/distfiles/nwipe-0.14.tar.gz'
--2014-01-30 16:58:41--  http://ftp.heanet.ie/pub/gentoo/distfiles/nwipe-0.14.tar.gz
Resolving ftp.heanet.ie... 193.1.193.64, 2001:770:18:aa40::c101:c140
Connecting to ftp.heanet.ie|193.1.193.64|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 150685 (147K) [application/x-gzip]
Saving to: ‘/usr/portage/distfiles/nwipe-0.14.tar.gz’

     0K .......... .......... .......... .......... .......... 33% 44.0M 0s
    50K .......... .......... .......... .......... .......... 67% 54.4M 0s
   100K .......... .......... .......... .......... .......   100% 74.6M=0.003s

2014-01-30 16:58:43 (54.8 MB/s) - ‘/usr/portage/distfiles/nwipe-0.14.tar.gz’ saved [150685/150685]

 * nwipe-0.14.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                [ ok ]
>>> Unpacking source...
>>> Unpacking nwipe-0.14.tar.gz to /var/tmp/portage/app-crypt/nwipe-0.14/work
>>> Source unpacked in /var/tmp/portage/app-crypt/nwipe-0.14/work
>>> Preparing source in /var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14 ...
find: ‘/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14’: Bad file descriptor
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking
checking for a BSD-compatible install... rm: cannot remove 'conftest.dir/conftest.two': Bad file descriptor
rm: cannot remove 'conftest.dir/conftest.one': Bad file descriptor
/usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
rm: cannot remove './confYXNdqc/subs.awk': Bad file descriptor
rm: cannot remove './confYXNdqc/subs1.awk': Bad file descriptor
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... no
checking for i686-pc-linux-gnu-cc... no
checking for cc... no
checking for i686-pc-linux-gnu-cl.exe... no
checking for cl.exe... no
configure: error: in `/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
rm: cannot remove 'conftest.dir/conftest.two': Bad file descriptor
rm: cannot remove 'conftest.dir/conftest.one': Bad file descriptor

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14/config.log
 * ERROR: app-crypt/nwipe-0.14::gentoo failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *          ebuild.sh, line  93:  Called src_configure
 *        environment, line 138:  Called __eapi2_src_configure
 *   phase-helpers.sh, line 682:  Called econf
 *   phase-helpers.sh, line 577:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of `emerge --info '=app-crypt/nwipe-0.14::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-crypt/nwipe-0.14::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-crypt/nwipe-0.14/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-crypt/nwipe-0.14/temp/environment'.
 * Working directory: '/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14'
 * S: '/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14'

>>> Failed to emerge app-crypt/nwipe-0.14, Log file:

>>>  '/var/tmp/portage/app-crypt/nwipe-0.14/temp/build.log'

 * Messages for package app-crypt/nwipe-0.14:

 * ERROR: app-crypt/nwipe-0.14::gentoo failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *          ebuild.sh, line  93:  Called src_configure
 *        environment, line 138:  Called __eapi2_src_configure
 *   phase-helpers.sh, line 682:  Called econf
 *   phase-helpers.sh, line 577:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of `emerge --info '=app-crypt/nwipe-0.14::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-crypt/nwipe-0.14::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-crypt/nwipe-0.14/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-crypt/nwipe-0.14/temp/environment'.
 * Working directory: '/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14'
 * S: '/var/tmp/portage/app-crypt/nwipe-0.14/work/nwipe-0.14'
╠ Cleaned: 4 files and directories
>> [ChrootHandler|sabayon-x86-nwipe.spec] executing post_run
>> [ChrootHandler|sabayon-x86-nwipe.spec] executing kill
>>  (3/4) [Runner|sabayon-x86-nwipe.spec] executing molecule.specs.plugins.remaster_plugin.CdrootHandler
>> [CdrootHandler|sabayon-x86-nwipe.spec] executing pre_run
>> [CdrootHandler|sabayon-x86-nwipe.spec] preparing environment
>> [CdrootHandler|sabayon-x86-nwipe.spec] compressing chroot
>> [CdrootHandler|sabayon-x86-nwipe.spec] spawning: /usr/bin/mksquashfs /var/tmp/moleculek1uQdWchroot/root /var/tmp/moleculek1uQdWchroot/cdroot/livecd.squashfs -noappend -no-progress
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on /var/tmp/moleculek1uQdWchroot/cdroot/livecd.squashfs, block size 131072.

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, no xattrs
        duplicates are removed
Filesystem size 594469.13 Kbytes (580.54 Mbytes)
        35.89% of uncompressed filesystem size (1656524.38 Kbytes)
Inode table size 2728942 bytes (2664.98 Kbytes)
        30.96% of uncompressed inode table size (8813066 bytes)
Directory table size 2475655 bytes (2417.63 Kbytes)
        36.82% of uncompressed directory table size (6724040 bytes)
Number of duplicate files found 26507
Number of inodes 272824
Number of files 231186
Number of fragments 7027
Number of symbolic links  5790
Number of device nodes 5102
Number of fifo nodes 2
Number of socket nodes 0
Number of directories 30744
Number of ids (unique uids + gids) 34
Number of uids 12
        root (0)
        portage (250)
        ldap (439)
        polkitd (105)
        man (13)
        nobody (65534)
        unknown (1006)
        bin (1)
        unknown (384)
        unknown (600)
        pcscd (102)
        postfix (207)
Number of gids 29
        root (0)
        disk (6)
        audio (18)
        cdrom (19)
        usb (85)
        tty (5)
        portage (250)
        video (27)
        floppy (11)
        dialout (20)
        kmem (9)
        lp (7)
        tape (26)
        entropy (1000)
        ldap (439)
        mail (12)
        unknown (1010)
        utmp (406)
        messagebus (410)
        unknown (1006)
        wheel (10)
        postdrop (208)
        bin (1)
        unknown (35)
        locate (245)
        polkitd (102)
        postfix (207)
        uucp (14)
        cron (16)
>> [CdrootHandler|sabayon-x86-nwipe.spec] chroot compressed successfully
>> [CdrootHandler|sabayon-x86-nwipe.spec] executing post_run
>> [CdrootHandler|sabayon-x86-nwipe.spec] executing kill
>>  (4/4) [Runner|sabayon-x86-nwipe.spec] executing molecule.specs.plugins.remaster_plugin.IsoHandler
>> [IsoHandler|sabayon-x86-nwipe.spec] executing pre_run
>> [IsoHandler|sabayon-x86-nwipe.spec] building ISO image
>> [IsoHandler|sabayon-x86-nwipe.spec] spawning: /usr/bin/mkisofs -J -R -l -no-emul-boot -boot-load-size 4 -udf -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -V Molecule remaster -o /home/trebe03/molecule/sabayon/remaster_Sabayon_Linux_14.01_x86_SpinBase.iso /var/tmp/moleculek1uQdWchroot/cdroot
Setting input-charset to 'UTF-8' from locale.
Size of boot image is 4 sectors -> No emulation
  1,55% done, estimate finish Thu Jan 30 12:00:02 2014
  <snip>
 99,03% done, estimate finish Thu Jan 30 12:00:05 2014
Total translation table size: 2048
Total rockridge attributes bytes: 18992
Total directory bytes: 38912
Path table size(bytes): 150
Max brk space used 30000
323151 extents written (631 MB)
>> [IsoHandler|sabayon-x86-nwipe.spec] built ISO image: /home/trebe03/molecule/sabayon/remaster_Sabayon_Linux_14.01_x86_SpinBase.iso
>> [IsoHandler|sabayon-x86-nwipe.spec] generating md5 for: /home/trebe03/molecule/sabayon/remaster_Sabayon_Linux_14.01_x86_SpinBase.iso
>> [IsoHandler|sabayon-x86-nwipe.spec] executing post_run
>> [IsoHandler|sabayon-x86-nwipe.spec] executing kill
>> [Runner|sabayon-x86-nwipe.spec] All done


So I get an ISO but without nwipe on it.

Any suggestions ? I'm stuck in the dark!! Documentation is rather scarse.

Regards,
Bernard :mrgreen:
imaginasys
Simple Hen
 
Posts: 51
Joined: Sat Nov 23, 2013 6:59

Re: Sabayon spinbase+nwipe

Postby imaginasys » Fri Jan 31, 2014 17:01

Replying to my own post since nobody did it before!

I was missing an essential part for using portage : the gcc compiler...
I modified the package to add list for :

packages_to_add: dev-util/pkgconfig, virtual/pkgconfig, sys-devel/binutils, sys-devel/gcc, sys-devel/autoconf, sys-devel/m4


And I'm still waiting for molecule to cook a nice iso with the app-crypt/nwipe package from gentoo installed!

I'll post further to confirm it works.

Regards,
Bernard :mrgreen:
imaginasys
Simple Hen
 
Posts: 51
Joined: Sat Nov 23, 2013 6:59

Re: Sabayon spinbase+nwipe

Postby imaginasys » Fri Jan 31, 2014 17:38

Yes I confirm it works. I have been able to generate the remastered image with app-crypt/dban added on it.
It is a little too big 715MB, I would like to reduce the size of the image. After having compile nwipe, I don't need the compiler anymore, portage, equo, and more ...

Let's go to step#2: add customization :

Make a cleanup of whatever I don't need anymore to run nwipe (reduce size of image);
use my own langage (french) and use fr-ca keyboard;
start nwipe at boot and output to a log on a USB key I will have mounted before;
put my own background image at start;

I will post further once I found out howto do some customization.

Regards,
Bernard :mrgreen:
imaginasys
Simple Hen
 
Posts: 51
Joined: Sat Nov 23, 2013 6:59

Re: Sabayon spinbase+nwipe

Postby wolfden » Sun Feb 02, 2014 23:56

how about request package nwipe to be added to repo than u could skip the compiler stuffs and portage to reduce the size
wolfden
Sharecropper
 
Posts: 9050
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA


Return to ISO Testing & Molecule

Who is online

Users browsing this forum: No registered users and 0 guests