LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 07-29-2016, 10:37 PM   #1
americast
Member
 
Registered: May 2012
Location: Kolkata, India
Distribution: Ubuntu, OpenSUSE
Posts: 91
Blog Entries: 1

Rep: Reputation: Disabled
Unable to create ext4 partition in un-allocated space during Ubuntu 16.04.1 installation


Hello everyone,
I was trying to install Ubuntu 16.04.1 LTS on a Lenovo ThinkPad laptop (2GB RAM, 2.3 GHz processor). I already have Windows installed with an un-allocated space of 258 GB after the Windows C: drive. During installation, I just used a part of the free space (around 120 GB) and partitioned it into three halves:
- 2 GB for swap
- 100 GB for /home and
- 18 GB for /

During installation, I got notified that the swap partition could not be created and the installation aborted. I restored all the free space using gparted and tried installing Ubuntu again, this time without creating a partition for swap. Again during installation, I got an error that ext4 partition could not be created. The installer aborted again...

I am not being able to create ext4 partitions even using gparted. Any help would be appreciated...

Gramercy...
 
Old 07-29-2016, 10:51 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
From the liveCD, open a terminal and post the output from this
Code:
sudo parted /dev/sda "print free"
 
Old 07-29-2016, 11:47 PM   #3
americast
Member
 
Registered: May 2012
Location: Kolkata, India
Distribution: Ubuntu, OpenSUSE
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
From the liveCD, open a terminal and post the output from this
Code:
sudo parted /dev/sda "print free"
Thanx a lot for your quick response. Here's the output:

Code:
ubuntu@ubuntu:~$ sudo parted /dev/sda "print free"
Model: ATA ST320LT020-9YG14 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1049kB  1016kB  primary
 2      1049kB  106MB   105MB   primary  ntfs         boot
 3      106MB   43.0GB  42.8GB  primary  ntfs
        43.0GB  320GB   277GB            Free Space
Gramercy again...
 
Old 07-30-2016, 12:02 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Being msdos partition table format, you can only create 4 primary partitions. Been a while since I looked at Ubuntu, but it used to like creating one primary and then a couple of logical partitions. You can't do that.
I would create an extended partition using all that space, then either:
- see if the installer will allow you create all partitions as logical within that extended, or
- allocate all the logicals yourself prior to the install, then assign them mountpoints during the install.

The partitioning step of the install should have an "expert" or "something else" option to allow you to make the assignments you want.
 
Old 07-30-2016, 03:37 AM   #5
americast
Member
 
Registered: May 2012
Location: Kolkata, India
Distribution: Ubuntu, OpenSUSE
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Being msdos partition table format, you can only create 4 primary partitions. Been a while since I looked at Ubuntu, but it used to like creating one primary and then a couple of logical partitions. You can't do that.
I would create an extended partition using all that space, then either:
- see if the installer will allow you create all partitions as logical within that extended, or
- allocate all the logicals yourself prior to the install, then assign them mountpoints during the install.

The partitioning step of the install should have an "expert" or "something else" option to allow you to make the assignments you want.
This is the exact thing which I had done when I had tried installing Ubuntu by creating partitions manually before installation using gparted. I had allocated all the free space into an extended partition and then created those three logical partitions. Gparted had failed to create the partitions. In the Ubuntu installer, there is no option to create an extended partition. It is done automatically. The presence of an extended partition was clearly visible in gparted when the installation via the Ubuntu installer had failed...

Just a guess: I think, the presence of Windows is not allowing partitioning. May be I have to fill the free space with zeros before partitioning can be done...

Edit: When starting gparted, I am getting this message: "The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes." I had chosen to "Ignore" it.

Gparted looks like this after an installation failure. Note that I had created these partitions by choosing "Something Else" in the Ubuntu installer:

https://www.dropbox.com/s/idqo8ac5gz...46-46.png?dl=0

Gramercy...

Last edited by americast; 07-30-2016 at 04:20 AM.
 
Old 07-30-2016, 05:22 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I have not played with version 16 yet but when manually partitioning you need to select the mount point (/, swap etc ) and format type (ext4 etc).
 
Old 07-30-2016, 06:59 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You can try not creating the swap space, but the problem may be a requirement that the /boot be on a primary partition (one reason may be due to the BIOS requiring a primary partition for booting).

Another way is to not have a separate home, AND have no swap partition (use a swap file instead). That way you can use a primary partition that has both / and /boot within a single partition.

