You are not logged in.
Pages: 1
During booting, I find an error message. I am able to trace this error with systemctl status dev-sda5.swap. This is the output:
● dev-sda5.swap - Swap Partition
Loaded: loaded (/run/systemd/generator.late/dev-sda5.swap; generated; vendor
Active: failed (Result: exit-code) since Sat 2016-08-13 21:52:45 IST; 6h ago
What: /dev/sda5
Docs: man:systemd-gpt-auto-generator(8)
Process: 271 ExecActivate=/sbin/swapon /dev/sda5 (code=exited, status=255)
Aug 13 21:52:45 clinton-pc systemd[1]: Activating swap Swap Partition...
Aug 13 21:52:45 clinton-pc swapon[271]: swapon: /dev/sda5: read swap header fail
Aug 13 21:52:45 clinton-pc systemd[1]: dev-sda5.swap: Swap process exited, code=
Aug 13 21:52:45 clinton-pc systemd[1]: Failed to activate swap Swap Partition.
Aug 13 21:52:45 clinton-pc systemd[1]: dev-sda5.swap: Unit entered failed state.
~This is the output of parted /dev/sda print
[clinton@clinton-pc ~]$ sudo parted /dev/sda print
Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2097kB 539MB 537MB fat32 boot boot, esp
2 539MB 22.0GB 21.5GB ext4 rootfs
3 22.0GB 34.9GB 12.9GB ext4 var
4 34.9GB 39.2GB 4295MB linux-swap(v1) swap
5 39.2GB 1000GB 961GB ext4 homeHowever, an fdisk -l shows that my home partition is actually a swap partition. Which is weird because I didn't do that:
[clinton@clinton-pc ~]$ sudo fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: DFB7DE69-0934-4EA0-9541-7FEBD3CD739B
Device Start End Sectors Size Type
/dev/sda1 4096 1052671 1048576 512M EFI System
/dev/sda2 1052672 42991615 41938944 20G Linux filesystem
/dev/sda3 42991616 68157439 25165824 12G Linux filesystem
/dev/sda4 68157440 76546047 8388608 4G Linux swap
/dev/sda5 76546048 1953523711 1876977664 895G Linux swapThe kernel tries to perfrom some swapping on my home directory. How do I fix this, without having to format my whole system again
. Thank you
Clinton
For the Love of God and the good of all men
Offline
Using fdisk try to change the partion type of your home partition to Linux filesystem
...what is the output of
$ cat /etc/fstab
Offline
Output of cat /etc/fstab
[clinton@clinton-pc ~]$ cat /etc/fstab
# /dev/sda2
UUID=6e8e9616-92e4-4c46-8938-c8781049cdda / ext4 rw,relatime,data=ordered 0 1
# /dev/sda1
UUID=95A2-FED3 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
# /dev/sda3
UUID=e7c69c75-166e-4212-a3d6-0602ba79c569 /var ext4 rw,relatime,data=ordered 0 2
# /dev/sda5
UUID=3673a968-9361-402b-9e31-0b75bf41c90b /home ext4 rw,relatime,data=ordered 0 2
# /dev/sda4
UUID=6b801c07-b62e-4ae9-8870-8ff8e23eff22 none swap defaults 0 0Offline
What's the output of blkid.
Not an installation issue, moving to NC.
Offline
[clinton@clinton-pc ~]$ blkid
/dev/sda1: UUID="95A2-FED3" TYPE="vfat" PARTLABEL="boot" PARTUUID="33734569-4ae9-4d04-b6dc-9b3ef1868436"
/dev/sda2: UUID="6e8e9616-92e4-4c46-8938-c8781049cdda" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="16b46b43-f70e-42c6-b95d-cafb5ade7d72"
/dev/sda3: UUID="e7c69c75-166e-4212-a3d6-0602ba79c569" TYPE="ext4" PARTLABEL="var" PARTUUID="c12d31a3-c351-4b8b-95d4-b049f1107a14"
/dev/sda4: UUID="6b801c07-b62e-4ae9-8870-8ff8e23eff22" TYPE="swap" PARTLABEL="swap" PARTUUID="28636b0c-7ff5-4214-863b-dd91a6e9db44"
/dev/sda5: UUID="3673a968-9361-402b-9e31-0b75bf41c90b" TYPE="ext4" PARTLABEL="home" PARTUUID="3bc2e360-8dd9-4cdb-84f1-431ea3efdd40"Offline
I think you missed a step, Did you do a mkswap on /dev/sda4
Speak your mind even if your voice shakes.
Offline
I think you missed a step, Did you do a mkswap on /dev/sda4
I remember I did. And if you check closely, you will notice that, the error is not coming from my swap partition. It is coming from my home drive.
Offline
"Type Linux swap" in the fdisk output is the problem, as dazemc already said. Set it to the correct partition type.
Offline
I did a search and realized fdisk will format the partition. This shiuld be my last resort as I have valuable data on it.
Offline
fdisk will not format anything.
Offline
I remember I did. And if you check closely, you will notice that, the error is not coming from my swap partition. It is coming from my home drive.
I guess I overlooked it, as correctly mentioned by others fdisk is the right way to change partition type. If you fear messing things up, then simple solution would be to just mask the dev-sda5.swap unit so that systemd will not try to mount that partition as swap. i.e systemctl mask dev-sda5.swap
/home partition should work as it should be despite fdisk -l showing it as swap which anyway is just a tag.
Last edited by glavin (2016-08-14 15:13:18)
Speak your mind even if your voice shakes.
Offline
It worked!! It even fixed another problem which was happening at shutdown. Couldn't Unmount /var. Very happy!!!
Offline
Pages: 1