You are not logged in.

#1 2014-11-12 21:55:16

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

I'm a little confused about gpt and partitioning

Note: following the youtube guide provided in the link

I'm trying to make a VM in VMware and when I run cfdisk I get option like sun, dos, gpt, and a 4th item. Now I've been able to successfully install Arch with dos before by disabling efi. But I am trying to get this up and running because I believe I have efi on my desktop motherboard and plan to install arch as dual boot setup with windows 7. So when I do cfdisk and follow it further, I don't know a) what type to make a drive, I know one has to be swap and I assume the other has to be "Linux Filesystem", and b) how to set a bootflag on a particular partition.

P.S. Was also reading on the arch wiki (link also provided) and I don't think I'm reading this correctly it's saying that if Windows is instaled on EFI then I cannot install Arch as GPT either? What if it's on seperate hard drives?

https://wiki.archlinux.org/index.php/GU … er_Support
https://www.youtube.com/watch?v=Wqh9AQt … 4QYmvrtj4g

Offline

#2 2014-11-12 22:07:59

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

There's an "ef00" type (if you're going to use EFI) and an "ef02" type (if you're going to use MBR). These you should use instead of boot flags. If opting for EFI the esp needs to be FAT32 (the ef00 type) and is recommended to be mounted at /boot mountpoint. If opting for GPT+MBR grub will need a BIOS boot partition (ef02 type) which is ~2MiB. I assumed you want GPT (required for EFI).

Now regarding dual booting. Windows doesn't support GPT+MBR. So either go with GPT+EFI or MBR+BIOS.

Offline

#3 2014-11-13 02:37:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,226
Website

Re: I'm a little confused about gpt and partitioning

LiquidAurum wrote:

Note: following the youtube guide ...

Please don't do that.  Or if you are going to - then go ask for help in the youtube comments.

That sounds more confrontational than really desired, but there is no way to skirt the point: many good people have put a lot of time and effort into making the beginner's guide on our wiki clear and comprehensive [1].  It's a bit of a slap in all of their faces if you ignore all that information then ask here about something that is already covered in that page simply because you preferred to watch a video which didn't give the information you needed.

[1] This is not to imply it is perfect - and if you read it and have questions still, by all means post them here.  Those can be clarified, and may even lead to revisions of the wiki that would help others.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2014-11-13 06:48:14

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

The youtube video was complementary to the wiki I read here, later in my post you can see I had read the wiki and still didn't understand, which is why I asked for further elaboration. smile

Offline

#5 2014-11-13 14:24:24

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

bstaletic wrote:

There's an "ef00" type (if you're going to use EFI) and an "ef02" type (if you're going to use MBR). These you should use instead of boot flags. If opting for EFI the esp needs to be FAT32 (the ef00 type) and is recommended to be mounted at /boot mountpoint. If opting for GPT+MBR grub will need a BIOS boot partition (ef02 type) which is ~2MiB. I assumed you want GPT (required for EFI).

Now regarding dual booting. Windows doesn't support GPT+MBR. So either go with GPT+EFI or MBR+BIOS.

Thank you, just to be sure the (I'm pretty sure I'm right, I'll make the /dev/sda2 (non-Swap partition) the EFI type since I want to recreate scenario of dual booting assuming I have EFI. I'll try it set to MBR later. Now to a question, On my last VM I believe I had it set to Linux Filesystem, it still works as far as booting goes. But I wonder why? I hadn't set bootflags, neither had I set it to EFI/MBR.

Thanks

Offline

#6 2014-11-13 14:35:44

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

If you have not used grub for your last VM and gone for GPT+BIOS tpye you were not in a need to set "ef0?" partition type. To my knowlage only grub requires ef02 when going GPT+BIOS. Since you used gdisk (or cgdisk or something similar) and since you have only recently swithced to EFI booting you were booting in legacy (BIOS) mode. Hence, every partition could have had 8300 type (linux filesystem).

Offline

#7 2014-11-13 15:35:49

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

In case you have a UEFI motherboard, mount the EFI System Partition to /boot. Whilst other mountpoints are viable, using /boot is recommended as explained in the EFISTUB article.

# mkdir /mnt/boot
# mount /dev/sdXY /mnt/boot

Was reading this on the wiki and it says to the above if I had a EFI system. But when I ran the pacstrap -i command for the base and base-devel it gave me a /mnt is not a mountpoint error. if I use the df -aTh command I see /dev/sda2 is correctly mounted on /mnt/boot. So I'm not sure where the problem is.

P.S. For further info my /dev/sda1 partition is swap, while /dev/sda2 is the EFI one.

Thanks

Offline

#8 2014-11-13 15:45:22

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

You did not mount the future root partition (the partition you are going to use for system). You mounted esp as /mnt/boot and made a swap file system.

Read the wiki more carefully.  It says tofirst mount your designated root partition and make directories according to what partitions are you planing and then mount everything else.

Offline

#9 2014-11-13 16:08:42

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

Oh when I was reading that I had thought it was talking about MBR mode. I think I might have this whole mounting concept wrong as well. I thought when you mount a hard drive it is logically placed on that mountpoint. I never thought it could be mounted in more then one location (also the reason I thought the wiki was first talking only about MBR)

Offline

#10 2014-11-13 16:38:12

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

One partition can be mounted multiple times, but even if it could not you definitely need a root partition which you didn't specify, and (for EFI) you need EFI system partition with FAT32 filesystem which is recommended to be mounted at /boot. You also should have a separate /home and swap partition.

Last edited by bstaletic (2014-11-13 16:39:35)

Offline

#11 2014-11-13 16:53:41

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

now when I do pacstrap -i /mnt base base-devel it gives me the  error "failed to install packages to new root".

I don't beleive it to be the cause but I also changed mirrorlist by using mirrorlist generator from the website.

https://www.archlinux.org/mirrorlist/?c … _version=4

Last edited by LiquidAurum (2014-11-13 17:50:11)

Offline

#12 2014-11-13 17:50:23

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: I'm a little confused about gpt and partitioning

What package does it fail to retrieve; and what is the exact error? You could try removing the first mirror so you'll switch to the next; to see if that fixes it

Offline

#13 2014-11-13 17:51:01

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

Could you tell us how you mounted partitions under /mnt? The best would be the output of lsblk -f.

Offline

#14 2014-11-13 17:56:58

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

Let's see, I have the 2 partitions, one is swap, one is sda1 which is vfat type. and it's mountpoint is on /mnt/boot. However just to be clear before mounting it on /mnt/boot, i did run the command mount /dev/sda1 /mnt

@Spider, I went through and commented out all new mirrors, and left the default ones on same error. the package that it failes on is the vi package. and then proceeds to say failed to install to new root

Last edited by LiquidAurum (2014-11-13 17:59:34)

Offline

#15 2014-11-13 18:04:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,953

Re: I'm a little confused about gpt and partitioning

So you have no root partition?

Online

#16 2014-11-13 18:09:31

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

Scimmia wrote:

So you have no root partition?

No, he doesn't.

Offline

#17 2014-11-13 18:10:37

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

I mounted it earlier with mount /dev/sda1 /mnt, doesn't that mount the root partition? I was told from wiki and this thread that ESP should be mounted on /mnt/boot as well.

I think I understand the confusion now, I had made /dev/sda1 EFI, while /dev/sda2 is Swap, none of these have been formatted as either Linux filesystem or Linux root type. Is that the problem?

Last edited by LiquidAurum (2014-11-13 18:13:54)

Offline

#18 2014-11-13 18:40:37

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

With EFI esp and root can not be on the same partition. One of the reasons is root partition can not be FAT32 (permission incompatibility).

Offline

#19 2014-11-13 18:44:13

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: I'm a little confused about gpt and partitioning

Yes that is the problem. You have no partition to install to...

Offline

#20 2014-11-13 18:51:21

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

So I have to create a 3rd partition (one for root, one for efi, one for swap)? And for info, what's the minimum recommended size for root parition?? Which brings me to second question, is it possible to have an EFI without an EFI system partition (I assume not)? Because without a designated ESP, there wouldn't be a "boot flag" from what you were talking about earlier right?

Offline

#21 2014-11-13 18:53:15

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: I'm a little confused about gpt and partitioning

If you want EFI, yes, you'll need 3 partitions. I'd recommend an EFI partition of ~ 100 MB, a swap partition of roughly twice your internal memory and a root partition using all remaining space smile

Offline

#22 2014-11-13 18:58:28

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

Yet you'd still be missing designated /home partition, so you could preserve user data even when you reinstall your system. Essentially I'd recommend at least four partitions. If you use ssd I would recomment even complicated setup.

Offline

#23 2014-11-13 19:03:22

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

What if I set the "root" parition as a Linux Filesystem and not Linux Root? Would I be able to designate "Linux Filesystem" as a root partition? Or would have to be a "Linux Root" type? If it's ok to leave it as "linux filesystem" then what's the point of the "linux root" option?

As far as /home parition goes, I don't care too much for it now, as this is a vm for expirmenting on Arch which yes eventually will go as dual boot on my desktop. But thanks for the advice

Last edited by LiquidAurum (2014-11-13 19:04:23)

Offline

#24 2014-11-13 19:19:04

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: I'm a little confused about gpt and partitioning

I don't know the difference between "Linux root" and "Linux filesystem", but I had root on "Linux filesystem"

Offline

#25 2014-11-13 20:43:26

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: I'm a little confused about gpt and partitioning

Ok, so I followed the install guide all the way through, and now when I boot it just says "booting..." and I believe it's just frozen like that

Offline

Board footer

Powered by FluxBB