Grub installation failed on a USB stick.
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Grub installation failed on a USB stick.
I want to install a non live version of linux mint on a sub stick. So since my laptop has 2 usb ports i used 2 usb sticks, one with a bootable live version and the other on which the system has to be installed.
So let us call /dev/sdd the target USB drive.
In the installer i choose "other, custom" and created 2 partitions (/dev/sdd1,/dev/sdd2) on the usb stick (/home and /), i formated them and asked the installer to put the system here and to install grub on /dev/sdd.
The instalation process went fine till the instalation of grub point at which it failed.
Then i tried to install grub from the live session.
i mounted /dev/sdd1 on mnt and did:
sudo grub-install --root-directory=/mnt/ /dev/sdd
but it failed too.
I m puzzled, i also checked that /dev/sdd1 has the boot flag on.
I don't understand at all, my usb stick should behave exactly like any other storage device (ie like any harddrive).
Last i would also be happy to find a non uefi installer for linux mint, i know how to handly the legacy system and how to boot (repair) as system from Grub -- it is a bit messy but once you found the initram file and the kernel file you are done. The uefi boot mode is just obscure to me and i don' t even know why it was pushed by the hardware designer (may be to prevent us from using open soruce operatng systes
So let us call /dev/sdd the target USB drive.
In the installer i choose "other, custom" and created 2 partitions (/dev/sdd1,/dev/sdd2) on the usb stick (/home and /), i formated them and asked the installer to put the system here and to install grub on /dev/sdd.
The instalation process went fine till the instalation of grub point at which it failed.
Then i tried to install grub from the live session.
i mounted /dev/sdd1 on mnt and did:
sudo grub-install --root-directory=/mnt/ /dev/sdd
but it failed too.
I m puzzled, i also checked that /dev/sdd1 has the boot flag on.
I don't understand at all, my usb stick should behave exactly like any other storage device (ie like any harddrive).
Last i would also be happy to find a non uefi installer for linux mint, i know how to handly the legacy system and how to boot (repair) as system from Grub -- it is a bit messy but once you found the initram file and the kernel file you are done. The uefi boot mode is just obscure to me and i don' t even know why it was pushed by the hardware designer (may be to prevent us from using open soruce operatng systes
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Grub installation failed on a USB stick.
I think what you may be running into (not sure from your description) is that it's trying to install grub in UEFI mode. which requires a seperate efi file/partition.
Grub will try to make that file but sometimes it fails. if you can boot the machine in legacy bios mode and do the install that way it should work.
If you need uefi boot. I'm not sure you can place grub on the stick.
good luck.
Grub will try to make that file but sometimes it fails. if you can boot the machine in legacy bios mode and do the install that way it should work.
If you need uefi boot. I'm not sure you can place grub on the stick.
good luck.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: Grub installation failed on a USB stick.
Ok i will check that, i m not too sure how to boot in legacy mode, probably some option in the bios.
Re: Grub installation failed on a USB stick.
Caution: Installing to a USB drive in UEFI can be hazardous to your internal hard drive's bootloader. It's a bug. There are a couple of strategies for getting around this, of which I prefer the one described in this thread. Notice the install is done in BIOS mode, then the UEFI bootloader added manually in Terminal.
Re: Grub installation failed on a USB stick.
So changed in the bios the option to boot in legacy mode, but then the usb stick that i created using dd is not considered as a valid boot device.
When i change back to UEFI the usb stick is found and boot normaly.
The file system on the usb stick does not look like a traditionnal linux root file system, no vmlinux and initram file, instead i have the weird uefi organisation :
/mnt/Linux Mint 18.3 Cinnamon 64-bit/boot/grub $-> ls
efi.img font.pf2 grub.cfg loopback.cfg x86_64-efi
I tried to find a traditional (legacy) iso image for mint but could not fund it.
When i change back to UEFI the usb stick is found and boot normaly.
The file system on the usb stick does not look like a traditionnal linux root file system, no vmlinux and initram file, instead i have the weird uefi organisation :
/mnt/Linux Mint 18.3 Cinnamon 64-bit/boot/grub $-> ls
efi.img font.pf2 grub.cfg loopback.cfg x86_64-efi
I tried to find a traditional (legacy) iso image for mint but could not fund it.
Re: Grub installation failed on a USB stick.
Then mint .iso boot to whatever mode you have the machine set to , there is not seperate .iso for legacy boot.
it your machine is set to boot in bios mode then mint will boot and install in that mode. if it's set to boot uefi it will install in that boot mode.
hope this helps.
it your machine is set to boot in bios mode then mint will boot and install in that mode. if it's set to boot uefi it will install in that boot mode.
hope this helps.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: Grub installation failed on a USB stick.
perhaps this thread will be helpful too you.
viewtopic.php?f=46&t=186040&p=963551#p963551
viewtopic.php?f=46&t=186040&p=963551#p963551
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: Grub installation failed on a USB stick.
Re: Grub installation failed on a USB stick.
Unless there is a typo in your post, you tried to install grub to /home instead of / (the latter containing /boot where grub needs to put its config file)rastabaik wrote: ⤴Sat Feb 24, 2018 7:29 am In the installer i choose "other, custom" and created 2 partitions (/dev/sdd1,/dev/sdd2) on the usb stick (/home and /),
[..]
Then i tried to install grub from the live session.
i mounted /dev/sdd1 on mnt and did:
sudo grub-install --root-directory=/mnt/ /dev/sdd
but it failed too.
Also you can force installation in Legacy mode thanks to the --target option.
So I would do :
Code: Select all
sudo mount /dev/sdd2 /mnt
sudo grub-install --target=i386-pc --root-directory=/mnt /dev/sdd
Re: Grub installation failed on a USB stick.
I use uefi boot. When doing an install to any drive on a uefi system the boot loader install looks to the drives in a prescribed order. The first drive in that sequence that has an esp is used to install the boot loader. So if the sequence is
sda
sdb
sdc
sdd
and there is an esp on sda it will use that esp even if you tell the installer to use sdd.
A way around that is to disconnect all other internal drives during the live USB to USB drive install so there is no other esp to be selected in lieu of your directive.
Hope this helps.
sda
sdb
sdc
sdd
and there is an esp on sda it will use that esp even if you tell the installer to use sdd.
A way around that is to disconnect all other internal drives during the live USB to USB drive install so there is no other esp to be selected in lieu of your directive.
Hope this helps.
LM21.1 KDE/LM21.1 Cin/ UEFI Tuf Gaming X570 Plus, Ryzen 7 5800X, GTX 3060, Samsung 980 Pro M.2 NVMe
LM21.1 KDE/LM21.1 Cin/ UEFI on STRIX laptop, i7700 HQ, GTX 1060, Samsung 980 Pro M.2 NVMe
LM21.1 KDE/LM21.1 Cin/ UEFI on STRIX laptop, i7700 HQ, GTX 1060, Samsung 980 Pro M.2 NVMe
Re: Grub installation failed on a USB stick.
I just finished an installation of LM 18.3 Xfce onto a USB flashdrive in UEFI-mode. Prior to the installation process, I made three partitions on the target USB. First, one fat32-formatted 512 MiB partition flagged as esp and boot. Then one partition for / and one for swap. I chose the first partition as the location for the bootloader and the installation completed without any problem. I am actually posting this booted into this newly made installation.
Edit: Just upgraded to the latest kernel, rebooted and everything seems to work fine so far.
Code: Select all
uname -a
Linux minty 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux