Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Get help on partitioning here [Part 3]
View unanswered posts
View posts from last 24 hours

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


Joined: 05 Dec 2016
Posts: 7

PostPosted: Wed Dec 14, 2016 5:56 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Lasty, kernels can eat up a lot of space. They accumulate in /usr/src. Each kernel is about 800Mb.
Remove excess kernels, first with emerge, so portage knows, then remove the remainder.
Take care not to remove any useful kernel .config files.


Thanks for the help and pointing me the app and the manual so I can learn :D

Kernel (linux-4.4.26-gentoo) its eating 6.6GB :?

du -d 1 -h /
Code:

8,2M   ./bin
3,1M   ./lib32
du: no se puede acceder a './proc/4506/task/4506/fd/3': No existe el fichero o el directorio
du: no se puede acceder a './proc/4506/task/4506/fdinfo/3': No existe el fichero o el directorio
du: no se puede acceder a './proc/4506/fd/4': No existe el fichero o el directorio
du: no se puede acceder a './proc/4506/fdinfo/4': No existe el fichero o el directorio
0   ./proc
36K   ./tmp
101M   ./opt
4,0K   ./mnt
4,0K   ./grub
1,4G   ./lib64
132K   ./root
84K   ./dev
12M   ./etc
15G   ./usr
220M   ./var
4,0K   ./media
8,9M   ./sbin
4,6G   ./home
16K   ./lost+found
4,0K   ./data
4,0K   ./gome
4,0K   ./boot
0   ./sys
772K   ./run
21G   .

du -d 1 -h /usr

Code:

 
133M   /usr/bin
12M   /usr/lib32
78M   /usr/libexec
1,3G   /usr/lib64
267M   /usr/include
2,8G   /usr/share
6,6G   /usr/src
11M   /usr/sbin
16K   /usr/local
3,3G   /usr/portage
14M   /usr/x86_64-pc-linux-gnu
15G   /usr
Gentoo-Libre / # du -d 1 -h /usr/src/
6,6G   /usr/src/linux-4.4.26-gentoo
6,6G   /usr/src/


du -d 1 -h /usr/src/linux-4.4.26-gentoo/
Code:


496K   /usr/src/linux-4.4.26-gentoo/samples
325M   /usr/src/linux-4.4.26-gentoo/arch
697M   /usr/src/linux-4.4.26-gentoo/fs
5,3M   /usr/src/linux-4.4.26-gentoo/init
259M   /usr/src/linux-4.4.26-gentoo/sound
8,0K   /usr/src/linux-4.4.26-gentoo/distro
36M   /usr/src/linux-4.4.26-gentoo/lib
6,8M   /usr/src/linux-4.4.26-gentoo/.tmp_versions
46M   /usr/src/linux-4.4.26-gentoo/security
40M   /usr/src/linux-4.4.26-gentoo/include
51M   /usr/src/linux-4.4.26-gentoo/crypto
41M   /usr/src/linux-4.4.26-gentoo/mm
6,0M   /usr/src/linux-4.4.26-gentoo/usr
8,6M   /usr/src/linux-4.4.26-gentoo/firmware
312K   /usr/src/linux-4.4.26-gentoo/certs
3,0M   /usr/src/linux-4.4.26-gentoo/virt
904M   /usr/src/linux-4.4.26-gentoo/net
27M   /usr/src/linux-4.4.26-gentoo/block
3,4G   /usr/src/linux-4.4.26-gentoo/drivers
5,4M   /usr/src/linux-4.4.26-gentoo/ipc
12M   /usr/src/linux-4.4.26-gentoo/tools
33M   /usr/src/linux-4.4.26-gentoo/Documentation
133M   /usr/src/linux-4.4.26-gentoo/kernel
4,5M   /usr/src/linux-4.4.26-gentoo/scripts
6,6G   /usr/src/linux-4.4.26-gentoo/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Dec 14, 2016 7:57 pm    Post subject: Reply with quote

UechyLibre,

Code:
3,4G   /usr/src/linux-4.4.26-gentoo/drivers
6,6G   /usr/src/linux-4.4.26-gentoo/



