Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
choosing between mbr/bios or gpt memes
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 12:30 pm    Post subject: choosing between mbr/bios or gpt memes Reply with quote

I am gonna install gentoo on x220 chinkpad and I am just wondering should I go with BIOS/MBR or BIOS/GPT setup, if I go with mbr I can create three partitions, boot, swap and root but gpt is seemingly better? I have no idea, does it matter if I go with mbr? I did read https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks and especially the "GPT or MBR" -Section but it left me feeling like I can just go with MBR even though GPT is " the recommended approach" (?) I am not gonna dual boot nor will I use uefi.

Is there anything else I should take notice of before deciding to use MBR over GPT?


Last edited by randomeme098 on Mon Aug 06, 2018 1:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4307
Location: Dallas area

PostPosted: Mon Aug 06, 2018 12:35 pm    Post subject: Reply with quote

The size of the disk, if 2TB and under then you can go either way.

With MBR you can only have 4 primary partitions (one of which could allow other partitions within) so strictly speaking you can have more than 4.

GPT is newer and will handle disks 3TB and up.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 1:34 pm    Post subject: Reply with quote

Ah yes, okay I think I'll go with MBR for now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43986
Location: 56N 3W

PostPosted: Mon Aug 06, 2018 3:39 pm    Post subject: Reply with quote

randomeme098,

BIOS/MBR works.
UEFI/GPT works.
UEFI/MBR is not allowed (by UEFI)
BIOS/GPT mostly works but not everywhere. Whatever, if you need this mix, there are extra hoops to jump through.

With a boot HDD < 2TiB, Both work.
Over 2TiB you need GPT, well, there is a hack for MBR but don't go there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 4:23 pm    Post subject: Reply with quote


    */dev/sda1 - ext4 // Boot system partition - 128M
    */dev/sda2 - swap partition - 8G
    */dev/sda3 - ext4 // root partition (rest of the disk space)


I wanna do BIOS/MBR, this is okay partition table right? This will work for my system because there isn't a need for a separate bios boot partition?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43986
Location: 56N 3W

PostPosted: Mon Aug 06, 2018 4:31 pm    Post subject: Reply with quote

randomeme098,

8G swap is huge, unless you want to use hibermate with 8G RAM.
You don't actually need a separate /boot partition but its harmless.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4307
Location: Dallas area

PostPosted: Mon Aug 06, 2018 4:41 pm    Post subject: Reply with quote

It depends on how much memory is in your system.

I don't use swap partitions on either desktop (32gig) or laptop (8gig) and have never had a problem (no suspend/hibernate on either)
I agree Neddy, 8gig is huge, even when I first started with linux and used a swap it was only 4gig, but I found that I hardly used it.

