help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I install grub in my Flash Drive?


From: Jordan Uggla
Subject: Re: How can I install grub in my Flash Drive?
Date: Wed, 29 Apr 2015 13:32:35 -0700

On Tue, Apr 28, 2015 at 11:38 PM, bkpsusmitaa <address@hidden> wrote:
> Hello!
> I have a 16GB pendrive, with two ext4 partitions. I plan to run
> Knoppix from the flashdrive. My pendrive in one computer is /dev/sdb
> I am trying grub-install /dev/sdb
> The device is mounted in /media/sdb1 and /media/sdb2
> I am getting a grub-probe error.
>
> I read the following section:
> ==================================================
> If you want GRUB to put images under a directory other than /boot, you
> need to specify the option --boot-directory. The typical usage is that
> you create a GRUB boot floppy with a filesystem. Here is an example:
>
> # mke2fs /dev/fd0
> # mount -t ext2 /dev/fd0 /mnt
> # mkdir /mnt/boot
> # grub-install --boot-directory=/mnt/boot /dev/fd0
> # umount /mnt
> ==================================================
>
> In my other computer the drive is read as /media/sdc1 and sdc2
> when I write: grub-install /dev/sdc
>  or             : grub-install /dev/sdc1
> I get:
> ============================================
> grub-install /dev/sdc
> grub-probe: error: cannot find a device for / (is /dev mounted?).
> grub-probe: error: cannot find a device for /boot/ (is /dev mounted?).
> Could not find device for /boot: Not found or not a block device
> ============================================
> address@hidden:/home/knoppix# grub-install /dev/sdc1
> grub-probe: error: cannot find a device for / (is /dev mounted?).
> grub-probe: error: cannot find a device for /boot/ (is /dev mounted?).
> Could not find device for /boot: Not found or not a block device.
> =============================================

You quoted the portion of the grub manual referring to using
--boot-directory with grub-install, then provided examples where you
used grub-install without --boot-directory. If your pen drive has a
device node of /dev/sdb, /dev/sdb1 is mounted to /media/sdb1/ , and
you want to use /media/sdb1/boot/ as your boot directory, then you
should run "grub-install --boot-directory=/media/sdb1/boot/ /dev/sdb".

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]