Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Gentoo Installation: Partition Issue
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
RankkaApina
n00b
n00b


Joined: 25 Jan 2025
Posts: 9

PostPosted: Sat Jan 25, 2025 11:31 pm    Post subject: [SOLVED] Gentoo Installation: Partition Issue Reply with quote

I've successfully created a bootable USB and I'm trying to install Gentoo and get rid of the malware on my laptop (i.e. Windows). I've followed the handbook so far and got to the partition bit, but I can't do it the way it describes and I know why, I just don't know how to actually manage it.

If I try the given command
Code:
fdisk /dev/sda/
, I get the following:

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

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Because it's just showing me the USB stick information.
Code:
fdisk -l
gives me:

Code:
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVLB512HBJQ-000L7             
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: 047336BF-38A3-456E-810C-89FCAE132266

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     206847    204800   100M EFI System
/dev/nvme0n1p2    206848     239615     32768    16M Microsoft reserved
/dev/nvme0n1p3    239616  998647807 998408192 476.1G Microsoft basic data
/dev/nvme0n1p4 998647808 1000212479   1564672   764M Windows recovery environment


Disk /dev/sda: 3.73 GiB, 4003463168 bytes, 7819264 sectors
Disk model: DataTraveler 108
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: dos
Disk identifier: 0x0812e5da

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1  *     2048 7819135 7817088  3.7G  e W95 FAT16 (LBA)


Disk /dev/loop0: 3.54 GiB, 3803422720 bytes, 7428560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


But I don't know how to go on from here: how to actually create the partitions correctly on my hard drive (and not on the USB), as I've never done that before.

Could anyone help?


Last edited by RankkaApina on Sun Jan 26, 2025 10:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23053

PostPosted: Sun Jan 26, 2025 12:12 am    Post subject: Reply with quote

Welcome to the forums.

As I read your output, /dev/sda is your LiveUSB device. /dev/nvme0n1 is a Samsung NVMe drive, with Microsoft Windows on it. If you intend to completely remove Microsoft Windows now, before you have a working Gentoo install, then I think your next step is to use fdisk (or other partitioning tool) as fdisk /dev/nvme0n1, not fdisk /dev/sda as you attempted, and use the partitioning tool to remove the Windows partition (p3) and probably also the p2 and p4 partitions. You may want to keep p1 for use as the EFI boot partition. To be clear, if you remove the p3 partition, you will lose the ability to use the installed Microsoft Windows on this system. Long term, I think this is what you want. Short term, it may not be, if you want to keep Windows usable until you are satisfied that the installed Gentoo works as you desire. Since this is an NVMe device, you probably want to keep the partitions aligned on 1MiB boundaries. The existing p1 and p2 partitions appear to have been done this way. Most modern partitioning tools should strongly encourage you to do this, but it is something to keep in mind as you pick sizes.

Please ask if you require further elaboration.
Back to top
View user's profile Send private message
RankkaApina
n00b
n00b


Joined: 25 Jan 2025
Posts: 9

PostPosted: Sun Jan 26, 2025 1:06 am    Post subject: Reply with quote

I think I managed to do that actually. To clarify: I don't want Windows at all, just Gentoo. So, it looks like this now:
Code:

Device            Start        End   Sectors   Size Type
/dev/nvme0n1p1     2048    2099199   2097152     1G EFI System
/dev/nvme0n1p2  2099200   35653631  33554432    16G Linux swap
/dev/nvme0n1p3 35653632 1000214527 964560896 459.9G Linux root (x86-64)


Disk /dev/sda: 3.73 GiB, 4003463168 bytes, 7819264 sectors
Disk model: DataTraveler 108
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: dos
Disk identifier: 0x0812e5da

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1  *     2048 7819135 7817088  3.7G  e W95 FAT16 (LBA)


Do I have an issue if the partitions are not named as in the default (if I just call these instead of sda)? Also, is there a way to rename them, cause the name is annoyingly long...?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23053

PostPosted: Sun Jan 26, 2025 1:17 am    Post subject: Reply with quote

Anyone who uses an NVMe drive will have partition names similar to what you got. You will be fine, as long as you use the correct names in /etc/fstab.

You could try to use udev to rename the device, but you won't be using these names much once the system is up. If you really want to avoid these names, you could place an LVM PV in nvme0n1p3, then rely on LVM LVs to hold your data, at which point most of your uses would refer to the LV names, not the partition name. That would replace anything you have put on p3 so far, so you might lose work and need to redo some steps.
Back to top
View user's profile Send private message
RankkaApina
n00b
n00b


Joined: 25 Jan 2025
Posts: 9

PostPosted: Sun Jan 26, 2025 3:43 pm    Post subject: Reply with quote

Thanks, I think I'll just leave them as is for now, and maybe I forget it :lol: It's possible that once I have everything set up and don't need to actively engage with the partitions, it doesn't really matter what they are named...
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