4 primary disk partitions; none spare to extend, what to do
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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)
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.