That's huge. I've never seen a kernel tree that big but I do configure my own kernels.
Run
Code:
uname -a
just te be sure that you are actually using that kernel.
I get
Code:
/usr/src $ du -hd1
1.1G   ./linux-4.7.0-gentoo
1.2G   ./linux-4.8.1-gentoo
1.2G   ./linux-4.8.4-gentoo
753M   ./linux-4.8.6-gentoo
753M   ./linux-4.8.10-gentoo
347M   ./linux-4.6.0-gentoo
5.2G   .


My kernels are about 1.2G after they are built, 770Mb as installed by portage and 355M after they have been removed by portage.

For comparison, my running kernel shows
Code:
 /usr/src/linux-4.8.4-gentoo $ du -hd1
3.4M   ./security
36K   ./certs
6.1M   ./firmware
87M   ./net
964K   ./init
9.6M   ./mm
14M   ./tools
36M   ./Documentation
521M   ./drivers
67M   ./fs
700K   ./samples
190M   ./arch
88K   ./usr
7.8M   ./crypto
12M   ./lib
8.0K   ./distro
49M   ./include
44M   ./sound
4.2M   ./block
828K   ./ipc
1.1M   ./.tmp_versions
976K   ./virt
4.9M   ./scripts
21M   ./kernel
1.2G   .


You can reclaim some of the space safely by cleaning the build files out.
If you do this, you will need to rebuild the entire kernel if you want to change anything

Code:
cd /usr/src/linux-4.4.26-gentoo/
make clean
This removes all the binary files that were created by make. Its reversible.

To be a bit more agressive, the only thing you need to save is the .config file. Thats
Code:
/usr/src/linux-4.4.26-gentoo/.config

Copy it somewhere safe and rename it to config_linux-4.4.26-gentoo, so you can put it back if you need to.
Now you can delete all of /usr/src/linux-4.4.26-gentoo.

Restoring it is a bit more complex. First, you need to emerge it. It should be in your distfiles, so there will be nothing to download.
Then you restore the .config file.
Lastly, you build the kernel again.
It will need 6.6G of space again, unless you cut out some of the junk.

What is taking up all that space in /usr/src/linux-4.4.26-gentoo/drivers ?
_________________
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
Ramirez987
n00b
n00b


Joined: 19 Jul 2015
Posts: 23

PostPosted: Sat May 06, 2017 3:57 pm    Post subject: Reply with quote

Hi all,

I am new to Gentoo linux.
I am trying to install it on my old laptop Fujitsu-Siemens Amilo Pi 1505(core 2 duo 1.6, 2.5 GB RAM, 128GB disk) and I am stuck at Installation/Disks part.

It seems to me, that I need to use MBR label, because it is old computer, but I am not sure.
So I have created 4 partitions, as Handbook says and there is a sentence: "Mark the partition for UEFI purposes:"
and then: "Using UEFI with MBR partition layout is discouraged. If an UEFI capable system is used, please use GPT layout."

So, should I do it, or not? If not, should I make the partition? Mark it as what? Or maybe I can use GPT label? Can you help me?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3095

PostPosted: Sat May 06, 2017 5:56 pm    Post subject: Reply with quote

Use mbr and don't mark it it for uefi.
They should be marked as linux filesystem, lvm, or raid volume, depending on the way you're going to use them. It's usually a good idea to be sincere with your tools. If you don't specify it, they should default to linux filesystem and you can easily change it later if you want another layer between your files and the hard disk.
AFAIR Gentoo manual has several sections for making your system bootable. Follow either of those that has you install any bootloader. I personally like grub-legacy, though other options are available.
Back to top
View user's profile Send private message
Sergix8
n00b
n00b


Joined: 10 Aug 2017
Posts: 1

PostPosted: Thu Aug 10, 2017 6:29 pm    Post subject: W7+gentoo Reply with quote

Hi, i'm new, i would like to know how i can see the partition table in GENTOO, and also each time i put out the disk of GENTOO it seems it desinstall, so i can only use my W7 partition.

Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Aug 10, 2017 7:04 pm    Post subject: Reply with quote

Sergix8,

Welcome to Gentoo.
Code:
fdisk -l /dev/sda
will show the partition table on the first HDD.

When you install gentoo and stop in the middle, all your work is still on the hard drive.
However, when you come back to do some more, you need to do the mount commands and the chroot steps.
Then you are back into your install like you had never left.

