Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######Variables#########
- ###DNAME this is the name of your distro
- #$DNAME=
- ###CNAME this is the name of the chroot folder
- #$CNAME=
- debootstrap --arch=i386 precise scratch
- sudo mount --bind /dev scratch/dev
- sudo cp /etc/resolv.conf scratch/etc/resolv.conf
- sudo cp /etc/hosts scratch/etc/hosts
- sudo chroot scratch
- mount none -t proc /proc
- mount none -t sysfs /sys
- mount none -t devpts /dev/pts
- export HOME=/root
- export LC_ALL=C
- apt-get update
- apt-get upgrade
- apt-get install --yes ubuntu-standard casper lupin-casper discover laptop-detect os-prober linux-generic
- rm /etc/apt/sources.list
- touch /etc/apt/sources.list
- cat <<EOF >> /etc/apt/sources.list
- #############################################################
- ################### OFFICIAL UBUNTU REPOS ###################
- #############################################################
- ###### Ubuntu Main Repos
- deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
- deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
- ###### Ubuntu Update Repos
- deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
- deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
- deb http://us.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
- #deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
- deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
- deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
- deb-src http://us.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
- #deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
- ###### Ubuntu Partner Repo
- deb http://archive.canonical.com/ubuntu precise partner
- deb-src http://archive.canonical.com/ubuntu precise partner
- ###### Ubuntu Extras Repo
- deb http://extras.ubuntu.com/ubuntu precise main
- deb-src http://extras.ubuntu.com/ubuntu precise main
- ##############################################################
- ##################### UNOFFICIAL REPOS ######################
- ##############################################################
- ###### 3rd Party Binary Repos
- #### Opera - http://www.opera.com/
- ## Run this command: sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
- deb http://deb.opera.com/opera/ stable non-free
- EOF
- wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
- apt-get install ubuntu-extras-keyring
- apt-get install --yes python-software-properties && add-apt-repository -y ppa:razor-qt
- apt-get update
- apt-get install razorqt
- apt-get install --yes kdm
- apt-get install --yes ubiquity-frontend-kde ubiquity-frontend-debconf
- nano /usr/share/applications/kde4/ubiquity-frontend-kde.desktop
- remove line about only show in
- apt-get install --yes aptitude synaptic software-center dkms htop curl jockey-kde vlc clementine k3b kmix quassel qbittorrent dolphin ark p7zip p7zip-rar p7zip-full juffed juffed-plugins konsole kdenetwork kdenetwork-filesharing opera
- rm -rf /tmp/*
- apt-get clean
- rm /var/lib/dbus/machine-id
- rm /etc/resolv.conf
- umount -lf /proc
- umount -lf /sys
- umount -lf /dev/pts
- exit
- sudo rm filesystem.manifest filesystem.manifest-remove filesystem.size
- sudo chroot scratch dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee filesystem.manifest
- ############
- sudo cp -v filesystem.manifest filesystem.manifest-desktop
- REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper lupin-casper live-initramfs user-setup discover1 xresprobe os-prober libdebian-installer4'
- for i in $REMOVE
- do
- sudo sed -i "/${i}/d" filesystem.manifest-desktop
- done
- #############
- printf $(sudo du -sx --block-size=1 scratch | cut -f1) > filesystem.size
- sudo mksquashfs scratch filesystem.squashfs -e boot
- #############
- sudo <<EOF >> ../README.diskdefines
- #define DISKNAME $DNAME
- #define TYPE binary
- #define TYPEbinary 1
- #define ARCH i386
- #define ARCHi386 1
- #define DISKNUM 1
- #define DISKNUM1 1
- #define TOTALNUM 0
- #define TOTALNUM0 1
- EOF
- ############
- sudo cp $CNAME/boot/vmlinuz*-generic-pae image/casper/vmlinuz
- sudo cp $CNAME/boot/initrd.img*-generic-pae image/casper/initrd.lz
- cd ..
- mkdir isolinux
- cd isolinux
- sudo cp /usr/lib/syslinux/isolinux.bin isolinux.bin
- cd ..
- sudo mkdir install
- sudo cp /boot/memtest86+.bin memtest86+.bin
- cd ..
- ###should be at root of the iso folder again
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement