{"id":3313,"date":"2012-02-16T21:00:59","date_gmt":"2012-02-16T19:00:59","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=3313#post-"},"modified":"2012-02-16T21:00:59","modified_gmt":"2012-02-16T19:00:59","slug":"booting-ubuntus-minimal-cd-iso-from-grub2","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2012\/02\/16\/booting-ubuntus-minimal-cd-iso-from-grub2\/","title":{"rendered":"Booting Ubuntu&#8217;s Minimal CD iso from Grub2"},"content":{"rendered":"<p>Today I got me a used <a href=\"http:\/\/mummila.net\/wiki\/Pannuhuone:Acer_Aspire_One_ZG5_(A0A110)\" title=\"Mummilan wiki: Pannuhuone:Acer Aspire One ZG5 (A0A110)\">Acer Aspire One ZG5<\/a>. It came with preinstalled Ubuntu, but also with the previous owner&#8217;s data that they obviously wished to be wiped first.<\/p>\n<p>The ZG5 doesn&#8217;t have an optical drive, and I don&#8217;t have any thumbdrives bigger than 256 MB, so reinstalling took a bit of creativity.<\/p>\n<p>The obvious choice might have been to get <a href=\"https:\/\/help.ubuntu.com\/community\/Installation\/MinimalCD\" title=\"Ubuntu Community Documentation: Installation\/MinimalCD\">an installation iso smaller than 256 MB<\/a>, stick it to a thumbdrive and proceed from there. But I figured, I already have Grub and schtuff from the previous installation on the disk, so why not make use of it?<\/p>\n<p>The <a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=1599293\" title=\"Ubuntu Forums: HOWTO: Boot &amp; Install Ubuntu from the Grub Rescue Prompt\">Boot &amp; Install Ubuntu from the Grub Rescue Prompt HOWTO on Ubuntu Forums<\/a> looked like the way to go, but I wanted to use the <code>toram<\/code> option to make unmounting of the iso work. As the ZG5 (by default) only has 512 MB of memory, cramming an entire CD&#8217;s worth of data into it wouldn&#8217;t be possible, so I grabbed the <a href=\"http:\/\/archive.ubuntu.com\/ubuntu\/dists\/oneiric\/main\/installer-i386\/current\/images\/netboot\/mini.iso\">minimal CD image of Precise<\/a>, which currently is 24,1 MB. To do this I recovery-booted the pre-existing installation and used wget to download the image into \/root.<\/p>\n<p>I then rebooted and went to the Grub commandline. Just as in the Howto, I set the Grub modules path, loaded necessary modules (no Microsoft filesystems needed, the old \/ was ext2), set the loopback and root.<\/p>\n<pre><code>set prefix=(hd0,1)\/boot\/grub\r\ninsmod linux\r\ninsmod loopback\r\ninsmod iso9660\r\nloopback loop (hd0,1)\/root\/mini.iso\r\nset root=(loop)<\/code><\/pre>\n<p>Next was the linux commandline. The mini CD doesn&#8217;t have casper and location of files differs slightly from the Live CD. I also added the <code>toram<\/code> parameter:<\/p>\n<pre><code>linux \/linux iso-scan\/filename=\/root\/mini.iso noprompt noeject toram\r\ninitrd \/initrd.gz<\/code><\/pre>\n<p>Then just<\/p>\n<pre><code>boot<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today I got me a used Acer Aspire One ZG5. It came with preinstalled Ubuntu, but also with the previous owner&#8217;s data that they obviously wished to be wiped first. The ZG5 doesn&#8217;t have an optical drive, and I don&#8217;t have any thumbdrives bigger than 256 MB, so reinstalling took a bit of creativity. The [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3313","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=3313"}],"version-history":[{"count":3,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3313\/revisions"}],"predecessor-version":[{"id":3316,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/3313\/revisions\/3316"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=3313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=3313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=3313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}