It is possible to try to install Gentoo into RAM if you don't mount a partition for gentoo to install onto.
Thats not an error. With the large RAM on todays systems, you might even succeed installing into RAM.
It would vanish at power off though.

After the mount steps and before the chroot command,
Code:
df
should show your gentoo partition(s) at /mnt/gentoo/...
_________________
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
Sabongayam8
n00b
n00b


Joined: 15 Oct 2017
Posts: 7

PostPosted: Thu Oct 19, 2017 9:50 am    Post subject: Gentoo Install EFI Multiboot setup Reply with quote

8) Good day all... BACK to Gentoo... I did an install some years ago and quite honestly liked it. I have since played around with 'based on Gentoo" installs and found all the problems this forum speaks of.

Basically you did not set it up and even if you're familiar with Gentoo you end up "trying" to undo the setup of someone else to make it work or do what you wish it to do. It is ultimately easier to take the time to just do it yourself and have the setup you want.

So here I am. I had use Calculate for a bit. It always breaks if you try to use it or convert it to Gentoo. The latest version is so LOCKED into their Calculate setup with config files not quite in the usual place that I took one look and realized it would be way more work trying to UNDO their settings than just install.

I jumped over to Sabayon and their current installer is just the weirdest thing I've seen in my life of installing Linux distros. I can not make it choose my preset partitions and it quite seems to wish to do it's own thing. Plus I suspect I'll still have similar issues as Calculate though not as bad.

Somewhere else in the forum when I did a search I came across the suggestion to do your install in stages. A good idea not considered. Because I am a bit pressed for time and my 1st Gentoo Install which broke because I don't understand the config file changes that take place on updates took me 6 hours.

This time I hope to gain a better understanding of that.

My approach is to read the maual and I have, and I am... reading it again. :) before I start because I really have no time to fix problems.

I am installing on two different units.

Unit 1: Intel NUC6CAYH
Dual core Celerons
HDMI out
VGA out
4 USB ports and I can get the actual specs but it's just off the top of my head.

Obviously newer units. My confusion, sorry if it's clearer to others but these are my 1st EFI units because my previous but still working laptop is so old it's BIOS. :lol:

In reading the installation guide...

When I get to the part where we mount /dev/sdx /mnt/gentoo

that's pretty understandable and then we come to the instructions after unpacking the tar

It asks us to mount the "boot" partiton just before or after that when building the kernel

I put this question here under partition questions because my partition setup does not have a specific 'boot' partition.

where should I direct this?

having 2 Binary Distros here 'boot' is typically here in the:
/boot/

Basically I want to keep this arrangement at the moment. The Little Nuc is what I use daily so I don't want to mess around with it too much.

Even with Binary Distros I am a bit pressed for time so I haven't any intention of redoing my partitions at the moment.

The other Device is a NUC6i7KYK but that'll be after I learn on this one and I've found already that all but one project I used on it would not install on the NUC6CAYH.

Anyway, if someone might be able to give me a tip about this "boot" issue I would much appreciate it.

I don't usually start installs etc until I'm sure I've got the answers or problems worked out.

Thanks...

My partition scheme is pretty basic.
sda1 EFIboot fat32
sda2 linux Ext 4
sda3 linux btrfs
sda4 linux (plan to put gentoo here)
sda5
sda6 swap
sda7

I haven't gotten around to installing it but planning to try something called refind as a manager to the installs.

As a last parting note of info, I personally have no need of systemd in my usage and thefrore don't plan on installing it so a basic Gentoo install for a desktop system.

Just wondering what to do about the 'boot' when I do the kernel configuration. :oops:
Back to top
View user's profile Send private message
pensador_13
n00b
n00b


Joined: 15 Nov 2017
Posts: 7
Location: Portugal

PostPosted: Sat Nov 18, 2017 4:57 pm    Post subject: Reply with quote

Hello :)

I intend to use only Gentoo on my laptop.

The BIOS of my laptop has two boot modes: UEFI and Legacy.
UEFI has secure boot enabled and I couldn't disable it, it seems that if a computer includes Windows 10, manufacturers can choose to enable Secure Boot and not give users a way to turn it off :(

