Engage. Your Community

fstab edit question

Hi I'm reinstalling korora and stuffed up the swap partition and need to add it to fstab. I have created the partition but am not sure which bit to remove in the current file (see the fstab contents below). the swap is /dev/sdb5. Any help would be greatly appreciated.

Can someone confirm (or not) that I replace the line '/dev/mapper/korora00-swap swap swap defaults 0 0' with the new UUID line ie 'UUID="00bea0bb-4f3c-4bc4-8e63-3f5bc8cc6168" swap swap defaults 0 0 '

#
# /etc/fstab
# Created by anaconda on Mon May 29 19:11:56 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/korora00-root /                       ext4    defaults        1 1
UUID=be0d5af3-81a4-470e-993b-a3d26420bd7b /boot                   ext4    defaults        1 2
UUID=aec2697d-e24e-3a0a-be00-f2c3e73e63a0 /boot/efi               hfsplus defaults        0 2
/dev/mapper/korora00-swap swap                    swap    defaults        0 0

#mount DATA partition under /mnt/fstab
UUID="15ec00a2-fb4e-44d4-a64c-b5ed05fbdba2" /mnt/DATA  ext4 defaults 0 2

In my fstab the swap line is

UUID=3fc758f7-7ac1-421a-abf3-26266793acd7 swap                    swap    defaults        0 0

so it looks like your proposed line is correct.

Do you know if I just delete the /dev/mapper/korora00-swap line?

sirrahn wrote:
Do you know if I just delete the /dev/mapper/korora00-swap line?

I don't have anything like that so yes I would delete it.

Thanks, seems to have worked okay. I will reboot later when I have time to try and fix any disasters. Korora 25 is running beautifully.

sirrahn wrote:
Thanks, seems to have worked okay. I will reboot later when I have time to try and fix any disasters. Korora 25 is running beautifully.

No problem, you can check it just by typing swapon. It should show the partition in use and its size etc.

Hi again, things were looking good but I followed up by removing the other swap that had been created by the installer and an now getting errors on start up and instructions to check the initramfs report.

The installer created a lvm partition for root (korora00-root) and in that partition these seemed to be 2 more partitions the root partitions and the initial swap that was created. the root partition was too small so I did 2 things. I grew the size of the lvm partition and then I deleted the swap on (korora00-root) and grew the root partition so that it took up almost all of korora00-root. This seemed to go okay, but now when i boot the system I get error and are dumped into emergency mode if i exit this I go back into the gui. In the errors it suggests I save the rdsosreport.text. This is a link to it: rdsosreport

I don't understand the lvm partition or what the installer was doing or whether the root should be an lvm partition. But is someone could help me that would be great, it seems i have to fix the initramfs and I'm not sure if I should do anything with the partitions?

Thanks

If you haven't customised the system too much it may be quicker and easier to reinstall and set the partitions up the way you want using either LVM or regular partitions.

Hi, I have spent a fair bit of time customising and would love to avoid this if possible. I really screwed up the install somehow but apart from this its running great and I just about have it right. I found it confusing to try and upgrade over the top of the existing system. Hopefully next time I'll be a lot wiser. How hard is it going to be to fix from here? By the way I've just put a link to the rdsodreport in the above post.

sirrahn wrote:
Hi, I have spent a fair bit of time customising and would love to avoid this if possible. I really screwed up the install somehow but apart from this its running great and I just about have it right. I found it confusing to try and upgrade over the top of the existing system. Hopefully next time I'll be a lot wiser. How hard is it going to be to fix from here? By the way I've just put a link to the rdsodreport in the above post.

I don't have any experience with LVM so I've asked on irc for you.

Thanks ozjd, me either.

There is the suggestion to rebuild your grub configuration. The changes you have made don't appear to be reflected in the kernel command line.

If you aren't familiar with rebuilding grub see here and scroll down to the rebuilding section.

Thanks for the suggestion, I just tried this assuming I have an efi system (I pretty sure it is efi and i do have a /boot/efi partition) but I got the same errors as last time. Even though I edited the fstab file the system is trying to find the old swap partition on the lvm partition! I updated the rdsosreport file in the above link but it looks to be the same.

If you have a /boot/efi/EFI/fedora/grub.cfg and don't have /boot/grub2/grub.cfg then you have a efi system.

Yes I only have the efi version. I did look inside the grub.cfg it and it still has a reference to the korora00/swap even though I used the sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg command.

Please Log In to participate with the community.