Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Remaster livecd install-x86-minimal-2004.0.iso
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
daledude
n00b
n00b


Joined: 05 Apr 2004
Posts: 52

PostPosted: Sat May 01, 2004 1:12 am    Post subject: HOWTO: Remaster livecd install-x86-minimal-2004.0.iso Reply with quote

HOWTO: Remaster livecd install-x86-minimal-2004.0.iso

This howto explains the steps involved in remastering install-x86-minimal-2004.0.iso. I understand 2004.1 is out, but my needs required the use of this particular livecd. This howto may inadvertently apply to 2004.1.

I do not get into specifics on adding to the new iso. I do offer some pointers on where things should go and where they are located after the new .iso is created.

REQUIREMENTS:

  • 650megs to 1gig recommended harddrive space. About 350 megs of harddrive space just for the initial setup. I use a second harddrive.
  • Download install-x86-minimal-2004.0.iso from one of the local mirrors.


QUICK START WITH EVERYTHING COMBINED:
This quick section only displays the commands used to get the job done. All sections after this give a bit more explanation and break down into this process.
Code:
mkdir /tmp/remaster
cd /tmp/remaster
mkdir tmpiso
mkdir master

mount -o loop /tmp/install-x86-minimal-2004.0.iso tmpiso
cp -rp tmpiso/* master/
umount tmpiso

# mkfsiso recreates boot.cat
# so having it exist makes
# mkfsiso fail in some cases
rm master/isolinux/boot.cat

# optionally you may do the following
# if your really hard up for space
rmdir tmpiso
rm /tmp/install-x86-minimal-2004.0.iso

mkzftree -u master/zisofs zisofs

# we will be recompressing the new
# root tree later
rm -rf master/zisofs

# add perl binary to livecd
# by creating a new directory to place it
mkdir master/docs/myprogs
cp -p /usr/bin/perl master/docs/myprogs

# the above does not add perl to root
# tree directly. I placed it on the cd (somewhere)
# and will use a soft link to it within the root tree.
# note that /mnt/cdrom is mounted by the livecd
# when it is booted and its there you access
# files/programs/etc that are not in the root tree
ln -s /mnt/cdrom/docs/myprogs/perl zisofs/usr/bin/perl

# we did this 'rm -rf' before, but must
# be done anytime we recompress zisofs.
rm -rf master/zisofs
mkzftree zisofs master/zisofs

cd master

mkisofs -R -J -l -no-emul-boot -boot-load-size 4 -boot-info-table -r -b isolinux/isolinux.bin -c isolinux/boot.cat -o ../newlivecd.iso -z zisofs .

cd ..


SETUP WORKING DIRECTORY STRUCTURE:
Code:
mkdir /tmp/remaster
cd /tmp/remaster
mkdir tmpiso
mkdir master


COPY ISO FILES TO HARDDRIVE:
I assume you downloaded install-x86-minimal-2004.0.iso to /tmp.
Code:
mount -o loop /tmp/install-x86-minimal-2004.0.iso tmpiso
cp -rp tmpiso/* master/
umount tmpiso

# mkfsiso recreates boot.cat
# so having it exist makes
# mkfsiso fail in some cases
rm master/isolinux/boot.cat

# optionally you may do the following
# if your really hard up for space
rmdir tmpiso
rm /tmp/install-x86-minimal-2004.0.iso


UNCOMPRESS THE MASTER ROOT TREE:
Code:
mkzftree -u master/zisofs zisofs

# we will be recompressing the new
# root tree later
rm -rf master/zisofs


OVERVIEW OF OUR WORKING DIRECTORY STRUCTURE SO FAR:
  • master/ - This directory holds the structure of our soon to be new .iso.
  • master/isolinux - This contains the kernel and boot code.
  • master/zisofs - This shouldn't exist since we removed it. But, it will be the compressed root tree with the important OS binaries.
  • master/docs - This is where you will place large files not neccessary for a running livecd system. You can create a directory in master/ called something else. But, I stuck with just using this existing one.
  • master/rr_moved - Doesn't matter.
  • zisofs - This is our uncompressed root tree where we will add new programs. This whole tree is loaded into memory when using the livecd so it is very important to not add uneeded files here. Even in some instances you should make soft links from here to master/docs/wherever so they do not take much memory and are accessible in a normal way. i.e. /usr/bin/azureus -> docs/myprogs/usr/bin/azureus, etc.


ADDING PROGRAMS TO OUR UNCOMPRESSED zisofs ROOT TREE:
Here is where you will add programs and libraries to the zisofs directory (not master/zisofs!). I won't get into details but do offer a small example. It is important to know that all files in the zisofs tree are loaded into memory. So make it damn small! In my simple example I show how to do this. Remember, this is only an example and I leave it to you to know what you want to actually do.

Code:
# add perl binary to livecd
# by creating a new directory to place it
mkdir master/docs/myprogs
cp -p /usr/bin/perl master/docs/myprogs

# the above does not add perl to root
# tree directly. I placed it on the cd (somewhere)
# and will use a soft link to it within the root tree.
# note that /mnt/cdrom is mounted by the livecd
# when it is booted and its there you access
# files/programs/etc that are not in the root tree
ln -s /mnt/cdrom/docs/myprogs/perl zisofs/usr/bin/perl


RECOMPRESS THE NEW ROOT zisofs TREE:
If you modified or added files to zisofs then you must
do this for your changes to actually be put on the livecd.
If you haven't changed anything in zisofs/, then skip this.
Code:
# we did this 'rm -rf' before, but must
# be done anytime we recompress zisofs.
rm -rf master/zisofs
mkzftree zisofs master/zisofs


MASTER YOUR NEW LIVECD INTO AN .ISO FILE:
After this step you will have a file called newlivecd.iso which you can burn and boot from. I use vmware so I just made the cdrom point to this newlivecd.iso for iteration testing. I love vmware.

If you followed the small example above where I added the perl binary you can test it after your booted into the livecd by just typing 'perl -v' and 'ls -l /usr/bin/perl' and notice where it's linked to.
Code:
cd master

mkisofs -R -J -l -no-emul-boot -boot-load-size 4 -boot-info-table -r -b isolinux/isolinux.bin -c isolinux/boot.cat -o ../newlivecd.iso -z zisofs .

cd ..


Some intesting files/directorys:
  • zisofs/etc/profile - You can add commands to be run after this livecd boots here.
  • /mnt/cdrom - This is available after the livecd boots. It is the actual directory structure on the entire livecd.
  • master/isolinux/boot.msg - This is the test displays when the livecd is first loaded.
  • master/isolinux/help.msg - This help is displayed at boot when you press F2.
  • master/isolinux/kernels.msg - This is displayed when you press F1 at boot.
  • master/isolinux/isolinux.cfg - This is the grub config file.
  • zisofs/etc/bootsplash/livecd-2004.0/images - contains the jpg's for the boot spash screens
Back to top
View user's profile Send private message
Stolz
Moderator
Moderator


Joined: 19 Oct 2003
Posts: 3015
Location: Hong Kong

PostPosted: Sat Oct 02, 2004 1:32 pm    Post subject: Reply with quote

Thanks for the How-To.

I want to remaster the install-amd64-2004.2-minimal.iso in order to add the net-module of my on-board card.

The guide seems simple, but my problem is I don't have installed the mkzftree command. How can I install it? In wich program/package is included?

Thanks in advice.

EDIT: Ok, I've found it. It is part of the zisofs-tools package. ;)
Back to top
View user's profile Send private message
snizfast
n00b
n00b


Joined: 22 Sep 2004
Posts: 43

PostPosted: Mon Jan 30, 2006 9:53 pm    Post subject: Reply with quote

app-misc/zisofs-tools is the package required for mkzftree command
_________________
Talk is cheap, supply exceeds demand
alias nocomment='sed -e '\''s/#.*//;/^\s*$/d'\'' '
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum