LinuxQuestions.org
Review your favorite Linux distribution.
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 07-31-2019, 03:15 AM   #1
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Rep: Reputation: Disabled
Grub expert needed, my dual boot does not load GRUB anymore


After I used GParted system did not boot anymore, I am on linux manjaro, and can access the "old" system with the live cd giving
Code:
grub> search.file /etc/manjaro-release root
grub> configfile /boot/grub/grub.cfg
I followed a number of steps
there is something wrong with my fdisk -l ?

Code:
billy-pc% sudo fdisk -l
Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: PM961 NVMe SAMSUNG 256GB                
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B03E0E64-DB72-43F2-A2D5-70A2D2848690

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1026047   1024000   500M EFI System
/dev/nvme0n1p2   1026048   1288191    262144   128M Microsoft reserved
/dev/nvme0n1p3   1288192 369770495 368482304 175.7G Microsoft basic data
/dev/nvme0n1p4 464975872 465995775   1019904   498M Windows recovery environmen
/dev/nvme0n1p5 465995776 497776639  31780864  15.2G Windows recovery environmen
/dev/nvme0n1p6 497778688 500117503   2338816   1.1G Windows recovery environmen
/dev/nvme0n1p7 378720256 462116863  83396608  39.8G Linux filesystem
/dev/nvme0n1p8 369770496 378720255   8949760   4.3G Linux swap

Partition table entries are not in disk order.
and i get this error