I do have a boot, root and portage partition (I prefer keeping /usr/portage on it's own partition)
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 5:09 pm    Post subject: Reply with quote

Okay thanks for replies, I thought giving lot of space for swap partition was just a safe measure of some sort and it's not too much space so I thought why not, but I guess 4G or even 1024M could do.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4307
Location: Dallas area

PostPosted: Mon Aug 06, 2018 5:26 pm    Post subject: Reply with quote

If you want swap, and you want a largish boot (maybe for lots of kernels & sysrescuecd, etc)

swap - 2 gig
boot - 2 git
root - rest of device

would suffice (assuming disk is at least 128 gig in size)

I have (250 gig ssd)
boot - 2 gig
root - ~50 gig
portage - ~30 gig
extended partition - rest of device
_stuff to keep - ~120 gig
_free space (in case I want to work on another root, etc) - ~50 gig (not used typically)
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 5:33 pm    Post subject: Reply with quote

2GB for boot partition, why do you give it so much storage? The handbook seems to suggest that you can do with just 2mb? https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4307
Location: Dallas area

PostPosted: Mon Aug 06, 2018 5:52 pm    Post subject: Reply with quote

randomeme098 wrote:
2GB for boot partition, why do you give it so much storage? The handbook seems to suggest that you can do with just 2mb? https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks


For normal purposes 2 mb would suffice.

I keep sysrescuecd on it so I don't have to scrounge for either a usb flash or the cd and I had some other kernels and stuff when I was playing around with multiple linux instances.
I'm using ~620 mb of the 2 gb right now. But as you said about swap, it's not much of the disk so I've left it alone.

Edit to add: 2 mb is outdated, I would say 50mb, because each of my kernel images is ~5mb.

Code:
$ du -sh /boot/*
2.3M   /boot/System.map-4.14.44-zen
2.3M   /boot/System.map-4.14.52-zen
0   /boot/boot
108K   /boot/config-4.14.44-zen
108K   /boot/config-4.14.52-zen
816K   /boot/grub
du: cannot read directory '/boot/lost+found': Permission denied
16K   /boot/lost+found
4.0K   /boot/stop.esata
356M   /boot/sysrcd
237M   /boot/sysrcd.old
5.0M   /boot/vmlinuz-4.14.44-zen
5.2M   /boot/vmlinuz-4.14.52-zen

_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
randomeme098
n00b
n00b


Joined: 05 Aug 2018
Posts: 14

PostPosted: Mon Aug 06, 2018 7:57 pm    Post subject: Reply with quote

Ah okay, Ill go with 2g then
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3250
Location: Illinois, USA

PostPosted: Mon Aug 06, 2018 8:41 pm    Post subject: Reply with quote

Anon-E-moose wrote:
It depends on how much memory is in your system.

RedHat used to recommend swap as twice true memory. I never understood that.
512MB so use 1G swap
2G so use 4G swap?
16GB so use 32G swap? Doesn't make sense.

My (non-expert) advice is to make sure that real memory+swap is slightly greater than the biggest package you want to emerge.
IIRC for Firefox that would be 12G, but I run Firefox-bin
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43986
Location: 56N 3W

PostPosted: Mon Aug 06, 2018 8:44 pm    Post subject: Reply with quote

Tony0945,

That advice from Ret Hat is from 1999.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1374
Location: Montréal

PostPosted: Mon Aug 06, 2018 9:05 pm    Post subject: Reply with quote

Do not forget to mount your boot partition in the /boot directory of your Gentoo root partition at anytime you want to read and write in the /boot directory to make sure all the stuff who go to the /boot directory is effectively write in the boot partition and not elsewhere.
_________________
Paul
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3250
Location: Illinois, USA

PostPosted: Mon Aug 06, 2018 11:25 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Tony0945,

That advice from Red Hat is from 1999.

Yes. As I said "used to". What I am very interested in is "What does NeddySeagoon recommend?".

And, if this is not off-topic, I noticed that I still have a 12G swap file from when I had 2G memory. I now have 16G memory. Would you recommend that I delete the file and edit /etc/fstab accordingly?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7321
Location: Saint Amant, Acadiana

PostPosted: Tue Aug 07, 2018 12:10 am    Post subject: Reply with quote

I keep a 512 MB file for just to have swap.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43986
Location: 56N 3W

PostPosted: Tue Aug 07, 2018 8:38 am    Post subject: Reply with quote

Tony0945,

If you want to hibernate, enough swap to save RAM. The hibernate image compressed so that's a safe value even if a little swap should be used.
Without hibernate, 512Mb near the front of the drive is good.
a) No swap space does not prevent swapping. It only denies the kernel the ability to swap dynamically allocated RAM.
b) At the front of the drive, you can install MSDOS and Windows 3.1 there just for old times sake :)
If you need more than 512MB of swap on a regular basis, you should really fit more RAM.

Embedded systems (memory constrained) have their own rules. There, you need enough swap to build and link.
My 64 bit Raspberry Pi (1G RAM) has 4G of swap as Its run out of VM with 2G.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3250
Location: Illinois, USA

PostPosted: Tue Aug 07, 2018 1:23 pm    Post subject: Reply with quote

Thank you, Neddy!
Reviewing my systems with your guidelines in mind:
Code:
 # swapon
NAME      TYPE       SIZE USED PRIO
/dev/sda2 partition 1024M   0B   -2
/swapfile file        12G   0B   -3
For this system deleting the swapfile should be sufficient. It was made when the hard drive was on different mobo/CPU and made sufficient to build FF at that time. New mobo has 16G Ram.
Code:
# free --giga
              total        used        free      shared  buff/cache   available
Mem:             16           0          11           0           5          16
Swap:            13           0          13
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Aug 07, 2018 1:42 pm    Post subject: Reply with quote

MBR was made for disks which have a maximum of 32 megabytes of storage. That's not a typo. Back when it was made the idea of a 5mb hard disk was huge and unattainable. The scheme has been modified several times and currently handles up to 2 terabytes.

EFI is newer, has no limit on number of partitions and works with most newer hardware (meaning IMO hardware which was purchased in the last 10 years) but there may be exceptions. One exception I know of is a Raspberry Pi, which only has USB anyway.

EFI has a backup partition table, many many more partition types and no concern for size of disk or size of partition that matters in the near future.

In my personal opinion, if a system can boot from an EFI partition table then I will install an EFI partition table. I don't dual boot anything ever, even linux and linux together. I'm simply using what I consider to be a significantly superior partition table.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3250
Location: Illinois, USA

PostPosted: Tue Aug 07, 2018 3:10 pm    Post subject: Reply with quote

1clue, I concur. The only reason to use MBR for a new installation on a PC or Laptop is if the BIOS won't boot from it. Both of my newer systems can handle either but I keep reading that some will only boot BIOS from MBR not GPT.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7321
Location: Saint Amant, Acadiana

PostPosted: Tue Aug 07, 2018 3:13 pm    Post subject: Reply with quote

GPT can have "protective MBR" and even the MBR boot flag can be set if needed for some brain dead BIOS.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43986
Location: 56N 3W

PostPosted: Tue Aug 07, 2018 6:14 pm    Post subject: Reply with quote

1clue,

In the days of sub 32MB HDD, no partition table was required. They were just like big floppies. The boot sector was still there.
When the 32 MB limit was reached. The partition table was introduced as a hack to divide >32 MB HDD into 32MB or smaller partitions as that was all that an MSDOS filesystem could address.
As the partition table had to be read by the BIOS, and the BIOS could only read CHS 0/0/0, it had to be squeezed into that space after the end of the boot code.
Hence we got a partition table than only had 4 entries.

The concept of Primary, Extended and Logical partition was not yet born. There was just the partition table.

The original partition table hack broke when HDD reached 128MB (4 32MB partitions)
At that point, Extended and Logical partitions were introduced.

The history of the PC is litter with examples like that.

FAT12 grew into FAT16 and then FAT32. Allocation cluster sizes other than 1 sector were permitted and the rest is history.
I don't think FAT12 was ever used on HDD ... anyway, enough reminiscing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Aug 07, 2018 10:38 pm    Post subject: Reply with quote

https://en.wikipedia.org/wiki/Master_boot_record might be interesting at this point.

https://en.wikipedia.org/wiki/GUID_Partition_Table might be an interesting contrast.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Aug 08, 2018 1:50 pm    Post subject: Reply with quote

Tony0945 wrote:
1clue, I concur. The only reason to use MBR for a new installation on a PC or Laptop is if the BIOS won't boot from it. Both of my newer systems can handle either but I keep reading that some will only boot BIOS from MBR not GPT.


While I haven't installed onto bare metal for awhile now, I decided to only make EFI systems from this point forward, unless hardware prevents it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum