Page 1 of 8

Build with me ;)

PostPosted: Fri Dec 28, 2012 2:39 pm
by TheeMahn
Snatch Ubuntu minimal, my base for an upcoming release.

Open a terminal and make a folder called wip:
Code: Select all
mkdir wip
cd wip/
wget http://www.ubuntu-mini-remix.org/download/12.10/ubuntu-mini-remix-12.10-amd64.iso


We will need a Super user account to preform the tasks at hand, lets set root up:
Code: Select all
sudo passwd


Enter your password 3 times, as that was not good enuff lets root up and drop the password again...

Now let's root up:
Code: Select all
su


Mount up and enter chroot environment:
Code: Select all
#prepare
mkdir edit
mkdir extract-cd
mkdir mnt
mkdir squashfs


mount -o loop ubuntu-mini-remix-12.04-amd64.iso mnt/
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs
cp -a squashfs/* edit/
umount squashfs/
umount mnt/

mount --bind /dev/ edit/dev
#DBUS? - only mount when playing with the kernel / cups
mount --bind /var/run/dbus/ edit/var/run/dbus/
#mount --bind / edit

chroot edit
mount -t devpts none /dev/pts
mount -t proc none /proc
mount -t sysfs none /sys
cd tmp/



One of the first things I do is add custom repositories. I physically copy the below deb to /home/$USERNAME/wip/edit/tmp/. I want the maximum avaliable software at my disposal, enter custom repositories. We will not have the end user plauged with GPG key issues make the deb snatch those based on the O/S they are building upon (info retrived from /etc/lsb_release -a):
ultimate-edition-repositories-0.0.6_all.deb
Custom repos, Smart deb, investigates current O/S. Please do not devulge on your current O/S we are here to build right.
(4.54 KiB) Downloaded 731 times


Refresh your sources list after installation note no sudo now we are TheeMahn:)
Code: Select all
apt-get update

Enter Mate - do not think I am happy about it, will adjust later:
Code: Select all
#AYE MATEY
apt-get install mate-core mate-desktop-environment


As I said adjust, strip requirements from mate:
mate-core_1.4.9+precise_all.deb
strips requirements and bumps version.
(2.66 KiB) Downloaded 659 times

mate-desktop-environment_1.4.9+precise_all.deb
strips requirements and bumps version.
(2.35 KiB) Downloaded 683 times


Bluez will fail a work around:
Code: Select all
#FAILURE BLUEZ - Workaround
mv /usr/sbin/bluetoothd /usr/sbin/bluetoothd-please-rename-me-when-you-are-done
ln -s /bin/true /usr/sbin/bluetoothd
apt-get install -f

#WAIT & RESUME
rm /usr/sbin/bluetoothd
mv /usr/sbin/bluetoothd-please-rename-me-when-you-are-done /usr/sbin/bluetoothd

dpkg-reconfigure hddtemp



Due to the nature of a minimal build we can not add PPA's beyond what the above deb added, lets not keep our eyes closed and allow full adjusment of repositories:
Code: Select all
apt-get install -y python-software-properties

Now that that is out of the way I would like our users to have the newest wine, ubuntu tweak, java, and theme engine for upcoming Ultimate Edition 3.6 even though my efforts are currently concentrated on Ultimate Edition 3.4.
Code: Select all
#PPA ADD
add-apt-repository ppa:tiheum/equinox && add-apt-repository ppa:alexeftimie/ppa && add-apt-repository ppa:ubuntu-wine/ppa && add-apt-repository ppa:tualatrix/next && add-apt-repository ppa:team-xbmc/unstable && apt-get update
apt-get install gtk2-engines-equinox faenza-icon-theme indicator-sysmonitor wine openjdk-7-jre icedtea-7-plugin ubuntu-tweak xbmc


I must admit If I can throw 4 or 5 commands at one time it is done. No add one repository, update repeat process, why not add 4 or 5 and then update only once.
Now we enter a milimalist stage, without a doubt a few tools a must have for TheeMahn:

Code: Select all
#Minimal
apt-get install terminator brasero devede gimp transmission kvm qemulator isomaster vlc gtk-recordmydesktop recordmydesktop ubuntu-restricted* fusion-icon gdebi calibre easytag gnome-disk-utility gedit gedit-plugins gnome-screenshot gftp lanshark xchat pidgin bum usb-creator-gtk nautilus firefox cheese ubuntu-dev-tools playonlinux xinit xfsprogs gparted

Note K3b replaced brasaro, kvirc xchat, dependancies are large at this level.
There are always tools behind the fusiness of the GUI let us introduce them to the O/S:
Code: Select all
#Console
apt-get install p7zip-full alien checkinstall arj bc binutils bootchart brasero build-essential bum bzip2 bzr cheese compiz compiz-fusion-plugins-main compiz-gnome compiz-plugins compizconfig-backend-gconf compizconfig-settings-manager conky-all easytag faac faad fakeroot ffmpeg ffmpeg2theora file-roller flac fslint fusion-icon gedit gedit-plugins glade gnome-codec-install preload pidgin-plugin-pack gstreamer-tools debootstrap fakeroot metacity-themes unrar gstreamer0.10-plugins-ugly icedtea6-plugin xvid4conf id3v2 patchutils qemu vorbis-tools gnome-screenshot gstreamer0.10-plugins-bad-multiverse dh-buildinfo squashfs-tools p7zip gnome-themes-extras xchat phatch gstreamer0.10-ffmpeg lha rar  cabextract gstreamer0.10-fluendo-mp3 ubuntu-dev-tools mpg321 ntfs-config mkvtoolnix unace lintian linux-firmware-nonfree ndiswrapper-utils-1.9 compiz-fusion-plugins-extra lynx system-config-samba samba mediainfo synaptic electricsheep git subversion cmake smbfs reiserfsprogs reiser4progs jfsutils ntfsprogs kpartx dmraid gpart


Programmer - I use Gedit & plugins 90+ % of the time?
Code: Select all
#Extras
apt-get install qt4-designer qt4-dev-tools qt4-qmake devscripts qtcreator

Upgrades avoiding breakage:
Code: Select all
#UPGRADES AVOIDING NETWORK
apt-get install accountsservice apparmor apt apt-transport-https apt-utils base-files bind9-host busybox-initramfs busybox-static coreutils cron dbus dmsetup dnsutils gnupg gpgv grub-common grub-pc grub-pc-bin grub2-common hdparm initscripts isc-dhcp-client isc-dhcp-common krb5-locales libaccountsservice0 libapt-inst1.4 libapt-pkg4.12 libbind9-80 libdevmapper1.02.1 libdns81 libisc83 libisccc80 libisccfg82 liblwres80 libparted0debian1 libpolkit-gobject-1-0 libudev0 linux-firmware login lsb-base lsb-release multiarch-support ntfs-3g ntpdate openssl parted passwd psmisc sudo sysv-rc sysvinit-utils ubuntu-keyring udev update-manager-core upstart vim-common vim-tiny xkb-data

Begin returning it to its roots:
Code: Select all
#Stripit?
apt-get remove --purge mate-backgrounds mate-calc mate-terminal mate-terminal-common mate-themes rhythmbox gnome-screenshot engrampa baobab dmz-cursor-theme


Full media access:
Code: Select all
#MEDIA
apt-get install libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev libquicktime2 libdvdcss2

Features:
Code: Select all
#PDF
apt-get install libreoffice-pdfimport

Code: Select all
#Compression
apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack lha arj cabextract file-roller

Code: Select all
apt-get install gimp-data-extras gimp-plugin-registry


We have to have an installer:
Code: Select all
apt-get install ubiquity ubiquity-frontend-gtk
#nano /usr/share/applications/ubiquity-gtkui.desktop


Unity?
Code: Select all
apt-get install --no-install-recommends ubuntu-desktop
sudo /usr/lib/lightdm/lightdm-set-defaults -s mate


This is heavy, let there be no doubt about it, lets play with the kernel...

Code: Select all
#KERNEL
#Old Kernel Purging...
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs -p sudo apt-get -y purge

#Grab headers and source for remaining single kernel
apt-get install build-essential linux-headers-`uname -r` linux-image-`uname -r`
apt-get install bcmwl-kernel-source
#update initramfs
update-initramfs -u -k all

depmod -a #this can be used if you wish to install additional drivers

#scrap temp files and history
rm -rf /tmp/* ~/.bash_history

#Build Initrd.lz
mkinitramfs -o /tmp/initrd.lz `uname -r`

#copy vmlinuz
cp /boot/vmlinuz-`uname -r` /tmp/vmlinuz

#Scrap source and headers?
#apt-get --remove --purge linux-headers-`uname -r` linux-image-`uname -r`

apt-get autoremove
apt-get clean
apt-get autoclean
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
rm /etc/resolv.conf
rm /var/lib/apt/extended_states

umount -f /proc/sys/fs/binfmt_misc
umount /proc
umount /sys
umount /dev/pts

#scrap temp files and history
rm -rf ~/.bash_history /home/root/.bash_history /root/.bash_history

exit
umount /home/$USER/wip/edit/dev

mv edit/tmp/initrd.lz extract-cd/casper/
mv edit/tmp/vmlinuz extract-cd/casper/


##PROCEED TO BUILD SECTION


Cusomizations:
Grub:
Code: Select all
##CUSTOM GRUB copy image to /boot/grub
sudo grub-mkfont --size=12 --range=0x0-0x7F --output=/boot/liberation.pf2 /usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf

##CUSTOM LightDM
Edit the following file :

sudo vi /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.override


Apply the new settings :

Code: Select all
glib-compile-schemas /usr/share/glib-2.0/schemas/


Build it:
Code: Select all
#Absolute final build process:
apt-get autoremove
apt-get clean
apt-get autoclean
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
rm /tmp/*
#rm /etc/resolv.conf
rm /var/lib/apt/extended_states
rm /var/crash/*
#BAIL OUT
umount -f /proc/sys/fs/binfmt_misc
umount /proc
umount /sys
umount /dev/pts
rm -rf /tmp/* ~/.bash_history /home/root/.bash_history /root/.bash_history
exit
umount $PWD/edit/dev

#scrap old squashfs we are going to build a new one
rm extract-cd/casper/filesystem.squashfs

#build new squashfs grab some beer, chips & disks are now choked
mksquashfs edit extract-cd/casper/filesystem.squashfs -no-sparse

#manifest
chmod +w extract-cd/casper/filesystem.manifest
chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop

#calculate disksize or ubiquity will be inaccurate
printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size

#report this info to me in red so it is easy to find:
echo -e '\e[0;31m' | cat extract-cd/casper/filesystem.size

#calculate crc
cd extract-cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt

#build final iso - root overwrites ;)
mkisofs -r -V "Ultimate Edition 3.4" -p TheeMahn -P "Ultimate Edition Team" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ultimate-edition-3.4-minimalist-x64.iso .

#Test
#copy blank Testing.img created with qemulator to wip folder
cd ..
kvm -m 2047 -smp 8 -usb -boot d -cdrom ultimate-edition-3.4-minimalist-x64.iso -name Ultimate

ultimate-edition-customizations-3.4.0_all.deb
work the magic, still not perfect.
(24.64 MiB) Downloaded 660 times

I am going to provide my customisations deb, let me be very forthcoming will fail lintian. All the debs provided prior were repomastered. I am sure I can make all the way across the board comply.

Re: Build with me ;)

PostPosted: Fri Dec 28, 2012 2:43 pm
by pch.shot
Micro, Pam jump in here!

Re: Build with me ;)

PostPosted: Fri Dec 28, 2012 2:44 pm
by pch.shot
Also BBOSAK2143!

Re: Build with me ;)

PostPosted: Fri Dec 28, 2012 3:33 pm
by TheeMahn
have not finished the post and jumping in like a mexican jumping bean ;)

Re: Build with me ;)

PostPosted: Fri Dec 28, 2012 6:46 pm
by Micro
Its so good to see this u have no idea. Very similiar to my sid businesscard build i do on my main box. Mate desktop with Ultimate Edition themes, tweak and software center along with multimedia stuff. I will surely spin one up when i get back home from vaca on the third. Ill also add some kernel repos to the sources.list to spice it up. Im speechless.

Re: Build with me ;)

PostPosted: Sat Dec 29, 2012 1:03 am
by pam
Main rig's down ...up on Monday...
will fire up all those commands.....

same here..........speechless!
Thank You Theemahn

pch.shot i saw your site, but i should have some valuable content to put up.......if a distro or something
of sorts is ready before feb i wouldn't feel guilty....

Re: Build with me ;)

PostPosted: Sat Dec 29, 2012 1:40 pm
by Micro
pch.shot wrote:Micro, Pam jump in here!

Lol i think we are the only mods that need no summons. We always got u pch.shot, no need to hallar...

Re: Build with me ;)

PostPosted: Sun Dec 30, 2012 9:44 am
by tanmay.01
I hope Ultimate Edition 3.6 has kernel between 3.5 to 3.7 ....
There are 2 many thing missing in 3.2 that i need and thats the only reason why i dont have Ultimate Edition on my main.
(I know i can compile myself, but those versions create a lot of trouble on LTS.)

Re: Build with me ;)

PostPosted: Mon Dec 31, 2012 12:19 am
by pam
for PPA ADD after running this i get a crash message....
after running the below command:
Code: Select all
add-apt-repository ppa:tiheum/equinox && add-apt-repository ppa:alexeftimie/ppa && add-apt-repository ppa:ubuntu-wine/ppa && add-apt-repository ppa:tualatrix/next && add-apt-repository ppa:team-xbmc/unstable && apt-get update


crash message.........

Code: Select all
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.2.3 final 0
Distributor ID:   Ubuntu
Description:   Ubuntu 12.10
Release:   12.10
Codename:   quantal
Exception information:

unsupported locale setting
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 69, in main
    enable_i18n()
  File "/usr/lib/command-not-found", line 40, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.2/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting


Help!

............and solved by ---------
Code: Select all
nano /etc/default/locale


adding the line........
Code: Select all
LANG=en_US.UTF-8

Re: Build with me ;)

PostPosted: Mon Dec 31, 2012 12:27 am
by pch.shot