LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   partition hard drive (sda) in suse linux 11 (https://www.linuxquestions.org/questions/suse-opensuse-60/partition-hard-drive-sda-in-suse-linux-11-a-906769/)

Micik 10-06-2011 11:46 AM

partition hard drive (sda) in suse linux 11
 
Hello to all,
I have a problem when trying to repartition my hard drive in suse linux 11. I have bought HP laptop that came with suse linux 11 preinstalled. Now, I don't want to remove linux and want to make dual boot with Win 7.

First step is to allocate enough fre space for Windows, but here I found an obstacle. When trying to resize the biggest partition in yast I receive an error saying that extended partition cannot be resized.
My hard drive has /devsda1 to /dev/sda6. The biggest is /dev/sda4 (Extended) and is 300 GB large.
How to shrink that partition to 200 GB and leave 100 GB unallocated space for Windows?
One thing that is strange to me is that /dev/sda6 is almost the same saze as /dev/sda4. sda6 is linux native. Should I resize sda6?

What exactly is extended partition, I'm really confused.

Thanks

Doc CPU 10-06-2011 12:17 PM

Hi there,

Quote:

Originally Posted by Micik (Post 4491683)
My hard drive has /devsda1 to /dev/sda6. The biggest is /dev/sda4 (Extended) and is 300 GB large.
How to shrink that partition to 200 GB and leave 100 GB unallocated space for Windows?
One thing that is strange to me is that /dev/sda6 is almost the same saze as /dev/sda4. sda6 is linux native. Should I resize sda6?

What exactly is extended partition, I'm really confused.

first of all it seems that you have an awful lot of partitions. What for? Or more to the point, what are they used for? I don't know yast (that is, no more than hearsay), but its partition editor should not only list the device name (sda1, sda2, and so on) and size of each partition, but also the type (that's what you gave as "linux native", I guess) and mount points, that is, they directory that they represent in the file system (Like /boot, for example).

Anyway, the traditional PC design allowed for only four partitions on one hard disk. That proved sufficient even in the stone age, when DOS was the major operating system. That's why the PC guys invented a clever extension, which was the "Extended Partition". An extended partition is some sort of container. It occupies only one of the four slots in the partition table, but can contain any number of so-called logical partitions.

In your setup, sda4 is probably an extended partition that contains sda5 and sda6. And that means that if you want to shrink sda4 (the container), you first have to shrink its contents to get "mpty" space - like the big sda6, for instance.

But I'm still curious about your sophisticated partition layout. Would you mind posting what the partition editor shows?

[X] Doc CPU

Micik 10-06-2011 01:55 PM

I don't really know why such huge number of partitions. It just came preinstalled. I ave figured it out that I can only shring and resize partition /dev/sda6 (and that /sda4 was not a real but extended partition. This partiion had exactly the same size of sd5+sda6). Other partitions were for win-lin exchange (FAT), one for recovery and for HP tools.

Anyway I have created new partition of size 200 GB form sda6 and currently installing win7.
The next step would be to restore Grub loader to load win7 also, or to have dual boot options list.

Larry Webb 10-06-2011 02:14 PM

I would guess that you have one (linux) partition for /, one for swap, and one for home. forth partition would be extended and would house extension 5 and 6. If you add all the partitions above 4 should all equall the amount of 4.

SL00b 10-06-2011 02:23 PM

In SuSE, sda1 is the boot partition, sda2 is swap, and sda3 is root. Create an extended partition sda4 and add filesystems at sda5 and 6 for /home and /var, and there you are at six partitions. It's not a very large or complicated partitioning scheme by any stretch.

sedsed 02-15-2013 06:00 AM

Quote:

Originally Posted by Micik (Post 4491683)
Hello to all,
I have a problem when trying to repartition my hard drive in suse linux 11. I have bought HP laptop that came with suse linux 11 preinstalled. Now, I don't want to remove linux and want to make dual boot with Win 7.

First step is to allocate enough fre space for Windows, but here I found an obstacle. When trying to resize the biggest partition in yast I receive an error saying that extended partition cannot be resized.
My hard drive has /devsda1 to /dev/sda6. The biggest is /dev/sda4 (Extended) and is 300 GB large.
How to shrink that partition to 200 GB and leave 100 GB unallocated space for Windows?
One thing that is strange to me is that /dev/sda6 is almost the same saze as /dev/sda4. sda6 is linux native. Should I resize sda6?