Then I switched to Legacy and I was able to boot the USB stick with the minimal Gentoo install.
I read the Preparing the disks section of the AMD64 Handbook, but the following question remain unanswered:
Is it possible to configure the partitioning in a way that will run with UEFI mode and Security Boot enabled?

Thanks in advance,
Luís Carneiro
Back to top
View user's profile Send private message
chilos
n00b
n00b


Joined: 02 Mar 2018
Posts: 19

PostPosted: Fri Mar 02, 2018 9:14 am    Post subject: can't add filesystems Reply with quote

Hey guys. I'm following the handbook and so far I've created my partitions. But, I can't seem to add a file system to any of them.

I try:

mkfs.vfat /dev/sda2 ( i am uefi)
mkfs.ext4 /dev/sda4

Then it shows me the list of commands you get when you type 'help'.

and when I hit print, the column for files systems are still blank.

Anybody know what I am not doing right?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Mar 02, 2018 11:04 am    Post subject: Reply with quote

chilos,

After
Code:
mkfs.ext4 /dev/sda4
you have your filesystem ready to use.
To be able to use it you need to mount it inside the filesystem tree.

When you follow the handbook, the command would be
Code:
mount /dev/sda4 /mnt/gentoo

When you write files to /mnt/gentoo they go to /dev/sda4.

Code:
df -h
will show your mounted filesystems.

With your filesystem attached at /mnt/gentoo, you can move on to installing the stage3 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
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Fri Mar 02, 2018 2:47 pm    Post subject: Re: can't add filesystems Reply with quote

chilos wrote:
Then it shows me the list of commands you get when you type 'help'.

and when I hit print, the column for files systems are still blank.

Anybody know what I am not doing right?

You must exit parted before creating file systems.
Back to top
View user's profile Send private message
Garbanzo
n00b
n00b


Joined: 06 Aug 2018
Posts: 37

PostPosted: Tue Aug 07, 2018 2:25 am    Post subject: Partiion recommendations Reply with quote

Hi, I'm going to try a Gentoo install for the first time.

I have a brand new system with no OS. It has a 256SSD, a 2TB HD, and 16GB ram.

Any recommendations for partitions? I want to also install KDE Neon so i was thinking of splitting the SSD in two.

Thanks
Back to top
View user's profile Send private message
nlantau
n00b
n00b


Joined: 29 Jul 2021
Posts: 7

PostPosted: Thu Jul 29, 2021 1:20 pm    Post subject: Resize fs, partition for dual boot Gentoo & LFS Reply with quote

Hi!

I'm new here on the forum (excuse me if I'm posting this in the wrong place).
I've been a proud Gentoo user for about a month or so now and I'm right where I belong. What a wonderful distro!

