Berry Linux Remastering How to (Aug 15, 2006)
- Intoroduction -------
These are some instructions and tips for those wanting to remaster your own
version of Berry Linux. You don't even need a CD writer to test it.
- DISCLAIMER -------
WE CAN NOT BE HELD LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO
HARDWARE OR SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING
FROM THE USE OF THIS DOCUMENT.
USE AT YOUR OWN RISK.
- Hardware Environment -------
* You need a swap partition of at least 500 MB, I haven't done this with less
than 2 GB of swap so I'm not sure if you need 2 GB or 1 GB.
* You will also need 2 GB free on a disk
- Work Sequence -------
* Boot with BERRY CD. Open Root shell. (all commands below are run from a
Root shell)
* Make 2 directories on a partition, master and source. (we'll call them
/mnt/source and /mnt/master )
# mkdir /mnt/source/BERRY/
# mkdir /mnt/master/BERRY/
# cp -Rp /BERRY/* /mnt/source/BERRY/
# cp /sysroot/BERRY/boot.img /mnt/master/BERRY/
# chroot /mnt/source/BERRY/
You are now "chrooted" in the BERRY source directory.
In case of an error about chroot, do this,
# mount -o remount,exec /mnt/source/BERRY/
# mount -t proc /proc proc
edit /etc/resolv.conf to add your name server and check that you are connected
to the internet (ping google.com).
now you can install other programs.
if you want to install other programs you will need to remove some programs
too. edit what you will and make the changes you want ( e.g. kde defaults
etc. ) the kde defaults for user BERRY are stored in /etc/skel
Then press Ctrl+D to leave being chrooted.
To make the "BERRY" file ( the compressed file ) run
* for cloop
# mkisofs -R -l -V "BERRY iso9660 filesystem" -hide-rr-moved -v \
/mnt/source/BERRY | create_compressed_fs - 65536 > \
/mnt/master/BERRY/BERRY
* for squashfs (needs mksquashfs)
# mkisofs -R -l -V "BERRY iso9660 filesystem" -hide-rr-moved -v \
/mnt/source/BERRY | /opt/berry/mksquashfs > \
/mnt/master/BERRY/BERRY
or
# /opt/berrymksquashfs /mnt/source/BERRY/* /mnt/master/BERRY/BERRY
Now you can either make the final ISO image for burning or you can test it by
symlinking the BERRY directory in a root directory of a partition e.g.
# cd /
# ln -s /mnt/master/BERRY BERRY
then you can make a boot floppy :
# dd if=/mnt/master/BERRY/boot.img of=/dev/fd0 (for 2.88MB)
# dd if=/mnt/master/BERRY/boot-fd.img of=/dev/fd0 (for 1.44MB)
and boot off that, _without the cd in the drive_, when looking for the CD it
will look for a Directory called "BERRY" on /dev/hda1 a2 a3 b1 b2 etc. etc.
if it finds one then it will say "accessing CD on /dev/hda1" and use that as
the CD.
After this you are ready to make the final iso image to burn so run the
following:
# mkisofs -l -J -V "BERRY-your_name" -v -b BERRY/boot.img \
-c BERRY/boot.cat -o /somewhere/BERRY-cd.iso /mnt/master
make sure it isn't bigger than 700MB ( or 650 if you want to use the 74 minute
cdroms )
ls -lh /somewhere/BERRY-cd.iso
then burn it !
Thats it :)
I hope these are accurate, please email me if I have missed anything.
- Example for remastering -------
1) Boot with Berry CD
2) mkdir /mnt/source
mkdir /mnt/master
3) mount /dev/hda3 /mnt/source
mount /dev/hda2 /mnt/master
4) mkdir /mnt/source/BERRY
mkdir /mnt/master/BERRY
5) cp -Rp /BERRY/* /mnt/source/BERRY/
cp /sysroot/BERRY/boot.img /mnt/master/BERRY/
6) chroot /mnt/source/BERRY
7) mount -t proc /proc proc
8) rpm -e ..... (The three office rpms)
9) umount /proc
10) CRTL-D
11) mkisofs -R -l -V "BERRY Linux System" -hide-rr-moved -v \
/mnt/source/BERRY | /opt/berry/create_compressed_fs - 65536 > \
/mnt/master/BERRY/BERRY