Advertisement
Guest User

Untitled

a guest
Jul 13th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. ######Variables#########
  2. ###DNAME this is the name of your distro
  3. #$DNAME=
  4. ###CNAME this is the name of the chroot folder
  5. #$CNAME=
  6.  
  7. debootstrap --arch=i386 precise scratch
  8. sudo mount --bind /dev scratch/dev
  9. sudo cp /etc/resolv.conf scratch/etc/resolv.conf
  10. sudo cp /etc/hosts scratch/etc/hosts
  11. sudo chroot scratch
  12. mount none -t proc /proc
  13. mount none -t sysfs /sys
  14. mount none -t devpts /dev/pts
  15. export HOME=/root
  16. export LC_ALL=C
  17. apt-get update
  18. apt-get upgrade
  19. apt-get install --yes ubuntu-standard casper lupin-casper discover laptop-detect os-prober linux-generic
  20. rm /etc/apt/sources.list
  21. touch /etc/apt/sources.list
  22. cat <<EOF >> /etc/apt/sources.list
  23. #############################################################
  24. ################### OFFICIAL UBUNTU REPOS ###################
  25. #############################################################
  26.  
  27. ###### Ubuntu Main Repos
  28. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
  29. deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
  30.  
  31. ###### Ubuntu Update Repos
  32. deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
  33. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
  34.  
  35. deb http://us.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
  36. #deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
  37. deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
  38. deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
  39. deb-src http://us.archive.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse
  40. #deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
  41.  
  42. ###### Ubuntu Partner Repo
  43. deb http://archive.canonical.com/ubuntu precise partner
  44. deb-src http://archive.canonical.com/ubuntu precise partner
  45.  
  46. ###### Ubuntu Extras Repo
  47. deb http://extras.ubuntu.com/ubuntu precise main
  48. deb-src http://extras.ubuntu.com/ubuntu precise main
  49.  
  50. ##############################################################
  51. ##################### UNOFFICIAL REPOS ######################
  52. ##############################################################
  53.  
  54. ###### 3rd Party Binary Repos
  55.  
  56. #### Opera - http://www.opera.com/
  57. ## Run this command: sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
  58. deb http://deb.opera.com/opera/ stable non-free
  59.  
  60. EOF
  61. wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
  62. apt-get install ubuntu-extras-keyring
  63. apt-get install --yes python-software-properties && add-apt-repository -y ppa:razor-qt
  64. apt-get update
  65. apt-get install razorqt
  66. apt-get install --yes kdm
  67. apt-get install --yes ubiquity-frontend-kde ubiquity-frontend-debconf
  68. nano /usr/share/applications/kde4/ubiquity-frontend-kde.desktop
  69. remove line about only show in
  70. 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
  71. rm -rf /tmp/*
  72. apt-get clean
  73. rm /var/lib/dbus/machine-id
  74. rm /etc/resolv.conf
  75. umount -lf /proc
  76. umount -lf /sys
  77. umount -lf /dev/pts
  78. exit
  79. sudo rm filesystem.manifest filesystem.manifest-remove filesystem.size
  80. sudo chroot scratch dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee filesystem.manifest
  81. ############
  82. sudo cp -v filesystem.manifest filesystem.manifest-desktop
  83. REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper lupin-casper live-initramfs user-setup discover1 xresprobe os-prober libdebian-installer4'
  84. for i in $REMOVE
  85. do
  86. sudo sed -i "/${i}/d" filesystem.manifest-desktop
  87. done
  88. #############
  89. printf $(sudo du -sx --block-size=1 scratch | cut -f1) > filesystem.size
  90. sudo mksquashfs scratch filesystem.squashfs -e boot
  91. #############
  92. sudo <<EOF >> ../README.diskdefines
  93. #define DISKNAME $DNAME
  94. #define TYPE binary
  95. #define TYPEbinary 1
  96. #define ARCH i386
  97. #define ARCHi386 1
  98. #define DISKNUM 1
  99. #define DISKNUM1 1
  100. #define TOTALNUM 0
  101. #define TOTALNUM0 1
  102. EOF
  103. ############
  104. sudo cp $CNAME/boot/vmlinuz*-generic-pae image/casper/vmlinuz
  105. sudo cp $CNAME/boot/initrd.img*-generic-pae image/casper/initrd.lz
  106. cd ..
  107. mkdir isolinux
  108. cd isolinux
  109. sudo cp /usr/lib/syslinux/isolinux.bin isolinux.bin
  110. cd ..
  111. sudo mkdir install
  112. sudo cp /boot/memtest86+.bin memtest86+.bin
  113. cd ..
  114. ###should be at root of the iso folder again
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement