I have an opensuse installation I use fairly often, but I have other OSs on the drive. I have had many different flavours of linux on this system over time and so I have added and removed, resized, etc, partitions a number of times.
I am cleaning up the disk some to add another OS and I moved the swap partition to a different place. I was checking the partitions afterwords with “fdisk -l” and “cat /proc/swaps” and I noticed this message from fdisk.
There are some posts about how to fix this but I am wondering if it matters.
At the moment, the drive looks like,
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 102404095 102400000 48.8G 7 HPFS/NTFS/exFAT
/dev/sda2 200710144 500117503 299407360 142.8G 5 Extended
/dev/sda3 118784610 200706047 81921438 39.1G 83 Linux
/dev/sda4 102408192 118779903 16371712 7.8G 82 Linux swap / Solaris
On the drive, sda1 comes first, followed by the swap (sda4), then the opensuse root (sda3), then by an extended partition where the other OS will go. Logically, the extended partition should be sda4 and not sda2 since it comes last of the existing partitions.
Should I take the time to change this or does it not matter?
Your choice. It doesn’t really matter, but some software might complain that partitions are out of order.
There’s actually an “fdisk” option to fix the order (in the extended menu). But there’s the risk that your system might become unbootable if there is something that depends on the current partition order.
I would treat it as a warning.
It is probably not what the original designers of the MS-DOS partitioning as ever assumed to done.
I have often seen people posting such fdisk -l listings here on the forums with that warning, but it never had anything to do with problems.
To be a bit nasty, I always assume that those systems had an adventurous life, but that is what you told already. lol!
If all that’s left on disk is a supported openSUSE version, IMO that risk is somewhere between small and zero. Grub and fstab are configured to look first to UUIDs in large part in order to avoid such things. If on your installed system they still are so configured, you should be good to go.
I take pains to ensure out of order tables don’t happen, but if they do, I expediently restore order on discovery.
Yes, if everything is based on UUID, it should be fine. But if using device-name or device-id, then changing the order can cause problems.
Some people (probably only a small number) use randomly encrypted swap. And you cannot use UUID with that, because it changes for every boot.
I am sory to object, but using UUID= (or any other way to identify using the /dev/disk/by-* files) all comes down in the end to /dev/sdN These files are all symbolic links. And the /dev/sdN are the real special files and have minor numbers that link them directly to the entries in the partition table.
The only thing is that those entries (which are in sequence in the table), then point to places on disk where a lower placed entry points to a higher place on disk then a higher placed entry.
The example is in post #1 up here where sda2 has a higher starting address then sda3 and sda4 and where sda3 has a higher starting adres then sda4. On disk starting from the begin you will find the contents of sda1, sda4, sda3 and sda2 in that sequence.
That does not matter at all as long as the kernel on I/O access adds the correct start address to the disk address used inside the partition. And it does.