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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-04-2020, 07:16 PM
|
#1
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Rep: 
|
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
|
|
|
07-04-2020, 07:52 PM
|
#2
|
Member
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268
Rep:
|
I think modern distros do that automatically pretty well. What are you trying to install?
|
|
2 members found this post helpful.
|
07-04-2020, 08:32 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,384
|
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.
|
07-05-2020, 12:48 AM
|
#4
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,501
|
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.
|
07-05-2020, 09:17 AM
|
#5
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Original Poster
Rep: 
|
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.
|
|
|
07-05-2020, 09:45 AM
|
#6
|
Member
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268
Rep:
|
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.
|
07-05-2020, 11:07 PM
|
#7
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Original Poster
Rep: 
|
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
|
|
|
07-05-2020, 11:47 PM
|
#8
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,501
|
Quote:
Originally Posted by SaintDanBert
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.
|
|
|
All times are GMT -5. The time now is 06:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|