Posts Tagged Sabayon

EfikaMX: Install Sabayon to NAND

I assume you have a working bootable Sabayon image on a sd card.

Boot from the Sabayon SD

Once booted up:
Install u-boot-tools:
equo install u-boot-tools
We need this later

Format the nand root partition:
mkfs.ext4 /dev/sda2

Mount the clean nand root partition:
mkdir /mnt/nand && mount /dev/sda2 /mnt/nand

Rsync / from the SD to the new nand partition:
rsync -avHAXx --delete --numeric-ids --exclude "/mnt/*" / /mnt/nand/

Change fstab on the nand root partition:
nano /mnt/nand/etc/fstab
Change /dev/mmcblk0p1 to /dev/sda1

Unmount nand root partition
umount /dev/sda2

Now we go ahead with the boot partition.
mkfs.ext3 /dev/sda1

Rsync boot partition from the SD to the new partition:
mkdir /mnt/temp && mount /dev/mmcblk0p1 /mnt/temp
mkdir /mnt/nandboot && mount /dev/sda1 /mnt/nandboot

rsync -avHAXx /mnt/temp/ /mnt/nandboot/

Regenerate uboot image:

cd into /mnt/nandboot

nano boot.script

change so it looks like this root=/dev/sda2

Now regenerate the uboot image:

mkimage -A arm -T script -C none -n "boot" -d boot.script  boot.scr

Reboot the system and remove the SD card.

Leave a comment

Create your own spinoff!

If you are in a small company or simply in a situation where you want to install a preselected list of programs then why shouldn’t you just grab SabayonCore modify the ISO so it will have anything you want and burn that to a disc. Or maybe you want to create your own Sabayon based distro and fork it a bit? Yes you can!

The tool we have in stock to achieve this is called molecule.
First install molecule (equo install molecule)

Then grab an example spec file.

All I can say is that if you want to start something based on the CoreCD you want to have a look at this spec file:

http://gitweb.sabayon.org/?p=molecule.git;a=blob;f=examples/specs/5-x86-g-remaster-add-games.spec;h=5623f42dee8595990663ad2e72697cafd9ce9143;hb=29d45a193430bc8afbda65d0cf10f692144f5f70

(also found in /etc/molecule/examples)

Since I am for now only looking into a 64bits mastered ISO I’ve commented out:

# 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

Next I point to where My ISO I want to remaster is:

# Path to source ISO file (MANDATORY)
source_iso: /home/joost/Sabayon_Linux_CoreCD_DAILY_amd64.iso

Now where does this all go:

# Destination directory for the ISO image path (MANDATORY)
destination_iso_directory: /home/joost

Tell molecule to update that ISO before installing anything (that is the next point in line)

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

Tell it to add packages (in this case my set @lxde)

# List of packages that would be added from chrooted system (comma separated)
packages_to_add: @lxde

Ofcourse you can add as many packages here as you want!

I can imagine this does not actually give the perfect result yet.
In my example I use the @lxde set and it contains the gdm login manager by default. On CoreCD chroot there is actually nothing that triggers this to auto start. We also need to configure a file called /etc/conf.d/xdm and set it to use gdm.

Here an example snip. how thats done:

Make it use gdm:
sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="gdm"/g' /etc/conf.d/xdm

Make xdm startup automaticly (and thus load gdm)
rc-update add xdm

so I created inner_chroot_script_after.sh
#!/bin/bash
# Use gdm by default
sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="gdm"/g' /etc/conf.d/xdm
# automaticly start xdm
rc-update add xdm
# to be sure, cleanup
equo cleanup

All these commands should be put in a file, and we point our specs file to trigger it from within the chroot like this:
# Inner chroot script command, to be executed inside destination chroot after
# packages installation and removal
inner_chroot_script_after: /home/joost/inner_chroot_script_after.sh

Now run molecule and make it all happen:
molecule sabayon-lxde-amd64.spec

Keep in mind I cannot guarantee anything YET, but it should give you a head start.
Also note that this is a strategy used where we take an excisting iso and modify it basicly. Much more advanced things ARE possible but lets start here rite?

12 Comments

Follow

Get every new post delivered to your Inbox.

Join 174 other followers