Code:
billy-pc% sudo grub-install /dev/nvme0n1p1
Installing for i386-pc platform.
grub-install: warning: File system `fat' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
billy-pc%
I added in /etc/fstab this third line:

Code:
# /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>
UUID=bb57f30f-5414-42a4-a8ac-a18aad047d55 swap           swap    defaults,noatime 0 2
UUID=cc71e759-e197-45d1-aa7c-65db99f02915 /              ext4    defaults,noatime 0 1
UUID=BC76-3943                            /boot/efi      vfat    defaults,noatime 0 2
 
Old 07-31-2019, 04:37 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,296

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
It's a gpt disk, and fdisk is for the older MBR system with it's size limit. This is supposed to end all battles with the system BIOS. MBR has a max of 4 primary partitions; if there's more, you have to make an extended partition and then subdivide that. You have no extended partition, so it's gpt. It wasn't uncommon for some windows things to overwrite the MBR. I don't know if it's still common.

Use gdisk, and I think 'gdisk -l' does a similar job. It's as alike to fdisk in options as possible.

We need to know where your /boot partition is, where grub is/was installed, and where boot was. You can then try something like this from your live cd:
Code:
 cat /etc/fstab  # then note your / and /boot drives. 
# From your output, I'd guess  p2 is your /boot and p7 is your /. don't guess! 
mount <your boot drive> /mnt
mount <your boot drive> /mnt/boot
chroot /mnt # Gets you into your linux system in runlevel 3
# set up grub bearing in mind X or fancy utilities probably won't work. 
# As a last resort just get your linux system looking half right, and save it.
vi /boot/grub/grub.cfg # most systems link vi to SOME editor 
grub-install /dev/sda # or whatever your disk is called
 
Old 07-31-2019, 05:06 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,508

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
After I used GParted system did not boot anymore
It would be useful to members trying to assist you to inform them of the reason for using the partition manager and specifically, what you did!

Quote:
I followed a number of steps
To do what? What steps were they? You need to post more details.

You have an EFI partition which means at least one of the OS's is an EFI install. THis is the default for windows 10. Did you install Manjaro EFI? Were you ever able to boot Manjaro and if so did windows also boot after installing Manjaro?

The message you posted about "Installing for i386-pc platform" would indicate that you are booting in Legacy mode and trying to install Grub which should be installed EFI as it appears your Manjaro is also EFI. THe wiki below at the manjaro site gives detailed instructions on dual booting EFI with windows. Hopefully it will help.

https://forum.manjaro.org/t/wiki-win...-by-step/52668
 
Old 07-31-2019, 06:06 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
Installing for i386-pc platform
this would indicate that you booted the cd in legacy mode. Need to make sure booted in efi mode,
Code:
ls /sys/firmware
will show an efi folder in efi mode.
Once booted in efi mode
Code:
mount /dev/nvme0n1p7 /mnt
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
grub-install --target=x86_64-efi --boot-directory=/mnt/boot /dev/nvme0n1
grub-mkconfig -o /mnt/boot/grub/grub.cfg
some live cd's don't have grub-efi installed so may get error about x86_64-efi.
If so install grub-efi with the live iso package manager.

as has already been said it would help if we knew what you did with gpart

Last edited by colorpurple21859; 07-31-2019 at 10:33 AM.
 
Old 07-31-2019, 09:57 AM   #5
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
I reply to all of you in this post

@business_kid
@yancek
@colorpurple21859

thank you for your support,
first of all I,I am booting from Legacy mode, not UEFI it worked really good, I was switching to UEFI only to use Linux.

Yesterday on the manjaro forum was recommended me to make a /boot/efi mount and I am not sure at this point if I have a GBT or MBR
https://forum.manjaro.org/t/grub-doe...v-sda/96809/10

at the moment this is the state of my partitions, comprehensive of the change /boot/efi below
Quote:
Filesystem Type Size Used Avail Use% Mounted on
dev devtmpfs 3.7G 0 3.7G 0% /dev
run tmpfs 3.7G 1.4M 3.7G 1% /run
/dev/nvme0n1p7 ext4 40G 29G 8.4G 78% /
tmpfs tmpfs 3.7G 210M 3.5G 6% /dev/shm
tmpfs tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
/dev/nvme0n1p1 vfat 496M 72M 425M 15% /boot/efi
tmpfs tmpfs 3.7G 42M 3.7G 2% /tmp
tmpfs tmpfs 748M 20K 748M 1% /run/user/1000
@BusinessKid
Quote:
Originally Posted by business_kid View Post
It's a gpt disk, and fdisk is for the older MBR system with it's size limit. This is supposed to end all battles with the system BIOS. MBR has a max of 4 primary partitions; if there's more, you have to make an extended partition and then subdivide that. You have no extended partition, so it's gpt. It wasn't uncommon for some windows things to overwrite the MBR. I don't know if it's still common.

Use gdisk, and I think 'gdisk -l' does a similar job. It's as alike to fdisk in options as possible.

We need to know where your /boot partition is, where grub is/was installed, and where boot was. You can then try something like this from your live cd:
Code:
 cat /etc/fstab  # then note your / and /boot drives. 
# From your output, I'd guess  p2 is your /boot and p7 is your /. don't guess! 
mount <your boot drive> /mnt
mount <your boot drive> /mnt/boot
chroot /mnt # Gets you into your linux system in runlevel 3
# set up grub bearing in mind X or fancy utilities probably won't work. 
# As a last resort just get your linux system looking half right, and save it.
vi /boot/grub/grub.cfg # most systems link vi to SOME editor 
grub-install /dev/sda # or whatever your disk is called
gdisk cannot be run with -l it gives me error:

I tried to execute this command on nvme0n1 and nvme0n1p1(I guess is only this last one that makes sense)
Quote:
[billy-pc billy]# gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
but
Quote:
[billy-pc billy]# gdisk /dev/nvme0n1p1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Exact type match not found for type code 6E00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 7400; assigning type code for
'Linux filesystem'
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.

Warning! Secondary partition table overlaps the last partition by
3649239541 blocks!
You will need to delete this partition or resize it in another utility.
So i start to be afraid that I installed a kind of mbr, gbt hybrid...
so now you know where my boot is (actually
boot/efi that maybe is wrong, was suggested me yesterday)

I need before to change /boot/efi/ or convert from legacy to UEFI before to follow the command you gave me I guess.

@yancek,
thank you, I used GParted to increase the linux partition and reduce Windows(that is needed for two software)
these are the step i did
1) from windows I reduced the space unallocating 10G
2) with GParted I tried to allocate this unallocate space on my ext4 partition with Linux Manjaro, did not work because I had between the unallocate space(the 10G created from window) and the ext4 another partition, the SWAP partition, so I cancelled the SWAP partition,and as consequence the unallocate space become bigger roughly 14G, then I "expanded" via GPARTED GUI tool ext4 to make Linux Manjaro bigger of 10G, and finally I created a linux swap partition
3) the system did not boot so I asked to the folks in the official forum and was suggested me to create a /boot/efi partition, adding a third line with UID in /etc/fstab.

I do not know if I installed manjaro EFI, i guess not because after the succesful installation, I log with Legacy in the Bios, and not with UEFI that I have to reselect in the BIOS instead any time I want to connect to Windows 10. So I guess I missed the things up yesterday, because I did not have to add a /boot/efi partition.
I read the link you gave me, is really useful if I want to do a fresh installation, but a) I would like to maintain my present installation b) I do not know what I should cancel, if need to reinstall everything

@colorpurple21859
thank you, if I boot in EFI mode, I get an error as soon as I try to do manjaro-chroot -a

ls /sys/firmware does not show any efi folder but: acpi, devicetree, dmi, memap
I will try again to boot in efi mode, but please see above, it looks as I have to modify before the /boot/efi partition?
 
Old 07-31-2019, 10:44 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
If you installed manjaro in legacy, there are a couple of ways this can be fixed without reinstalling.
To fix so installation will boot in efi mode, boot live iso in efi mode,
follow steps in my post #4 above, I add a mkddir and grub-mkconfig command to post #4, you do not have to chroot for this to work.
If any errors other than already mentioned in post 4 let us know.

To install bootloader in efi mode while booting iso in legacy mode, will have to chroot into /mnt after mounting the partitions and issue above commands starting with grub-install after chroot into /mnt. will get error about nvram and will have to select from bios to boot, then if you reinstall grub again all should be fixed.

To boot installation in legacy mode, boot iso in legacy mode, chroot into system and install lilo as bootloader, If you want to use grub as boot loader create a 1MB partition flagged as boot-boot/bios-grub before install grub.

Last edited by colorpurple21859; 07-31-2019 at 10:48 AM.
 
Old 07-31-2019, 12:51 PM   #7
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
If you installed manjaro in legacy, there are a couple of ways this can be fixed without reinstalling.
To fix so installation will boot in efi mode, boot live iso in efi mode,
follow steps in my post #4 above, I add a mkddir and grub-mkconfig command to post #4, you do not have to chroot for this to work.
If any errors other than already mentioned in post 4 let us know.

To install bootloader in efi mode while booting iso in legacy mode, will have to chroot into /mnt after mounting the partitions and issue above commands starting with grub-install after chroot into /mnt. will get error about nvram and will have to select from bios to boot, then if you reinstall grub again all should be fixed.

To boot installation in legacy mode, boot iso in legacy mode, chroot into system and install lilo as bootloader, If you want to use grub as boot loader create a 1MB partition flagged as boot-boot/bios-grub before install grub.
I am sorry for Efi mode you mean that in the BIOS I have to activate UEFI/deactivate Legacy and then run the USB stick? I did it but I cannot pass from there your commands
Quote:
[manjaro-lxde manjaro]# mount /dev/nvme0n1p7 /mnt
mount: /mnt: special device /dev/nvme0n1p7 does not exist.
[manjaro-lxde manjaro]#
In other words from UEFI all the nvm* devices are not properly recognized.
Ehy I have an hint, what about this message I get before in the previous post? I think maybe is not a warning and I have to eliminate nvme0n1p1?
Quote:
[billy-pc billy]# gdisk /dev/nvme0n1p1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Exact type match not found for type code 6E00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 7400; assigning type code for
'Linux filesystem'
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.

Warning! Secondary partition table overlaps the last partition by
3649239541 blocks!
You will need to delete this partition or resize it in another utility.
 
Old 07-31-2019, 12:55 PM   #8
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
EDIT: booting from USB, deselecting legacy, selecting UEFI(that I assume is efi mode), GPARTED shows me only one partition
/dev/sda filesystem:iso96660 size :3,75G

I guess this is the reason why I cannot pass the /dev/mvn* commands
 
Old 07-31-2019, 01:31 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
what is the output of
Code:
fdisk -l
and/or
Code:
gdisk /dev/nvme0n1
gdisk: p

Last edited by colorpurple21859; 07-31-2019 at 01:33 PM.
 
Old 07-31-2019, 01:48 PM   #10
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
what is the output of
Code:
fdisk -l
and/or
Code:
gdisk /dev/nvme0n1
gdisk: p
right now, I switched on Legacy because everything is visible:

fdisk

Quote:
billy-pc% sudo fdisk -l
[sudo] password for billy:
Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: PM961 NVMe SAMSUNG 256GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B03E0E64-DB72-43F2-A2D5-70A2D2848690

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1026047 1024000 500M EFI System
/dev/nvme0n1p2 1026048 1288191 262144 128M Microsoft reserved
/dev/nvme0n1p3 1288192 369770495 368482304 175.7G Microsoft basic data
/dev/nvme0n1p4 464975872 465995775 1019904 498M Windows recovery environment
/dev/nvme0n1p5 465995776 497776639 31780864 15.2G Windows recovery environment
/dev/nvme0n1p6 497778688 500117503 2338816 1.1G Windows recovery environment
/dev/nvme0n1p7 378720256 462116863 83396608 39.8G Linux filesystem
/dev/nvme0n1p8 369770496 378720255 8949760 4.3G Linux swap

Partition table entries are not in disk order.
and gdisk /dev/nvme0n1 (PLEASE CONSIDER that fdisk shows not nvme0n1 but nvmeon1p1 above, and this latter gives error/warning that I need to delete the partition and that secondary partition overlaps last partition)

Quote:
billy-pc% gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4

Problem opening /dev/nvme0n1 for reading! Error is 13.
You must run this program as root or use sudo!
billy-pc% sudo gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
and finally

Quote:
billy-pc% sudo gdisk: p
sudo: gdisk:: command not found

Last edited by ivano8; 07-31-2019 at 01:49 PM.
 
Old 07-31-2019, 02:02 PM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
That is strange that you can't see your drive when booting in uefi mode only, unless there is more than one item in your system bios your are changing to allow to boot in efi mode and one of them you shouldn't be changing. What system is this so someone that has one can better help on that.
Quote:
billy-pc% sudo gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
enter the p here to print out partition table.
Code:
Command (? for help): p
/dev/nvme0n1 is your drive, /dev/nvme0n1p1 is the first partition on that drive

as stated earlier to get booting in either mode while booting in legacy mode will have to chroot into system to install a bootloader. To keep from having to create another partition to install bootloader in legacy mode lilo is a good choice. If you want to use grub looks like you have enough room between some of your partitions to create 1mb empty partition flagged as bios-boot

here is a howto to chroot and fix bootloader https://wiki.manjaro.org/index.php/R...RUB_Bootloader

Last edited by colorpurple21859; 07-31-2019 at 02:17 PM.
 
Old 08-01-2019, 10:15 AM   #12
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
That is strange that you can't see your drive when booting in uefi mode only, unless there is more than one item in your system bios your are changing to allow to boot in efi mode and one of them you shouldn't be changing. What system is this so someone that has one can better help on that.

enter the p here to print out partition table.
Code:
Command (? for help): p
Ah I see here you are

Quote:
Command (? for help): p
Disk /dev/nvme0n1: 500118192 sectors, 238.5 GiB
Model: PM961 NVMe SAMSUNG 256GB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): B03E0E64-DB72-43F2-A2D5-70A2D2848690
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 2863725 sectors (1.4 GiB)

Number Start (sector) End (sector) Size Code Name
1 2048 1026047 500.0 MiB EF00 EFI system partition
2 1026048 1288191 128.0 MiB 0C01 Microsoft reserved ...
3 1288192 369770495 175.7 GiB 0700 Basic data partition
4 464975872 465995775 498.0 MiB 2700
5 465995776 497776639 15.2 GiB 2700
6 497778688 500117503 1.1 GiB 2700
7 378720256 462116863 39.8 GiB 8300
8 369770496 378720255 4.3 GiB 8200 SWAP ADDED BY ME

Quote:
Originally Posted by colorpurple21859 View Post
/dev/nvme0n1 is your drive, /dev/nvme0n1p1 is the first partition on that drive
Ah I see I am starting to connect the dots, hopefully I will be able to play with partitions easier in the future.

Quote:
Originally Posted by colorpurple21859 View Post
If you want to use grub looks like you have enough room between some of your partitions to create 1mb empty partition flagged as bios-boot
Please could expand a bit this concept with my actual situation, if you have time? I am really starting to enjoying this post. I do not get these three points, while I am reading the link you gave me on restoring the GRUB bootloader, and having decided to give a try to UEFI instead of Legacy.
1) is normal that the partition 1 starts at 2048 and is half giga?
2) where I need/or should be GRUB in an EFI installation?
3)what is the relation with ` /dev/nvme0n1p1 vfat 496M 72M 425M 15% /boot/efi` do I need to cancel and flag it as a bios boot( I am assuming /boot/efi is correct, should not be /boot)

I am learning a lot, and keep studying

Last edited by ivano8; 08-01-2019 at 10:17 AM.
 
Old 08-01-2019, 10:55 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
is normal that the partition 1 starts at 2048 and is half giga?
I think that is kilobytes and is normal on gpt drive.
Quote:
what is the relation with ` /dev/nvme0n1p1 vfat 496M 72M 425M 15% /boot/efi` do I need to cancel and flag it as a bios boot( I am assuming /boot/efi is correct, should not be /boot)
leave that partition alone, it is needed to boot in uefi mode and is normally mounted /boot/efi. When grub-installed is invoked in legacy mode grub code is installed on the drive mbr, in uefi grub boot code is installed as a file in /boot/efi/EFI/manjaro/grubx64.efi.

When grub is installed in legacy mode on msdos type drive there is room between the mbr and first partiitont to store the core.img, This space doesn't exist on a gpt drive, so a 1mb partition is needed for this. https://en.wikipedia.org/wiki/BIOS_boot_partition

On my system, I have an efi partition and 1mb bios-boot/bios-grub partition so I can boot in either efi or legacy mode. Some distros you will need to install additional grub package grub-pc and/or grub-efi because they only install the grub files that is only needed for what mode the installation was done in.

Last edited by colorpurple21859; 08-01-2019 at 11:01 AM.
 
Old 08-01-2019, 02:17 PM   #14
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
The correct form is gdisk /dev/nvme0n1 as this refers to the whole drive itself analogous to /dev/sda for a SATA drive.

Code:
billy-pc billy]# gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
However /dev/nvme0n1p1 refers to the first partition on this NVMe SSD analogous to /dev/sda1 for the first partition on a SATA drive. There is no partition table inside an individual partition. The second gdisk command using /dev/nvme0n1p1 was very wrong.
 
Old 08-01-2019, 03:56 PM   #15
ivano8
LQ Newbie
 
Registered: Jul 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
guys I took two days off from the office but is solved, and the satisfaction to work around that other operative system is noticeable

1)open window select as admin right clicking the window icon to have a prompt as admin and write bcdedit /set safeboot minimal
1) Change SATA settings to AHCI
2)set windows as first UEFI, open again the command prompt as admin and write bcdedit /deletevalue safeboot
3) run manjaro and give
Quote:
manjaro-chroot -a #check is mounted the /boot/efi directory

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck --verbose
4) move in the UEFI settings manjaro on top of the HD
5) <In my case I got a problem, the SWAP partition I changed with gparted had another uid, so i run `blkid` to find the new UUID and changed accordingly the value in /etc/fstab>
6) I repeat with a voice algorithm recursion, W$ we won, we won, we won

Thank you guys for the support
 
  


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
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
NIC not installed anymore, KDE not installed anymore, LILO duplicate Volume ID error scottad Slackware 2 03-31-2012 12:13 AM
Grub menu doesnt load at startup : dual boot : grub in the /boot partition jayesh.bhoot Linux - General 7 10-23-2010 03:58 AM
grub.conf dual boot xp centos xp does not load Envision5000 Linux - Newbie 8 03-06-2006 10:04 PM
GRUB not loading / boot.ini file does not show Linux anymore jeetasher Linux - Laptop and Netbook 14 10-23-2005 06:50 PM

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

All times are GMT -5. The time now is 11:24 AM.

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