What exactly is extended partition, I'm really confused.

Thanks

I have exactly the same problem, i know this post is old but i have to try.

So i have an extended partition on my HP laptop - sda4, its 673gb. In it there were 2 partitions : 1)sda5 11,45GB SWAP and sda6 - this one was 660gbm and i shrinked it to 60GB.
Now i have 600gb unallocated but it is still in sda4(the extended one). Now i cant resise sda 4 to make the unallocated part (600gb) come out of the extended one. Its suse linux 11.2 and the partitioner is YaST partitioner. It just says : Error, extended partition can not be resized
and even: Error, the extended partition can not be edited.
I have unmounted sda5 and sda6, but still the same problem.

Thank you

sedsed 02-15-2013 06:39 AM

http://i50.tinypic.com/2nkt9fq.png

thats the situation

michaelk 02-15-2013 07:55 AM

sedsed,
You can not use the unallocated space outside of the extended partition since you already have 4 primary partitions. Could you move the linux recovery partition to a new logical within the extended partition?

sedsed 02-15-2013 03:35 PM

The recovery partition was very handy , i am afraid i will mess up something with it (reason is: i tryed to isntall win7 few times and every time linux gets corrupt so i had to recover every time, and the recovery part works very well for linux, so i would liketo keep that that way. Im not sure, if i put it into the extended partition, will i be able to recover, will it show up as an option in the hp recovery boot menu.

Could i delete the whole extended partition and replace it with an Primary. On this primary, i could then (if im right) install windows 7 64 bit ultimate. (I hope WIN7 does not need 2 primary partitions).
But in this case i loose the SWAP partition(which is inside of the Extended). the question here would be, do i need the swap partiton? I have 6 gb of RAM.

YOur suggestion helped me alot to understand whats going on here, so any more suggestion will be much appreciated.

Thank you

michaelk 02-15-2013 04:02 PM

I do not know if you can move the recovery partition from a primary to a logical.

Since your /home partition is a logical partition you would need to move its contents to / before you could delete the extended partition. If you do not have enough free space in your / partition for /home then it becomes a lot more complicated.

sedsed 02-16-2013 04:23 AM

Quote:

Originally Posted by michaelk (Post 4892558)
I do not know if you can move the recovery partition from a primary to a logical.

Since your /home partition is a logical partition you would need to move its contents to / before you could delete the extended partition. If you do not have enough free space in your / partition for /home then it becomes a lot more complicated.

SDA1 has 9GB free space. Maybe i could shrink /home to something like 5 gb and put it in there. I dont have anything important in /home but i need comfort before manipulating with it. Maybe /home can be deleted ? Then i could delete the whole extended partition?

michaelk 02-16-2013 01:03 PM

Actually, you just want to copy the contents of the /home partition to the /home directory. So how full is your /home partition?

sedsed 02-16-2013 02:21 PM

in root's home are the mentioned 9gb free
in name's home, there are 57gb free

so the laptop is almost empty, its an clean installation.

michaelk 02-16-2013 02:55 PM

You would need to log in as root and unmount /home.
create a directory /mnt/oldhome
Mount your home partition to /mnt/oldhome
Now you can copy the contents of your home partition to the /home directory.
cd /mnt/oldhome
cp -rp * /home
To turn off swap:
swapoff /dev/sda5
Edit /etc/fstab to remove the lines for /home and swap.

Once you are comfortable that the contents of the home partition have been copied you can reboot the PC. If everything is working you can not safely delete the /home, swap and then the extended partition.

If you feel brave enough you could move the recovery partition and then resize / to give it some more space. You should boot from a live CD to resize the / partition.

yancek 02-16-2013 02:59 PM

Your image shows sda4 as an Extended Partition of 673GB holding sda5 (11GB) and sda6 (61GB). That leaves you with 600GB on sda4 in which to add a new partition. You don't edit it you click Add Partition at the bottom and create the new partition. I just booted an install of Opensuse and did this, worked fine.


All times are GMT -5. The time now is 04:15 PM.