Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
About UEFI and BIOS (In a VM)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Tue Jun 12, 2018 1:14 pm    Post subject: About UEFI and BIOS (In a VM) Reply with quote

So, in VirtualBox, I don't have UEFI checked. It should be using BIOS. However, towards the beginning of the guide, during parted, when I made /dev/sda2 the boot partition, it gave it the esp flag. Does that mean I will use UEFI? Can I simply go through the instructions using UEFI? I am trying to do this on my own, but I just don't want to brutally mess it up.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 12, 2018 3:37 pm    Post subject: Reply with quote

StevenC21,

You an do either BIOS or UEFI as long as you are self consistent everywhere and do not try to mix BIOS and UEFI.
The flags on the partitions can be changed with parted to whatever you want.

The install for BIOS or UEFI is pretty much the same.
If you want to use UEFI you must use a GPT disk label.

What does
Code:
fdisk -l /dev/sda
say about your disklabel?
_________________
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
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Wed Jun 13, 2018 3:05 am    Post subject: Reply with quote

Code:

Device       Start       End   Sectors  Size Type
/dev/sda1     2048      6143      4096    2M BIOS boot
/dev/sda2     6144    268287    262144  128M EFI System
/dev/sda3   268288   1316863   1048576  512M Linux swap
/dev/sda4  1316864 104855551 103538688 49.4G Linux filesystem


Edit: Do you happen to be able to provide a list of all the boot-related things, so I can check each to make sure they are all using UEFI, because thats what I seem to be using? Also how to check and change them.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Wed Jun 13, 2018 3:52 am    Post subject: Reply with quote

StevenC21 wrote:
Edit: Do you happen to be able to provide a list of all the boot-related things, so I can check each to make sure they are all using UEFI,

Did you read https://wiki.gentoo.org/wiki/EFI_System_Partition and https://wiki.gentoo.org/wiki/EFI_stub_kernel?
Back to top
View user's profile Send private message
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Wed Jun 13, 2018 3:59 am    Post subject: Reply with quote

I had not.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 13, 2018 8:09 pm    Post subject: Reply with quote

StevenC21,

We still need the disklable from fdisk.
If the disklabel is dos, go BIOS. If its GPT go with EFI.

You cannot use EFI with a dos disklabel.
Your partition scheme supports either and there is no change to the install.
_________________
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
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Wed Jun 13, 2018 8:31 pm    Post subject: Reply with quote

Oh, sorry neddy! I didn't see that chunk of fdisk's output. I have a gpt disklabel.

Just in case I messed up, is it possible to retroactively edit such things?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 13, 2018 9:24 pm    Post subject: Reply with quote

StevenC21,

The disklable in some ways, dictates the layout of the data on the drive. So the simple answer is no.
To change disklables you backup the content of the drive, change the disklabel, which makes all the data on the drive inaccessible and will destroy some of it, then you restore from your backup.

However in a VM, where your 'disk' is a file on the hosts filesystem, you can cheat.
Make another 'disk' for your VM.
Boot with your install media,
Attach your existing install at /mnt/gentoo.
Make another mount point at /mnt/dos
Mount your new filesystem at /mnt/dos
Copy everything from /mnt/gentoo to /mnt/dos

That answers your question but don't do that unless you want the practice

With your partition scheme and a GPT disklable, either BIOS or EFI will work.
For EFI your /boot must be converted to vfat. Thats copy everything off, reformat /boot, copy everything back.

For BIOS follow the BIOS instructions to install grub.

Whichever you choose, set the EFI checkbox in your VM setup correctly.
Use the matching grub-install invocation.
Convert /boot to vfat if you need to.

Personally, I would use BIOS but I'm biased. I can remember Windows 1.0 running on a 286. :)
_________________
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
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Wed Jun 13, 2018 9:39 pm    Post subject: Reply with quote

Well, it appears that /boot is formatted as an "EFI filesystem", by that fdisk result. Is that going to work for UEFI? I would think so.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 13, 2018 9:46 pm    Post subject: Reply with quote

StevenC21,

What fdisk says about a filesystem and what is actually there may be two different things.
fdisk records your intent when you created the partition.
Code:
df -hT
will tell whats actually there.
fdisk only manipulates the partition table. It does not put filesystems on the partitions. That's a different range of tools.

Didn't this all start when grub-install complained that boot did not look like an EFI partition?
_________________
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
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Wed Jun 13, 2018 9:53 pm    Post subject: Reply with quote

Code:

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda4      ext4       49G  4.3G   42G  10% /
cgroup_root    tmpfs      10M     0   10M   0% /sys/fs/cgroup
udev           devtmpfs   10M  4.0K   10M   1% /dev
shm            tmpfs     3.9G     0  3.9G   0% /dev/shm
/dev/sda2      vfat      127M   12M  115M  10% /boot


There is the output. I see now that it is vfat, so we are all good there.

I actually have two Gentoo Virtual Machines, and I think this thread may have begun talking about the first, and melded into the second? I'm really not sure.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 13, 2018 10:08 pm    Post subject: Reply with quote

StevenC21,

Yep, so EFI should work.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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