Question: After a successful (read: not done yet) resize of my ext4 filesystem and resize of root partition (as suggested by Hu here https://forums.gentoo.org/viewtopic-p-8500360.html#8500360, would it be possible to create an ext4 filesystem on the unused to be used as an LFS root partition? I'm thinking 'why not?', but I'm asking because I've found it difficult to find answers to my situation.

My setup:

When I did my partitioning and setup of filesystems during the installation, I followed the handbook (https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Partitioning_the_disk_with_GPT_for_UEFI).
Code:

$ lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                           
├─nvme0n1p1 vfat   FAT32       5C45-B0FF                                           
├─nvme0n1p2 swap   1           310b9e26-21b8-4b20-9444-70b09f4d5c9d                [SWAP]
└─nvme0n1p3 ext4   1.0         a5b8d631-0e0c-45ee-9411-ab20edd4ee00  850,8G     3% /


I currently run 'sv_SE.UTF-8', so it's all in Swedish but I use GPT for UEFI with GRUB 2.06.

Code:

$ fdisk -l
Disk /dev/nvme0n1: 953,87 GiB, 1024209543168 byte, 2000409264 sektorer
Disk-modell: KXG6AZNV1T02 TOSHIBA                   
Enheter: sektorer av 1 * 512 = 512 byte
Sektorstorlek (logisk/fysisk): 512 byte / 512 byte
I/O-storlek (minsta/optimal): 512 byte / 512 byte
Disketikettstyp: gpt
Diskidentifierare: 5E487F85-44AE-47E0-B8C8-4225EFD58C68

Enhet            Början     Slutet   Sektorer Storlek Typ
/dev/nvme0n1p1     2048     526335     524288    256M EFI-system
/dev/nvme0n1p2   526336   17303551   16777216      8G Linux växling
/dev/nvme0n1p3 17303552 2000409230 1983105679  945,6G Linux-filsystem


Code:

grub-install --version
grub-install (GRUB) 2.06


I'm thinking that it would work and that
Code:

$ grub-mkconfig -o /boot/grub/grub.cfg

would probe all partitions for detection of all kernels which will link each kernel to their respective filesystems. Correct?

It wouldn't be the end of the world if I'd have to do a complete wipe of my current Gentoo and run LFS all by itself. But it would be kind of nice to have them both.

Thanks!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Thu Jul 29, 2021 4:30 pm    Post subject: Re: Resize fs, partition for dual boot Gentoo & LFS Reply with quote

nlantau wrote:
would it be possible to create an ext4 filesystem on the unused to be used as an LFS root partition?
That should work. You will need an otherwise unused partition on which to create the ext4 filesystem. If you have free space after the earlier resize, and you have the ability to create a partition to use that free space, you can do this.
nlantau wrote:
I currently run 'sv_SE.UTF-8', so it's all in Swedish
You can use LC_ALL=C fdisk -l to force the output not to be translated. However, I think most veterans here know fdisk well enough that we can get what we need even without being able to read Swedish.
nlantau wrote:
but I use GPT for UEFI with GRUB 2.06.
Good. The number of partitions allowed on GPT is high enough that you should be fine.
nlantau wrote:
Code:
$ fdisk -l
Disk /dev/nvme0n1: 953,87 GiB, 1024209543168 byte, 2000409264 sektorer
Enhet            Början     Slutet   Sektorer Storlek Typ
/dev/nvme0n1p1     2048     526335     524288    256M EFI-system
/dev/nvme0n1p2   526336   17303551   16777216      8G Linux växling
/dev/nvme0n1p3 17303552 2000409230 1983105679  945,6G Linux-filsystem
If I did the math correctly, you have little or no space unassigned. Your drive is 953GiB, with 945G assigned to the filesystem and 8G to the swap. You may have shrunk the filesystem on /dev/nvme0n1p3, but the partition still uses the entire remainder of the device. If so, then our first step is to shrink the partition so that you have room to make a new one. Warning: modifying partitions can easily cause data loss. A backup is recommended. If you cannot make a backup, or are not sure you can restore it, check your steps very carefully. I suggest that, before you start, you run sfdisk -d /dev/nvme0n1 and save its output somewhere persistent and not on that drive. If things go badly, you can use that output to restore the partition table to its current state. Now you can follow the steps in my post that you cited. If you're not comfortable with translating those instructions into commands to run, I suggest you post back here first and get someone to help you. If you think you know what to run, but want a second opinion before you execute it, post here with what you would do and we can critique it for you.
nlantau wrote:
I'm thinking that it would work and that
Code:
$ grub-mkconfig -o /boot/grub/grub.cfg
would probe all partitions for detection of all kernels which will link each kernel to their respective filesystems. Correct?
Sorry, no comment here. I don't use grub2.
Back to top
View user's profile Send private message
nlantau
n00b
n00b


Joined: 29 Jul 2021
Posts: 7

PostPosted: Thu Jul 29, 2021 5:55 pm    Post subject: Re: Resize fs, partition for dual boot Gentoo & LFS Reply with quote

Thank you, Hu!

I tried it first on my spare laptop (running Gentoo as well. It's my "try-new-and/or-edgy-stuff-on"-laptop). Was a bit nervous when the only option in fdisk is to delete the partition and then create a new one. But giving it some reading and understanding the importance of the starting blocks, I gave it a go.

Code:

$ LC_ALL=C fdisk -l
Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: KXG6AZNV1T02 TOSHIBA                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5E487F85-44AE-47E0-B8C8-4225EFD58C68

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048     526335     524288   256M EFI System
/dev/nvme0n1p2     526336   17303551   16777216     8G Linux swap
/dev/nvme0n1p3   17303552 1086851071 1069547520   510G Linux filesystem
/dev/nvme0n1p4 1086851072 2000409230  913558159 435.6G Linux filesystem


Code:

$ lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                           
├─nvme0n1p1 vfat   FAT32       5C45-B0FF                                           
├─nvme0n1p2 swap   1           310b9e26-21b8-4b20-9444-70b09f4d5c9d                [SWAP]
├─nvme0n1p3 ext4   1.0         a5b8d631-0e0c-45ee-9411-ab20edd4ee00  443,8G     6% /
└─nvme0n1p4 ext4   1.0         e3df47c6-082a-4a13-b215-82225d77be30               


I think my previous post might have been a bit unclear; I had not done any resizing prior to submitting the post.

Thank you for the LC_ALL=C tip! I read about it in the LFS manual just yesterday, but did not think it would effect stdout like that. Very useful, thanks!

From here on out I can more easily spread out my LFS journey, with no need for LiveCD-env. Thank you!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Thu Jul 29, 2021 6:29 pm    Post subject: Reply with quote

I see now. I got sidetracked with the parenthetical notes and thought you had done some, but not all, of the changes.

Yes, the delete+recreate is an unfortunate limitation of some tools, but as you found, as long as (1) the start position is unchanged across delete+create, and (2) the size of the partition is not less than the size of the filesystem, you will be fine. The partition table defines the start/stop points of the data. Deleting a partition does not, on its own, affect the data contained in that range. However, it can make that range difficult to find again, and if you cannot find where the control structures start, you cannot mount the contained filesystem. Hypothetically, if you had deleted both the p2 and p3 partitions, and did not have notes on the extents of each, it could be difficult to recreate p3 with the right start, since it could start anywhere after where p2 started, and with p2 deleted, you don't know its size anymore. For the simplifying case here, where you only deleted one partition, and there was no gap between the deleted partition and its predecessor, knowing the right start is fairly straightforward.
Back to top
View user's profile Send private message
nlantau
n00b
n00b


Joined: 29 Jul 2021
Posts: 7

PostPosted: Sun Aug 01, 2021 12:39 pm    Post subject: Reply with quote

I can confirm that my initial thoughts and ideas regarding partitioning and installing LFS works. Had a successful boot of LFS (first try!) last night.

A note on grub2: Since I have a separate partition for /boot, I ran the usual
Code:

grub-mkconfig -o /boot/grub/grub.cfg

from my Gentoo partition. Prior to this, I had placed my LFS vmlinuz, System.map and config on /boot.

The one thing the automatic grub-mkconfig messed up was finding the root partition. The grub.cfg though LFS was on the same partition as Gentoo. So, I had to change 2 numbers in grub.cfg.

In other words - a really smooth and successful journey.
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Mon Aug 23, 2021 7:26 pm    Post subject: "GPT table is not on the end of the device" Error Reply with quote

Unfortunately, my current attempt at installing Gentoo is not going as smoothly as it has in the past. LOL

Anyway, my question.

I'm trying to partition unallocated disk space to install Gentoo.

When executing fdisk I get the following warning:

Quote:
The backup GPT table is not on the end of the device. This problem will be corrected by write.
The device contains 'isw_raid_member' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.


It is greek to me but my real concern is that it is indicating that it will correct it automatically when I write the changes I make to the partition table. I am not sure if this is good or bad but in my initial install attempt, I lost my existing Win10 partition and all data. It may or may not have been related but I am skittish now.

Can someone clarify for me? Thanks as always.

This is what my disk looks like.

Code:
[root@sysrescue /dev]# fdisk nvme0n1

Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The backup GPT table is not on the end of the device. This problem will be corrected by write.
The device contains 'isw_raid_member' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Command (m for help): p

Disk nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: INTEL HBRPEKNX0203AH                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2D5C88F0-AEA2-4E08-97E5-E619AA78457D

Device          Start        End   Sectors   Size Type
nvme0n1p1        2048     534527    532480   260M EFI System
nvme0n1p2      534528     567295     32768    16M Microsoft reserved
nvme0n1p3      567296  565199977 564632682 269.2G Microsoft basic data
nvme0n1p4   565200896 1179600895 614400000   293G Microsoft basic data
nvme0n1p5  1998800896 2000392191   1591296   777M Windows recovery environment


And this is the unallocated space that I would like to use as LUKS/LVM EXT4 for Gentoo.

Code:
Unpartitioned space nvme0n1: 390.63 GiB, 419439123968 bytes, 819217039 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

     Start        End   Sectors   Size
1179600896 1998800895 819200000 390.6G
2000392192 2000409230     17039   8.3M
Back to top
View user's profile Send private message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 84

PostPosted: Thu Dec 22, 2022 2:07 pm    Post subject: Reply with quote

I have Gentoo installed and working with UEFI. However, there's a quirk of the setup that I'm curious if I can remedy.

I currently have a 256MB VFAT /boot partition with /boot/EFI under it. Previously, I would have made /boot anywhere from 256MB to 1GB depending on what types of and how many kernel rebuilds I planned on doing and keeping around, but it would be EXT2. The nice bit of EXT2 is that it supports symbolic links. This allowed me to leverage the 'make install' bit of the kernel and the automatic 'latest build' symlink creation. That meant I pretty much never needed to change the grub config immediately after a kernel build, as the symlink would point to the new kernel by default. With VFAT, that's not possible.

So here's my "I still don't understand EFI" question: Is there some combination of partitions that would allow me to make EFI happy and also support symlinking the active kernel? Or am I just stuck with losing that function and I should be rerunning grub-mkconfig every time anyway?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Dec 22, 2022 2:33 pm    Post subject: Reply with quote

jrittenh,

It can be achieved. Only the *.efi file loaded by the EFI firmware needs to be on the VFAT partition.
That will be your boot loader.
With two partitions /boot can be whatever the boot loader can read.
and /boot/EFI can be a mount point for the VFAT partition. EFI might be a bad choice of name for the mount point because you will have /boot/EFI/EFI/.... as the EFI firmware will always look in the EFI directory on the VFAT partition.

You need to reinstall grub, remake its grub.cfg and save/restore all your kernels when you divide your existing VFAT into two.
Don't forget /etc/fstab.

Keep you live media handy, in case you don't get it right first time :)
_________________
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
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 351

PostPosted: Thu Dec 22, 2022 2:44 pm    Post subject: Reply with quote

jrittenh wrote:

So here's my "I still don't understand EFI" question: Is there some combination of partitions that would allow me to make EFI happy and also support symlinking the active kernel? Or am I just stuck with losing that function and I should be rerunning grub-mkconfig every time anyway?

The problem is that you are (ab)using the EFI System Partition (ESP) as /boot. Simply mount the ESP to /boot/efi (default path for Grub) or any other place (e.g. /efi could be a good choice). /boot will then be either on your system partition or on a separate partition for /boot.

The ESP is formatted with FAT (defined in the UEFI specs) and the UEFI implementation (the firmware on your motherboard) has a FAT driver to be able to load an EFI binary from the ESP. The EFI binary in your use case is the Grub bootloader (and not the kernel images).
Back to top
View user's profile Send private message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 84

PostPosted: Thu Dec 22, 2022 2:48 pm    Post subject: Reply with quote

That's exactly what I was hoping, but hadn't gotten the courage to try. Thanks! I'll definitely give it a go.
Back to top
View user's profile Send private message
jrittenh
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 84

PostPosted: Thu Dec 22, 2022 2:52 pm    Post subject: Reply with quote

sMueggli wrote:
jrittenh wrote:

So here's my "I still don't understand EFI" question: Is there some combination of partitions that would allow me to make EFI happy and also support symlinking the active kernel? Or am I just stuck with losing that function and I should be rerunning grub-mkconfig every time anyway?

The problem is that you are (ab)using the EFI System Partition (ESP) as /boot. Simply mount the ESP to /boot/efi (default path for Grub) or any other place (e.g. /efi could be a good choice). /boot will then be either on your system partition or on a separate partition for /boot.

The ESP is formatted with FAT (defined in the UEFI specs) and the UEFI implementation (the firmware on your motherboard) has a FAT driver to be able to load an EFI binary from the ESP. The EFI binary in your use case is the Grub bootloader (and not the kernel images).


Yeah, I never claimed to have everything configured in an optimal fashion :P This is honestly my first EFI build, as I haven't rebuilt my home desktop in over a decade and I've been using Macbooks at work for way too long.
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 Previous  1, 2
Page 2 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