{"id":269,"date":"2014-09-29T16:43:20","date_gmt":"2014-09-29T20:43:20","guid":{"rendered":"http:\/\/www.mufljuz.com\/?p=269"},"modified":"2015-06-04T09:07:02","modified_gmt":"2015-06-04T13:07:02","slug":"gentoo-install-min-on-usb-stick","status":"publish","type":"post","link":"https:\/\/www.mufljuz.com\/?p=269","title":{"rendered":"Gentoo install min on USB stick"},"content":{"rendered":"<p>Download minimal CD ISO from <a href=\"https:\/\/www.gentoo.org\/main\/en\/where.xml\" title=\"gentoo.org\">gentoo.org<\/a><\/p>\n<p><code><br \/>\ndmesg | tail<br \/>\nparted \/dev\/sdX<br \/>\ndd if=gentoo_image.img of=\/dev\/sdX bs=4M<br \/>\n<\/code><\/p>\n<h2>Longer method<\/h2>\n<p>Taken from <a href=\"http:\/\/gentoo-en.vfose.ru\/wiki\/Gentoo_minimal_CD_on_USB_stick\" title=\"http:\/\/gentoo-en.vfose.ru\/wiki\/Gentoo_minimal_CD_on_USB_stick\">gentoo-en.vfose.ru<\/a><br \/>\nInstall syslinux<\/p>\n<pre>emerge syslinux<\/pre>\n<p>Find the USB drive <\/p>\n<pre>fdisk -l<\/pre>\n<p>Clear disk partition table and boot sector<\/p>\n<pre>dd if=\/dev\/zero of=\/dev\/sdf count=1024<\/pre>\n<p>Create a partition table with 512-byte sectors and a primary partition of type 83 (ext2) with fdisk and make it bootable<\/p>\n<pre>\r\nfdisk -b 512 \/dev\/sdf\r\nn p 1 enter enter\r\nt 83\r\na 1 \r\np\r\nw\r\nDevice     Boot      Start        End      Blocks   Id  System\r\n\/dev\/sdf1   *           1        1009      500433   83  Linux\r\n<\/pre>\n<p>Format the partition ext2 and tune it<\/p>\n<pre>\r\nmkfs.ext2 \/dev\/sdf1\r\ntune2fs -i 0 \/dev\/sdf1\r\n<\/pre>\n<p>install the mbr<\/p>\n<pre>\r\nequery f sys-boot\/syslinux | grep mbr\r\n<\/pre>\n<p>Note: the listing above is for gentoo only. If you are using ubuntu, the listing above can be ignored.<\/p>\n<pre>\r\ncat \/usr\/share\/syslinux\/mbr.bin > \/dev\/sdf\r\n<\/pre>\n<p>If cat command returns Permission Denied error try with:<\/p>\n<pre>\r\ndd if=\/usr\/share\/syslinux\/mbr.bin of=\/dev\/sdf\r\n<\/pre>\n<p>mount the usb flash drive and disk image. If the device folder doesn&#8217;t exist, please create them before conducting the following listing.<\/p>\n<pre>\r\nmount -t ext2 \/dev\/sdf1 \/mnt\/usb\/\r\nmount -t iso9660 -o loop,user \/downloads\/install-x86-minimal-2008.0.iso \/mnt\/cdrom\r\n<\/pre>\n<p>install the system files<\/p>\n<pre>\r\ncd \/mnt\/usb\/\r\ncp -r \/mnt\/cdrom\/* \/mnt\/usb\/\r\nmv isolinux extlinux\r\nmv extlinux\/isolinux.cfg extlinux\/extlinux.conf\r\nrm extlinux\/isolinux.bin\r\nrsync -av extlinux \r\n<\/pre>\n<p>install the bootloader<\/p>\n<pre>\r\ncd \/tmp\r\nextlinux -i \/mnt\/usb\/extlinux\r\numount \/mnt\/usb \r\n<\/pre>\n<p>Lastly ensure the changes are synced to the USB Stick before removing it:<\/p>\n<pre>\r\nsync\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Download minimal CD ISO from gentoo.org dmesg | tail parted \/dev\/sdX dd if=gentoo_image.img of=\/dev\/sdX bs=4M Longer method Taken from gentoo-en.vfose.ru Install syslinux emerge syslinux Find the USB drive fdisk -l Clear disk partition table and boot sector dd if=\/dev\/zero of=\/dev\/sdf count=1024 Create a partition table with 512-byte sectors and a primary partition of type 83 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/269"}],"collection":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269"}],"version-history":[{"count":8,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":294,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/269\/revisions\/294"}],"wp:attachment":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}