Partitioning.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
drrummer

Partitioning.

Post by drrummer »

I think this is the appropriate place to pose these queries:

1. I read an article explaining how Linux uses the sda naming convention. However, in the attached image you will see the names follow the 'nvme0n1p' style. Does that affect anything pactical ?
2. Can I change the name of a partition without consequences ?
3. Can I change the label fo a partition without consequences ?

Thanks guys.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Grayfox
Level 4
Level 4
Posts: 333
Joined: Sun May 21, 2017 5:10 am
Location: In a hole

Re: Partitioning.

Post by Grayfox »

Linux drive naming conventions are as follows
HDA, HDB, HDC are PATA based HDDs with numbers after to denote partition(PATA was before SATA(pre 2003)
SDA, SDB, SDC are SCSI, SATA and USB based HDDs/SSDs drives with numbers after to denote partition
nvme0n1,nvme1n1, nvme2n1 are NVME based SSDs with px after to denote partition with x being partition number
SR0, SCD0 are disc drives

nvme0n1 means 1st NVME based device, Additional NVME devices will be nvme1n1, nvme2n1.

Logical Partitions start at partition 5, this is because of the limitation of "Master Boot Record" only having the ability to have 4 partitions, and a logical partition is a type of partition that can have partitions within it.
GPT fixes this issue as well as the 2TB boot drive issue which MBR has.

Dont worry about Labels,
They do have an impact with some partitions.
Eg I made a recovery partition with the Recovery Label.
It mounts as /media/grayfox/Recovery
PC: Intel i5 6600K @4.5Ghz, 1TB NVMe SSD, 32GiB 3000Mhz DDR4, GTX1080 running Mint 21.3
Laptop: Asus UM425UAZ running LMDE 6
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Partitioning.

Post by ricardogroetaers »

Observation:
- The HDA, HDB "nomenclature" is obsolete, no longer used even for IDE (PATA) disks.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Partitioning.

Post by Flemur »

drrummer wrote: Sun Oct 17, 2021 6:07 pm 1. I read an article explaining how Linux uses the sda naming convention. However, in the attached image you will see the names follow the 'nvme0n1p' style. Does that affect anything pactical ?
2. Can I change the name of a partition without consequences ?
Note that you're using 'name' to mean two different things. You can't change the nvmeXXXX values; you can change the actual name in the "Name" column ("Basic data partition") to something useful but AFAIK it's not really used for anything.
3. Can I change the label fo a partition without consequences ?
You can unless the label is being used, which usually it isn't unless you did something to use it, e.g. I use labels rather than UUIDs whenever possible like in /etc/fstab:

Code: Select all

LABEL=DATA    /mnt/DATA     ext4 defaults,user,exec,noatime         0 2
is friendlier than

Code: Select all

UUID=b0451149-941c-493c-bfcd-6e8b4572bf80 ...etc...
If I were to change the label to DATA2 it wouldn't mount correctly.

And partitions on USB drives and such will automagically mount using their LABELs, so you can tell what they are, like
/media/username/PARTITION_LABEL

And: it looks like you have nvme0np7 mounted to two mount points, /home and /run/<something?>; is it supposed to be like that?
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Grayfox
Level 4
Level 4
Posts: 333
Joined: Sun May 21, 2017 5:10 am
Location: In a hole

Re: Partitioning.

Post by Grayfox »

ricardogroetaers wrote: Mon Oct 18, 2021 9:07 am Observation:
- The HDA, HDB "nomenclature" is obsolete, no longer used even for IDE (PATA) disks.
Well it has been zonks since i have used linux on a system that has PATA.
Was going off memory for that one.
PC: Intel i5 6600K @4.5Ghz, 1TB NVMe SSD, 32GiB 3000Mhz DDR4, GTX1080 running Mint 21.3
Laptop: Asus UM425UAZ running LMDE 6
User avatar
AndyMH
Level 21
Level 21
Posts: 13742
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Partitioning.

Post by AndyMH »

Logical Partitions start at partition 5, this is because of the limitation of "Master Boot Record" only having the ability to have 4 partitions, and a logical partition is a type of partition that can have partitions within it.
Nearly right, an extended partition can have logical partitions within it :D . The OP has a GPT partition table on the drive - no extended partition.

sda, sdb, etc. are drives with a sata interface, nvme0n1 is a drive with a pcie interface (faster), so that is a drive with an M.2 form factor. Note that the device names are not fixed, they are assigned in the order that the system reports them to OS. So what is sdc one day can be sdd the next, e.g. if you have plugged in an additional drive. If you have a card reader and plug an SD card in it will probably appear as mmcblk0.

While Flemur prefers to use labels in fstab, I'm the opposite, I prefer the UUID, simply on the basis that it is more difficult to change.

I would recommend that when you create data partitions that you always add a label. If you do, then mint will automount it at /media/you/mylabel. If it doesn't have a label it will use the UUID, e.g. /media/you/977c160a-2b1d-458b-8a91-558d9a930989 = less user friendly.

On a drive with a GPT partition table you can also add partition names, but I've yet to find a use for them.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
drrummer

Re: Partitioning.

Post by drrummer »

I don't know what half of that stuff means.

But the one takeaway I get is that I can change labels and names.

Thank you guys.
drrummer

Re: Partitioning.

Post by drrummer »

Could I join the two Filesystem partitions together ?
What is ESP ?
I renamed Swap to Linux Sawp, but it doesn't appear.
User avatar
Grayfox
Level 4
Level 4
Posts: 333
Joined: Sun May 21, 2017 5:10 am
Location: In a hole

Re: Partitioning.

Post by Grayfox »

drrummer wrote: Wed Oct 20, 2021 10:17 pm Could I join the two Filesystem partitions together ?
What is ESP ?
I renamed Swap to Linux Sawp, but it doesn't appear.
ESP is an EFI partition.

SWAP wont appear.
SWAP is just like pagefile.sys.
It is place for virtual RAM to be stored.
You wont see any usable data on it.
PC: Intel i5 6600K @4.5Ghz, 1TB NVMe SSD, 32GiB 3000Mhz DDR4, GTX1080 running Mint 21.3
Laptop: Asus UM425UAZ running LMDE 6
drrummer

Re: Partitioning.

Post by drrummer »

Thanks mate.
drrummer

Re: Partitioning.

Post by drrummer »

Some follow up questions:

I followed the tips given here:
https://askubuntu.com/questions/852395/ ... s-to-linux

At step 1, I shrank the C:drive. Even though it has 250GB free, it would only allow me to shrink by 39GB.

After step 1, I logged into Linux. I tried to move the partitions as they suggest in step 2. It won't work.
--However, I can shrink further the Acer partition, even though I couldn't do that in the Windows Disk Management interface. Why would that happen ?
User avatar
AndyMH
Level 21
Level 21
Posts: 13742
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Partitioning.

Post by AndyMH »

drrummer wrote: Sun Nov 07, 2021 9:32 pm At step 1, I shrank the C:drive. Even though it has 250GB free, it would only allow me to shrink by 39GB.
Try turning off virtual memory in win, this gets rid of pagefile.sys which can live at the end of the partition (and turn it back on after shrinking). Another one is fast boot, that creates hiberfil.sys, which could also be limiting your ability to shrink your C: partition. Best to turn off fast boot anyway, with it on linux only has read-only access to your ntfs partitions.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
drrummer

Re: Partitioning.

Post by drrummer »

Thanks for the reply.

I've managed to grant Linux full control of files on Windows. Media files at least

Thanks for the tips. It seems Gparted will allow me to shrink the Partition further. Allow me to elaborate.

1. Logged into Windows; Shrank partition as much as possible. Reason was to do with some files being at the end of the partion.
2. Logged into Linux; Shrink possibility ofsame partition is greater.

QUESTION: Will Gparted do damage if I continue with the shrink from the Linux side ?
drrummer

Re: Partitioning.

Post by drrummer »

I have two question regarding the attached image:
1. How can I check what is in the second Filesystem partition ?
2. How can I move stuff from one partition to another ?
User avatar
AndyMH
Level 21
Level 21
Posts: 13742
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Partitioning.

Post by AndyMH »

drrummer wrote: Mon Nov 08, 2021 8:56 am I have two question regarding the attached image:
1. How can I check what is in the second Filesystem partition ?
2. How can I move stuff from one partition to another ?
1. you can't and there is nothing in there. This is MS creating a small partition in case it might have a future use for it.
https://en.wikipedia.org/wiki/Microsoft ... _Partition
2. Mount the partitions and copy files over using your file manager.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
drrummer

Re: Partitioning.

Post by drrummer »

1. The second Filesystem partition is actually a Linux partition.
2. There doesn't seem to be an option to transfer files between partitions.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Partitioning.

Post by Flemur »

drrummer wrote: Tue Nov 09, 2021 7:55 am 1. The second Filesystem partition is actually a Linux partition.
2. There doesn't seem to be an option to transfer files between partitions.
1. The second partition (0n1p2) is a weird MS partition.
2. You mount the partitions, and then copy files the same way you'd do it anywhere else, with a file-browser or 'cp' in a terminal, etc.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
drrummer

Re: Partitioning.

Post by drrummer »

No. Not the 2nd partition, the 2nd Filesystem partition.

From what I understand the first 3 are Windows related. P1, P2, P3.

P5 and P7 are Linux Filesystems. I'd like to merge both of these.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Partitioning.

Post by Flemur »

drrummer wrote: Tue Nov 09, 2021 8:54 am No. Not the 2nd partition, the 2nd Filesystem partition.
I don't know what that means; there's ONE partition, p7, labeled "Filesystem", but it could be labeled anything or nothing. The 2nd partition on the filesystem, which could be called "the 2nd filesystem partition", is a windows partition.
P5 and P7 are Linux Filesystems. I'd like to merge both of these.
p5 = "/" = your OS, so you have to modify it when booted from the install media (USB or DVD) so that it's not mounted.

To merge p5 and p7, I'd do this:

1 - make backups of everything (all the files) on p5 and p7. (if you want to save the files on p7)
2 - remove p6
3 - remove p7
Edit: you can do that stuff while booted normally into p5.
Edit2: run "swapoff" or "sudo swapoff" before deleting p6.

4 - resize p5 into the empty space where p6 and p7 were.
Edit: this needs to be done from the install media.

5 - Now you have a p5 partition which uses all that space that was in p6 and p7. You should be able to boot to p5 as you did before. To restore the files that were on p7 you can either mount p5 while running the installer, or boot normally and copy from the p7 backup to p5 (probably easier); you might have to make a directory to put the files in. (p7 didn't have a mount-point so it's not /home or anything else you needed to boot and run the OS). If all goes well you won't need to restore from the p5 backup you made in step #1.

6 - rather than a swap partition, make a swapfile under "/" in he new p5; you do this by creating the swapfile and editing /etc/fstab. It might be easiest to comment-out the current reference to the swap file in /etc/fstab, although if the system can't find the swap partition because you removed it, at worst it'll make you wait 1.5 minutes at boot. You might not need a swap file or partition (I don't use either).
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
drrummer

Re: Partitioning.

Post by drrummer »

Thanks for this. I'll try it shortly.

There is already a Swapfile at P6.
Locked

Return to “Installation & Boot”