Restore Swap Petition?
I'm running arch, installed with archinstall[1].
I read that arch uses zram[2] for swapping, not disk. Also read somewhere that zram doesn't use disk for swap, so i don't need a swap partition. (I don't get why archinstall creates a swap partition if it's not needed) Believing it wasn't needed, i deleted the swap partition (using cfdisk from the Live ISO). Now arch won't boot. I'm getting a message about waiting 10 seconds for a partition, and then i get dropped into emergency shell. Code:
Loading keymap.... Done. I attempted to recreate a swap partition in the same location on disk, using cfdisk, of "Linux Swap" type. Then i did mkswap on the reformatted swap partition. Code:
# mkswap /dev/sdb2 Do i need to change a partition ID in a grub config file? I also attempted to mount the boot partition from the live ISO, and chroot into it, but that fails. Code:
# mount /dev/sdb1 /mnt [2]: https://wiki.archlinux.org/title/Zram |
Quote:
Have you checked /etc/fstab to make sure it reflects the actual partition structure? |
Since you didn't delete or comment out the line that pertains to swap in the /etc/fstab the system is not booting. Since reformatting creates a new UUID the swap partition is still not active. From the emergency shell try either commenting out or changing the UUID to match.
|
Quote:
I mounted the system partition, and checked /etc/fstab. It doesn't contain incorrect mounting info for the swap directory, because it doesn't contain any mount info for the swap partition (or for any other partition). Plz see my original question for more details. |
Did you actually mount or change to the correct directory? You need to mount the root partition and then edit the mounted directory's /etc/fstab file. There isn't a need to use chroot. Is the root partition encrypted?
|
Quote:
Code:
# mount /dev/sdb1 /mnt Quote:
|
And the file is empty?
While I have installed Arch in a VM in the past I have not played with it in awhile. |
Quote:
Quote:
|
I would guess or assume that Arch uses systemd to mount the filesystems instead of /etc/fstab. Yes, you can change the current swap UUID to match the old.
|
Quote:
Quote:
|
Did you change the correct filesystem?
|
Quote:
If you mean, correct partition, then yes, i believe so. I think the boot wouldn't have gotten as far as it did if i had altered the system partition. |
Depends on how you configured your install but for me with an efi default setup, archinstall created 2 partitions. /dev/sda1 for /boot and /dev/sda2 for the / partition. The boot partition was defined in /etc/fstab but / is a kernel command line parameter as well as zswap. Do you have a /boot/loader/entries directory? Check the conf files to see if the UUIDs match your /(root) filesystem.
|
|
All times are GMT -5. The time now is 07:27 AM. |