Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#32609 - [arch-install-scripts] genfstab embeds temporary device mapper number in swap line of fstab
Attached to Project:
Arch Linux
Opened by A Web (aweb) - Sunday, 11 November 2012, 18:24 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 17 November 2012, 15:56 GMT
Opened by A Web (aweb) - Sunday, 11 November 2012, 18:24 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 17 November 2012, 15:56 GMT
|
DetailsDescription:
genfstab embeds device mapper numbers in swap lines. Since these numbers change on reboot (particularly between the install CD and booting from disk), they become incorrect on reboot, causing a difficult to track 60-second pause on every boot and resulting in swap being disabled. Additional info: * package version(s) Confirmed in arch-install-scripts 8-1. * config and/or log files etc. Job dev-dm\x2d4.device/start timed out. Timed out waiting for device dev-dm\x2d4.device. Dependency failed for /dev/dm-4. Job dev-dm\x2d4.swap/start failed with result 'dependency'. Job dev-dm\x2d4.device/start failed with result 'timeout'. Steps to reproduce: Run genfstab when using lvm or dm-crypt or both for the swap partition. For example, I am using lvm on a luks partition, and swap on a logical volume called /dev/mapper/decrypted-swap. If I run genfstab without the -U flag, I get output like the following: # genfstab -p / /dev/mapper/decrypted-root / ext4 rw,relatime,data=ordered 0 2 /dev/sda1 /boot ext2 rw,relatime 0 2 /dev/dm-4 none swap defaults 0 0 This is somewhat understandable in that /proc/swaps does not contain symbolic link paths for /dev/mapper/... the way /proc/mounts does, but it leads to a frustrating install experience. It took me several hours to understand why my system was stalling for 60 seconds every time I rebooted with some weird journalctl message about /dev/dm-4 timing out. (It was dm-4 when I installed because the install CD was using some device mapper numbers, but becomes /dev/dm-1 when I boot from disk.) A fix to this would save people a lot of frustration. At a minimum, genfstab could check if the swap path matches /dev/dm-[0-9]* and if so issue a warning to stderr that device mapper numbers change and the user should either run genfstab -U or manually edit the swap line to contain a more permanent device name. A slightly fancier fix would be to search /dev/mapper for a symbolic link pointing back to the appropriate /dev/dm-*, and to output that for the swap line. |
This task depends upon
Closed by Dave Reisner (falconindy)
Saturday, 17 November 2012, 15:56 GMT
Reason for closing: Fixed
Additional comments about closing: arch-install-scripts-9-1
Saturday, 17 November 2012, 15:56 GMT
Reason for closing: Fixed
Additional comments about closing: arch-install-scripts-9-1
# genfstab -pL /
...
/dev/dm-1 none swap defaults 0 0
If I explicitly label the swap using swaplabel, then it works, but I usually only label my file systems, not my swap, since there's only one swap partition on my systems and lvm gives it an acceptably unique name.
It's absolutely the case that, knowing what I know now, this will never again be a problem for me. On the other hand, this is the kind of small annoyance that is likely to turn people off of arch if they are just testing it out. Moreover, if genfstab found the /dev/mapper/... name, it would be more convenient for advanced users as well (just because I can edit my fstab after creating it doesn't mean that it's not easier not to).
And though the stakes are low, the fix is super simple, too. I've attached a short patch to fix the problem. It might not be in the right style, and might not be the most efficient way of handling it, but it shows that this is a trivial issue to deal with.
Committed a fix: https://github.com/falconindy/arch-install-scripts/commit/3a7eb157d11cd8225965152e82d74724808f5d24. It'll be included with December's ISO.