S
S
Sild2013-12-31 16:07:47
linux
Sild, 2013-12-31 16:07:47

Partitioning a hard drive for a dual block. Details

Hello,
On New Year's Eve, I wanted to finally clean up my typewriter.

I'll start with what I don't like. Silly little things - the swap partition is not there, the partition is of the wrong type, the partition numbers are mixed up (first comes sda3 sda4 and then sda2 sda1). This is first. There is also a slightly more important point - I would like to mount /home as a "disk D" in Windows. To do this, I see at least 2 options - make /home type NTFS (and here the first question is: how bad is it? I saw somewhere that / and /home should be made of the same type), the second is to install drivers on Windows so that it is possible to operate with ext4. Which of these approaches do you think is the best? Or maybe there are other options?
Further. What are the section sequences? Swap should be placed at the beginning of the disk. Next I have at least //home windows. (I would also like to allocate a partition for Linux for installed applications in order to painlessly transfer the reinstallation of the system, but this seems to be problematic?)

It is also interesting how much it makes sense to separate / var. Although projects are currently stored there, maybe it's better to keep them in / home and set other paths on the servers?

And finally. Primary and Logical. Is there an actual difference between them, for use at the OS level? And what is the best way to use them?

the question of space for sections is absolutely not of interest.

Thank you in advance

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
merlin-vrn, 2013-01-01
@merlin-vrn

I would like to mount /home as a "D drive" in Windows. To do this, I see at least 2 options - make /home type NTFS (and here the first question is: how bad is it? I saw somewhere that / and /home should be made of the same type), the second is to install drivers on Windows so that it is possible to operate with ext4. Which of these approaches do you think is the best? Or maybe there are other options?

Don't do NTFS on /home. This will create problems with all sorts of paranoid softins in Linux, because. they like to protect sensitive data with 0700 access mode, and you can't do that on ntfs. There will be everything: from swearing at each start, to failure to start.
I can't even imagine where you got the nonsense about / and /home being the same type. On the contrary, their tasks are different, therefore it can objectively be useful to use different FS.
For Windows, there is a wonderful ext2ifs , which will allow you to see the partition as "drive D". Unlike all other solutions, this is done correctly (like an installable file system driver), the support is complete, you can even put a Windows swap there if you wish.
Unfortunately, this driver understands only e2 and e3; and he doesn't know e4. You can make an e3 FS for /home, but mounting it in Linux with the e4 driver will work faster (due to, for example, a smart allocator).
It is also interesting how much it makes sense to separate /var. Although projects are currently stored there, maybe it's better to keep them in / home and set other paths on the servers?

If it's a desktop, there's no point in highlighting anything other than /home. No separate / usr (I don’t imagine situations in which it should be separated at all), nor / var, in which on the desktop, in fact, only service system data, such as a software package manager database, which may lie on /. And /boot does not need to be separated either. This makes sense for root-on-lvm, which is actually correct, but not on a dual boot machine on Windows.
In general, what do you have in /var, DocumentRoot? Better move it to /home. And it will be more convenient to develop.
What are the section sequences? Swap should be placed at the beginning of the disk. Next I have at least //home windows. (I would also like to allocate a partition for Linux for installed applications in order to painlessly transfer the reinstallation of the system, but this seems to be a problem?)

That's right, the swap at the beginning, the rest does not matter.
When reinstalling linux, even if one is required, it itself will be able to rearrange all the necessary applications in a fully automatic mode. You only need to create an automation file, in fact, with a list of the required software. (Example: in Gentoo, such a file is created automatically and is called /var/lib/portage/world. To save the system profile, you need to save it, as well as /etc/portage/* - when, God forbid, installing again, all this is put in place, and then emerge -avuDN world in the chroot during installation - and voila, all the software with all the options, as it was.)
Your data and personal settings are already on a separate partition, reinstall - they won't go anywhere.
Although during normal operation you will not need any of this.
And finally. Primary and Logical. Is there an actual difference between them, for use at the OS level? And what is the best way to use them?

No difference at all from a Linux point of view. About Windows, I'm not so sure, although it seems that today there is no difference either.
I have never needed more than 4 sections in my life. Servers usually have two of them - /boot and lvm pv, and everything else is inside lvm. On desktops - now it’s exactly the same, I only have Windows in virtual machines; however, when it was “on the hardware”, four sections were also enough.
So if I were you, I would make four primary partitions - swap, windows, /, / home.

A
agmt, 2013-12-31
@agmt

I have /home on the same partition as /. All personal stuff is stored in /d (and D:\ in Windows), which is in ntfs. If desired, you can use mount -o bind /d/… /home/….

K
kedobear, 2013-12-31
@kedobear

>> make /home type NTFS
No need to do this, it will be very bad, if at all. Better give Windows ext* support.
>> I would also like to allocate a partition for Linux for installed applications in order to painlessly endure the reinstallation of the system, but this seems to be problematic?
0. Don't reinstall Linux. If you have such a need, you are probably doing something wrong or using a distribution that is not suitable for you.
1. Allocate / usr - why? Reinstalling programs takes minutes (make yourself a script with a list of packages to install).
And the compatibility of binaries with the new system may be in question.
>> there is a sense to allocate separately/var
Nope.
>> And finally. Primary and Logical. Is there an actual difference between them, for use at the OS level? And what is the best way to use them?
The number of Primary sections is limited. There shouldn't be any actual difference in use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question