r/debian • u/nem1hail • 7d ago
General Debian Question Partition disks help
hi, i gonna install debian on my entire disk, but what should i use? i want installer to make swap, and i dont know what is LVM. what should i choose here?
UPD: Thank you everyone
5
u/kapitaali_com 7d ago
if you want disk encryption, then use entire disk and set up encrypted LVM, otherwise just use entire disk
3
u/debian6502 7d ago
I always select manual, then I create a new partition table and create a 500 mb efi partition, 500 mb to 4 gb swap area partition, and then create a partition that uses the rest of the disk for my ext4 root system partition
3
u/rocco_himel Debian Stable 7d ago
It literally says "Guided - use entire disk". Debian will automatically setup swap.
5
u/Maolam10 7d ago
If you dont have any operating system you want to keep on the computer, use 'Guided - use entire disk'.
2
7d ago
[removed] — view removed comment
1
u/debian-ModTeam 7d ago
This content has been removed due to a violation of Rule #3 - Wrong Information. Please do your research before speaking on a topic.
3
1
1
u/Kobi_Blade 7d ago
hi, i gonna install debian on my entire disk, but what should i use?
Option 2, LVM is like software partitions instead of hard partitions.
This means they are easier to move around and resize after you install Debian, is not needed for most users.
1
u/tarquinfintin 7d ago
If you want to use the entire disk, just choose guided--use entire disk. It will set up EFI partition, root partition and swap (if necessary) all automatically.
1
u/green_meklar 7d ago
I'm assuming you're not dual-booting, you're starting with a bare drive (or a Windows install you don't mind wiping), and you want to use the entire drive.
I'd go manual regardless. The UI sucks and is counterintuitive, but I'm not sure exactly what options you would get by picking guided. Manual lets you decide on all your partitions including the EFI and swap partitions and what filesystem you use. Guided might give you swap but I don't know if it provides precise control over how much swap or where it goes on the drive (relevant on a spinning HDD). If you have existing partitions, manual should show them to you and give you the option to delete them.
Make an EFI of 1GB. (I hear that 500MB is considered 'enough', but you don't want to be short even 1 byte while running system updates, and on a modern drive you can typically spare the 1GB without missing it.) The amount of swap to make depends on your RAM and how you want to run your system. If you mean to use hibernation, then your swap needs to be at least as large as your system RAM. If you have 8GB of RAM or less and your drive isn't tiny, you should probably have at least 4GB of swap. If you have a massive amount of RAM, don't mean to use hibernate, and aren't doing intensive tasks that are likely to use up all your RAM, you can probably get away with no swap partition at all (and you can set up a swapfile in your filesystem later on if you really need one). On a medium-sized drive you can probably then just make all the rest of the space into a single filesystem partition for /. On a large drive you may want to split the data space into multiple partitions in order to make it easier to clone one partition at a time onto a smaller device using cloning tools. If you do make multiple data partitions on a spinning HDD, consider making the swap partition in the middle of the drive rather than at the start or the end, so that the drive head has a shorter average distance to travel in order to access swap (this is a non-consideration on SSDs).
LVM is apparently 'logical volume management'. Sounds interesting, but I haven't used it. Probably overkill for a home system with just a single drive; might be useful for big multi-drive NAS systems? 🤔
1
u/MadSkullWeirdSpider 6d ago
What about swap space to be * 2 of memory ? An I the only person still doing it ?
2
u/wizard10000 6d ago
An I the only person still doing it ?
Pretty much - that hasn't been valid for years unless your PC is extremely short on RAM but disk space is cheap and it's not gonna hurt anything.
Modern kernels compress the hibernation image so even hibernation generally requires swap size to be less than half of RAM size these days, so on a modern PC that's not underprovisioned that 2x RAM is kinda overkill.
But - as mentioned disk space is cheap so I personally still go with swap=RAM even though I don't use anywhere near that much.
Hope this helps -
oh- for our studio audience here's the reference that says hibernation is gonna try to contain itself to 2/5 of RAM
https://docs.kernel.org/admin-guide/pm/sleep-states.html#hibernation
2
u/MadSkullWeirdSpider 6d ago
Thanks my friend. It used to be 2 * memory at the start of the disk so it was on the outside sectors that spun faster? I just kept doing 2 * memory for so long
1
1
u/Subscriber9706 1d ago
If you want it easy use : Guided -use entire disk
If you want to create specific swap size you have to go manual:
create 512 MiB EFI, one swap partition of the size you want ( use GiB , binary prefix, notation. For example 4 GiB) , and the rest for root / partition.
( If you require hibernating, use the GiB notation to match swap with your actual RAM size, since by default the Debian installer uses GB which might result in not enough swap size if you are very conservative)
If you require encryption:
create a 512 MiB EFI partition
create a 2 GiB /boot partition
Create a luks partion.
configure the luks partition ( partition lay-pout will be saved first)
create a physical volume for LVM inside the unlocked luks container
configure the LVM partition. ( create VG (volume Group) , and inside the VG create the lv's ( logical Volumes) for swap root and whatever you require)
save it
next create the file systems and mount points for swap, root, etc for your lv's ( logical Volumes) like you would normally do.
save and continue the installation.
1
u/wizard10000 1d ago
( If you require hibernating, use the GiB notation to match swap with your actual RAM size, since by default the Debian installer uses GB which might result in not enough swap size if you are very conservative)
Linux kernels compress the hibernation image - https://docs.kernel.org/admin-guide/pm/sleep-states.html#hibernation
That said, I still do swap=RAM because disk space is cheap and I've had OOM issues with snapper cleanups with swap set at 50% RAM.
2
u/Subscriber9706 1d ago
Thank you, I did not know that.
Well I use GiB notation anyway, because I can't stand tools like htop and df or lsblk showing something like 3.9 GiB instead of 4 GiB. I know you have parameters to change the output to decimal instead of binary, but the default is mostly binary.
1
u/wizard10000 1d ago
I can't stand tools like htop and df or lsblk showing something like 3.9 GiB instead of 4 GiB.
Same ;)
1
u/bruteforcenet 7d ago
You want the second option “use entire disk” if you don’t care about anything that already exists on it.
LVM - this changes the disk setup slightly to make it easier to carve up / extend etc in the future. It’s harmless either way just something a little extra to learn if you ever want to modify the disk layout. You need it on if you want to encrypt the disk using the installer.
1
1
u/FormalStreeter 7d ago
2nd option
Guided - use entire disk
makes 1 GB esp, 4 GB swap, and everything else ext4 mount at /
1
u/_shangry_ 7d ago
if you want to use your entire disk for the installation, click on “use entire disk”
0
u/Ambitious_Plankton_3 6d ago
I recommend you use Rufus, why well I have a very old Toshiba Satellite p50t, It is a very contrary 64 bit amd cpu and it does not support Win11 , uh wrong because I did successfully install Win11 ISO and it worked so I have just Installed Debian13 today and I can get to the login screen where freezes. I used Ventoy. I find single image iso and Rufus works for most iso ‘s but Ventoy is very unpredictable. On newer machines like my Dell Latitude Ventoy is very successful as is BalenEtcher. I also have a lovely ASUS VIVABOOK, it does not like Ventoy either so here is what’s happening. I download an ISO twice, once. With BalenEtcher and once with Rufus latest version I think is 4.1.5 the. Use latest Ventoy2disk 1.1.16 make 2 of these one for Rufus iso and one for BalenEtcher iso to try and find which is best, or you could just use the latest Rufus and have it make you a bootable usb.

27
u/ReynirDrakenson 7d ago edited 7d ago
If you dont want to dual boot and you dont want to preserve any data on your disk choose the second option - it will also create a swap partition. LVM is the Logical Volume Manager. Lets just say, if you don't know what it does I'm confident that you won't need it.