You are not logged in.

#1 2019-08-16 21:55:37

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

[Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Hello,

I am a noob. I'm following the installation guide here: https://wiki.archlinux.org/index.php/Installation_guide
I completed the install with no errors, but when I reboot my machine, it is unable to find an operating system on my drive.
I checked the BIOS to ensure that I am in LEGACY mode, that the hard drive is set to boot before the CD, and that the CD
is no longer in the drive once I rebooted after the install. I am using a Lenovo H50-55.

I started by partitioning the drive like so:

fdisk ./dev/sda
g
n 1 
n 2
n 3
t 1 4
t 2 19
w

Then, I made the filesystems:

mkfs.ext4 /dev/sda3
mkswap /dev/sda2
swapon /dev/sda2

Then, mounted them:

mount /dev/sda3 /mnt

Then, I ran some commands to set up wi-fi. I've excluded them here but can provide if need.
Next, I installed the base system:and generated the fstab

pacstrap /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab

Then I set up timezones

ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime

and the clock

hwclock --systohc --utc

Then I edited /etc/locale.conf and ran locale-gen.
After than I added my hostname and set up the hosts file.

Then, i TRIED to run this command:

grub-install /dev/sda

But I received this error:

grub-install: error: failed to get canonical path of `airootfs´

I did some research online and dicovered I needed to chroot into the system. So i performed:

arch-chroot /mnt

and was then able to perform these commands successfully:

pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

I then set the root password with passwd.
and ran pacman -Syu to see if i needed to update, but it said "nothing to do".
At this point, I believed that I had completed the install, so I reboot and took the cd out of the disc drive; however,
I now am unable to load an operating system. There is no operating system found on my hard drive so the BIOS drops down to my Realtek Network
and coughs up an error about PXI-E. I know the hard drive is just fine as I had a windows install on there just a few hours ago and have
not messed with the hardware at all. I'm a novice, so I could be way off, but my suspicion is that I did not install grub correctly to point to root.
Thanks in advance for any help!

UPDATE: I discovered that I am apparently able to boot the system if I use the CD and select 'Exsting OS' instead of the installation media. But I am not able to boot without the CD

Last edited by pirateprentice (2019-08-21 00:03:00)

Offline

#2 2019-08-16 22:19:43

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,143
Website

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Welcome to the forums, pirateprentice, and congrats on writing such a detailed and well formatted first post.

However, please edit your title to describe the problem you are having: https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-08-16 22:21:34

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

WorMzy wrote:

Welcome to the forums, pirateprentice, and congrats on writing such a detailed and well formatted first post.

However, please edit your title to describe the problem you are having: https://wiki.archlinux.org/index.php/Co … ow_to_post

Is the new title adequate?

Offline

#4 2019-08-16 22:30:38

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,143
Website

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Well, the "problems with installation" is redundant, as you're posting in the installation section of a help forum, so please remove that.

Also, I suggest including grub2 in the title -- as far as I can tell, you've set up your partitions correctly for a grub2+BIOS/GPT system, but attracting the attention of someone who has more experience with that bootloader would probably help.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2019-08-16 22:33:51

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

WorMzy wrote:

Well, the "problems with installation" is redundant, as you're posting in the installation section of a help forum, so please remove that.

Also, I suggest including grub2 in the title -- as far as I can tell, you've set up your partitions correctly for a grub2+BIOS/GPT system, but attracting the attention of someone who has more experience with that bootloader would probably help.


Thank you for the suggestions. I have updated the title accordingly.

Offline

#6 2019-08-16 23:17:07

lucas2santos
Member
From: Brazil
Registered: 2019-06-17
Posts: 10

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

pirateprentice wrote:

Then, i TRIED to run this command:

grub-install /dev/sda

It looks like your "grub-install" command is incomplete.

According with the Wiki, if you are in BIOS/Legacy mode, the command line should be:

grub-install --target=i386-pc /dev/sda

Try to do it this way and see if that solves the problem.

Offline

#7 2019-08-16 23:33:55

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

lucas2santos wrote:
pirateprentice wrote:

Then, i TRIED to run this command:

grub-install /dev/sda

It looks like your "grub-install" command is incomplete.

According with the Wiki, if you are in BIOS/Legacy mode, the command line should be:

grub-install --target=i386-pc /dev/sda

Try to do it this way and see if that solves the problem.

Thank you for the suggestion! It didn't work however.

Offline

#8 2019-08-17 00:24:17

lucas2santos
Member
From: Brazil
Registered: 2019-06-17
Posts: 10

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Please, boot with CD ("Existing OS" option) and post here the output from:

fdisk -l
lsblk

Offline

#9 2019-08-17 00:46:17

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

lucas2santos wrote:

Please, boot with CD ("Existing OS" option) and post here the output from:

fdisk -l
lsblk

Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors

Disk model: ST2000DM001-1ER1
Units: sectors of 1 * 512 MB = 512 bytes
Sector size:(logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: ED72E732-8849-7844-954C-CD242256FCA3

Device Start End Sectors Size Type

/dev/sda1 2048 6143 4096   2M  BIOS boot
/dev/sda2 6144 37115903 37109760 17.7G Linux swap
/dev/sda3 37115904 3907029134 3869913231 1.8T Linux filesystem

Name MAJ:MIN RM SIZE R0 TYPE MOUNTPOINT

sda        8      : 0  0      1.8T   0     disk
1-sda1   8      : 1  0      2M     0     part
1-sda2   8      : 2  0   17.76G 0     part [SWAP]
1-sda3   8      : 3  0    1.8T     0    part / 
sr0        11      :0  1   622M    0     rom

Thanks!

Last edited by pirateprentice (2019-08-17 01:23:44)

Offline

#10 2019-08-17 03:07:58

lucas2santos
Member
From: Brazil
Registered: 2019-06-17
Posts: 10

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Honestly I didn't managed to detect what is wrong with your setup. Apparently you did all right. Following the same steps that you made to install Arch Linux works without problems in a virtual machine - I just tested here.

Maybe you could try to do this, to see if it would be somehow helpful: https://wiki.archlinux.org/index.php/GR … ooting_GPT

If it doesn't work, then, unfortunately, I can't help anymore.

Last edited by lucas2santos (2019-08-17 03:08:50)

Offline

#11 2019-08-17 04:46:26

liewkj
Member
Registered: 2019-07-08
Posts: 69

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

pirateprentice wrote:

I checked the BIOS to ensure that I am in LEGACY mode, that the hard drive is set to boot before the CD, and that the CD

Legacy BIOS mode won't boot from GPT. Set the BIOS to UEFI mode if you want to boot from GPT partition.
Or, during fdisk, create DOS partition instead of GPT partition if you insist to keep the BIOS in Legacy Mode.

Offline

#12 2019-08-17 05:08:11

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,320

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

liewkj wrote:
pirateprentice wrote:

I checked the BIOS to ensure that I am in LEGACY mode, that the hard drive is set to boot before the CD, and that the CD

Legacy BIOS mode won't boot from GPT. Set the BIOS to UEFI mode if you want to boot from GPT partition.
Or, during fdisk, create DOS partition instead of GPT partition if you insist to keep the BIOS in Legacy Mode.

You're basing that on...what?

There are a few actual BIOS systems that won't boot from GPT, haven't seen a UEFI system that won't yet.

Offline

#13 2019-08-17 11:07:58

loqs
Member
Registered: 2014-03-06
Posts: 9,110

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

pirateprentice can you check the system is booting in BIOS mode?  The following should return no output from the install media:

dmesg | grep -F 'efi:'

Offline

#14 2019-08-17 14:09:46

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

liewkj wrote:
pirateprentice wrote:

I checked the BIOS to ensure that I am in LEGACY mode, that the hard drive is set to boot before the CD, and that the CD

Legacy BIOS mode won't boot from GPT. Set the BIOS to UEFI mode if you want to boot from GPT partition.
Or, during fdisk, create DOS partition instead of GPT partition if you insist to keep the BIOS in Legacy Mode.


I'll wait for this to be confirmed. I don't necessarily want to repartition the drive and go through the installation process again if I dont need to.



loqs wrote:

pirateprentice can you check the system is booting in BIOS mode?  The following should return no output from the install media:

desm | grep -F 'efi:'

No output.

Thanks!

Offline

#15 2019-08-17 19:08:32

liewkj
Member
Registered: 2019-07-08
Posts: 69

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

I just want to make things simple. Legacy BIOS mode should be using DOS partition while UEFI mode should be using GPT partition. There are ways to make Legacy BIOS mode boot from GPT partition, but I think this is considered advanced topic for those who really want to get into it.

Offline

#16 2019-08-17 20:13:58

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

liewkj wrote:

I just want to make things simple. Legacy BIOS mode should be using DOS partition while UEFI mode should be using GPT partition. There are ways to make Legacy BIOS mode boot from GPT partition, but I think this is considered advanced topic for those who really want to get into it.

Thank you for the input. If a solution cannot be found either by me or someone in the community, I'll re-install using uefi, but that's plan b..

Offline

#17 2019-08-17 20:36:48

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,320

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

liewkj wrote:

I just want to make things simple. Legacy BIOS mode should be using DOS partition while UEFI mode should be using GPT partition. There are ways to make Legacy BIOS mode boot from GPT partition, but I think this is considered advanced topic for those who really want to get into it.

On the other hand, nobody should be using DOS partitioning in 2019 unless absolutely necessary. There's nothing 'advanced' about BIOS using GPT, a BIOS firmware shouldn't be reading the partition table at all.

pirateprentice, what error are you seeing exactly? What happens when you install grub? What are you choosing at boot? We need basic info.

Last edited by Scimmia (2019-08-17 20:39:07)

Offline

#18 2019-08-17 21:03:51

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Scimmia wrote:
liewkj wrote:

I just want to make things simple. Legacy BIOS mode should be using DOS partition while UEFI mode should be using GPT partition. There are ways to make Legacy BIOS mode boot from GPT partition, but I think this is considered advanced topic for those who really want to get into it.

On the other hand, nobody should be using DOS partitioning in 2019 unless absolutely necessary. There's nothing 'advanced' about BIOS using GPT, a BIOS firmware shouldn't be reading the partition table at all.

pirateprentice, what error are you seeing exactly? What happens when you install grub? What are you choosing at boot? We need basic info.


All of that information has been given in the first post and subsequent replies.

Offline

#19 2019-08-17 21:15:11

loqs
Member
Registered: 2014-03-06
Posts: 9,110

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

When you run `grub-install /dev/sda` it produces no output?  What was the commands return status? `echo $?`

Offline

#20 2019-08-17 21:17:36

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

loqs wrote:

When you run `grub-install /dev/sda` it produces no output?  What was the commands return status? `echo $?`

No, sorry if there was any confusion. There was no output to the desm command you asked me to run in an earlier post.
I will run grub-install again and edit this post with the output.

Last edited by pirateprentice (2019-08-17 21:18:07)

Offline

#21 2019-08-17 22:13:38

respiranto
Member
Registered: 2015-05-15
Posts: 412
Website

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

pirateprentice wrote:

I'll wait for this to be confirmed. I don't necessarily want to repartition the drive and go through the installation process again if I dont need to.

Just in case: gdisk allows to convert a GPT to an MBR.

Offline

#22 2019-08-17 23:56:42

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

loqs wrote:

When you run `grub-install /dev/sda` it produces no output?  What was the commands return status? `echo $?`

I decided to write the output in a new post so that you would notice there was something new here.

The output from grub-install /dev/sda is as follows:

Installing for i386-pc platform.
Installation finished. No error reported.

Last edited by pirateprentice (2019-08-17 23:58:48)

Offline

#23 2019-08-18 02:05:12

liewkj
Member
Registered: 2019-07-08
Posts: 69

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

AFAIK, if you need GRUB2 (installed in MBR so that Legacy BIOS can find it) to boot GPT partition, then you will need BIOS Boot partition. If your system is UEFI capable, then as others had already said, UEFI is more robust than legacy BIOS/MBR boot. You just need to create EFI System Partition and format it as FAT and grub2-efi will take it from there. Create a mount point for EFI System Partition at /boot/efi and install grub2 with

# grub-install --boot-directory=/boot --efi-directory=/boot/efi
# grub-mkconfig -o /boot/grub/grub.cfg

You can easily verify the installation of grub2-efi for Arch at the mount point

# find /boot/efi/EFI
/boot/efi/EFI/arch/grubx64.efi

With UEFI, everything is transparent making use of proper filesystem, nothing is hidden and verifiable It is then very easy to maintain and backup boot critical files, unlike Legacy BIOS/MBR which tends to store/hide data in physical blocks.

Offline

#24 2019-08-18 02:26:45

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

liewkj wrote:

AFAIK, if you need GRUB2 (installed in MBR so that Legacy BIOS can find it) to boot GPT partition, then you will need BIOS Boot partition. If your system is UEFI capable, then as others had already said, UEFI is more robust than legacy BIOS/MBR boot. You just need to create EFI System Partition and format it as FAT and grub2-efi will take it from there. Create a mount point for EFI System Partition at /boot/efi and install grub2 with

# grub-install --boot-directory=/boot --efi-directory=/boot/efi
# grub-mkconfig -o /boot/grub/grub.cfg

You can easily verify the installation of grub2-efi for Arch at the mount point

# find /boot/efi/EFI
/boot/efi/EFI/arch/grubx64.efi

With UEFI, everything is transparent making use of proper filesystem, nothing is hidden and verifiable It is then very easy to maintain and backup boot critical files, unlike Legacy BIOS/MBR which tends to store/hide data in physical blocks.

I did not want to have to use UEFI, but if it is not possible to boot GPT without, then I will do it.

Offline

#25 2019-08-18 02:32:44

loqs
Member
Registered: 2014-03-06
Posts: 9,110

Re: [Solved] No operating system found, GRUB2 & GPT/BIOS Legacy Mode

Can you move the disk to another system?  To try and check if it is what is on the disk that is the issue or the firmware accessing the disk.
Edit:
You could also try syslinux.  It is only mentioned in relation to syslinux so may not apply to grub2 but is legacy bios bootable set?

Last edited by loqs (2019-08-18 02:44:39)

Offline

Board footer

Powered by FluxBB