LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-04-2020, 07:16 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Distribution: Mint-19.3 with Cinnamon
Posts: 1,688
Blog Entries: 3

Rep: Reputation: 106Reputation: 106
making new HDD ready for GPT/UEFI install


Can someone point out a link to the HOWTO for preparing a brand-new-to-me
HDD using GUID/GPT partition table and whatever special and magic partitions?
Once configured, I want to use this HDD for a fresh-install of a Linux distro.

If you know the answers and know that they work, are you willing to share
what you know with me and others?

I know there is a BIOS Boot Partition, a core.img file comes from somewhere, a folder /boot/efi -- does it need its own partition -- and a /boot partition.
I think that all of these are small in size.

QUESTION: Do these need to be on disk in a special location -- low number LBA etc -- and in some special order? Are there others?

QUESTION: Is it better to make these with gparted outside of the
linux installer?

QUESTION: Do I need to do anything else? Do I need to load these with
any files or will the installer handle all of that?

QUESTION: Have modern installers got to the point that they will do all of the correct configuration?

Thanks in advance,
~~~ 0;-Dan
 
Old 07-04-2020, 07:52 PM   #2
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 231

Rep: Reputation: Disabled
I think modern distros do that automatically pretty well. What are you trying to install?
 
2 members found this post helpful.
Old 07-04-2020, 08:32 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,991

Rep: Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283
No.
No.
No.
Yes.

Use something to erase the disk and make sure it is gpt - gparted is fine. Leave it empty, and kick off the installer. Go get a beverage of choice and relax. Oh, and make sure you have UEFI mode selected in the firmware.
 
2 members found this post helpful.
Old 07-05-2020, 12:48 AM   #4
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,612
Blog Entries: 1

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
Nothing need be done in advance of starting a Gnu Linux distribution's installer, but if know what you want, you might find it easier to prepare at least to some extent first using a standalone partitioner (e.g. Gparted). If you're going to partition in advance, as I always do, it's a smart but not necessary convention to make the first partition the FAT32 ESP partition. Other than that, it really doesn't matter what goes where. Given the huge size of modern disks, it can make good sense to create two or more OS partitions so that in the future when upgrade time comes, or you wish to experiment or participate in beta testing a new release, it doesn't become necessary to re-partition, or risk bootability with an installation gone bad, since at that point you'll have an already working installation to fall back to.
 
2 members found this post helpful.
Old 07-05-2020, 09:17 AM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Distribution: Mint-19.3 with Cinnamon
Posts: 1,688

Original Poster
Blog Entries: 3

Rep: Reputation: 106Reputation: 106
Thanks to all of the above:for your comments.

If I understand, I can simply create a new, fresh, empty, GPT partition table on the drive and let the installer do its thing.
Do I have that right?

Sorry, folks, there must be a better way to link to multiple people who offered replies. I'll do better next time.

Thanks, again,
~~~ 0;-Dan

Last edited by SaintDanBert; 07-05-2020 at 09:18 AM.
 
Old 07-05-2020, 09:45 AM   #6
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 231

Rep: Reputation: Disabled
If you want to feel absolutely sure about it then yeah, create gpt via gparted then just select that disk in installer. It would probably do everything even without your explicit gpt formatting but that would guarantee it's gonna get done right. Just try it, you can always redo or ask for help if it would turn out wrong in the end.
 
1 members found this post helpful.
Old 07-05-2020, 11:07 PM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Distribution: Mint-19.3 with Cinnamon
Posts: 1,688

Original Poster
Blog Entries: 3

Rep: Reputation: 106Reputation: 106
Okay, so I have a GPT based HDD with Linux Mint 19.3.

I have no idea what the 16GB /dev/sda1 partition is supposed to do or what it contains. Something I read said that it would have a core.img file specific to my BIOS (or something like that).

QUESTION: Is this where the step-zero boot loader code lives to load GRUB which then loads linux itself?

QUESTION: Did the linux installer just know to fill /dev/sda1 or was it filled by gparted when it runs within the install process?

QUESTION: Was /dev/sda1 filled by update-grub2 when writing the bootstrap details to the drive?

