homey
14th September 2005, 05:52 AM
Here are my notes on building a Fedora livecd using the Makefile ( script ) from http://dc.qut.edu.au/yetaa/
The objective of the YETAA is to quickly provide a mechanism for Fedora Core users to build their own boot CDs. Yet Another ADIOS is based on the ADIOS scripts, but this time we supply you with only the tools to build your own live boot CD. You can build the live CD with unionfs switched on or off.
If you are just looking for a Gnome based Fedora livecd, they have an iso which can be downloaded. I was more interested in the nuts and bolts of making my own version.
So with that in mind, I downloaded the kernel adios-kernel-2.6.12-3.i386.rpm which has the needed squashfs. I also downloaded the yetaa tools package yetaa-adk-0.3.tgz. This has the script and related goodies.
It is important to remind people to make a backup of your system before proceeding.
I use the very handy partimage to backup the host and build systems.
I already have FC4 installed and will use that as the host system.
I installed a second FC4 system using the minimal install feature. I then use yum to add any programs and remove any unwanted stuff which may have sneaked into the system.
Once I have the host and build systems where I want them, I proceed to make the 472MB livecd image ....
These commands are done as root user at the host system.
Install the Adios kernel on the host Fedora system.
I also installed the new kernel into the build system so I could make sure it was working.
This will make a boot entry in your grub.conf
# rpm -ivh adios-kernel-2.6.12-3.i386.rpm
Reboot the host system using the new grub boot entry.
Check to make sure you're using the Adios kernel.
# uname -r
2.6.12
We can get rid of the old kernel in the host system and the build system.
# rpm -qa |grep kernel
adios-kernel-2.6.12-3
kernel-2.6.12-1.1447_FC4
# rpm -e --nodeps kernel-2.6.12-1.1447_FC4
# depmod -a
Unpack the yetaa tools into /root of the host system
# cd /root
# tar -xvzf yetaa-adk-0.3.tgz
Remove the contents of the host system build folder to gain space.
# rm -rf /lib/modules/2.6.12/build/*
Copy the new kernel to the yetaa folder.
# cd /root/yetaa-adk/bootcd/isolinux
# cp /boot/vmlinuz-2.6.12 .
# mv vmlinuz-2.6.12 vmlinuz
Create the working folders.
# mkdir /mnt/initrd /mnt/initrd2 /mnt/yetaa-devel
Make any changes to the /root/yetaa-adk/Makefile.
For example: Mine looks like this...
YETAADEV = /dev/hda2
YETAADEV_GRUBROOT = (hd0,1) # 1 less than hda?
CDWRITER = "ATA:1,0,0"
BURNSPEED = 16
More changes to the Makefile
clean-var: commenting out these lines so my desktop settings on the build system would show up on the livecd....
# @echo "Cleaning home directories ..."
# # Don't remove .mailcap, .mime-types, .sversionrc in /home/adios as
# # they're needed by openoffice. Don't remove Gnome directories in case
# # someone wants to install it.
# (cd $(YETAA_DEVEL)/home/adios; >.bash_history; \
# rm -rf .balsa .eggcups .esd_auth .fonts* .gaim .ICEauthority; \
# rm -rf mail .mcop* .nessus* .netscape* .qt .ssh .themes .Trash; \
# rm -rf .viminfo .Xauthority .xine .xsession* .xscreensaver .kde)
# (cd $(YETAA_DEVEL)/root; >.bash_history; \
# rm -f .fonts.cache-1 .ICEauthority .viminfo .xauth* .Xauthority; \
# rm -rf .fullcircle .gconf* .gnome* .mcop* .mozilla .qt .ssh .kde)
clean-usr: Removed all but English languages. This can be skipped or changed to meet your needs.
yetaa.kernel: Fixed punctuation errors which will cause "make once" to fail.
# use adios kernel /lib/modules - could be simplified
if [ -e /lib/modules/$(KERNEL_VERSION) ]; then \
rm -rf $(YETAA_DEVEL)/lib/modules/* \
cp -a /lib/modules/$(KERNEL_VERSION) $(YETAA_DEVEL)/lib/modules; \
fi
if [ ! -e /lib/modules/$(KERNEL_VERSION) ]; then \
echo "install ADIOS kernel modules $(KERNEL_VERSION)"; exit 1; \
fi
if [ -e /etc/modules/$(KERNEL_VERSION) ]; then \
mkdir -p $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
cp -a /etc/modules/$(KERNEL_VERSION)/* $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
rm -f $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION)/modules*; \
fi
if [ ! -e /etc/modules/$(KERNEL_VERSION) ]; then \
mv $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION)/modules* $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
fi
(cd $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION); ln -s ../../../var/etc/modules/$(KERNEL_VERSION)/modules* . )
I will try to attach my version of Makefile which will need to be unzipped and moved to /root/yetaa-adk
Create the image and burn to cdrom with these commands:
make devel
make initrd
make once
make sqfs
make iso
Note: I use make blank on the cd-rw. Don't use that for cd-r
make blank; make burn
The objective of the YETAA is to quickly provide a mechanism for Fedora Core users to build their own boot CDs. Yet Another ADIOS is based on the ADIOS scripts, but this time we supply you with only the tools to build your own live boot CD. You can build the live CD with unionfs switched on or off.
If you are just looking for a Gnome based Fedora livecd, they have an iso which can be downloaded. I was more interested in the nuts and bolts of making my own version.
So with that in mind, I downloaded the kernel adios-kernel-2.6.12-3.i386.rpm which has the needed squashfs. I also downloaded the yetaa tools package yetaa-adk-0.3.tgz. This has the script and related goodies.
It is important to remind people to make a backup of your system before proceeding.
I use the very handy partimage to backup the host and build systems.
I already have FC4 installed and will use that as the host system.
I installed a second FC4 system using the minimal install feature. I then use yum to add any programs and remove any unwanted stuff which may have sneaked into the system.
Once I have the host and build systems where I want them, I proceed to make the 472MB livecd image ....
These commands are done as root user at the host system.
Install the Adios kernel on the host Fedora system.
I also installed the new kernel into the build system so I could make sure it was working.
This will make a boot entry in your grub.conf
# rpm -ivh adios-kernel-2.6.12-3.i386.rpm
Reboot the host system using the new grub boot entry.
Check to make sure you're using the Adios kernel.
# uname -r
2.6.12
We can get rid of the old kernel in the host system and the build system.
# rpm -qa |grep kernel
adios-kernel-2.6.12-3
kernel-2.6.12-1.1447_FC4
# rpm -e --nodeps kernel-2.6.12-1.1447_FC4
# depmod -a
Unpack the yetaa tools into /root of the host system
# cd /root
# tar -xvzf yetaa-adk-0.3.tgz
Remove the contents of the host system build folder to gain space.
# rm -rf /lib/modules/2.6.12/build/*
Copy the new kernel to the yetaa folder.
# cd /root/yetaa-adk/bootcd/isolinux
# cp /boot/vmlinuz-2.6.12 .
# mv vmlinuz-2.6.12 vmlinuz
Create the working folders.
# mkdir /mnt/initrd /mnt/initrd2 /mnt/yetaa-devel
Make any changes to the /root/yetaa-adk/Makefile.
For example: Mine looks like this...
YETAADEV = /dev/hda2
YETAADEV_GRUBROOT = (hd0,1) # 1 less than hda?
CDWRITER = "ATA:1,0,0"
BURNSPEED = 16
More changes to the Makefile
clean-var: commenting out these lines so my desktop settings on the build system would show up on the livecd....
# @echo "Cleaning home directories ..."
# # Don't remove .mailcap, .mime-types, .sversionrc in /home/adios as
# # they're needed by openoffice. Don't remove Gnome directories in case
# # someone wants to install it.
# (cd $(YETAA_DEVEL)/home/adios; >.bash_history; \
# rm -rf .balsa .eggcups .esd_auth .fonts* .gaim .ICEauthority; \
# rm -rf mail .mcop* .nessus* .netscape* .qt .ssh .themes .Trash; \
# rm -rf .viminfo .Xauthority .xine .xsession* .xscreensaver .kde)
# (cd $(YETAA_DEVEL)/root; >.bash_history; \
# rm -f .fonts.cache-1 .ICEauthority .viminfo .xauth* .Xauthority; \
# rm -rf .fullcircle .gconf* .gnome* .mcop* .mozilla .qt .ssh .kde)
clean-usr: Removed all but English languages. This can be skipped or changed to meet your needs.
yetaa.kernel: Fixed punctuation errors which will cause "make once" to fail.
# use adios kernel /lib/modules - could be simplified
if [ -e /lib/modules/$(KERNEL_VERSION) ]; then \
rm -rf $(YETAA_DEVEL)/lib/modules/* \
cp -a /lib/modules/$(KERNEL_VERSION) $(YETAA_DEVEL)/lib/modules; \
fi
if [ ! -e /lib/modules/$(KERNEL_VERSION) ]; then \
echo "install ADIOS kernel modules $(KERNEL_VERSION)"; exit 1; \
fi
if [ -e /etc/modules/$(KERNEL_VERSION) ]; then \
mkdir -p $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
cp -a /etc/modules/$(KERNEL_VERSION)/* $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
rm -f $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION)/modules*; \
fi
if [ ! -e /etc/modules/$(KERNEL_VERSION) ]; then \
mv $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION)/modules* $(YETAA_DEVEL)/var/etc/modules/$(KERNEL_VERSION); \
fi
(cd $(YETAA_DEVEL)/lib/modules/$(KERNEL_VERSION); ln -s ../../../var/etc/modules/$(KERNEL_VERSION)/modules* . )
I will try to attach my version of Makefile which will need to be unzipped and moved to /root/yetaa-adk
Create the image and burn to cdrom with these commands:
make devel
make initrd
make once
make sqfs
make iso
Note: I use make blank on the cd-rw. Don't use that for cd-r
make blank; make burn