加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html 48.17 KB
一键复制 编辑 原始数据 按行查看 历史
黑果小兵 提交于 2024-09-18 16:31 . Site updated: 2024-09-18 16:31:42
<!DOCTYPE html><html class="theme-next muse use-motion" lang="zh-CN"><head><meta name="generator" content="Hexo 3.8.0"><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#222"><script src="//fastly.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script><link href="/lib/pace/pace-theme-corner-indicator.min.css?v=1.0.2" rel="stylesheet"><meta name="google-site-verification" content="sDeZZSmv4NPbU3sXi1IL5l8PiZt1wVqR5EKUsxOjruY"><link href="https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@3.2.5/dist/jquery.fancybox.min.css" rel="stylesheet" type="text/css"><link href="//fonts.googleapis.com/css?family=Noto Serif SC:300,300italic,400,400italic,700,700italic|Noto Serif SC:300,300italic,400,400italic,700,700italic|Roboto Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css"><link href="//fastly.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"><link href="/css/main.css?v=6.6.0" rel="stylesheet" type="text/css"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.6.0"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.png?v=6.6.0"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.png?v=6.6.0"><link rel="mask-icon" href="/images/logo.svg?v=6.6.0" color="#222"><script id="hexo.configurations">var NexT=window.NexT||{},CONFIG={root:"/",scheme:"Muse",version:"6.6.0",sidebar:{position:"left",display:"hide",offset:12,b2t:!1,scrollpercent:!0,onmobile:!0},fancybox:!0,fastclick:!1,lazyload:!1,tabs:!0,motion:{enable:!0,async:!1,transition:{post_block:"fadeIn",post_header:"slideDownIn",post_body:"slideDownIn",coll_header:"slideLeftIn",sidebar:"slideUpIn"}},algolia:{applicationID:"",apiKey:"",indexName:"",hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}}}</script><meta name="description" content="MacOS系统下使用gpt命令修复损坏的EFI分区今天在远景论坛里看到有坛友将EFI的分区损坏,于是就跟帖回复,现将回复的内容整理下放到博客上,让更多遇到问题的人看到。 命令及用法 显示gpt分区命令如下:123456789101112131415161718192021222324sudo gpt -r show disk0 start size index"><meta name="keywords" content="gpt,MacOS,EFI,Fix,修复"><meta property="og:type" content="article"><meta property="og:title" content="MacOS系统下使用gpt命令修复损坏的EFI分区以及dd命令的基本用法"><meta property="og:url" content="https://blog.daliansky.net/Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html"><meta property="og:site_name" content="黑果小兵的部落阁"><meta property="og:description" content="MacOS系统下使用gpt命令修复损坏的EFI分区今天在远景论坛里看到有坛友将EFI的分区损坏,于是就跟帖回复,现将回复的内容整理下放到博客上,让更多遇到问题的人看到。 命令及用法 显示gpt分区命令如下:123456789101112131415161718192021222324sudo gpt -r show disk0 start size index"><meta property="og:locale" content="zh-CN"><meta property="og:updated_time" content="2020-09-12T05:53:13.000Z"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="MacOS系统下使用gpt命令修复损坏的EFI分区以及dd命令的基本用法"><meta name="twitter:description" content="MacOS系统下使用gpt命令修复损坏的EFI分区今天在远景论坛里看到有坛友将EFI的分区损坏,于是就跟帖回复,现将回复的内容整理下放到博客上,让更多遇到问题的人看到。 命令及用法 显示gpt分区命令如下:123456789101112131415161718192021222324sudo gpt -r show disk0 start size index"><link rel="alternate" href="/atom.xml" title="黑果小兵的部落阁" type="application/atom+xml"><link rel="canonical" href="https://blog.daliansky.net/Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html"><script id="page.configurations">CONFIG.page={sidebar:""}</script><title>MacOS系统下使用gpt命令修复损坏的EFI分区以及dd命令的基本用法 | 黑果小兵的部落阁</title><noscript><style>.sidebar-inner,.use-motion .brand,.use-motion .collection-title,.use-motion .comments,.use-motion .menu-item,.use-motion .motion-element,.use-motion .pagination,.use-motion .post-block,.use-motion .post-body,.use-motion .post-header{opacity:initial}.use-motion .logo,.use-motion .site-subtitle,.use-motion .site-title{opacity:initial;top:initial}.use-motion .logo-line-before i{left:initial}.use-motion .logo-line-after i{right:initial}</style></noscript></head><body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN"><div class="container sidebar-position-left page-post-detail"><div class="headband"></div><header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-wrapper"><div class="site-meta"><div class="custom-logo-site-title"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span> <span class="site-title">黑果小兵的部落阁</span> <span class="logo-line-after"><i></i></span></a></div><p class="site-subtitle">Hackintosh安装镜像、教程及经验分享</p></div><div class="site-nav-toggle"><button aria-label="切换导航栏"><span class="btn-bar"></span> <span class="btn-bar"></span> <span class="btn-bar"></span></button></div></div><nav class="site-nav"><ul id="menu" class="menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i><br>首页</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i><br>归档</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i><br>分类</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i><br>标签</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i><br>关于</a></li><li class="menu-item menu-item-search"><a href="javascript:;" class="popup-trigger"><i class="menu-item-icon fa fa-search fa-fw"></i><br>搜索</a></li></ul><div class="site-search"><div class="popup search-popup local-search-popup"><div class="local-search-header clearfix"><span class="search-icon"><i class="fa fa-search"></i> </span><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span><div class="local-search-input-wrapper"><input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input"></div></div><div id="local-search-result"></div></div></div></nav></div></header><a href="https://github.com/daliansky" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#222;color:#fff;position:absolute;top:0;border:0;right:0" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><main id="main" class="main"><div class="main-inner"><div class="content-wrap"><div id="content" class="content"><div id="posts" class="posts-expand"><div class="reading-progress-bar"></div><article class="post post-type-normal" itemscope itemtype="http://schema.org/Article"><div class="post-block"><link itemprop="mainEntityOfPage" href="https://blog.daliansky.net/Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="黑果小兵"><meta itemprop="description" content="黑果小兵,daliansky,blog.daliansky.net,macOS,Hackintosh,黑苹果,linux"><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="黑果小兵的部落阁"></span><header class="post-header"><h1 class="post-title" itemprop="name headline">MacOS系统下使用gpt命令修复损坏的EFI分区以及dd命令的基本用法</h1><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i> </span><time title="创建时间:2017-10-07 22:39:16" itemprop="dateCreated datePublished" datetime="2017-10-07T22:39:16+08:00">2017-10-07</time> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-calendar-check-o"></i> </span><time title="修改时间:2020-09-12 13:53:13" itemprop="dateModified" datetime="2020-09-12T13:53:13+08:00">2020-09-12</time> </span><span class="post-category"><span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-folder-o"></i> </span><span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/教程/" itemprop="url" rel="index"><span itemprop="name">教程</span></a></span> </span><span class="post-meta-divider">|</span> <span class="post-meta-item-icon" title="阅读次数"><i class="fa fa-eye"></i> <span class="busuanzi-value" id="busuanzi_value_page_pv"></span></span><div class="post-symbolscount"><span class="post-meta-item-icon"><i class="fa fa-file-word-o"></i> </span><span title="本文字数">2.5k</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-clock-o"></i> </span><span title="阅读时长">5 分钟</span></div></div></header><div class="post-body" itemprop="articleBody"><div><div><div class="post-gallery"></div></div></div><h1 id="macos系统下使用gpt命令修复损坏的efi分区"><a class="markdownIt-Anchor" href="#macos系统下使用gpt命令修复损坏的efi分区"></a> MacOS系统下使用gpt命令修复损坏的EFI分区</h1><blockquote><p>今天在远景论坛里看到有坛友将EFI的分区损坏,于是就跟帖回复,现将回复的内容整理下放到博客上,让更多遇到问题的人看到。</p></blockquote><h2 id="命令及用法"><a class="markdownIt-Anchor" href="#命令及用法"></a> 命令及用法</h2><h3 id="显示gpt分区"><a class="markdownIt-Anchor" href="#显示gpt分区"></a> 显示gpt分区</h3><p>命令如下:</p><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">sudo gpt -r show disk0</span><br><span class="line"> </span><br><span class="line"> start size index contents</span><br><span class="line"> 0 1 PMBR</span><br><span class="line"> 1 1 Pri GPT header</span><br><span class="line"> 2 32 Pri GPT table</span><br><span class="line"> 34 2014 </span><br><span class="line"> 2048 614400 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B</span><br><span class="line"> 616448 409600 2 GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE</span><br><span class="line"> 1026048 157696000 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</span><br><span class="line"> 158722048 32000000 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 190722048 262144 </span><br><span class="line"> 190984192 196116728 5 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 387100920 400937448 6 GPT part - 48465300-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 788038368 262144 </span><br><span class="line"> 788300512 1280000 7 GPT part - 5361644D-6163-11AA-AA11-00306543ECAC</span><br><span class="line"> 789580512 129175576 8 GPT part - 48465300-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 918756088 1269536 9 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 920025624 19594968 10 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</span><br><span class="line"> 939620592 59325048 11 GPT part - 48465300-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 998945640 1269536 12 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC</span><br><span class="line"> 1000215176 7 </span><br><span class="line"> 1000215183 32 Sec GPT table</span><br><span class="line"> 1000215215 1 Sec GPT header</span><br></pre></td></tr></table></figure><p>其中:</p><ul><li><code>C12A7328-F81F-11D2-BA4B-00A0C93EC93B</code> 是EFI系统分区(ESP)的标志</li><li><code>index</code> 是指磁盘分区,这里的数值是 <code>1</code> ,也就是说是设备 <code>disk0</code> 的第一个分区</li><li><code>start</code> 是指开始的扇区,这里的数值是: <code>2048</code></li><li><code>size</code> 是指扇区的偏移量,这里的数值是: <code>614400</code></li></ul><h3 id="删除坏的efi分区请先阅读下面的警告信息再运行以下命令"><a class="markdownIt-Anchor" href="#删除坏的efi分区请先阅读下面的警告信息再运行以下命令"></a> 删除“坏”的EFI分区,请先阅读下面的警告信息,再运行以下命令:</h3><ul><li><strong>确保你知道你在做什么,然后再从这里开始 - 如果你搞砸,你可能会丢失数据。</strong></li><li>您无法使用 <code>gpt</code> 编辑分区表,而驱动器上的分区已装入,因此您需要从另一个驱动器(例如,使用OSX安装程序的USB记忆棒)引导,或者以目标磁盘模式运行mac并从另一个mac进行分区操作。</li><li>您可能需要使用 <code>diskutil unmountDisk disk0</code> 卸载任何自动安装的卷,然后再继续执行下面的操作。</li></ul><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo gpt remove -i 1 disk0</span><br></pre></td></tr></table></figure><ul><li><strong>确保disk0真的是要更改的磁盘 - 数字可以在重新启动之间更改。</strong></li><li>而且,只有在EFI系统分区(ESP)已经存在的情况下才能运行,如果没有,则删除分区1可能是灾难性的! 在这种情况下,您需要移动索引,因为我认为ESP必须具有索引 <code>1</code></li></ul><h3 id="重新添加分区与正确的布局和类型"><a class="markdownIt-Anchor" href="#重新添加分区与正确的布局和类型"></a> 重新添加分区与正确的布局和类型:</h3><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo gpt add -b 2048 -i 1 -s 614400 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk3</span><br></pre></td></tr></table></figure><p>执行完这三条命令,您的EFI系统分区(ESP)也就恢复正常了。</p><h1 id="dd命令的基本用法"><a class="markdownIt-Anchor" href="#dd命令的基本用法"></a> dd命令的基本用法</h1><p>其实在做修复之前,也可以使用 <code>dd</code> 命令将EFI分区做个备份,尤其是准备在同一块磁盘里面安装Windows和MacOS的同学,更应该先做个EFI分区的备份,以便EFI被 <em>玩坏</em> 后可以恢复如初。</p><h2 id="efi分区备份到文件命令如下"><a class="markdownIt-Anchor" href="#efi分区备份到文件命令如下"></a> EFI分区备份到文件,命令如下:</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo dd <span class="keyword">if</span>=/dev/rdisk0s1 of=~/Desktop/ESP.img <span class="comment"># 将EFI分区备份到用户目录-桌面,文件名为:ESP.img</span></span><br></pre></td></tr></table></figure><h2 id="从备份文件恢复到esp分区命令如下"><a class="markdownIt-Anchor" href="#从备份文件恢复到esp分区命令如下"></a> 从备份文件恢复到ESP分区,命令如下:</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo dd <span class="keyword">if</span>=~/Desktop/ESP.img of=/dev/rdisk0s1 <span class="comment"># 将备份文件ESP.img恢复到EFI分区</span></span><br></pre></td></tr></table></figure><h1 id="关于打赏"><a class="markdownIt-Anchor" href="#关于打赏"></a> 关于打赏</h1><p>您的支持就是我更新的动力!<br>如果不希望看到博主停更的话,请点击下方的 <code>打赏</code> 支持一下,有钱的捧个钱场,没钱的捧个人场,谢谢大家!</p></div><div><div id="wechat_subscriber" style="display:block;padding:10px 0;margin:20px auto;width:100%;text-align:center"><a href="https://hackintosher.taobao.com"><img id="wechat_subscriber_qcode" src="/uploads/WeChatandShop.png" alt="黑果小兵 wechat" style="max-width:90%"></a><div>微信扫一扫,订阅/直达【黑果小兵的部落阁】</div></div></div><div class="updated"><svg xmlns="http://www.w3.org/2000/svg" width="130" height="20"><lineargradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></lineargradient><clippath id="a"><rect width="130" height="20" rx="3" fill="#fff"/></clippath><g clip-path="url(#a)"><path fill="#555" d="M0 0h55v20H0z"/><path fill="#97CA00" d="M55 0h75v20H55z"/><path fill="url(#b)" d="M0 0h130v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="Menlo,monospace" font-size="110"><text x="285" y="150" fill="#010101" fill-opacity=".3" textlength="450" transform="scale(.1)">更新日期</text><text x="285" y="140" textlength="450" transform="scale(.1)">更新日期</text><text x="915" y="150" fill="#010101" fill-opacity=".3" textlength="650" transform="scale(.1)">2020-09-12</text><text x="915" y="140" textlength="650" transform="scale(.1)">2020-09-12</text></g></svg></div><div><div><div style="text-align:center;color:#ccc;font-size:14px">-------------本文结束<i class="fa fa-apple"></i>感谢您的阅读-------------</div></div></div><div><div style="padding:10px 0;margin:20px auto;width:90%;text-align:center"><button id="rewardButton" disable="enable" onclick='var qr=document.getElementById("QR");"none"===qr.style.display?qr.style.display="block":qr.style.display="none"'><span>打赏</span></button><div>如果文章对您有帮助,就请站长喝杯咖啡吧 ´◡`</div><div id="QR" style="display:none"><div id="wechat" style="display:inline-block"><img id="wechat_qr" src="/images/wechatpay.jpg" alt="黑果小兵 微信支付"><p>微信支付</p></div><div id="alipay" style="display:inline-block"><img id="alipay_qr" src="/images/alipay.jpg" alt="黑果小兵 支付宝"><p>支付宝</p></div></div></div></div><div><div><ul class="qq-qun"><div><p></p><h2>QQ群列表:</h2><p></p><p>630724380 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=JyGkfKK7U3Xq3TDtpqKOTq_gW7SBg4Uh&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群7</a> 2000人 新开群<br>713810838 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=e8E-1Ge2lCoBSTlj8Y4zMxX7l7-V63Iv&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群8</a> 2000人 新开群<br>688324116 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=Fp4HZ5e8A61oCu0GMS5YUqP6COc43-AO&jump_from=webapi" target="_blank" rel="noopener">一起黑苹果</a> 2000人<br>331686786 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=No8zvDfvDicT-GfSApw1RMBI-3MQ7zM3&jump_from=webapi" target="_blank" rel="noopener">一起吃苹果</a> 2000人<br>257995340 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=acztqL9efoqAOoptc_3moZ9b3Sgczu9_&jump_from=webapi" target="_blank" rel="noopener">一起啃苹果</a> 2000人群 远景报备群<br>875482673 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aZNyoRum_er2mruqmnbX_93ncHNgsyak&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群</a> 2000人<br>1058822256 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=1sIT0BDaejgr9t1Hlw16cMnw_Z96zleV&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群2</a> 2000人<br>819662911 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aJx9xO7vAmyslCuOdK0bRMmDLpvOCeRw&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群3</a> 2000人<br>954098809 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=iu042k0X5snr--dzAxOzcsvD9Zft9yx7&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群4</a> 2000人<br>1161377948 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=kBV9vCnz-NqtXXJiwnUhaLyJN1D7G0n6&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群5</a> 2000人<br>553283949 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=kr_hZc5pKK4TCDRaFPwRlfAiB4528InP&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群6</a> 2000人<br>701278330 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=x57TlUmxz88oXGDWjMOOsWokYi8klE11&jump_from=webapi" target="_blank" rel="noopener">黑苹果无线网卡交流群</a> 1000人群 DW1820A技术支持群<br>891434070 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=TUAxSUUtw_T1N62V0kF1sWvMcDr_eoxc&jump_from=webapi" target="_blank" rel="noopener">Catalina黑苹果交流群</a> 2000人群 远景报备群<br>939122730 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=g_rpf7m0LJllE6WHY9c0gVvCTBm1MtuN&jump_from=webapi" target="_blank" rel="noopener">Catalina黑苹果交流II群</a> 2000人群<br>891677227 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=xsuIOzF7RXYaRTTbJ5o_UjzohRDUx5UY&jump_from=webapi" target="_blank" rel="noopener">黑果小兵高级群</a> 2000人群<br>943307869 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aoSvqrbysdjPo0Wa_XvvPuMG9NMEtOie&jump_from=webapi" target="_blank" rel="noopener">黑果小兵高级群II</a> 2000人群<br>419298796 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=4gWtT2-pOWZYIGwIpVaTNft2aOJP-5qs&jump_from=webapi" target="_blank" rel="noopener">零刻黑苹果技术交流群</a> 500人群 非专用机型请勿加入<br>275356796 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=H7hFwiVkZq71L7se6rz3hE9QcacqL-dV&jump_from=webapi" target="_blank" rel="noopener">morefine黑苹果技术交流群</a> 500人群 非专用机型请勿加入<br>869792897 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=MTDHb2QgLH3gkaymtdFCpk77J5ufWJpH&jump_from=webapi" target="_blank" rel="noopener">minisforum U820黑苹果技术群</a> 500人群 非专用机型请勿加入<br>942112153 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=N5cjw5ksrnmk-RMQ4fPCOo5D_Dxiu47B&jump_from=webapi" target="_blank" rel="noopener">天逸510s Mini黑苹果交流群</a> 1000人群 非专用机型请勿加入<br>673294583 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=GgcMJM5-98yB-fc6zyGcTI3OuesrSBRk&jump_from=webapi" target="_blank" rel="noopener">小新Pro黑苹果技术群</a> 2000人群 非专用机型请勿加入<br>946132482 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=r-m99xC-BPIRdVkEjU6duvqXMJ-1FOwA&jump_from=webapi" target="_blank" rel="noopener">小新Pro黑苹果</a> 500人群 非专用机型请勿加入<br>158976808 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=c9DeeyUg9x4dZlOpIVmj4R4g38p-YCZ1&jump_from=webapi" target="_blank" rel="noopener">DELL黑苹果交流群</a> 1000人群 非专用机型请勿加入<br>247451054 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=h7fvRnWmdaMK2D0qVQLzJsjCC9PwB5h3&jump_from=webapi" target="_blank" rel="noopener">小米Pro黑苹果高级群</a> 2000人群 非专用机型请勿加入<br>943181023 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=OGO_GSX9ZhtbQ_HNns57Vdxm5pR1wH6V&jump_from=webapi" target="_blank" rel="noopener">联想小新Air黑苹果交流群</a> 500人群 非专用机型请勿加入<br></p><p></p><h2>Telegram群:</h2><p></p><p>黑果小兵的部落阁 <a href="http://t.me/daliansky" target="_blank">http://t.me/daliansky</a><br>黑果小兵的部落阁 #安装问题讨论 <a href="https://t.me/Hackintosh_Installer" target="_blank">https://t.me/Hackintosh_Installer</a></p><p></p><h2>淘宝店铺:</h2><p></p><p>黑果小兵的部落阁 <a href="https://hackintosher.taobao.com" target="_blank">https://hackintosher.taobao.com</a></p></div></ul></div></div><div><ul class="post-copyright"><li class="post-copyright-author"><strong>本文作者: </strong>黑果小兵</li><li class="post-copyright-link"><strong>本文链接:</strong> <a href="https://blog.daliansky.net/Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html" title="MacOS系统下使用gpt命令修复损坏的EFI分区以及dd命令的基本用法">https://blog.daliansky.net/Use-the-gpt-command-to-repair-a-damaged-EFI-partition-under-Mac-OS-As-well-as-the-basic-usage-of-the-dd-command.html</a></li><li class="post-copyright-license"><strong>版权声明: </strong>本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处!</li></ul></div><footer class="post-footer"><div class="post-tags"><a href="/tags/gpt/" rel="tag"><i class="fa fa-tag"></i> gpt</a> <a href="/tags/MacOS/" rel="tag"><i class="fa fa-tag"></i> MacOS</a> <a href="/tags/EFI/" rel="tag"><i class="fa fa-tag"></i> EFI</a> <a href="/tags/Fix/" rel="tag"><i class="fa fa-tag"></i> Fix</a> <a href="/tags/修复/" rel="tag"><i class="fa fa-tag"></i> 修复</a></div><div class="post-nav"><div class="post-nav-next post-nav-item"><a href="/MacOS-multi-system-Bluetooth-device-automatically-connected.html" rel="next" title="MacOS多系统下蓝牙设备的自动连接"><i class="fa fa-chevron-left"></i> MacOS多系统下蓝牙设备的自动连接</a></div><span class="post-nav-divider"></span><div class="post-nav-prev post-nav-item"><a href="/Add-the-CLOVER-boot-to-the-correct-posture-of-the-UEFI-Boot-Option-Menu.html" rel="prev" title="将CLOVER引导添加进UEFI BOOT Option Menu的正确姿势">将CLOVER引导添加进UEFI BOOT Option Menu的正确姿势 <i class="fa fa-chevron-right"></i></a></div></div></footer></div></article></div></div><div id="gitalk-container"></div></div><div class="sidebar-toggle"><div class="sidebar-toggle-line-wrap"><span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span></div></div><aside id="sidebar" class="sidebar"><div id="sidebar-dimmer"></div><div class="sidebar-inner"><ul class="sidebar-nav motion-element"><li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">文章目录</li><li class="sidebar-nav-overview" data-target="site-overview-wrap">站点概览</li></ul><div class="site-overview-wrap sidebar-panel"><div class="site-overview"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"><a href="/"><img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="黑果小兵"></a><p class="site-author-name" itemprop="name">黑果小兵</p><p class="site-description motion-element" itemprop="description">黑果小兵</p></div><nav class="site-state motion-element"><div class="site-state-item site-state-posts"><a href="/archives/"><span class="site-state-item-count">127</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"><a href="/categories/index.html"><span class="site-state-item-count">26</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"><a href="/tags/index.html"><span class="site-state-item-count">289</span> <span class="site-state-item-name">标签</span></a></div></nav><div class="feed-link motion-element"><a href="/atom.xml" rel="alternate"><i class="fa fa-rss"></i> RSS</a></div><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/daliansky" title="GitHub &rarr; https://github.com/daliansky" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i></a> </span><span class="links-of-author-item"><a href="http://www.jianshu.com/u/df9143008845" title="简书 &rarr; http://www.jianshu.com/u/df9143008845" rel="noopener" target="_blank"><i class="fa fa-fw fa-heartbeat"></i></a> </span><span class="links-of-author-item"><a href="http://shang.qq.com/wpa/qunwpa?idkey=db511a29e856f37cbb871108ffa77a6e79dde47e491b8f2c8d8fe4d3c310de91" title="QQ &rarr; http://shang.qq.com/wpa/qunwpa?idkey=db511a29e856f37cbb871108ffa77a6e79dde47e491b8f2c8d8fe4d3c310de91" rel="noopener" target="_blank"><i class="fa fa-fw fa-qq"></i></a></span></div><div class="links-of-blogroll motion-element links-of-blogroll-block"><div class="links-of-blogroll-title"><i class="fa fa-fw fa-link"></i> Links</div><ul class="links-of-blogroll-list"><li class="links-of-blogroll-item"><a href="https://blog.tlhub.cn" title="https://blog.tlhub.cn" rel="noopener" target="_blank">Athlonreg</a></li><li class="links-of-blogroll-item"><a href="http://www.sqlsec.com" title="http://www.sqlsec.com" rel="noopener" target="_blank">国光</a></li></ul></div></div></div><div class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active"><div class="post-toc"><div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#macos系统下使用gpt命令修复损坏的efi分区"><span class="nav-number">1.</span> <span class="nav-text">MacOS系统下使用gpt命令修复损坏的EFI分区</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#命令及用法"><span class="nav-number">1.1.</span> <span class="nav-text">命令及用法</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#显示gpt分区"><span class="nav-number">1.1.1.</span> <span class="nav-text">显示gpt分区</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#删除坏的efi分区请先阅读下面的警告信息再运行以下命令"><span class="nav-number">1.1.2.</span> <span class="nav-text">删除“坏”的EFI分区,请先阅读下面的警告信息,再运行以下命令:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#重新添加分区与正确的布局和类型"><span class="nav-number">1.1.3.</span> <span class="nav-text">重新添加分区与正确的布局和类型:</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#dd命令的基本用法"><span class="nav-number">2.</span> <span class="nav-text">dd命令的基本用法</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#efi分区备份到文件命令如下"><span class="nav-number">2.1.</span> <span class="nav-text">EFI分区备份到文件,命令如下:</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#从备份文件恢复到esp分区命令如下"><span class="nav-number">2.2.</span> <span class="nav-text">从备份文件恢复到ESP分区,命令如下:</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#关于打赏"><span class="nav-number">3.</span> <span class="nav-text">关于打赏</span></a></li></ol></div></div></div></div></aside></div></main><footer id="footer" class="footer"><div class="footer-inner"><div class="copyright"><a href="http://www.beian.miit.gov.cn" rel="noopener" target="_blank">辽ICP备15000696号-3 </a>&copy; 2016 – <span itemprop="copyrightYear">2024</span> <span class="with-love" id="animate"><i class="fa fa-apple"></i> </span><span class="author" itemprop="copyrightHolder">黑果小兵</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-area-chart"></i> </span><span title="站点总字数">859k</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-coffee"></i> </span><span title="站点阅读时长">26:03</span></div><div class="busuanzi-count"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span class="site-uv" title="总访客量"><i class="fa fa-user"></i> <span class="busuanzi-value" id="busuanzi_value_site_uv"></span> </span><span class="site-pv" title="总访问量"><i class="fa fa-eye"></i> <span class="busuanzi-value" id="busuanzi_value_site_pv"></span></span></div></div></footer><div class="back-to-top"><i class="fa fa-arrow-up"></i> <span id="scrollpercent"><span>0</span>%</span></div></div><script>"[object Function]"!==Object.prototype.toString.call(window.Promise)&&(window.Promise=null)</script><script src="/lib/jquery/index.js?v=2.1.3"></script><script src="/lib/velocity/velocity.min.js?v=1.2.1"></script><script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script><script src="https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@3.2.5/dist/jquery.fancybox.min.js"></script><script src="//fastly.jsdelivr.net/gh/theme-next/theme-next-reading-progress@1.1/reading_progress.min.js"></script><script src="/js/src/utils.js?v=6.6.0"></script><script src="/js/src/motion.js?v=6.6.0"></script><script src="/js/src/scrollspy.js?v=6.6.0"></script><script src="/js/src/post-details.js?v=6.6.0"></script><script src="/js/src/bootstrap.js?v=6.6.0"></script><script src="//fastly.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script><link rel="stylesheet" href="//fastly.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css"><script src="//fastly.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js"></script><script>var gitalk=new Gitalk({clientID:"0da3e792a21a77938da6",clientSecret:"4d2869563000629ee6dbed48fbbf878aea151cb6",repo:"daliansky.github.io",owner:"daliansky",admin:["daliansky"],id:md5(location.pathname),distractionFreeMode:"true",proxy:"https://gitalk.daliansky.workers.dev/?https://github.com/login/oauth/access_token"});gitalk.render("gitalk-container")</script><script>// Popup Window;
var isfetched = false;
var isXml = true;
// Search DB path;
var search_path = "search.xml";
if (search_path.length === 0) {
search_path = "search.xml";
} else if (/json$/i.test(search_path)) {
isXml = false;
}
var path = "/" + search_path;
// monitor main search box;
var onPopupClose = function (e) {
$('.popup').hide();
$('#local-search-input').val('');
$('.search-result-list').remove();
$('#no-result').remove();
$(".local-search-pop-overlay").remove();
$('body').css('overflow', '');
}
function proceedsearch() {
$("body")
.append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
.css('overflow', 'hidden');
$('.search-popup-overlay').click(onPopupClose);
$('.popup').toggle();
var $localSearchInput = $('#local-search-input');
$localSearchInput.attr("autocapitalize", "none");
$localSearchInput.attr("autocorrect", "off");
$localSearchInput.focus();
}
// search function;
var searchFunc = function(path, search_id, content_id) {
'use strict';
// start loading animation
$("body")
.append('<div class="search-popup-overlay local-search-pop-overlay">' +
'<div id="search-loading-icon">' +
'<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
'</div>' +
'</div>')
.css('overflow', 'hidden');
$("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');
$.ajax({
url: path,
dataType: isXml ? "xml" : "json",
async: true,
success: function(res) {
// get the contents from search data
isfetched = true;
$('.popup').detach().appendTo('.header-inner');
var datas = isXml ? $("entry", res).map(function() {
return {
title: $("title", this).text(),
content: $("content",this).text(),
url: $("url" , this).text()
};
}).get() : res;
var input = document.getElementById(search_id);
var resultContent = document.getElementById(content_id);
var inputEventFunction = function() {
var searchText = input.value.trim().toLowerCase();
var keywords = searchText.split(/[\s\-]+/);
if (keywords.length > 1) {
keywords.push(searchText);
}
var resultItems = [];
if (searchText.length > 0) {
// perform local searching
datas.forEach(function(data) {
var isMatch = false;
var hitCount = 0;
var searchTextCount = 0;
var title = data.title.trim();
var titleInLowerCase = title.toLowerCase();
var content = data.content.trim().replace(/<[^>]+>/g,"");
var contentInLowerCase = content.toLowerCase();
var articleUrl = decodeURIComponent(data.url);
var indexOfTitle = [];
var indexOfContent = [];
// only match articles with not empty titles
if(title != '') {
keywords.forEach(function(keyword) {
function getIndexByWord(word, text, caseSensitive) {
var wordLen = word.length;
if (wordLen === 0) {
return [];
}
var startPosition = 0, position = [], index = [];
if (!caseSensitive) {
text = text.toLowerCase();
word = word.toLowerCase();
}
while ((position = text.indexOf(word, startPosition)) > -1) {
index.push({position: position, word: word});
startPosition = position + wordLen;
}
return index;
}
indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
});
if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
isMatch = true;
hitCount = indexOfTitle.length + indexOfContent.length;
}
}
// show search results
if (isMatch) {
// sort index by position of keyword
[indexOfTitle, indexOfContent].forEach(function (index) {
index.sort(function (itemLeft, itemRight) {
if (itemRight.position !== itemLeft.position) {
return itemRight.position - itemLeft.position;
} else {
return itemLeft.word.length - itemRight.word.length;
}
});
});
// merge hits into slices
function mergeIntoSlice(text, start, end, index) {
var item = index[index.length - 1];
var position = item.position;
var word = item.word;
var hits = [];
var searchTextCountInSlice = 0;
while (position + word.length <= end && index.length != 0) {
if (word === searchText) {
searchTextCountInSlice++;
}
hits.push({position: position, length: word.length});
var wordEnd = position + word.length;
// move to next position of hit
index.pop();
while (index.length != 0) {
item = index[index.length - 1];
position = item.position;
word = item.word;
if (wordEnd > position) {
index.pop();
} else {
break;
}
}
}
searchTextCount += searchTextCountInSlice;
return {
hits: hits,
start: start,
end: end,
searchTextCount: searchTextCountInSlice
};
}
var slicesOfTitle = [];
if (indexOfTitle.length != 0) {
slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
}
var slicesOfContent = [];
while (indexOfContent.length != 0) {
var item = indexOfContent[indexOfContent.length - 1];
var position = item.position;
var word = item.word;
// cut out 100 characters
var start = position - 20;
var end = position + 80;
if(start < 0){
start = 0;
}
if (end < position + word.length) {
end = position + word.length;
}
if(end > content.length){
end = content.length;
}
slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
}
// sort slices in content by search text's count and hits' count
slicesOfContent.sort(function (sliceLeft, sliceRight) {
if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
return sliceRight.searchTextCount - sliceLeft.searchTextCount;
} else if (sliceLeft.hits.length !== sliceRight.hits.length) {
return sliceRight.hits.length - sliceLeft.hits.length;
} else {
return sliceLeft.start - sliceRight.start;
}
});
// select top N slices in content
var upperBound = parseInt('1');
if (upperBound >= 0) {
slicesOfContent = slicesOfContent.slice(0, upperBound);
}
// highlight title and content
function highlightKeyword(text, slice) {
var result = '';
var prevEnd = slice.start;
slice.hits.forEach(function (hit) {
result += text.substring(prevEnd, hit.position);
var end = hit.position + hit.length;
result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
prevEnd = end;
});
result += text.substring(prevEnd, slice.end);
return result;
}
var resultItem = '';
if (slicesOfTitle.length != 0) {
resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
} else {
resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
}
slicesOfContent.forEach(function (slice) {
resultItem += "<a href='" + articleUrl + "'>" +
"<p class=\"search-result\">" + highlightKeyword(content, slice) +
"...</p>" + "</a>";
});
resultItem += "</li>";
resultItems.push({
item: resultItem,
searchTextCount: searchTextCount,
hitCount: hitCount,
id: resultItems.length
});
}
})
};
if (keywords.length === 1 && keywords[0] === "") {
resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
} else if (resultItems.length === 0) {
resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
} else {
resultItems.sort(function (resultLeft, resultRight) {
if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
return resultRight.searchTextCount - resultLeft.searchTextCount;
} else if (resultLeft.hitCount !== resultRight.hitCount) {
return resultRight.hitCount - resultLeft.hitCount;
} else {
return resultRight.id - resultLeft.id;
}
});
var searchResultList = '<ul class=\"search-result-list\">';
resultItems.forEach(function (result) {
searchResultList += result.item;
})
searchResultList += "</ul>";
resultContent.innerHTML = searchResultList;
}
}
if ('auto' === 'auto') {
input.addEventListener('input', inputEventFunction);
} else {
$('.search-icon').click(inputEventFunction);
input.addEventListener('keypress', function (event) {
if (event.keyCode === 13) {
inputEventFunction();
}
});
}
// remove loading animation
$(".local-search-pop-overlay").remove();
$('body').css('overflow', '');
proceedsearch();
}
});
}
// handle and trigger popup window;
$('.popup-trigger').click(function(e) {
e.stopPropagation();
if (isfetched === false) {
searchFunc(path, 'local-search-input', 'local-search-result');
} else {
proceedsearch();
};
});
$('.popup-btn-close').click(onPopupClose);
$('.popup').click(function(e){
e.stopPropagation();
});
$(document).on('keyup', function (event) {
var shouldDismissSearchPopup = event.which === 27 &&
$('.search-popup').is(':visible');
if (shouldDismissSearchPopup) {
onPopupClose();
}
});</script><script src="/js/src/js.cookie.js?v=6.6.0"></script><script src="/js/src/scroll-cookie.js?v=6.6.0"></script><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({pluginRootPath:"live2dw/",pluginJsPath:"lib/",pluginModelPath:"assets/",model:{scale:1.2,hHeadPos:.5,vHeadPos:.618,jsonPath:"/live2dw/assets/tororo.model.json"},display:{superSample:2,width:150,height:300,position:"right",hOffset:0,vOffset:-20},mobile:{show:!1,scale:.5},react:{opacityDefault:.7,opacityOnHover:.2},log:!1,tagMode:!1})</script></body></html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化