Debranding
From openSUSE
Contents |
Tools required:
Rembrand
This is the tool that removes the images and icons that have a Novell or SUSE trademark visible in them. Without this tool, this "project" would never have even started.
The latest version is available from the Rembrand repository.
makeSUSEdvd
This is used to create both the DVD file structure used during the initial stages of the process, as well as the final DVD image.
To get the latest version, and more information, look here
debrand-openSUSE.sh
This is a script I wrote to automate the process of building a de-branded DVD. You can find the latest version, presently 0.4.2a, [here]
There are a few other requirements that are required:
- mkfs.cramfs which is needed to recreate the initial root file system. This is a part of the utils-linux package and installed by default.
- a graphics editor. I used Kiconedit for the small icons, and either Krita or GIMP for larger pictures.
Stage one: Initial preparation.
Preparation step one
The first thing you need to create a de-branded installation is to create the DVD structure. To ensure no problems with restricted licenses, I used the OSS CD images as the source. To do this I used:
makeSUSEdvd -g 752B6F6F -d /local/DVDs -t /local2/10.2-rebrand -i -f
| -g | This specifies the GPG key to use |
| -d | This specifies the location of the CD images |
| -t | This is where the DVD structure is built |
| -i | Ensures makeSUSEdvd doesn't make a DVD image |
| -f | This is not available in the release version of makeSUSEdvd.
It was added to my own copy and forces makeSUSEdvd to use the directories I specify. By default, makeSUSEdvd will not use pre-existing directories. |
Once this structure was built, the next step is to create an archive of the directory structure so as to reduce the time required, and the $HOME/.makeSUSEdvdrc file is copied to /local.
Initially, I was silly enough to actually create an OSS DVD image, mount it as a loop-back device and then use the mounted image as a source. The suggestion was made to use the "-i" and "-C" options to remove these unnecessary steps.
Preparation step two
The next step was to create a temporary directory structure where rembrand could place the RPM files it modified.
My debrand-openSUSE.sh script expects to find the structure inside /tmp/rembrand. The exact directory layout for rembrand is:
/tmp/rembrand/i586 /tmp/rembrand/i686 /tmp/rembrand/noarch
As a part of the debranding process, I also include the directory:
/tmp/rembrand/setup/slide/pic
which contains these three replacement images:
- 01_welcome.png
- 02_opensuse.png
- 10_devel.png
Once the directory structure was created, and these replacement slide-show images in place, I archived them up.
To date, the text files shown during the installation slideshow haven't yet been edited.
Preparation step three
The next step is to create a series of patches to the pattern files. This is to remove packages that aren't needed in, but are installed by default.
The next version of debrand-openSUSE.sh will have this support added.
Preparation step four
The next step actually consists of a few smaller steps.
part one
This part was initially performed by rembrand.
The first time I used rembrand, I passed the option "-O". This created a directory structure containing copies of the blank images it used as replacements. The initial [01/index.htm demonstration] consisted of the results of this part of the process.
part two
Part two involved me duplicating the structure created in part one but with the original copies of the images that were replaced. This allowed me to see just what image was replaced, and what information a replacement image should convey.
The replacement images fall into three catagories:
- images that had a little editing. Often this was to remove an image of Geeko, or the word SUSE.
- images that came from other packages in the default installation.
- images that I created from scratch. These demonstrate my complete lack of artistic ability.
part three
This part, while not strictly required, is useful as a backup procedure. It means that I don't have to go through the whole process of recreating, or finding, the images again if i accidentally delete the wrong directory.
Preparation step five
This step is to de-brand the installation root file system. This also has a few steps to it, some requiring the ability to use the root password.
As a small note, the installation root file system is a CRAMFS file system. This is a read-only file system so any changes will require a complete rebuild after making the changes.
First, I needed to mount the root file system. Depending on the system you're building for, you'll need to use one of these commands:
sudo mount -o loop /suse/boot/i386/root /mnt sudo mount -o loop /suse/boot/x86_64/root /mnt sudo mount -o loop /suse/boot/ppc/root /mnt
Next, create a directory in which to copy the present root file system. Here I used:
mkdir -p /local/root.new
Next, copy the contents from the mounted root into the directory I was using to build the new root. The command I used was:
sudo rsync -a /mnt/* /local/root.new/
As the "old" root contains hard links, I used sudo to perform the copy operation. I suppose I could have used cp but my preference was for rsync.
Next, change the ownership of everything in the "new" root file system to your $UID. This my not be required but I did this because doing so allowed me to compare and copy replacement images using a GUI.
These replacement images can be found in the following locations inside the "new" root file system:
/usr/share/YaST2/theme/openSUSE/control-center /usr/share/YaST2/theme/openSUSE/desktops /usr/share/YaST2/theme/openSUSE/icons/22x22/apps /usr/share/YaST2/theme/openSUSE/icons/32x32/apps /usr/share/YaST2/theme/openSUSE/icons/48x48/apps /usr/share/YaST2/theme/openSUSE/testpapers /usr/share/YaST2/theme/openSUSE/wallpapers /usr/share/YaST2/theme/openSUSE/wizard
Next, change the ownership back to root. This may be an unnecessary step, but it was one I used, "just in case."
Finally, create the new root file system. To do this, depending on the architecture, choose one of the following:
sudo /sbin/mkfs.cramfs /local/root.new /local/root.i386 sudo /sbin/mkfs.cramfs /local/root.new /local/root.ppc sudo /sbin/mkfs.cramfs /local/root.new /local/root.x86_64
Stage two: Actually building the de-branded installation.
This uses the debrand-openSUSE.sh script and expects to have the following available to it:
| /local/10.2-GM.tar |
This is the archive containing the pre-built DVD structure created by makeSUSEdvd. Using only the OSS CD ISO images, this will be about 3.3GB in size. |
| /local/tmp.rembrand.tar.bz2 |
This contains the directory structure where rembrand will write the modified RPMs |
| /local/rembrand-rebranded |
This contains all the images that will be used by rembrand to replace any images that need to be replaced. |
| /local/rembrand.patches |
This contains the patches to the patterns. Support for this is being added to debrand-openSUSE.sh v0.3. |
Also, the script is set up to use the following paths:
| /local |
This holds the archives created during the preparation stage. It has a copy of the .makeSUSEdvdrc file used by makeSUSEdvd when using the "-C" option It also has the directory structure containing images to be used as replacements. Finally, it holds the temporary directory /local/rembrand-rebranded.tmp which is used by rembrand. When called, rembrand will either take images from the directory containing the replacements, or will create a blank image if a replacement isn't found. The image it uses, either a blank image or one already supplied, is placed in this directory. |
| /local2 |
This is where the DVD structure is unpacked. It's also where makeSUSEdvd will create the DVD_DIR to contain the de-branded DVD ISO. |
The initial version of debrand-openSUSE.sh didn't have support for including a de-branded installation system. To include a de-branded installation system requires doing two things at once, using two different consoles.
- On the first console, start up debrand-openSUSE.sh
- On the second console use the following command:
while [ ! -s "/local/10.2-rebrand/boot/i386/root" ] do sleep 30 done && cp /local/root.i386 /local/10.2-rebrand/boot/i386/root
The only reason for needing this second console is that I hadn't modified the debrand-openSUSE.sh script to check if the new root file system exists, and to copy it into the DVD directory structure after unpacking it. Nor have I copied my "new" root file system into the archive containing the DVD structure.
debrand-openSUSE.sh versions from v0.2 look for files that match the following names and copy them into the correct location:
| /local/root.i386 |
This is the root file system for 32bit systems. This will be copied into the DVD structure as /local/10.2-rebrand/boot/i386/root |
| /local/root.x86_64 |
This is the root file system for 64bit x86 systems. This will be copied into the DVD structure as /local/10.2-rebrand/boot/x86_64/root |
| /local/root.ppc |
This is the root file system for PPC based systems. This will be copied into the DVD structure as /local/10.2-rebrand/boot/ppc/root |
What debrand-openSUSE.sh actually does.
The first thing that the script does is to unpack all the archives into the places it expects to find things.
The second thing the script does is to search for every RPM file in the unarchived DVD structure. The full pathnames for all the RPMs found are passed to rembrand to check. If a package matches one of those in the internal list of packages, rembrand replaces the images that need replacing. The script uses the following command to do this:
for i in i586 i686 noarch x86_64 ppc
do
[ ! -d "${i}" ] && continue
find "/local2/10.2-rebrand/suse/${i}" -type f -name "*.rpm" | \
sort | \
xargs rpm-rembrand -a \
-R "/tmp/rembrand/${i}" \
-I "/local/rembrand-rebranded" \
-O "/local/rembrand-rebranded.tmp"
rm "/local2/10.2-rebrand/suse/${i}/orig_list.txt"
done
The reason for using a loop is that it allows me to recreate the proper directory structure for the modified RPMs and makes it easier when copying them back into the DVD structure.
As to the options used by rembrand:
| -a |
This replaces optional images as well as non-optional images. Optional images are mainly screenshots. I'm presently undecided whether to keep using this option. |
| -R |
This is where I want rembrand to write the modified RPMs |
| -I |
This is where to find my replacement images |
| -O |
This is where to write the replacement images. This will contain my images and any new blanks. |
The first time I used rembrand, as I had no replacement images, I didn't use "-I" as there was nothing available to act as replacements.
The third step is to copy the modified RPMs back into the DVD structure, replacing the unmodified ones. At the same time, because of how I set things up, the replacement slideshow images are also copied into the DVD structure.
The fourth step is to copy the contents of /local/rembrand-rebranded.tmp into /local/rembrand-rebranded. This isn't really required except after any upgrades of rembrand where previously unknown images have been blanked.
The fifth step the script performs is to call makeSUSEdvd. By using:
makeSUSEdvd -C
makeSUSEdvd reads the contents of the ${HOME}/.makeSUSEdvdrc file and builds a new de-branded DVD image using the modified RPMs.
The last step is to copy the DVD image from /local2/DVD_DIR to /local2, and to delete /local2/DVD_DIR, ready for the next time I use debrand-openSUSE.sh.
While not strictly required, it does stop makeSUSEdvd from creating an alternative DVD_DIR due to /local2/DVD_DIR already existing.
Some actual examples of a de-branded openSUSE
Now that you've seen how to create your own re-branded, or just a de-branded, version of openSUSE Linux, you can see how my re-branding took shape here.

