[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: swap on second hard drive



Le 17/05/2016 17:41, Peter Hillier-Brook a écrit :
I recently re-formatted and re-partitioned a second disk that I use for
experimenting with various distributions. A consequence is that previous
UUIDs have disappeared into the bit bucket but, during booting of my
main system a script somewhere is trying to use the swap partition that
used to exist on the second disk.

This is not a major problem, as the system boots after a 90 second delay
for a start job that is never going to start and a dependency failure
message is output, but I would like to find and fix the problem. Can
anyone offer a pointer to a likely source?

The UUID is probably in /etc/fstab (man fstab).

If you want your system not to try to use the swap, just comment out the relevant line in /etc/fstab.

If you created a new swap partition and want to use it instead of the old one, you have two options.

a) Change the UUID of the new swap with mkswap or swaplabel (if you already initialized the swap with mkswap) with the old one.

b) Change the UUID in /etc/fstab with the new one (you can get it with blkid). If you use hibernation (suspend to disk), you also need to change the UUID in /etc/initramfs-tools/resume if that file exists, then rebuild the initramfs with update-initramfs. Method a) is much simpler IMO.

The use of UUID is not mandatory, but I strongly recommend using any persistent identifier such as label, UUID, partition label or partition UUID and not the device names /dev/sd* which are not reliably persistent when you have multiple disks.


Reply to: