Process of creating a LiveCD

Tutorials and Guides about using/developing Linux/BSD/Mac OS @Xbox360
Post Reply
User avatar
tuxuser
Administrator
Administrator
Posts: 301
Joined: Sat Feb 19, 2011 4:53 pm
Location: Germany
Contact:

Process of creating a LiveCD

Post by tuxuser » Sat Apr 30, 2011 2:20 am

Already saying sorry, some parts were written from the top of my head - so it could be incorrect sometimes ^^
If you know what you are doin, you will succeed though :D
Corrections are very welcome!
Process of LiveCD Creation:

1. Debootstrap a fresh system (on a PPC machine):

mkdir -p /mnt/ubuntu
cd /mnt
debootstrap --arch=powerpc precise ubuntu http://ports.ubuntu.com/


2. Mount-bind /dev and /proc:

mount -t proc none /mnt/ubuntu/proc
mount --rbind /dev /mnt/ubuntu/dev

cat > chroot/etc/apt/sources.list << EOF
# Main
deb http://ports.ubuntu.com/ubuntu-ports/ precise main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ precise universe multiverse
# Updates
deb http://ports.ubuntu.com/ubuntu-ports/ precise-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-updates restricted
deb http://ports.ubuntu.com/ubuntu-ports/ precise-updates universe multiverse
# Security
deb http://ports.ubuntu.com/ubuntu-ports/ precise-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ precise-security universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-security universe multiverse
EOF


3. Now chroot:

LANG=C chroot /mnt/ubuntu /bin/bash
export HOME=/root
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get update
dpkg-reconfigure tzdata
echo "ubuntu-xenon" > /etc/hostname
apt-get install --yes dbus
dbus-uuidgen > /var/lib/dbus/machine-id
cp /sbin/initctl /sbin/initctl.bkp
dpkg-divert --local --rename --add /sbin/initctl

ln -s /bin/true /sbin/initctl
apt-get install console-data
dpkg-reconfigure console-data


4. Lets install the essential packages for the LiveCD

apt-get install --yes casper lupin-casper
apt-get install --yes discover os-prober


5. Desktop Environment

apt-get install --yes lxde lxdm libpciaccess0 xfonts-base xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-input-kbd xserver-xorg-input-mouse



6. Sound System and other stuff

apt-get install --yes xvkbd alsa-base alsa-utils openssh-server nano mc libfuse2 libfuse-dev irssi mc sshfs build-essential ncurses-dev git-core gitosis man-db ftp
apt-get install --yes blueman samba xrdp

7. If you want a graphical installer, also install Ubiquity:

apt-get install ubiquity-frontend-gtk


8. Lets fix some nasty bugs in initramfs
*******************************************************
#Non-Workin powerofff/reboot. Its cool for us to do cause it wont autoboot on the next Xbox-Start anyway.

    in /etc/init.d/casper change

        eject -p -m /cdrom >/dev/null 2>&1

      [ "$prompt" ] || return 0


    to

        eject -p -m /cdrom >/dev/null 2>&1

        exit 0

        [ "$prompt" ] || return 0

*******************************************************

*******************************************************
#stdin 0: error at casper-initramfs

In /usr/share/initramfs-tools/scripts/casper-helpers - Line 44:

Change

eval $(fstype < $1)

to

eval $(fstype $1 2>/dev/null)

*******************************************************

*******************************************************

# INSTALL XBOXDRV DEB
# INSTALL XBOXBURNER DEB
# INSTALL ADDITIONAL STUFF TO /opt

*******************************************************

*******************************************************
#Blacklist xpad module
# /etc/modprobe.d/blacklist.conf - Append at the end:

#Blacklist xpad (xbox360 controller driver)
blacklist xpad

*******************************************************

*******************************************************
# Let xboxdrv + virtualkeyboard start at login-screen
# In /etc/lxdm/LoginReady:

# /dev/input/event14 could be another device, check it with evtest first!

/usr/local/bin/xboxdrv -c /usr/share/doc/xboxdrv/examples/virtualkeyboard.xboxdrv -s -- /usr/local/bin/virtualkeyboard -d /dev/input/event14
*******************************************************

*******************************************************
#Edit the live-password
nano /usr/share/initramfs-tools/scripts/casper-bottom/10adduser

Change:

# U6aMy0wojraho is just a blank password
db_set passwd/root-password-crypted '*'
db_set passwd/user-password-crypted U6aMy0wojraho

to

# HCJGGFOAgrFGE is password: xbox
db_set passwd/root-password-crypted HCJGGFOAgrFGE
db_set passwd/user-password-crypted HCJGGFOAgrFGE





#Also edit the live-username
nano /usr/share/initramfs-tools/scripts/casper

Change:

USERNAME=casper

to

USERNAME=xbox
*******************************************************

*******************************************************
/etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
*******************************************************

*******************************************************
Maybe modify /etc/sudoers and add user "xbox" there ?!

*******************************************************


9. Create kernel deb file and initramfs.cpio in chroot-environment

# Compile current linux-kernel sourcetree (w/ xenon patches) and install headers + modules
# copy zImage.xenon to /boot/
# mkinitramfs

10. Cleanup:

rm /var/lib/dbus/machine-id

rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl

apt-get clean

rm -rf /tmp/*

rm /etc/resolv.conf

umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
exit

umount /mnt/ubuntu/dev

11. Squash it! (on Host System)

apt-get install squashfs-tools
mksquashfs /mnt/ubuntu ~/image.squashfs

12. Assemble the CD

Put kernel-ELF, initramfs and a kboot.conf on the disc and configure it till it boots :D

Hint:

#Structure
/vmlinux
/initrd.gz
/casper/filesystem.squashfs

#kboot.conf

#KBOOTCONFIG
livecd_dvd="dvd:/vmlinux initrd=dvd:/initrd.gz boot=casper video=xenonfb console=tty0 console=ttyS0,115200n8 panic=60 nosplash noplymouth"
Last edited by tuxuser on Sun May 13, 2012 9:10 pm, edited 1 time in total.
I have no idea what I am doing but atleast I am trying

User avatar
tuxuser
Administrator
Administrator
Posts: 301
Joined: Sat Feb 19, 2011 4:53 pm
Location: Germany
Contact:

Re: Process of creating a LiveCD

Post by tuxuser » Sun May 13, 2012 9:04 pm

Updated for public consuming
I have no idea what I am doing but atleast I am trying

sema
User
User
Posts: 18
Joined: Fri Apr 29, 2011 8:08 pm

Re: Process of creating a LiveCD

Post by sema » Thu Feb 14, 2013 9:51 pm

Hi.
One question. What's for including graphical installer "ubiquity"? Will be possibile to install linux directly from cd, without internet connection?
Thanks in advance.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests