{"id":906,"date":"2015-08-27T05:34:50","date_gmt":"2015-08-26T20:34:50","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=906"},"modified":"2015-08-27T05:37:51","modified_gmt":"2015-08-26T20:37:51","slug":"debian-stretch-deleted-lib-restoration","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2015\/08\/27\/debian-stretch-deleted-lib-restoration\/","title":{"rendered":"Debian stretch \u3067 \/lib \u3092\u98db\u3070\u3057\u3066\u3057\u307e\u3044\u56f0\u3063\u305f\u3051\u3069\u3069\u3046\u306b\u304b\u5fa9\u65e7"},"content":{"rendered":"<p><a data-flickr-embed=\"true\"  href=\"https:\/\/www.flickr.com\/photos\/matoken\/19994565204\/in\/dateposted\/\" title=\"IMGP0010.DNG_DI4Y3X.ufraw\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm1.staticflickr.com\/762\/19994565204_41e81e657c.jpg\" width=\"500\" height=\"332\" alt=\"IMGP0010.DNG_DI4Y3X.ufraw\"><\/a><script async src=\"\/\/embedr.flickr.com\/assets\/client-code.js\" charset=\"utf-8\"><\/script><\/p>\n<p>lxc-creates \u3057\u3066\u5931\u6557\u3057\u3066\u304b\u3089 bash \u3082\u4ed6\u306e\u30a2\u30d7\u30ea\u3082\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\uff0e\u3069\u3046\u306b\u304b\u5fa9\u65e7\u3067\u304d\u305f\u306e\u3067\u30e1\u30e2\uff0e<\/p>\n<p>bash \u3082 ls \u3082\u5168\u90e8\u30b3\u30de\u30f3\u30c9\u304c\u306a\u3044\u3068\u8a00\u308f\u308c\u308b\uff0e\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3044\u305f zsh \u3067\u306f tab \u88dc\u5b8c\u3067\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u30b3\u30de\u30f3\u30c9\u306f\u51fa\u3066\u304f\u308b\uff0e\u3053\u306e\u72b6\u614b\u3067\u518d\u8d77\u52d5\u3059\u308b\u3068 recovary mode \u3067\u3082 kernel panick \u306b\uff0eSSD \u304c\u6b7b\u3093\u3060?\u3068\u6226\u3005\u6050\u3005\u3068\u3057\u306a\u304c\u3089 BIOS \u3067 USB \u8d77\u52d5\u3092\u6709\u52b9\u306b\u3057\u3066 USB\u30e1\u30e2\u30ea\u306e Linux \u304b\u3089\u8d77\u52d5\u3057\u3066\u5bfe\u8c61Disk \u3092 mount( LUKS + LVM + ext4 ) chroot \u3057\u3088\u3046\u3068\u3059\u308b\u3068 bash \u304c\u306a\u3044\u3068\u8a00\u308f\u308c\u308b\uff0els \u3059\u308b\u3068\u77e2\u5f35\u308a\u3061\u3083\u3093\u3068\u3042\u308b\uff0e<code>ldd .\/bin\/bash<\/code> \u3057\u3066 \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u78ba\u8a8d\u3057\u3088\u3046\u3068\u3059\u308b\u3068 chroot \u5148\u306e <code>\/lib<\/code> \u304c\u7a7a!<br \/>lxc-create \u304c host \u306e \/lib \u6d88\u3057\u3061\u3083\u3063\u305f\u307d\u3044?<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3053\u306e\u72b6\u614b\u3067\u5dee\u5206\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u3063\u3066\u304a\u304f\uff0e \/home, \/etc, \/var, \/opt \u3042\u305f\u308a\uff0e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30ed\u30b0\u3092\u898b\u305f\u611f\u3058\u3053\u306e\u8fba\u306f\u7279\u306b\u6d88\u3048\u305f\u308a\u3068\u304b\u306f\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3060\u3063\u305f\uff0e<\/p>\n<p>\u591a\u5206 \/lib \u304c\u5fa9\u6d3b\u3059\u308c\u3070\u6cbb\u308b\u3068\u601d\u3046\uff0e\u3068\u3044\u3046\u3053\u3068\u3067\uff0c\u524d\u3082\u3063\u3066\u53d6\u3063\u3066\u3042\u3063\u305f <code>dpkg --get-selections &quot;*&quot;<\/code> \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u304b\u3089 <code>\/lib<\/code> \u3092\u542b\u3080\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u629c\u304d\u51fa\u3057\u3066 <code>apt-get download<\/code> \u3057\u3066\uff0c<code>dpkg -x<\/code> \u3057\u3066\u51fa\u3066\u304d\u305f <code>.\/lib<\/code> \u3092 <code>\/lib<\/code> \u306bcp \u3057\u3066\u3069\u3046\u306b\u304b OS \u304c\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\uff0e<br \/>\u305d\u306e\u5f8c <code>dpkg --configure -a<\/code> \u3068\u304b <code>apt-get install -f<\/code> \u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u72b6\u614b\u3092\u6b63\u5e38\u306a\u72b6\u614b\u306b\uff0e<\/p>\n<p>\u305d\u3093\u306a\u3053\u3093\u306a\u3067\u3069\u3046\u306b\u304b\u5fa9\u65e7\u3057\u307e\u3057\u305f\uff0e<br \/>\u601d\u3063\u305f\u3088\u308a\u6642\u9593\u304b\u304b\u3063\u3066\u3057\u307e\u3063\u305f\uff0eDebian Installer \u3067\u8d77\u52d5\u3057\u3066\u4e0a\u66f8\u304d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066 <code>dpkg --set-selections<\/code> \u3068\u304b\u3057\u305f\u307b\u3046\u304c\u901f\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u306a\u3044\uff0e<\/p>\n<p>\u591a\u5206 <code>lxc-create<\/code> \u3067\u304a\u304b\u3057\u304f\u306a\u3063\u305f\u6c17\u304c\u3059\u308b\u306e\u3067\u3053\u306e\u8fba\u3061\u3083\u3093\u3068\u8abf\u3079\u305f\u3044\u3068\u3053\u308d\uff0e<\/p>\n<pre><code>% sudo lxc-create -t \/usr\/share\/lxc\/templates\/lxc-busybox -n busybox01\r\nlxc_container: No such file or directory - Failed to make \/ rslave to run template\r\nlxc_container: Continuing...\r\nwarning : busybox is not statically linked.\r\nwarning : The template script may not correctly\r\nwarning : setup the container environment.\r\nchmod: `\/usr\/local\/var\/lib\/lxc\/busybox01\/rootfs\/bin\/passwd&#39; \r\nsetting root password to &quot;root&quot;\r\nFailed to change root password\r\nlxc_container: unknown key lxc.haltsignal\r\nlxc_container: Failed to parse config: lxc.haltsignal = SIGUSR1\r\nlxc_container: _recursive_rmdir_onedev: failed to delete \/usr\/local\/var\/lib\/lxc\/busybox01\/rootfs\/lib\r\nlxc_container: _recursive_rmdir_onedev: failed to delete \/usr\/local\/var\/lib\/lxc\/busybox01\/rootfs\r\nlxc_container: Error destroying rootfs for busybox01\r\nlxc_container: Error creating container busybox01\r\nprecmd:2: command not found: basename\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>lxc-creates \u3057\u3066\u5931\u6557\u3057\u3066\u304b\u3089 bash \u3082\u4ed6\u306e\u30a2\u30d7\u30ea\u3082\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\uff0e\u3069\u3046\u306b\u304b\u5fa9\u65e7\u3067\u304d\u305f\u306e\u3067\u30e1\u30e2\uff0e bash \u3082 ls \u3082\u5168\u90e8\u30b3\u30de\u30f3\u30c9\u304c\u306a\u3044\u3068\u8a00\u308f\u308c\u308b\uff0e\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3044\u305f zsh \u3067\u306f tab \u88dc\u5b8c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6],"tags":[276,275,290],"class_list":["post-906","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","tag-debian-linux","tag-linux","tag-stretch"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=906"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/906\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}