LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2021, 09:11 AM   #1
BubbaGTX
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Rep: Reputation: Disabled
Post Bootloader not installing on Zorin OS bootloader partition


Hello,
couple of days ago I installed Zorin OS on an external hard drive. The problem I have is that I can't boot Zorin from any pc but only from my pc where bootloader for Zorin is on. During the installation of Zorin I created a 550 MB partition for the bootloader, then I selected it so the bootloader can be installed on it. After the installation was done the bootloader was installed on my SSD where Windows is on. This doesn't make any sense since I didn't touch SSD when I was creating partitions for Zorin.
Is there any way I can install new bootloader on unused EFI partition on Zorin disk or move it from SSD to external hard drive somehow?
 
Old 10-08-2021, 09:23 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
You should be able to copy it over from the SSD using standard filesystem commands. The whole point of UEFI is that your boot code resides in normal files that you can manipulate from inside the OS. Look at the EFI system partition on the SSD and copy the GRUB file over to the ESP on the hard drive. It will probably be called something like EFI/boot/grub64.efi.

Last edited by hazel; 10-08-2021 at 09:24 AM.
 
Old 10-08-2021, 09:36 AM   #3
BubbaGTX
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
You should be able to copy it over from the SSD using standard filesystem commands. The whole point of UEFI is that your boot code resides in normal files that you can manipulate from inside the OS. Look at the EFI system partition on the SSD and copy the GRUB file over to the ESP on the hard drive. It will probably be called something like EFI/boot/grub64.efi.
Thanks for the reply but I don't know how to do it. That's why I posted it in "Linux-Newbie" section.
 
Old 10-08-2021, 09:51 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
you can even use windows to copy files from here to there. From the other hand you can start over your installation and try to install bootloader on the required device.
 
Old 10-08-2021, 09:53 AM   #5
BubbaGTX
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
From the other hand you can start over your installation and try to install bootloader on the required device.
That is exactly what I did, it is said in the text I made on the top. It doesn't matter if I select the right device, bootloader will install on SSD, also tried it 2 times.
 
Old 10-08-2021, 10:19 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Boot into Zorin, open a terminal and post the output of the following;
Code:
cat /etc/fstab
cat /sys/firmware/efi 
ls /boot/grub
sudo parted -l
lsblk -f

Last edited by colorpurple21859; 10-08-2021 at 12:44 PM.
 
Old 10-08-2021, 03:31 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492
If Zorin uses the same or similar installer that its daddy (Ubuntu) uses, it will install the EFI files for Zorin to the first EFI partition it finds which will be the EFI partition already existing on your windows drive. Two options:

Disconnect the windows drive and only have the drive to which you wish to install Zorin connected and it should install the Zorin EFI files to the correct drive. Most users see this as a buy in the Ubuntu installer while the Ubuntu developers see it as a feature and have been aware of it for years and will not change it.

Second option is suggested above. Mount the EFI partition on the wwindows drive and mount the EFI partition on the Zorin drive and copy all the files from the zorin (or possibly ubuntu) directory on the EFI partition on the windows drive to the EFI partition on the Zorin drive. Many Ubuntu derivatives name the directory in the EFI partition ubuntu so that may be it or it may be zorin but it should be one or the other. You should be able to see which it is by simply mounting the EFI partition on the windows drive. Doing an online search for how to mount an efi partition from linux should show over half a million options, pick one.
 
Old 10-09-2021, 05:18 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Just a small point: I don't use GRUB myself (Hallelujah!) but would there be any problems in GRUB finding its modules after such a transfer?
 
Old 10-09-2021, 06:03 AM   #9
BubbaGTX
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Boot into Zorin, open a terminal and post the output of the following;
Code:
cat /etc/fstab
cat /sys/firmware/efi 
ls /boot/grub
sudo parted -l
lsblk -f

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdd2 during installation
UUID=7b362afd-e98b-42ca-b573-72a78fe13499 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=4253-2D26 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sdd4 during installation
UUID=052edb8a-e220-4a0e-a2c3-1dfacf07cd17 /home ext4 defaults 0 2
# swap was on /dev/sdb2 during installation
UUID=1332ccc0-15ee-4f62-8e06-080a07c2f845 none swap sw 0 0
# swap was on /dev/sdd3 during installation
UUID=037c46f8-4e05-4fdc-9b4d-be6d6c18bdb2 none swap sw 0 0
fonts
gfxblacklist.txt
grub.cfg
grubenv
unicode.pf2
x86_64-efi
Model: ATA ADATA SP900 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
2 106MB 123MB 16,8MB Microsoft reserved partition msftres
3 123MB 128GB 127GB ntfs Basic data partition msftdata
4 128GB 128GB 530MB ntfs hidden, diag


Model: ATA INTEL SSDSC2KW12 (scsi)
Disk /dev/sdb: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 500MB 499MB fat32 EFI System Partition boot, esp
2 500MB 16,5GB 16,0GB linux-swap(v1) swap swap
3 16,5GB 71,5GB 55,0GB ext4 root
4 71,5GB 128GB 56,5GB ext4 storage


