{"id":517,"date":"2012-12-05T15:52:24","date_gmt":"2012-12-05T15:52:24","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=517"},"modified":"2019-08-27T13:54:29","modified_gmt":"2019-08-27T13:54:29","slug":"grub-install","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=517","title":{"rendered":"Grub install"},"content":{"rendered":"<h3>Ohne EFI<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo bash\r\nmount \/dev\/sda2 \/mnt \r\nmount \/dev\/sda3 \/mnt\/boot \r\n\r\nmount -o bind \/dev \/mnt\/dev \r\nmount -o bind \/sys \/mnt\/sys \r\nmount -t proc \/proc \/mnt\/proc \r\n\r\nchroot \/mnt \/bin\/bash \r\ngrub-install \/dev\/sda\r\nupdate-grub\r\nexit\r\n<\/pre>\n<p>Sollte der Fehler &#8220;Could not find device for \/boot: Not found or not a block device.&#8221; auftreten, gibt man folgende Zeile vor dem grub-install ein:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncp \/proc\/mounts \/etc\/mtab \r\n<\/pre>\n<h3>Mit EFI<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo bash\r\nmount \/dev\/sda2 \/mnt \r\nmount \/dev\/sda1 \/boot\/efi\r\n\r\nmount -o bind \/dev \/mnt\/dev \r\nmount -o bind \/sys \/mnt\/sys \r\nmount -t proc \/proc \/mnt\/proc \r\n\r\nchroot \/mnt \/bin\/bash \r\ngrub-install \/dev\/sda\r\nupdate-grub\r\nexit\r\n<\/pre>\n<h4>HP EliteBook G4<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo parted -l\r\nModel: THNSN5512GPUK TOSHIBA (nvme)\r\nDisk \/dev\/nvme0n1: 512GB\r\nSector size (logical\/physical): 512B\/512B\r\nPartition Table: gpt\r\nDisk Flags: \r\n\r\nNumber  Start   End    Size    File system     Name                          Flags\r\n 1      1049kB  379MB  377MB   fat32           EFI system partition          boot, esp\r\n 2      379MB   395MB  16.8MB                  Microsoft reserved partition  msftres\r\n 3      395MB   325GB  325GB                   Basic data partition          msftdata\r\n 4      325GB   495GB  170GB   ext4\r\n 5      495GB   512GB  16.7GB  linux-swap(v1)\r\n\r\nmount \/dev\/nvme0n1p4 \/mnt\r\nmount \/dev\/nvme0n1p1 \/mnt\/boot\/efi\r\n\r\nmount -o bind \/dev \/mnt\/dev \r\nmount -o bind \/sys \/mnt\/sys \r\nmount -t proc \/proc \/mnt\/proc \r\nchroot \/mnt \/bin\/bash\r\n\r\ngrub-install \/dev\/nvme0n1\r\nInstalling for x86_64-efi platform.\r\nInstallation finished. No error reported.\r\n\r\nupdate-grub2 \r\nSourcing file `\/etc\/default\/grub'\r\nSourcing file `\/etc\/default\/grub.d\/50_linuxmint.cfg'\r\nGenerating grub configuration file ...\r\nFound linux image: \/boot\/vmlinuz-4.15.0-54-generic\r\nFound initrd image: \/boot\/initrd.img-4.15.0-54-generic\r\n  WARNING: Failed to connect to lvmetad. Falling back to device scanning.\r\ngrub-probe: error: cannot find a GRUB drive for \/dev\/sda1.  Check your device.map.\r\nAdding boot menu entry for EFI firmware configuration\r\ndone\r\n\r\n&lt;NO CHAIL&gt;\r\nos-prober | tr ' ' '^' | paste -s -d ' '\r\n&lt;\/NO CHAIL&gt;\r\n\r\nmv \/etc\/grub.d\/30_os-prober \/etc\/grub.d\/06_os-prober\r\nvi \/etc\/grub.d\/06_os-prober\r\n\r\n#OSPROBED=&quot;`os-prober | tr ' ' '^' | paste -s -d ' '`&quot;\r\nOSPROBED=&quot;\/dev\/nvme0n1p1@\/EFI\/Microsoft\/Boot\/bootmgfw.efi:Windows^Boot^Manager:Windows:efi \/dev\/nvme0n1p4:Linux^Mint^19.2^Tina^(19.2):LinuxMint:linux&quot;\r\n\r\nupdate-grub2\r\nSourcing file `\/etc\/default\/grub'\r\nSourcing file `\/etc\/default\/grub.d\/50_linuxmint.cfg'\r\nGenerating grub configuration file ...\r\nFound Windows Boot Manager on \/dev\/nvme0n1p1@\/EFI\/Microsoft\/Boot\/bootmgfw.efi\r\nFound Linux Mint 19.2 Tina (19.2) on \/dev\/nvme0n1p4\r\nFound linux image: \/boot\/vmlinuz-4.15.0-54-generic\r\nFound initrd image: \/boot\/initrd.img-4.15.0-54-generic\r\nAdding boot menu entry for EFI firmware configuration\r\ndone\r\n\r\n# sudo efibootmgr -v\r\nBootCurrent: 000D\r\nTimeout: 0 seconds\r\nBootOrder: 0011,0013,000D,000A,0010,000E,000B,000C,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000F\r\nBoot0000  Startup Menu\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)....ISPH\r\nBoot0001  System Information\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0002  Bios Setup\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0003  3rd Party Option ROM Management\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0004  System Diagnostics\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0005  System Diagnostics\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0006  System Diagnostics\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0007  System Diagnostics\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0008  Boot Menu\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0009  HP Recovery\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot000A* IPV4 Network - Intel(R) Ethernet Connection (4) I219-V\tPciRoot(0x0)\/Pci(0x1f,0x6)\/MAC(40b034e99e48,0)\/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.....ISPH\r\nBoot000B* THNSN5512GPUK TOSHIBA-27BS1003T52T\tBBS(HD,THNSN5512GPUK TOSHIBA-27BS1003T52T,0x400)\/PciRoot(0x0)\/Pci(0x1d,0x0)\/Pci(0x0,0x0)\/NVMe(0x1,00-08-0D-02-00-1D-9C-DA)......ISPH\r\nBoot000C* Intel Corporation: IBA CL Slot 00FE v0110\tBBS(Network,Intel Corporation: IBA CL Slot 00FE v0110,0x0)\/PciRoot(0x0)\/Pci(0x1f,0x6)\/IPv4(0.0.0.00.0.0.0,0,0)......ISPH\r\nBoot000D* Verbatim STORE N GO 1242000000000826\tPciRoot(0x0)\/Pci(0x14,0x0)\/USB(1,0)N.....YM....R,Y.....ISPH\r\nBoot000E  USB:  \tBBS(65535,,0x0)\/PciRoot(0x0)\/Pci(0x14,0x0)......ISPH\r\nBoot000F  Network Boot\tFvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)\/FvFile(9d8243e8-8381-453d-aceb-c350ee7757ca)......ISPH\r\nBoot0010* IPV6 Network - Intel(R) Ethernet Connection (4) I219-V\tPciRoot(0x0)\/Pci(0x1f,0x6)\/MAC(40b034e99e48,0)\/IPv6(&#x5B;::]:&lt;-&gt;&#x5B;::]:,0,0)N.....YM....R,Y.....ISPH\r\nBoot0011* ubuntu\tHD(1,GPT,7f3b4501-d7e9-450e-b82a-5104c336081c,0x800,0xb4000)\/File(\\EFI\\ubuntu\\shimx64.efi)\r\nBoot0013* Windows Boot Manager\tHD(1,GPT,7f3b4501-d7e9-450e-b82a-5104c336081c,0x800,0xb4000)\/File(\\EFI\\Microsoft\\Boot\\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...te...................ISPH\r\n\r\n# sudo efibootmgr -o 0011\r\nBootCurrent: 000D\r\nTimeout: 0 seconds\r\nBootOrder: 0011\r\nBoot0000  Startup Menu\r\nBoot0001  System Information\r\nBoot0002  Bios Setup\r\nBoot0003  3rd Party Option ROM Management\r\nBoot0004  System Diagnostics\r\nBoot0005  System Diagnostics\r\nBoot0006  System Diagnostics\r\nBoot0007  System Diagnostics\r\nBoot0008  Boot Menu\r\nBoot0009  HP Recovery\r\nBoot000A* IPV4 Network - Intel(R) Ethernet Connection (4) I219-V\r\nBoot000B* THNSN5512GPUK TOSHIBA-27BS1003T52T\r\nBoot000C* Intel Corporation: IBA CL Slot 00FE v0110\r\nBoot000D* Verbatim STORE N GO 1242000000000826\r\nBoot000E  USB:  \r\nBoot000F  Network Boot\r\nBoot0010* IPV6 Network - Intel(R) Ethernet Connection (4) I219-V\r\nBoot0011* ubuntu\r\nBoot0013* Windows Boot Manager\r\n\r\n\r\n<\/pre>\n<pre class=\"brush: plain; collapse: true; light: false; title: grub-install -v; toolbar: true; notranslate\" title=\"grub-install -v\">\r\n# grub-install -v\r\ngrub-install: info: executing modprobe efivars 2&gt;\/dev\/null.\r\ngrub-install: info: Looking for \/sys\/firmware\/efi ...\r\ngrub-install: info: ...found.\r\nInstalling for x86_64-efi platform.\r\ngrub-install: info: adding `hd0' -&gt; `\/dev\/nvme0n1' from device.map.\r\ngrub-install: info: \/dev\/nvme0n1p1 is present.\r\ngrub-install: info: Looking for \/dev\/nvme0n1p1.\r\ngrub-install: info: \/dev\/nvme0n1 is a parent of \/dev\/nvme0n1p1.\r\ngrub-install: info: \/dev\/nvme0n1p1 starts from 2048.\r\ngrub-install: info: opening the device hd0.\r\n&#x5B;...]\r\ngrub-install: info: scanning hd0 for LDM.\r\ngrub-install: info: no LDM signature found.\r\ngrub-install: info: Scanning for lvm devices on disk hd0.\r\ngrub-install: info: no LVM signature found.\r\ngrub-install: info: Partition 0 starts from 2048.\r\ngrub-install: info: \/dev\/nvme0n1p1 is present.\r\ngrub-install: info: Looking for \/dev\/nvme0n1p1.\r\ngrub-install: info: \/dev\/nvme0n1 is a parent of \/dev\/nvme0n1p1.\r\ngrub-install: info: \/dev\/nvme0n1p1 starts from 2048.\r\ngrub-install: info: opening the device hd0.\r\n&#x5B;...]\r\ngrub-install: info: Partition 0 starts from 2048.\r\ngrub-install: info: drive = 0.\r\ngrub-install: info: the size of hd0 is 1000215216.\r\ngrub-install: info: copying `\/usr\/lib\/grub\/x86_64-efi\/net.mod' -&gt; `\/boot\/grub\/x86_64-efi\/net.mod'.\r\n&#x5B;...]\r\ngrub-install: info: \/dev\/nvme0n1p4 is present.\r\ngrub-install: info: Looking for \/dev\/nvme0n1p4.\r\ngrub-install: info: \/dev\/nvme0n1 is a parent of \/dev\/nvme0n1p4.\r\ngrub-install: info: \/dev\/nvme0n1p4 starts from 635619328.\r\ngrub-install: info: opening the device hd0.\r\n&#x5B;...]\r\ngrub-install: info: Partition 0 starts from 2048.\r\ngrub-install: info: grub-mkimage --directory '\/usr\/lib\/grub\/x86_64-efi' --prefix '\/boot\/grub' --output '\/boot\/grub\/x86_64-efi\/core.efi' --format 'x86_64-efi' --compression 'auto'  --config '\/boot\/grub\/x86_64-efi\/load.cfg' 'ext2' 'part_gpt' 'search_fs_uuid' \r\n.\r\ngrub-install: info: the size of config file is 0x68.\r\ngrub-install: info: the total module size is 0x53e8.\r\ngrub-install: info: reading \/usr\/lib\/grub\/x86_64-efi\/kernel.img.\r\n&#x5B;...]\r\ngrub-install: info: Registering with EFI: distributor = `ubuntu', path = `\\EFI\\ubuntu\\shimx64.efi', ESP at hd0,gpt1.\r\ngrub-install: info: executing efibootmgr --version &lt;\/dev\/null &gt;\/dev\/null.\r\ngrub-install: info: executing modprobe -q efivars.\r\ngrub-install: info: executing efibootmgr -b 0011 -B.\r\n&#x5B;...]\r\ngrub-install: info: executing efibootmgr -c -d \/dev\/nvme0n1 -p 1 -w -L ubuntu -l \\EFI\\ubuntu\\shimx64.efi.\r\n\r\n<\/pre>\n<h3>Boot-Repair<\/h3>\n<pre class=\"brush: plain; title: Install; notranslate\" title=\"Install\">\r\nsudo add-apt-repository ppa:yannubuntu\/boot-repair\r\nsudo apt-get update\r\nsudo apt-get install -y boot-repair &amp;&amp; boot-repair\r\n<\/pre>\n<pre class=\"brush: plain; title: Run; notranslate\" title=\"Run\">\r\nsudo chroot &quot;\/mnt\/boot-sav\/sda5&quot; dpkg --configure -a\r\nsudo chroot &quot;\/mnt\/boot-sav\/sda5&quot; apt-get install -fy\r\nsudo chroot &quot;\/mnt\/boot-sav\/sda5&quot; apt-get purge -y --force-yes grub*-common grub-common:i386 shim-signed linux-signed*\r\nsudo chroot &quot;\/mnt\/boot-sav\/sda5&quot; apt-get install -y --force-yes grub-pc linux-generic\r\n<\/pre>\n<h3>Kernel Book Verbose<\/h3>\n<p><a href=\"http:\/\/askubuntu.com\/questions\/39057\/how-do-i-enable-verbose-mode-at-boot\">How do I enable verbose mode at boot?<\/a><br \/>\n<a href=\"http:\/\/askubuntu.com\/questions\/25022\/how-to-enable-boot-messages-to-be-printed-on-screen-during-boot-up\">How to enable boot messages to be printed on screen during boot up?<\/a><\/p>\n<pre class=\"brush: plain; title: \/etc\/default\/grub; notranslate\" title=\"\/etc\/default\/grub\">\r\n# If you change this file, run 'update-grub' afterwards to update\r\n# \/boot\/grub\/grub.cfg.\r\nGRUB_CMDLINE_LINUX_DEFAULT=&quot;nosplash debug&quot;\r\nGRUB_CMDLINE_LINUX=&quot;&quot;\r\n<\/pre>\n<ol>\n<li>Start your system and wait for the GRUB menu to show (if you don&#8217;t see a GRUB menu, press and hold the left Shift key right after starting the system).<\/li>\n<li>Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.<\/li>\n<li>Go down to the line starting with linux and remove the parameters quiet and splash.<\/li>\n<li>Now press Ctrl + x to boot.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Ohne EFI sudo bash mount \/dev\/sda2 \/mnt mount \/dev\/sda3 \/mnt\/boot mount -o bind \/dev \/mnt\/dev mount -o bind \/sys \/mnt\/sys mount -t proc \/proc \/mnt\/proc chroot \/mnt \/bin\/bash grub-install \/dev\/sda update-grub exit Sollte der Fehler &#8220;Could not find device for \/boot: Not found or not a block device.&#8221; auftreten, gibt man folgende Zeile vor dem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,10],"tags":[],"class_list":["post-517","post","type-post","status-publish","format-standard","hentry","category-debian","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=517"}],"version-history":[{"count":11,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":9931,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions\/9931"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}