LinuxQuestions.org
Help answer threads with 0 replies.
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-23-2020, 01:56 PM   #1
elmehalawi
LQ Newbie
 
Registered: Jun 2020
Posts: 8

Rep: Reputation: Disabled
Trying to understand booting


I'm pretty lost here and would like some pointers. I have an SSD (let's call it /dev/sdc) with both Windows 10 and Fedora 32 installed. Windows was not bootable since I installed Fedora because I guess it overwrote the MBR or something idk. So I decided to get another SSD (let's call it /dev/sda) to move the Fedora partition to.

I used clonezilla to copy the partition to sda, but I was not able to boot from the Fedora partition on sda (the new drive). So, I used clonezilla to clone the entire drive. I thought that would give me two identical drives, but the actual results surprised me:
  • I could boot Windows 10 again. I guess clonezilla somehow fixed the Windows boot manager. It only seems to boot from sda, the new drive.
  • Now when I boot Fedora, it seems to randomly choose one of the Fedora partitions to boot from. So for example when I run the command `mount | grep " / "`, it sometimes shows sda, and sometimes sdc.

I suspect the second problem has to do with the guid of the partitions being the same since they're presumably an exact copy of one another. I'm not really sure how that works though.

Also, it's worth noting that I don't think the Fedora partition uses UEFI to boot:

Code:
$ efibootmgr -v
EFI variables are not supported on this system.
Ideally the setup would be a UEFI partition on each drive, sda for Fedora, sdc for Windows. But I'm not sure how I can do that. I don't even what it looks like now since I don't know how to read the MBR or UEFI partitions and see what's inside them.

Thanks for your help!

Last edited by elmehalawi; 07-23-2020 at 01:59 PM.
 
Old 07-23-2020, 03:00 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,354

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
Ideally the setup would be a UEFI partition on each drive, sda for Fedora, sdc for Windows.
Unless you plan on moving one of the drives to another system, having more than one efi partition is asking for headaches, it is best to only have one efi partition on the first drive.

Quote:
I suspect the second problem has to do with the guid of the partitions being the same
Not good to have partitions/drives with same guid lsblk will confirm that one. I think gdisk can be used to change uuids on gpt drive.

Quote:
Also, it's worth noting that I don't think the Fedora partition uses UEFI to boot:

Code:
$ efibootmgr -v
EFI variables are not supported on this system.
That indicates that fedora is booting in legacy mode. Another sign is in legacy mode /sys/firmware/efi doesn't exist. It's not good to mix efi and legacy booting, grub won't chainload between a legacy install and an uefi install. The good news is Fedora can be made to boot in efi mode without reinstalling.

Last edited by colorpurple21859; 07-23-2020 at 03:02 PM.
 
1 members found this post helpful.
Old 07-23-2020, 03:02 PM   #3
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
well its complicated to me as well.

the basics of booting was that the PC booted up using bios firmware;512 bytes on the MBR via bios held just enough data to point to another location with grub. So MBR became stage 1 of grub and then that pointed to stage two grub where there was menu.lst and other configuration files in eg /boot/grub/

The system the way it worked had restrictions 4 primary partitions and then logical



Then secure boot came along associated with gpt , efi and using uefi firmware. I'm on slackware i have "secure boot" disabled but it still uses uefi , a 100mb EFI partition and associated elilo.efi at :


/boot/efi/EFI/Slackware/

My understanding is that you should have a gpt label system on your HD to use uefi; with grub2 and the gpt system you are not restricted to 4 primary partitions.

Basically i think .. if you left windows and fedora on one hd ; then just went head with installing of say a Debian derivative then if you selected options gpt , you should in theory end up with that install
using uefi and grub2 would be clever enough maybe with update-grub to update.

Before doing anything really you should confirm whether your PC is 32 bit or 64; if you said its Windows10 i could guess it would be 64 bit and whetheryour system support mbr or uefi.

So if you just were starting with the Windows you could poke around in system and it would tell you.

I found https://www.dedoimedo.com/computers/grub.html a good starting place.

i'm sure serious techno's will come along and clarify by loose introduction
 
Old 07-23-2020, 07:28 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Was this machine bought new with Win10 on it, or did you upgrade from say Win7 ?.
Go here, download the script and run it from a Fedora terminal. Post the output file. That should have all we need.

Can you also check the UEFI (aka BIOS) screens to see what mode you are running in - UEFI or legacy/CSM.
 
1 members found this post helpful.
Old 07-24-2020, 02:05 AM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,817
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Quote:
Originally Posted by elmehalawi View Post
I suspect the second problem has to do with the guid of the partitions being the same since they're presumably an exact copy of one another. I'm not really sure how that works though.
UUIDs were invented to minimize problems with device identification. When you make a true clone, you've defeated that function, presenting the kernel with two distinct devices per unique UUID, a situation it's not designed to cope with.

The solution is to generate new UUIDs immediately after making any true clone. I do a lot of cloning. The method I use to change filesystem UUIDs is described here (using tune2fs).
 
1 members found this post helpful.
Old 07-24-2020, 02:29 AM   #6
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 420
Blog Entries: 1

Rep: Reputation: 202Reputation: 202Reputation: 202
@elmehalawi, I dual boot win 10 & OpenSUSE and have used it both with Legacy grub and EFI.
My bootloader always broke after a major windows version update when I used legacy grub. I didnt try to troubleshoot it (I hate troubleshooting windows' antics) and ever since moving to EFI in 2018, it has survived multiple OS upgrades (Win/Lin), an OS migration (Leap 15 -> Leap 15.1) and Hardware replacements (CPU/MoBo).

My windows OS drive (AKA C drive) and Linux Root partition lies on the SSD. I have a separate partition for EFI boot which has not failed me yet. Data and Home partitions and a Windows Partition (E Drive) resides on the HDD.

Is there any specific reason why you do not want to use EFI boot ?

I'll share my Disk partition table if you think it'll help you make a decision.

Also, I personally prefer file level restoration over cloning because it is a lot simpler that way, but to each their own.
 
Old 08-14-2020, 02:10 PM   #7
elmehalawi
LQ Newbie
 
Registered: Jun 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you very much everyone who responded. What I did in the end was re-install fedora, and copy my home folder into the new install (on another partition to make future updates easier). I couldn't figure out how to switch my fedora install from legacy boot to uefi. So I just made sure to use the uefi boot option when booting the installer.

Grub auto-detected the windows partition so now I get a boot menu where I can choose between fedora and windows. I guess the moral is always use uefi.
 
  


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
Need to understand more about booting up, bout legacy bios vs efi, about dual-booting. 842Mono Linux - Newbie 11 02-13-2017 11:13 AM
trying to understand /dev e1000 Linux - General 6 02-22-2004 06:11 AM
Trying to figure out/understand this BIND/DNS thing MasterC Linux - Networking 11 09-21-2003 02:43 PM
Trying to understand DNS and Virtual Hosting dsiguy Linux - Newbie 2 11-26-2002 12:40 PM
Trying to understand linux quintino Linux - Newbie 3 02-02-2002 04:35 PM

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

All times are GMT -5. The time now is 10:34 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