Model: ATA WDC WD10EZRX-00D (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs


Model: TOSHIBA External USB 3.0 (scsi)
Disk /dev/sdd: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 551MB 549MB primary fat32 boot, esp
2 551MB 80,6GB 80,0GB primary ext4
4 80,6GB 492GB 412GB primary ext4
3 492GB 500GB 7999MB primary linux-swap(v1)


NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs 0 100% /snap/bare/5
loop1 squashfs 0 100% /snap/core/11743
loop2 squashfs 0 100% /snap/core18/2128
loop3 squashfs 0 100% /snap/pycharm-community/252
loop4 squashfs 0 100% /snap/gnome-3-28-1804/161
loop5 squashfs 0 100% /snap/snapd/13170
loop6 squashfs 0 100% /snap/gtk-common-themes/1519
loop7 squashfs 0 100% /snap/discord/130
loop8 squashfs 0 100% /snap/vlc/2344
sda
├─sda1 vfat 4253-2D26 65,7M 32% /boot/efi
├─sda2
├─sda3 ntfs 1A1E66561E662B49
└─sda4 ntfs 92907C31907C1DC3
sdb
├─sdb1 vfat 2D3F-15D1
├─sdb2 swap 1332ccc0-15ee-4f62-8e06-080a07c2f845 [SWAP]
├─sdb3 ext4 20e6ebe9-eb6f-4d9b-b575-70e6cc7460fc
└─sdb4 ext4 3a1e4fbb-3834-48f8-b15d-1b94cd1d3c6a
sdc
└─sdc1 ntfs HDD 7A50C92A50C8EDC7
sdd
├─sdd1 vfat DF16-85D6
├─sdd2 ext4 7b362afd-e98b-42ca-b573-72a78fe13499 57G 17% /
├─sdd3 swap 037c46f8-4e05-4fdc-9b4d-be6d6c18bdb2 [SWAP]
└─sdd4 ext4 052edb8a-e220-4a0e-a2c3-1dfacf07cd17 354,9G 1% /home

Last edited by BubbaGTX; 10-09-2021 at 06:15 AM.
 
Old 10-09-2021, 10:06 AM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Boot into zorin on the external drive
open a terminal
Code:
sudo nano /etc/fstab
change these lines:
Code:
# /boot/efi was on /dev/sda1 during installation
UUID=4253-2D26 /boot/efi vfat umask=0077 0 1
to this
Code:
# /boot/efi was on /dev/sdd1 during installation
UUID=DF16-85D6 /boot/efi vfat umask=0077 0 1
and delete these two lines
Code:
# swap was on /dev/sdb2 during installation
UUID=1332ccc0-15ee-4f62-8e06-080a07c2f845 none swap sw 0 0
open a terminal, run these commands:
Code:
sudo umount —all
sudo mount —all
sudo mount /dev/sdd1 /boot/efi
sudo grub-install --target=x86_64-efi —no-nvram
sudo grub-install --target=i386-pci /dev/sdd

Last edited by colorpurple21859; 10-09-2021 at 04:11 PM.
 
1 members found this post helpful.
Old 10-09-2021, 10:19 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
To elucidate this excellent advice a bit:

You are replacing the installer program's (wrong) advice to routinely mount your SSD's EFI system partition on /boot/efi with an instruction to mount the hard drive's ESP there instead. So this is where the system will look for boot files in future.

Unmounting and remounting all devices puts this new instruction into operation.

You then install GRUB to the hard drive, which is what the installer should have done.
 
Old 10-09-2021, 02:14 PM   #12
BubbaGTX
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
open a terminal, run these commands:
Code:
sudo umount —all
sudo mount —all
sudo mount /dev/sdd1 /boot/efi
sudo grub-install --target=x86_64-efi —no-nvram
sudo grub-install --target=i386-pci /dev/sdd
I get this error when trying to mount /dev/sdd1 /boot/efi:

mount: /boot/efi: mount failed: Operation not permitted

I also did this as root.

Last edited by BubbaGTX; 10-09-2021 at 02:16 PM.
 
Old 10-09-2021, 03:06 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492
I'm not sure why you got that error but, did you change the lines in fstab as suggested before running the mount commands?
Do you have a /boot/efi directory in Zorin?
You should post the actual command you used, copy/paste is best as there may be typos such as errors, spaces where there should be none that you did not notice.

Quote:
you then install GRUB to the hard drive, which is what the installer should have done.
Grub boot files are installed to the system partition but the Grub efi files aren't on the drive on which Zorin exists. New Ubuntu users have been complaining about this for years, that the installer puts the EFI files for Ubuntu/Zorin on the first EFI partition it finds which is almost always a windows EFI partition. If the Ubuntu developers wanted to change this, they have had years to do it. Although Grub files are on the system partition, the OP will still need to reinstall Grub so it points to the correct partition in addition to making the changes suggested by colorpurple21859..
 
Old 10-09-2021, 03:54 PM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
If the error is “already mounted to /boot/efi” you can ignore,
otherwise reboot into zorin and repost
Code:
lsblk -f

Last edited by colorpurple21859; 10-09-2021 at 04:03 PM.
 
Old 10-09-2021, 08:09 PM   #15
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
try this:
Code:
sudo mount /dev/sdd1 /mnt
sudo grub-install --target=x86_64-efi --efi-directory=/mnt --no-nvram

Last edited by colorpurple21859; 10-09-2021 at 08:28 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I have troubles. Blinks: Zorin OS12 zorin tty1 zorin login:_ FRANCISCO JAHN Linux - Newbie 1 09-23-2020 07:02 PM
[SOLVED] zorin os15 problem installing ANY OS in virtualbox stating my zorin kernel is not compatible harry.wert Zorin OS 4 09-05-2019 08:44 AM
bluetooth not working on upgrading from zorin os 5 to zorin os 9 drjrtrivedi Linux - Newbie 0 10-02-2014 10:46 PM
installed zorin os my i phone tethering wireless does not connect to zorin walt8 Linux - Newbie 2 06-18-2010 05:54 AM
installed zorin os my i phone tethering wireless does not connect to zorin walt8 Linux - Newbie 1 06-18-2010 03:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration