Jump to content


Swap Problem Debian 9.4


  • Please log in to reply
6 replies to this topic

#1 OFFLINE   mhbell

mhbell

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,212 posts

Posted 08 June 2018 - 10:55 PM

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, 08 June 2018 - 11:51 PM.

Registered Linux User #239772
Mint 18.1 Cinnimon, MX-16, Siduction LXQT, Debian Stretch, and Other Linux Distro's
https://pctechman.wordpress.com/

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,837 posts

Posted 09 June 2018 - 11:49 AM

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"

Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,837 posts

Posted 09 June 2018 - 12:00 PM

Nevermind, I missed the part where you found blkid. :ermm:
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#4 OFFLINE   sunrat

sunrat

    Thread Kahuna

  • Forum Moderators
  • 5,654 posts

Posted 10 June 2018 - 08:28 PM

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.
registered Linux user number 324659  ||    The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted ImagePosted Image
For the things we have to learn before we can do them, we learn by doing them.

#5 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,837 posts

Posted 10 June 2018 - 08:36 PM

View Postsunrat, on 10 June 2018 - 08:28 PM, said:

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

Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#6 OFFLINE   sunrat

sunrat

    Thread Kahuna

  • Forum Moderators
  • 5,654 posts

Posted 10 June 2018 - 08:56 PM

View Postsecuritybreach, on 10 June 2018 - 08:36 PM, said:

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.
registered Linux user number 324659  ||    The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted ImagePosted Image
For the things we have to learn before we can do them, we learn by doing them.

#7 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,837 posts

Posted 10 June 2018 - 09:14 PM

View Postsunrat, on 10 June 2018 - 08:56 PM, said:

View Postsecuritybreach, on 10 June 2018 - 08:36 PM, said:

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.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users