A booger about /home though. You COULD put /home in a file, and mount it via a loopback. This works for an implied quota control, but doesn't separate /home quite as well as a separate partition (problems with the root partition would still affect the file). Can make backup more obvious - you only have to copy one file (it would be an image backup).
 
Old 07-30-2016, 07:47 AM   #8
americast
Member
 
Registered: May 2012
Location: Kolkata, India
Distribution: Ubuntu, OpenSUSE
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
You can try not creating the swap space, but the problem may be a requirement that the /boot be on a primary partition (one reason may be due to the BIOS requiring a primary partition for booting).

Another way is to not have a separate home, AND have no swap partition (use a swap file instead). That way you can use a primary partition that has both / and /boot within a single partition.

A booger about /home though. You COULD put /home in a file, and mount it via a loopback. This works for an implied quota control, but doesn't separate /home quite as well as a separate partition (problems with the root partition would still affect the file). Can make backup more obvious - you only have to copy one file (it would be an image backup).
I simply tried to create a fourth primary partition (of 100 GB) in the free space using gparted. And, I am getting this error:

https://www.dropbox.com/s/vgxlm9rxzl...14-21.png?dl=0

Gramercy once again...
 
Old 07-30-2016, 09:30 AM   #9
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
americast,

In gparted highlight the 100GB or 120GB unallocated space and click on New.

Now create a single Extended partition and format it as ext4.

Then within this Extended partition, proceed as before but name each of the new (root, swap and home) partitions as Logical partitions (NOT Primary).

Close gparted.

Boot from Linux Mint DVD/USB drive and at the partitioning stage, choose Something else.
 
Old 07-30-2016, 11:22 PM   #10
americast
Member
 
Registered: May 2012
Location: Kolkata, India
Distribution: Ubuntu, OpenSUSE
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by beachboy2 View Post
americast,

In gparted highlight the 100GB or 120GB unallocated space and click on New.

Now create a single Extended partition and format it as ext4.

Then within this Extended partition, proceed as before but name each of the new (root, swap and home) partitions as Logical partitions (NOT Primary).

Close gparted.

Boot from Linux Mint DVD/USB drive and at the partitioning stage, choose Something else.
Creation of an extended partition in the free space was successful. But creation of logical partitions inside the extended partition (I tried with 2GB space) was unsuccessful (just like before):

https://www.dropbox.com/s/jat2030tr2...45-52.png?dl=0

Here is the details of the error:

Code:
GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Create Logical Partition #1 (ext4, 2.00 GiB) on /dev/sda  00:00:03    ( ERROR )
     	
create empty partition  00:00:02    ( SUCCESS )
     	
path: /dev/sda5 (partition)
start: 83890176
end: 88084479
size: 4194304 (2.00 GiB)
clear old file system signatures in /dev/sda5  00:00:00    ( SUCCESS )
     	
write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 67108864  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 2146959360  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 2147418112  00:00:00    ( SUCCESS )
write 8.00 KiB of zeros at byte offset 2147475456  00:00:00    ( SUCCESS )
flush operating system cache of /dev/sda  00:00:00    ( SUCCESS )
set partition type on /dev/sda5  00:00:01    ( SUCCESS )
     	
new partition type: ext4
create new ext4 file system  00:00:00    ( ERROR )
     	
mkfs.ext4 -F -L "" /dev/sda5  00:00:00    ( ERROR )
     	
mke2fs 1.42.13 (17-May-2015)
The file /dev/sda5 does not exist and no size was specified.

========================================
Gramercy...
 
1 members found this post helpful.
Old 08-01-2016, 06:17 AM   #11
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Quote:
Originally Posted by americast View Post
Edit: When starting gparted, I am getting this message: "The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes." I had chosen to "Ignore" it.
Don't know if it's relevant, but I see this error when I try to create some free space on a flash drive onto which I've dd'd a live Linux iso
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext4 partition free space wrongly reported by df -h (ubuntu 14.04 64bit) trancephorm Linux - Software 16 01-16-2018 10:27 PM
Map allocated space from Storage device to existing partition jkdholakiya Linux - Newbie 5 02-18-2015 06:08 PM
[SOLVED] unable to create partition in unallocated space adityavpratap Linux - Hardware 3 07-05-2011 03:31 AM
[SOLVED] Space available on ext4 partition jbcoats Linux - General 2 05-15-2010 03:27 AM
ext4 vs ntfs partition space used jithin1987 Linux - Newbie 1 11-04-2009 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration