{"id":356,"date":"2009-05-01T21:43:19","date_gmt":"2009-05-01T16:13:19","guid":{"rendered":"http:\/\/brainstorms.in\/?p=356"},"modified":"2009-05-01T21:43:37","modified_gmt":"2009-05-01T16:13:37","slug":"remastering-ubuntu-904-jaunty-jackalope","status":"publish","type":"post","link":"https:\/\/brainstorms.in\/?p=356","title":{"rendered":"Remastering ubuntu 9.04 Jaunty Jackalope"},"content":{"rendered":"<p>( This document was written in connection with a one day ubuntu ramastering workshop held at College of Engineering Attingal. See <a href=\"http:\/\/brainstorms.in\/?p=272\">this post<\/a>)<\/p>\n<p>System Requirement<\/p>\n<p>You need a reasonably\u00a0 good PC with Ubuntu 9.04 installed. It should have plenty of free space ( say 4 GB ) and minimum 1 GB<\/p>\n<p><strong>Preparing the host system<\/strong><\/p>\n<p>Create a work directory<\/p>\n<p># mkdir jaunty<\/p>\n<p>Create the following sub directoires<\/p>\n<p># mkdir\u00a0 jaunty\/cdrom<br \/>\n# mkdir\u00a0 jaunty\/tmp<br \/>\n# mkdir jaunty\/root<br \/>\n#mkdir jaunty\/remaster<\/p>\n<p>Mount the jaunty iso image on jaunty\/cdrom directory<br \/>\n#mount -o loop jaunty.iso jaunty\/cdrom<\/p>\n<p>Copy everything from the cdrom to jaunty\/image directory<\/p>\n<p>#cp -r jaunty\/cdrom\u00a0 jaunty\/image<\/p>\n<p>Now the\u00a0 image directory has\u00a0 the content of your cdrom.<\/p>\n<p>You may refer to<a href=\"http:\/\/brainstorms.in\/?p=326\"> this post for an explanation of the contents of the image directory<\/a>.<\/p>\n<p><strong>Rebuilding the squashfs image.<\/strong><\/p>\n<p>We are going to rebuild filesystem.squashfs under jaunty\/image\/casper<\/p>\n<p>Move the filesystem.squashfs image to jaunty\/tmp directory<\/p>\n<p>#mv\u00a0 jaunty\/image\/casper\/filesystem.squashfs jaunty\/tmp<\/p>\n<p>Mount the filesystem.squashfs under jaunty\/root direct<\/p>\n<p>#mount -o loop jaunty\/tmp\/filesystem.squashfs jaunty\/root<\/p>\n<p>Copy the contents of fileystem.squashfs\u00a0 to jaunty\/remaster<\/p>\n<p>#cp -r jaunty\/root jaunty\/remaster<\/p>\n<p>Now the jaunty\/remaster directory holds the uncompressed root filesystem for your live CD.<\/p>\n<p>Copy resolv.conf and sources.list from the host system<\/p>\n<p>#cp \/etc\/resolv.conf jaunty\/remaster\/etc\/<\/p>\n<p>Preserve\u00a0\u00a0 original sources.list.<\/p>\n<p>#cp jaunty\/remaster\/etc\/apt\/soures.list\u00a0\u00a0 jaunty\/remaster\/etc\/apt\/soures.list.backup<\/p>\n<p>#cp \/etc\/apt\/sources.list \/jaunty\/remaster\/etc\/apt\/<\/p>\n<p>Make sure that sources.list points to jaunty archive<\/p>\n<p>Now you can chroot to\u00a0 jaunty\/remaster .<\/p>\n<p>#chroot jaunty\/remaster<\/p>\n<p>Now run the following ( You are inside chroot )<\/p>\n<p># mount \/proc<\/p>\n<p># mount \/sys<\/p>\n<p># mount -t devpts none \/dev\/pts<\/p>\n<p>The above commands mount the respective directories inside chroot.<\/p>\n<p># apt-get update<\/p>\n<p>Install\/remove necessary packages using apt.<\/p>\n<p>Cleanup the unwanted files.<\/p>\n<p>#apt-get clean<br \/>\n#rm -rf \/tmp\/*<br \/>\n#rm \/etc\/resolv.conf<br \/>\n#umount -l -f \/proc<\/p>\n<p>#umount -l -f \/sys<\/p>\n<p>#umount \/dev\/pts<br \/>\nExit chroot<br \/>\n#exit<\/p>\n<p>Now replace the sources.list with the original sources.list<\/p>\n<p>#cp jaunty\/remaster\/etc\/apt\/soures.list.backup\u00a0\u00a0 jaunty\/remaster\/etc\/apt\/soures.list<\/p>\n<p><strong>Repack squashfs<\/strong><\/p>\n<p># cd jaunty<br \/>\n#mksquashfs remaster image\/casper\/filesystem.squashfs<\/p>\n<p>Recreate filesystem.manifest&amp; filesystem.manifest.desktop:<br \/>\nRun the following\u00a0 commands.<\/p>\n<p># chroot remaster\u00a0 dpkg-query -W &#8211;showformat=&#8217;${Package} ${Version}\\n&#8217; |\u00a0 tee image\/casper\/filesystem.manifest<\/p>\n<p>#cp -v image\/casper\/filesystem.manifest{,-desktop}<\/p>\n<p># REMOVE=&#8217;ubiquity casper live-initramfs user-setup discover xresprobe os-prober libdebian-installer4&#8242;<\/p>\n<p># for i in $REMOVE<br \/>\ndo<br \/>\nsed -i &#8220;\/${i}\/d&#8221; image\/casper\/filesystem.manifest-desktop<br \/>\ndone<\/p>\n<p><strong>Recreate md5sum<\/strong><\/p>\n<p>#cd image &amp;&amp; find . -type f -print0 | xargs -0 md5sum &gt; md5sum.txt<\/p>\n<p>Recreate the iso image.<\/p>\n<p># mkisofs -r -V &#8220;Jaunty_remix&#8221; -cache-inodes -J -l -b isolinux\/isolinux.bin -c isolinux\/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ..\/ubuntu-jaunty-remix.iso .<br \/>\n# cd ..<\/p>\n<p>You can test the new image with virtual box.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>( This document was written in connection with a one day ubuntu ramastering workshop held at College of Engineering Attingal. See this post) System Requirement You need a reasonably\u00a0 good PC with Ubuntu 9.04 installed. It should have plenty of free space ( say 4 GB ) and minimum 1 GB Preparing the host system&hellip; <a href=\"https:\/\/brainstorms.in\/?p=356\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Remastering ubuntu 9.04 Jaunty Jackalope<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-computers","category-gnulinux"],"_links":{"self":[{"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brainstorms.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=356"}],"version-history":[{"count":3,"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/brainstorms.in\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions\/359"}],"wp:attachment":[{"href":"https:\/\/brainstorms.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brainstorms.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brainstorms.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}