I have a dual-boot PC running WIndows 10 and Ubuntu Studio Linux 22.x LTS. Over the past year or so, I could not boot into Ubuntu, and the reasons were difficult to trace, which is why I had put it off, and used Windows for a while. Now that I am taking the time to poke around the Linux system, I had noticed things that were highly unusual: 1) I noticed two swap partitions. Was that me being absent-minded when I did the installation/upgrade a year ago? Then I noticed: 2) There are also two (2) EFI partitions. One installed 2 years ago, and one installed almost exactly a year ago (I would say that is about when the unexplained reboot failures happened. Both EFI partitions are on the same physical drive. I am fine with deleting one of the swap partitions, but is it ok to delete one of the EFI partitions, more than likely the newer one? The older one is listed as sdd2 (sdd1 is a windows recovery partition), and the newer one is sdd7. Any ideas? Paul
sciguy via talk wrote on 2023-09-04 10:49:
1) I noticed two swap partitions. Was that me being absent-minded when I did the installation/upgrade a year ago? Then I noticed:
Any ideas?
I'm not sure about the EFI partitions, but using the `swapon` and associated tools (swapoff, swaplabel), you can check which swap area is being used, enable / disable them (multiple swap areas are allowed, it appears), etc. Interestingly, the man page says:
The swaplabel utility allows changing the label or UUID on an actively used swap device.
But I'm not having success with that (using /dev/sda5).
swaplabel -L myswap /dev/sda5
swaplabel: /dev/sda5: failed to write label: Text file busy
Disabling swap (`swapoff -a`) then `swaplabel -L myswap /dev/sda5` does not complain, but also doesn't seem to work. I'm not sure I actually have any understanding of this. At all. Hopefully someone can chime in with answers / suggestions to our issues. rb
| From: sciguy via talk <talk@gtalug.org> | 1) I noticed two swap partitions. Was that me being absent-minded when I did | the installation/upgrade a year ago? Then I noticed: That should just work. But I always go for simplicity. | 2) There are also two (2) EFI partitions. One installed 2 years ago, and one | installed almost exactly a year ago (I would say that is about when the | unexplained reboot failures happened. Both EFI partitions are on the same | physical drive. The UEFI standard allows multiple ESPs (EFI System Partitions) on one drive. I have heard that Windows gets confused when there are multiple ESPs. I don't know of a reason why it would be good idea. There are cases where it makes sense to have an ESP on more than one disk. | I am fine with deleting one of the swap partitions, but is it ok to delete one | of the EFI partitions, more than likely the newer one? The older one is listed | as sdd2 (sdd1 is a windows recovery partition), and the newer one is sdd7. I imagine that the best course of action is to merge the contents of the second ESP into the first, and then delete the second. You might find that the UEFI firmware tries to boot from the deleted ESP. Oops! If you use efibootmgr(8), with the -v flag, you should be able to see what's going on. Beware: the last portion of a boot entry for Windows is in UTF16, something that comes out badly on the console. If you run the command without -v, you might see the structure better. You can edit the entries with efibootmgr too. There are a lot of defferences between UEFI setup screens. I don't know what yours can do.
participants (3)
-
BCLUG -
D. Hugh Redelmeier -
sciguy