{"id":590,"date":"2010-03-23T21:59:04","date_gmt":"2010-03-23T12:59:04","guid":{"rendered":"http:\/\/www13.atpages.jp\/mattyan\/blog\/?p=590"},"modified":"2010-03-23T21:59:04","modified_gmt":"2010-03-23T12:59:04","slug":"%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0ubuntu%e3%81%8c%e5%8b%95%e3%81%84%e3%81%9f","status":"publish","type":"post","link":"https:\/\/mattyan.net\/blog\/?p=590","title":{"rendered":"\u30ab\u30b9\u30bf\u30e0Ubuntu\u304c\u52d5\u3044\u305f"},"content":{"rendered":"<p>\u30ab\u30b9\u30bf\u30e0Ubuntu\u304c\u52d5\u3044\u305f\u304b\u3089\u3001\u69cb\u7bc9\u306e\u30e1\u30e2\u66f8\u304d<br \/>\n<!--more--><br \/>\n<strong>\u3054\u89a7\u306e\u65b9\u3078\u304a\u9858\u3044<\/strong><br \/>\n\u3053\u306e\u65b9\u6cd5\u306f\u307e\u3063\u3061\u3083\u3093\u304c\u8a66\u3057\u305f\u7d50\u679c\u3067\u3059\u3002\u9593\u9055\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u5b9f\u884c\u306f\u81ea\u5df1\u8cac\u4efb\u3067\u304a\u9858\u3044\u3057\u307e\u3059\u3002\u8ab0\u3082\u898b\u306a\u3044\u3060\u308d\u3046\u3051\u3069\u3001\u4e00\u5fdc\u306d\u3002<br \/>\n\u3069\u3053\u304b\u9593\u9055\u3063\u3066\u3044\u305f\u3089\u30c4\u30c3\u30b3\u30df\u9858\u3044\u307e\u3059\u3002<br \/>\n<strong>\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8<\/strong><br \/>\n&nbsp;&nbsp;Ubuntu9.10-ja<br \/>\n<strong>\u4f7f\u7528\u30c4\u30fc\u30eb<\/strong><\/p>\n<table summary=\"use soft\" border=\"1\">\n<tr>\n<td style=\"text-align:center;\">\u30c4\u30fc\u30eb\u540d<\/td>\n<td style=\"text-align:center;\">\u7528\u9014<\/td>\n<\/tr>\n<tr>\n<td>squashfs-tools<\/td>\n<td>HDD\u30a4\u30e1\u30fc\u30b8\u3092\u5c55\u958b\u3059\u308b\u30c4\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>genisoimage<\/td>\n<td>\u30d6\u30fc\u30bf\u30d6\u30ebISO\u306e\u4f5c\u6210<\/td>\n<tr>\n<td>VirtualBox<\/td>\n<td>\u4f5c\u6210\u74b0\u5883\u306e\u4fdd\u6301&#038;\u4f5c\u6210\u3057\u305fISO\u306e\u30c6\u30b9\u30c8<\/td>\n<\/tr>\n<\/table>\n<p>\u624b\u9806(ISO\u306f\/media\/cdrom0\/\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u308b)<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">mkdir  extract-cd<\/code><\/pre>\n<p>\u4f5c\u696d\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3001<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">rsync --exclude=casper\/filesystem.squashfs -a -v \/media\/cdrom0\/ extract-cd<\/code><\/pre>\n<p>HDD\u30a4\u30e1\u30fc\u30b8\u4ee5\u5916\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">unsquashfs -d edit mnt\/casper\/filesystem.squashfs<\/code><\/pre>\n<p>HDD\u30a4\u30e1\u30fc\u30b8\u3092\u5c55\u958b\u3057\u3066edit\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5165\u308c\u3066\u3082\u3089\u3046\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">sudo cp \/etc\/hosts edit\/etc\nsudo cp \/etc\/resolv.conf edit\/etc<\/code><\/pre>\n<p>\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5468\u308a\u306e\u8a2d\u5b9a\u3092\u30b3\u30d4\u30fc<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">sudo chroot edit<\/code><\/pre>\n<p>edit\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u30eb\u30fc\u30c8\u306b\u5207\u308a\u66ff\u3048\u3066<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">mount -t proc none \/proc\nmount -t sysfs none \/sys\nmount -t devpts none \/dev\/pts<\/code><\/pre>\n<p>\u5fc5\u8981\u306a\u3082\u306e\u3092\u30de\u30a6\u30f3\u30c8<br \/>\n\u3042\u3068\u306f\u3001apt-get\u3068\u304b\u3067\u5fc5\u8981\u306a\u3082\u306e(linux-image-$(uname -r)\u3068\u304b)\u3092\u5165\u308c\u3066\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">sudo rm \/etc\/hosts\nrm \/etc\/resolv.conf<\/code><\/pre>\n<p>\u30b3\u30d4\u30fc\u3057\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a2d\u5b9a\u3092\u5ec3\u68c4\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">umount \/proc\numount \/sys\numount \/dev\/pts\nexit<\/code><\/pre>\n<p>\u30a2\u30f3\u30de\u30a6\u30f3\u30c8&amp;\u8131\u51fa\u3002&quot;umount \/proc&quot;\u304c\u5931\u6557\u3057\u305f\u3089\u3001&quot;umount -lf \/proc&quot;\u3067\u5f37\u5236\u30a2\u30f3\u30de\u30a6\u30f3\u30c8\u3067\u304d\u308b\u3002<br \/>\n\u8131\u51fa\u3057\u305f\u3089HDD\u30a4\u30e1\u30fc\u30b8\u3092\u307e\u3068\u3081\u3066ISO\u3078\u3002\u305d\u306e\u524d\u306b<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">chmod +w extract-cd\/casper\/filesystem.manifest\nsudo chroot edit dpkg-query -W --showformat=&#039;${Package} ${Version}n&#039; &gt; extract-cd\/casper\/filesystem.manifest\nsudo cp extract-cd\/casper\/filesystem.manifest extract-cd\/casper\/filesystem.manifest-desktop\nsudo sed -ie &#039;\/ubiquity\/d&#039; extract-cd\/casper\/filesystem.manifest-desktop&lt;\/code\uff1e&lt;\/pre&gt;\n\u3061\u3087\u3063\u3068\u306f\u307f\u51fa\u3057\u305f&#8230;HDD\u30a4\u30e1\u30fc\u30b8\u306e\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u30a2\u30c3\u30d7\u3002\n&lt;pre style=&quot;border:solid #cccccc; background-color:#ffffff&quot;&gt;&lt;code&gt;sudo mksquashfs edit extract-cd\/casper\/filesystem.squashfs<\/code><\/pre>\n<p>HDD\u30a4\u30e1\u30fc\u30b8\u306e\u4f5c\u6210\u300230\u5206\u4ee5\u4e0a\u304b\u304b\u308b\u304b\u3089\u3001\u6687\u3064\u3076\u3057\u306e\u4f55\u304b\u304c\u3044\u308b\u304b\u3082\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">sudo cp edit\/vmlinuz extract-cd\/casper\/vmlinuz\nsudo cp edit\/inird.img extract-cd\/casper\/initrd.gz<\/code><\/pre>\n<p>\u30ab\u30fc\u30cd\u30eb\u30a4\u30e1\u30fc\u30b8\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<br \/>\n\u3053\u3053\u3067\u4f55\u56de\u304b\u306f\u307e\u3063\u305f\u3002Ubutnu9.10\u3067\u306finitrd\u306fgz\u3067\u306f\u306a\u304flz\u3092\u4f7f\u3046\u3063\u307d\u3044\u306e\u3067\u518d\u5727\u7e2e\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">mv extract-cd\/casper\/initrd.lz inird.lz.orig\ngzip -dc extract-cd\/casper\/initrd.gz | lzma -7 &gt; extract-cd\/casper\/initrd.lz\nrm -f initrd.lz.orig\nrm -f extract-cd\/casper\/initrd.gz<\/code><\/pre>\n<p>\u3042\u3068\u306f\u3001\u6b63\u898f\u30c7\u30a3\u30b9\u30af\u78ba\u8a8d\u7528MD5\u3092\u66f8\u304d\u63db\u3048\u3066<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">sudo \/bin\/sh -c &quot;rm extract-cd\/md5sum.txt&quot;\nsudo \/bin\/sh -c &quot;(cd extract-cd &amp;&amp; find . -type f -print0 | xargs -0 md5sum &gt; md5sum.txt)&quot;<\/code><\/pre>\n<p>ISO\u306b\u713c\u304d\u8fbc\u3093\u3060\u3089\u3067\u304d\u3042\u304c\u308a<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">mkisofs -iso-level 4 -allow-lowercase -L -relaxed-filenames -no-iso-translate -N\n -b &quot;isolinux\/isolinux.bin&quot; -hide boot.catalog -hide &quot;isolinux\/isolinux.bin&quot;\n-no-emul-boot -boot-info-table -V &quot;CustuUbuntu&quot; -o CustuUbuntu.iso extract-cd<\/code><\/pre>\n<h3>\u6ce8\u610f\u4e8b\u9805<\/h3>\n<p>\u30fbapt-get\u3067\u306a\u306b\u304b\u53d6\u5f97\u3057\u305f\u3089apt-get clean\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3002<br \/>\n\u30fbHDD\u30a4\u30e1\u30fc\u30b8\u306e\u5c55\u958b\u5148\u306f\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3067\u304d\u308b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u30de\u30a6\u30f3\u30c8\u3055\u305b\u3066\u308b\u30c9\u30e9\u30a4\u30d6\u306b\u3002\u3055\u3082\u306a\u304f\u3070ISO\u30a4\u30e1\u30fc\u30b8\u8d77\u52d5\u4e2d\u306b\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u3067\u843d\u3061\u308b\u3002<\/p>\n<pre style=\"border:solid #cccccc; background-color:#ffffff\"><code class=\"\" data-line=\"\">\/etc\/sudoers is mode 0777, should be 0440<\/code><\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u306e\u30a8\u30e9\u30fc<br \/>\n\u30fbvmlinuz\u3068initrd.img\u306fchroot\u3057\u305f\u3042\u3068\u3067&#8221;apt-get install linux-image-$(uname -r)&#8221;\u3092\u5b9f\u884c\u3059\u308b\u3068\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ab\u30b9\u30bf\u30e0Ubuntu\u304c\u52d5\u3044\u305f\u304b\u3089\u3001\u69cb\u7bc9\u306e\u30e1\u30e2\u66f8\u304d<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-590","post","type-post","status-publish","format-standard","hentry","category-ubuntu","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=590"}],"version-history":[{"count":0,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/590\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}