Jump to content

Swap Problem Debian 9.4


mhbell

Recommended Posts

Got a error when booting Debian 9.4 I get the "a start job is running for dev-disk-by. I have traced the problem to the swap file entry in the FSTAB for Debian 9.4 How do I create a new swap file with the correct UUID in FSTAB? I can delete the old swap file with Gparted and create a new one but how do I get it in FSTAB. I don't know what the uuid is for the new swap file.

Mel

Problem is solved. I use GPT partitioning so it was easy to remove (Delete the swap partition in debian and recreate a new one using Gparted. I then used the blkid command to get the uuid of the newly created swap partition and put it in the fstab file. All is OK now and working like it should.

Mel

Edited by mhbell
Link to comment
Share on other sites

securitybreach

To get the UUID, simply run bblkid as root. As seen below :

 

comhack@Cerberus ~ % sudo blkid
[sudo] password for comhack: 
/dev/sdb1: UUID="26a458e5-9b94-4f88-be49-c9e5e71a8b3a" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="6af44c3e-085a-48bf-8a2e-bf9c1949dcff"
/dev/sdb3: UUID="GFO854-Ah8H-d0Qq-i4w9-Cz3P-6WdT-6inRDH" TYPE="LVM2_member" PARTLABEL="Linux filesystem" PARTUUID="27f96b0f-2f41-4dc1-9db0-723ac51b7ccc"
/dev/sda1: LABEL="MEDIA" UUID="cb0d6b0f-1c2a-46c8-99eb-bbe4e1bcb1b5" TYPE="ext4" PARTUUID="3e12cce9-01"
/dev/sdc1: UUID="3067b591-934e-4c73-a4a7-e5d9da6c267a" TYPE="ext4" PARTUUID="0003d80e-01"
/dev/sdc3: LABEL="Clone" UUID="6b1e37c8-b8d8-4e59-bce9-11b07858aae2" TYPE="ext4" PARTUUID="0003d80e-03"
/dev/sde1: UUID="748f67e8-f6b2-4957-b015-622a0d42190f" TYPE="ext4" PARTUUID="8f3058f5-01"
/dev/sde3: LABEL="home" UUID="3fc84665-73ed-46ed-a4c6-31d4ce2bc1b7" TYPE="ext4" PARTUUID="8f3058f5-03"
/dev/sdd1: UUID="02fcad08-2db1-4467-b2ee-f9cbbfc229d1" TYPE="ext4" PARTUUID="e213a741-0055-45df-8bab-559442d7c228"
/dev/sdf1: UUID="f1d3022a-e554-4a23-ad7a-a224760192ca" TYPE="ext4" PARTUUID="83c53858-01"
/dev/mapper/lvm-lvroot: UUID="dcf10cb6-4569-4e96-afec-9c62c218bf92" TYPE="crypto_LUKS"
/dev/sdg1: LABEL="Expansion" UUID="392461ea-ed96-42a1-b398-9ca1ce5044c1" TYPE="ext4" PARTUUID="61098fd4-3c33-4206-acb7-da8ecd37e117"
/dev/sdg2: LABEL="CLONE" UUID="da37fc00-0bbd-43e9-9d0a-3bbf4dc74b70" TYPE="ext3" PARTUUID="a422b8ef-5e40-4787-ae86-2bddbae4bc6d"
/dev/mapper/root: UUID="5d25ff64-4cfb-453e-bc96-2070a546939d" TYPE="ext4"
/dev/mapper/tmp: UUID="64f6516b-bd2e-4e56-9c74-854e61754993" TYPE="ext2"
/dev/mapper/swap: UUID="5d538335-f189-431a-960d-ca56781f1ddf" TYPE="swap"
/dev/sdb2: PARTLABEL="BIOS boot partition" PARTUUID="d8ad926c-3fde-42b1-8223-cd8c0ed5e40d"

Link to comment
Share on other sites

Let me guess - you just installed another OS and it formatted the swap? I just installed Debian Stretch from a netinstall recently and found there is no option to not format the swap. A workaround is to not use a swap partition on installation and add a current one to fstab afterward.

Also if you had a current swap partition there is no need to delete and recreate it. Just get its UUID with blkid and add that to fstab.

Link to comment
Share on other sites

securitybreach

Let me guess - you just installed another OS and it formatted the swap? I just installed Debian Stretch from a netinstall recently and found there is no option to not format the swap. A workaround is to not use a swap partition on installation and add a current one to fstab afterward.

Also if you had a current swap partition there is no need to delete and recreate it. Just get its UUID with blkid and add that to fstab.

 

Yup, you can simply run swapon /dev/sd(partition number) like

 

sudo swapon /dev/sda4

Link to comment
Share on other sites

Yup, you can simply run swapon /dev/sd(partition number) like

 

sudo swapon /dev/sda4

I don't think that persists after reboot. You still need an fstab entry for that.

You can alternatively use LABEL or UUID for swapon.

Link to comment
Share on other sites

securitybreach
Yup, you can simply run swapon /dev/sd(partition number) like

 

sudo swapon /dev/sda4

I don't think that persists after reboot. You still need an fstab entry for that.

You can alternatively use LABEL or UUID for swapon.

 

It does not persist but I was just pointing out how to turn it on immediately without rebooting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...