QUESTION: If I have more that one drive bootable, will update-grub2 show multiple boot menu entries?

QUESTION: If multiple boot entries, does this enable a redundant way to keep both drives bootable?

The relevant (my opinion) details seem to be:
Code:
prompt$ sudo lsblk --output NAME,MOUNTPOINT,FSTYPE,SIZE,PARTFLAGS /dev/sda
[sudo] password for xyzzy: ************           

NAME   MOUNTPOINT FSTYPE   SIZE PARTFLAGS
sda                      931.5G 
├─sda1            vfat      16G 
├─sda2 /boot/efi  vfat       1G 
...
├─sda6 /boot      ext4       1G 
...
├─sda8 /          ext4      80G 
...

prompt$
NOTICE -- the PARTFLAGS column should no information

and also:
Code:
prompt $  sudo parted --list /dev/sda

...
Number  Start   End     Size    File system     Name       Flags
 1      1049kB  17.2GB  17.2GB  fat32           bios_grub  msftdata
 2      17.2GB  18.3GB  1074MB  fat32           -EFI       boot, esp
 6      18.3GB  19.3GB  1074MB  ext4            myBoot
...
 8      51.5GB  137GB   85.9GB  ext4            myRoot
...
NOTICE -- Here the Flags column show details for both sda1 & sda2.

... and lastly this:

Code:
prompt $ sudo ls -la /boot/efi

total 12
drwx------ 3 root root 4096 Dec 31  1969 .
drwxr-xr-x 5 root root 4096 Jul  3 18:40 ..
drwx------ 4 root root 4096 Jan 23  2019 EFI

prompt $ sudo ls -lah /boot/efi/EFI

total 16K
drwx------ 4 root root 4.0K Jan 23  2019 .
drwx------ 3 root root 4.0K Dec 31  1969 ..
drwx------ 2 root root 4.0K Jan 23  2019 BOOT
drwx------ 2 root root 4.0K Feb 21 09:20 ubuntu

prompt $ sudo ls -la /boot

total 396780
drwxr-xr-x  5 root root     4096 Jul  3 18:40 .
drwxr-xr-x 26 root root     4096 Jul  3 18:38 ..
-rw-r--r--  1 root root   235827 Jun 24 07:07 config-5.3.0-62-generic
drwx------  3 root root     4096 Dec 31  1969 efi
drwxr-xr-x  6 root root     4096 Jul  3 18:40 grub
-rw-r--r--  1 root root 69062949 Jul  3 18:40 initrd.img-5.3.0-62-generic
drwx------  2 root root    16384 Jan 24  2019 lost+found
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
=-rw-------  1 root root  4490843 Jun 24 07:07 System.map-5.3.0-62-generic
-rw-------  1 root root  9158912 Jun 24 07:20 vmlinuz-5.3.0-62-generic
I'm really trying to learn and understand rather than tinker
until the flat tire goes away and lack understanding about the why and how of what it going on. You know, "teach a man to fish..."

Thanks, again, for help in advance,
~~~ 0;-Dan
 
Old 07-05-2020, 11:47 PM   #8
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,612
Blog Entries: 1

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
Quote:
Originally Posted by SaintDanBert View Post
Okay, so I have a GPT based HDD with Linux Mint 19.3.

I have no idea what the 16GB /dev/sda1 partition is supposed to do or what it contains. Something I read said that it would have a core.img file specific to my BIOS (or something like that).

QUESTION: Is this where the step-zero boot loader code lives to load GRUB which then loads linux itself?
https://en.wikipedia.org/wiki/BIOS_b...components.svg suggests yes.
 
  


Reply

Tags
boot, gpt, guid, uefi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] GPT table corrupted (again @%36372 GPT) BW-userx Linux - Hardware 5 08-29-2018 04:14 PM
[SOLVED] UEFI fresh hdd GPT table and Slackware.. didnt do what it said it should BW-userx Slackware 6 08-29-2018 01:36 PM
[SOLVED] Boot from GPT HDD without UEFI BIOS? catkin Linux - General 4 09-24-2014 01:57 AM
slackware uefi gpt install porphyry5 Slackware - Installation 18 09-18-2013 04:06 PM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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