Void Linux discussion
 help / color / mirror / Atom feed
From: jacksprat <picamanic@gmail.com>
To: voidlinux <voidlinux@googlegroups.com>
Subject: Re: Trying to Install on USB drive using GRUB
Date: Tue, 25 Jun 2019 22:46:06 -0700 (PDT)	[thread overview]
Message-ID: <a63f086d-48c8-4039-9892-295194715d87@googlegroups.com> (raw)
In-Reply-To: <5d119bc6-2440-4bed-8f81-841ba285c876@googlegroups.com>


[-- Attachment #1.1: Type: text/plain, Size: 3017 bytes --]

This all happened because the hard drive on my shiny HP laptop was failing, 
and I decided to try and create a bootable USB drive with GRUB and and the 
Void Linux MUSL Live image.

As my route to finding a solution was a bit messy, I just wanted to let you 
know what eventually worked.

I started from Void Linux Live MUSL image, which I opted to load into RAM 
from USB, so that I could unmount the installation medium and remove.  This 
avoids getting confused with the target USB device:  a Samsung 250gb 860 
Evo SSD [SATA] connected via a STAR USB adaptor.
 
The void-installer script fails when running grub-install [it wanted UEFI], 
and my attempts to fix it failed.  However, as the basic system had been 
installed, I just needed to make it boot.

I ensured that the /dev/sdb1 partition was bootable by running fdisk 
/dev/sdb and use the "a" command to toggle the "bootable" flag.  

Next, I crafted a simple grub.cfg file:

  menuentry 'Void GNU/Linux MUSL 4.18.17 [sdb1]' {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    linux /boot/vmlinuz-4.18.17_1 root=/dev/sdb1 ro  
    initrd /boot/initramfs-4.18.17_1.img
  }

I don't understand "hd0" for the sdb device [why not "hd1"?], but only it 
works.  This is then installed with

  mkdir /usb
  mount /dev/sdb1 /usb
  grub-install --target=i386-pc --boot-directory=/usb/boot  /dev/sdb
  umount /usb

At this point the the system can be rebooted.

This all happened because the void-installer insisted that I use the crazy 
efi method, even though I have been using BIOS-based installs for ever.  On 
older [pre-efi] computers, the void-installer seems to just work.  Maybe I 
will embrace uefi one day [joke].




On Tuesday, June 25, 2019 at 10:25:30 AM UTC+1, jacksprat wrote:
>
> My laptop hard drive died, so as an interim solution, I wanted to install 
> Void Linux on a removable hard drive [/dev/sdb1].  
>
> I started with the current 64-bit MUSL live image.  The void-installer 
> script, run as root, fails to complete, complaining about expecting to find 
> an efi setup.  Rather than get involved with efi , I tried
>
>   mkdir /usb
>   mount /dev/sdb1 /usb
>   <create /usb/boot/grub/grub.cfg with suitable menu item>
>   grub-install --target=i384-pc --boot-directory=/usb/boot  /dev/sdb
>   umount /usb
>
> which completed without errors.  However, on reboot, I get the grub menu 
> from the failed hard drive.
>
> I also ran fdisk on /dev/sdb to mark the partition bootable.  What have I 
> missed?  Thanks.
>
>

-- 
You received this message because you are subscribed to the Google Groups "voidlinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to voidlinux+unsubscribe@googlegroups.com.
To post to this group, send email to voidlinux@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/voidlinux/a63f086d-48c8-4039-9892-295194715d87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3763 bytes --]

      parent reply	other threads:[~2019-06-26  5:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  9:25 jacksprat
2019-06-25  9:33 ` Igor Fontana
2019-06-25 10:33   ` jacksprat
2019-06-25 10:40     ` Igor Fontana
2019-06-25 11:07       ` jacksprat
2019-06-25 12:56         ` Igor Fontana
2019-06-25 13:38           ` Jeff Pohlmeyer
2019-06-25 13:53             ` jacksprat
2019-06-25 13:58               ` Igor Fontana
2019-06-25 14:07                 ` jacksprat
2019-06-25 14:11                   ` Igor Fontana
2019-06-25 14:25               ` Jeff Pohlmeyer
2019-06-25 14:37                 ` jacksprat
2019-06-25 13:46           ` jacksprat
2019-06-25 15:34           ` jacksprat
2019-06-25 15:40             ` Igor Fontana
2019-06-25 16:59               ` jacksprat
2019-06-25 17:23                 ` jacksprat
2019-06-25 18:32                 ` Jeffrey Sheinberg
2019-06-26  5:46 ` jacksprat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a63f086d-48c8-4039-9892-295194715d87@googlegroups.com \
    --to=picamanic@gmail.com \
    --cc=voidlinux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).