LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   4 primary disk partitions; none spare to extend, what to do (https://www.linuxquestions.org/questions/general-10/4-primary-disk-partitions%3B-none-spare-to-extend-what-to-do-890379/)

jal 07-07-2011 02:45 AM

4 primary disk partitions; none spare to extend, what to do
 
Partitioning issue trying to get Ubuntu on my new HP Mini 110

Windows 7 comes installed. I want to install Ubuntu, dual boot. HP has partitioned the disk with 4 primary partitions (boot,user,recovery,hp_tools).

I shrunk the 'user' partition so getting enough unallocated disk space for the install.

When I try to create a new partition I am told that it is impossible to create more than 4 primary partitions, and that I need to create an extended partition.

It also say's I'll have to delete a primary before I can create an extended partition. Which I'd rather not.

Anyone have a work around for this dilemma?

business_kid 07-07-2011 03:52 AM

Yes. Been there. Back up first if you can at all. A windows backup stores the partition table.
/didn't back up eh? all bets are off.

post the partition table as shown in fdisk or the like. It always helps to have the numbers, and grab testdisk's static binary from their website. You will probably need it.

eSelix 07-07-2011 04:34 AM

I am afraid you have no choice. Backup all your data, delete one or more primary partitions and create new extended one. Then you can create more logical partitions on that. 4 primary partitions is the limitation of the old MSDOS partition format.

syg00 07-07-2011 04:44 AM

*** post deleted ***

Removed in case some-one read my musings, and thinks it might work. It didn't, and causes loss of data, so better the thought is now gone.

Arcane 07-07-2011 04:45 AM

You need either put one more HDD in system, install on USB, use as Live OS or do what above posters said. Here is good article about partitioning HDD you should read.

Diantre 07-07-2011 04:51 AM

Quote:

Originally Posted by jal (Post 4407555)
Anyone have a work around for this dilemma?

There is no workaround. This is a limitation of the PCs. You can have either 4 primary partitions or 3 primary and one extended partition. The extended partition can have several logical partitions.

As others suggest, one way is to make a backup and delete one your primary partitions, then create an extended partition.

Another possible solution to your problem is to add a second hard drive.

jal 07-07-2011 05:12 AM

Quote:

Originally Posted by business_kid (Post 4407600)
Yes. Been there. Back up first if you can at all. A windows backup stores the partition table.
/didn't back up eh? all bets are off.

post the partition table as shown in fdisk or the like. It always helps to have the numbers, and grab testdisk's static binary from their website. You will probably need it.

K.
I'll not bother about the backup, while taking your point, if it goes, too bad. Ubuntu 11.04 is running just fine off the usb, losing win partitions isn't grief. I just thought since I was extorted for them I should hang on to them.

link to testdisk - brilliant! Many many thanks for that. I shall have a play about come the weekend.


Code:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x3393fcb8

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          26      203776    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        6400    51200000    7  HPFS/NTFS
/dev/sda3          28247      30389    17201152    7  HPFS/NTFS
/dev/sda4          30389      30402      105656    c  W95 FAT32 (LBA)


SigTerm 07-07-2011 05:12 AM

Quote:

Originally Posted by jal (Post 4407555)
Anyone have a work around for this dilemma?

Sure. Buy extra HDD drive. ~80 GB HDD shouldn't be very expensive.

jal 07-07-2011 05:39 AM

All,
Thanks for the suggestions, I think the consensus is that it just isn't do-able. I'm up against a hard limit.

I can't put in another hard drive, which is probably the best solution, because it's a netbook without spare drive bays and external drives fail the "simple, light and portable++" requirement.

It comes down to:
- blow away a partition and install an extended
- blow away the lot and never mind

So be it. *poof* MicroSoft Windows get out of my face.

and again,
Thanks all.

p.s.
Arcane, your link on partitions, good one.

bryanl 07-07-2011 03:22 PM

There are several things you can do.

One is to create recovery DVD's in Windows. This copies the recovery partition to bootable DVD which means you then can re-use that partition for something else.

Another option is to copy the boot partition to your Windows partition and then re-use that partition. Check first as this is usually a rather small partition with only a few files used to boot Windows. If those files are on the Windows partition, they will still (usually in my experience) boot Windows.

Then there's the hp-tools partition which might be trashable depending upon your reliance on the super duper extras that came with your PC. check hp's website as they might have online versions.

Once you've got an entry in the partition table free, you can use gparted in the Ubuntu bootable CD to delete the partition and move the remaining partitions around, and resize them, for what you need. For the linux system, use a swapfile rather than a swap partition - there are directions around for this you can find via search. or you could just free up a partition, set up an extended partition to install root, swap, and home partitions for linux.

As noted above, this sort of thing is much more comfortable when done with good backups. You might want to look at clonezilla for a good way to back up your current drive to a usb storage device for this.

business_kid 07-08-2011 03:03 AM

Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          26      203776    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        6400    51200000    7  HPFS/NTFS
/dev/sda3          28247      30389    17201152    7  HPFS/NTFS
/dev/sda4          30389      30402      105656    c  W95 FAT32 (LBA)

So your free space is 6401-28246? Smack in the middle?

You have the option there to delete sda2, or sda3, and make an extended partition in place of them. Then you can type in the numbers again in fdisk, or find the lost partition with testdisk.

FYI, I am in a similar position with my 3 year old hp laptop. It runs linux 95%+ of the time. But others have borrowed it and run windows, and I have installed Garmin & National Instruments software on it for occasional use, as neither are wine friendly. It also switches on the wifi, which is an absolute pain to do in linux, if someone knocks the button off.

I lost boot capacity on my OS_Tools (or whatever disk it was that booted, but who cares? I have a backup of the original windows, and can just revert to that any time I like.

jal 07-08-2011 07:11 PM

Quote:

Originally Posted by jal (Post 4407555)
Partitioning issue trying to get Ubuntu on my new HP Mini 110

HP has partitioned the disk with 4 primary partitions (boot,user,recovery,hp_tools).

When I try to create a new partition I am told that it is impossible to create more than 4 primary partitions, and that I need to create an extended partition.

It also say's I'll have to delete a primary before I can create an extended partition. Which I'd rather not.

Anyone have a work around for this dilemma?


So... the answer is:

There is no work around, one of the primary partitions will have to be removed.
There are a couple of suggestion on how to save partitions and/or partition data before removing it.
My favourite is to plug in a usb dvd drive and create the recovery disks, then the recovery partition can go without loss.

Thank you all for your help and advice.

/dev/dog 01-11-2015 12:30 PM

Similar thread with significant consequences
 
I posted another thread about how I discovered an MBR drive with more than 4 partitions.

http://www.linuxquestions.org/questi...16#post5299216

rokytnji 01-11-2015 01:24 PM

http://www.linuxquestions.org/questi...ok-4175530023/

Diantre 01-11-2015 05:49 PM

Quote:

Originally Posted by /dev/dog (Post 5299218)
I posted another thread about how I discovered an MBR drive with more than 4 partitions.

A MBR partition table can only have 4 primary partitions (if one of the primary partitions is an extended partition, it would be able to hold inside more partitions). A GPT partition table can hold 128 partitions. My guess is that you have a GPT disk with a protective MBR.

Could you post the output of these commands? (replace sdX with the correct location of your disk)

Code:

# fdisk -l /dev/sdX
# gdisk -l /dev/sdX

For example, I have a BIOS computer with a 1TB hard disk, with a GPT partition table and a protective MBR. This is the output of the two commands above on my system:

Code:

# fdisk -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
256 heads, 63 sectors/track, 121126 cylinders, total 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
Disk identifier: 0x165d650c

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1  1953525167  976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Code:

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7FD10C1E-3B10-4720-A910-15C2C0997083
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size      Code  Name
  1            2048        8390655  4.0 GiB    8200  Linux swap
  2        8390656        8652799  128.0 MiB  8300  Linux filesystem
  3        8652800      142870527  64.0 GiB    8300  Linux filesystem
  4      142870528      679741439  256.0 GiB  8300  Linux filesystem
  5      679741440      1105463295  203.0 GiB  8300  Linux filesystem
  6      1105463296      1531185151  203.0 GiB  8300  Linux filesystem
  7      1531185152      1953525134  201.4 GiB  8300  Linux filesystem



All times are GMT -5. The time now is 01:04 AM.