1

I have a dual boot Windows 10 and Ubuntu PC. After upgrading to Ubuntu 16.04 I get the following screen after selecting Ubuntu from the boot list.

enter image description here

I have tried the method posted here which requires booting from a bootable usb stick, running fsck -l (which shows nothing is wrong) on the root partition and rebooting, and others from this post but it didn't work. It simply goes back to the Emergency Mode.

After entering journalctl -xb I get the following output which I placed on a pastebin.

It seems like it is failing to mount the swap partition as an extract of the above log file shows:

systemd[1]: dev-sda9.mount: Failed to check directory /dev/sda9: Not a directory
...
systemd[1]: Failed to mount /dev/sda9.

The file /etc/fstab look like this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda8 during installation
UUID=775b2ce6-e738-40e5-828f-eccdf49cd63a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=B639-EA4B  /boot/efi       vfat    defaults        0       1
# /home was on /dev/sda10 during installation
UUID=22c6084f-1225-48eb-a295-5d1a0d3d8830 /home           ext4    defaults        0       2
# /windows was on /dev/sda7 during installation
UUID=6D02-3AEA  /windows        vfat    utf8,umask=007,gid=46 0       1
# swap was on /dev/sda9 during installation
UUID=2238a8ba-5029-47d6-8276-472f1bea530e none            swap    sw              0       0
#cryptswap   /dev/sda9    /dev/urandom     swap,cipher=aes-cbc-essiv:sha256,size=256
# usb hdd for backups
UUID=34a0826c-00e4-4c65-8b28-feb34a228b55 /mnt/Ext_HD_1TB auto auto,user,rw,exec 0 0

I tried to uncomment the 3rd last line (starting with #cryptswap..) and comment out the one above. All it does is request a passphrase for the swap partition. I do not want my swap to be encrypted.

And the command fdisk -l comes up with this:

Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 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


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 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


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: 531392B4-E90D-44D4-B066-9D0760AAE16B

Device         Start        End    Sectors  Size Type
/dev/sda1       2048    1230847    1228800  600M Windows recovery environment
/dev/sda2    1230848    1845247     614400  300M EFI System
/dev/sda3    1845248    2107391     262144  128M Microsoft reserved
/dev/sda4    2107392  161163263  159055872 75.9G Microsoft basic data
/dev/sda5  161163264  317462527  156299264 74.5G Microsoft basic data
/dev/sda6  317462528  348829695   31367168   15G Windows recovery environment
/dev/sda7  348829696  387891199   39061504 18.6G Microsoft basic data
/dev/sda8  387891200  583202815  195311616 93.1G Linux filesystem
/dev/sda9  583202816  598827007   15624192  7.5G Linux swap
/dev/sda10 598827008 1953523711 1354696704  646G Linux filesystem




Disk /dev/mapper/cryptswap: 7.5 GiB, 7999586304 bytes, 15624192 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


Disk /dev/sdc: 1.9 GiB, 2014314496 bytes, 3934208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a07f3

Device     Boot Start     End Sectors  Size Id Type
/dev/sdc1        2048 3934207 3932160  1.9G  b W95 FAT32
13
  • Temporarily comment out this line UUID=2238a8ba-5029-47d6-8276-472f1bea530e none swap sw 0 0 in your /etc/fstab and see if your machine boots (leave this line #cryptswap commented out too). Let me know. Cheers, Al
    – heynnema
    Oct 20, 2016 at 19:56
  • @heynnema I managed to get it to work yesterday afternoon by commenting out the UUID=34a0826c-00e4-4c65-8b28-feb34a228b55 /mnt/Ext_HD_1TB auto auto,user,rw,exec 0 0 or external usb hard drive line. I'll uncomment it and do as you said and get back to you. Oct 21, 2016 at 13:50
  • @heynnema that works as well but now I don't have a swap partition. How can I get my swap back? Oct 21, 2016 at 14:02
  • It looks like you commented out something else than the swap partition. Please confirm what kind of partition you have on your external 1TB disk. Did you also comment out the line I recommended? And please tell me, do you want/need an encrypted swap partition? This is important info for me to give you the correct recommendation. Cheers, Al
    – heynnema
    Oct 21, 2016 at 14:17
  • Also, do you know how to use gparted? And how much RAM do you have? How big is your existing sda9? Cheers, Al
    – heynnema
    Oct 21, 2016 at 14:25

2 Answers 2

4

Commenting out your entries in /etc/fstab for swap partitions allowed your computer to boot properly, albeit without a swap partition.

At some point in time, you may have had an encrypted swap partition. Then somebody tried to set it to use a regular unencrypted swap partition.

Since you know how to use gparted and blkid, I'll give you the short answer on how to get your swap partition back.

  1. start gparted and delete your old encrypted sda9 partition
  2. use gparted to recreate a new swap partition in the same (now unallocated) space. If you have 4G total RAM, you can create a slightly smaller swap partition than the 8G partition that you have before. Make it 4G.
  3. select the newly created swap partition and right-click on it and select the swapon command. This will temporarily enable swap.
  4. in terminal, type sudo blkid and note the UUID for the newly created swap partition (it may, or may not, be sda9).
  5. in terminal, sudo gedit -H /etc/fstab and find the commented out line

    #UUID=2238a8ba-5029-47d6-8276-472f1bea530e none swap sw 0 0
    

    remove the #, and change the UUIID to the one that you got from the blkid command. Save and quit gedit.

  6. reboot, and confirm that a swapon command properly shows your swap enabled.
3
1

Type in your password:

sudo -i
fdisk -l

At the end of the list you should have something similar to this:

              Device Boot   Start       End    Sector  Size  ID  Type**    
/dev/xxxxxxxxxxxxx00            1    125000    125000   61M   c  W95 FAT32 (LBA)
/dev/xxxxxxxxxxxxx11       125000  14334047  14209047  6.8G  83  Linux

I used /dev/xxxxxxxxxxx00 on the list that has Type FAT32 - please note the xxxxxxxxxxxxx represents other character that will appear on your screen. Yours will be different from mine.

Here are the commands that I used:

umount /dev/xxxxxxxxxxxx00
fsck -y /dev/xxxxxxxxxxxx00
reboot

This worked for me. After reboot it ran for about 3-5 minutes, then the Kali Linux GUI appeared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.