recovered swap partition space will not mount 16.04

Asked by Bruce MacAlister

Windows 10 with Ubuntu 16.04 on a laptop with an i3 processor, 4gb ram, 500gb hdd. I used gparted live to lay out partitions, NTFS for Win, EXT4 for Ubuntu and EXT4 for shared. Installed Win10 (64-bit) then Ubuntu (64-bit) as suggested in wikis, etc. Ubuntu would not install. Finally specified swap space and it worked but took all of the shared space. Used gparted live to reduce swap to 20gig. It worked. Used gparted to format recovered swap space to EXT4. Ubuntu cannot mount it. Windows doesn't see it with the EXT driver installed. (It does see the Ubuntu partition and, of course, Ubuntu can mount and see Win partition.)

How do I make the recovered space mountable and usable?

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: dos
Disk identifier: 0xcc0bf259

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 307202047 307200000 146.5G 7 HPFS/NTFS/exFAT
/dev/sda2 307204094 585918463 278714370 132.9G 5 Extended
/dev/sda3 585918464 976771071 390852608 186.4G 83 Linux
/dev/sda5 307204096 350212095 43008000 20.5G 82 Linux swap / Solaris
/dev/sda6 350214144 585918463 235704320 112.4G 83 Linux

Partition 2 does not start on physical sector boundary.
Partition table entries are not in disk order.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bruce MacAlister
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you manipulate the partition in Ubuntu, is it OK?

Be sure that you are messing with the right partition before you step

Revision history for this message
Bruce MacAlister (w4bru) said :
#2

When I use the gnome disk utility I can see it. It's status is "Ext4 (version 1.0) — Not Mounted." Unfortunately there is no way to show you the screen snapshot of it since launchpad doesn't allow attaching images. It is in /dev/sda2 with the swap area. It doesn't have it's own separate /sda number.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

1. To show a screen shot you have to upload the image file to a web hosting service of your choice and post the link to that file in this question document.

2. You might try deleting the partition and creating it again.

Revision history for this message
Bruce MacAlister (w4bru) said :
#4

Thank you both for the answers. In deleting the partition I delete the swap partition. Will that kill Ubuntu so it has to be reinstalled or is there an elegant way to delete and then create separate swap and extended partitions that preserve the installed 16.04? Installing 16.04 isn't that tough but re-installing all the other software I've added will eat up some time.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

I was not talking about deleting the swap partition that you use, but only the data partition that you cannot mount.

Just to add some explanation:
The standard partitioning scheme has a limit of four partitions. To enable creating more that four partitions on a device, the concept of "extended partitions" was introduced. An "extended partition" is a container to hold partitions.

Your disk has:
/dev/sda1: a primary partition, 146 GB formatted for Windows
/dev/sda2: an extended partition, 133 GB, containing /dev/sda5 and /dev/sda6
/dev/sda3: a primary partition, 186 GB, formatted for Linux.

/dev/sda5 (inside /dev/sda2): 20 GB swap partition for Linux
/dev/sda6 (inside /dev(sda2): 112 GB formatted for Linux

I assume that you refer to /dev/sda6 if you talk about "recovered swap partition space".

If you have problems mounting /dev/sda6, and if you are sure that there are no data on it that you would lose, then I recommend to delete that partition and to re-create it again. I do not see the need to touch the /dev/sda2 partition.

Revision history for this message
Bruce MacAlister (w4bru) said :
#6

I only seem to get back to this during the weekends.

I deleted (with gparted) sda6, then added it again and formated it EXT4, labeled it SharedEXT4.

Its icon appears on the launch list named SharedEXT4.

I cannot paste files into it.

Right click it and it is shown as mounted. Permissions show grayed out with root shown as owner.

I went through all I could find on how to establish permission in Terminal. What you see below is immediately after the gparted work and then the attempt to gain permission to access.

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 307202047 307200000 146.5G 7 HPFS/NTFS/exFAT
/dev/sda2 307204094 585918463 278714370 132.9G 5 Extended
/dev/sda3 585918464 976771071 390852608 186.4G 83 Linux
/dev/sda5 307204096 350212095 43008000 20.5G 82 Linux swap / Solaris
/dev/sda6 350217063 585906614 235689552 112.4G 83 Linux

Partition 2 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition table entries are not in disk order.

bruce@bruce-ubuntu:~$ sudo mount /dev/sda6 "/media/bruce/SharedEXT4"
mount: /dev/sda6 is already mounted or /media/bruce/SharedEXT4 busy
       /dev/sda6 is already mounted on /media/bruce/SharedEXT4
bruce@bruce-ubuntu:~$ umount /dev/sda6
bruce@bruce-ubuntu:~$ sudo mount /dev/sda6 "/media/bruce/SharedEXT4"
mount: mount point /media/bruce/SharedEXT4 does not exist

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: dos
Disk identifier: 0xcc0bf259

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 307202047 307200000 146.5G 7 HPFS/NTFS/exFAT
/dev/sda2 307204094 585918463 278714370 132.9G 5 Extended
/dev/sda3 585918464 976771071 390852608 186.4G 83 Linux
/dev/sda5 307204096 350212095 43008000 20.5G 82 Linux swap / Solaris
/dev/sda6 350217063 585906614 235689552 112.4G 83 Linux

Partition 2 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Partition table entries are not in disk order.

What am I missing here?

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

"...Right click it and it is shown as mounted. Permissions show grayed out with root shown as owner..."
Default setting for new partitions is that only root has write access.
You have to adapt the protection settings.

Revision history for this message
Bruce MacAlister (w4bru) said :
#8

Got it. Getting permissions set, directories added, permissions set for them, etc is the usual Linux tedium. I really prefer Ubuntu over Windows but what a pain to change anything. I don't object to Terminal mode but the cryptic command and syntax are not what anyone would call memorable. Thanks to both for the help.