LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 10-06-2011, 11:46 AM   #1
Micik
Member
 
Registered: Dec 2004
Distribution: Red hat linux 9
Posts: 189

Rep: Reputation: 16
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

Last edited by Micik; 10-06-2011 at 11:53 AM.
 
Old 10-06-2011, 12:17 PM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by Micik View Post
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
 
Old 10-06-2011, 01:55 PM   #3
Micik
Member
 
Registered: Dec 2004
Distribution: Red hat linux 9
Posts: 189

Original Poster
Rep: Reputation: 16
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.
 
Old 10-06-2011, 02:14 PM   #4
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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.
 
Old 10-06-2011, 02:23 PM   #5
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
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.
 
Old 02-15-2013, 06:00 AM   #6
sedsed
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by Micik View Post
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

Last edited by sedsed; 02-15-2013 at 06:02 AM.
 
Old 02-15-2013, 06:39 AM   #7
sedsed
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
http://i50.tinypic.com/2nkt9fq.png

thats the situation
 
Old 02-15-2013, 07:55 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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?
 
1 members found this post helpful.
Old 02-15-2013, 03:35 PM   #9
sedsed
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
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
 
Old 02-15-2013, 04:02 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
1 members found this post helpful.
Old 02-16-2013, 04:23 AM   #11
sedsed
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
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?
 
Old 02-16-2013, 01:03 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Actually, you just want to copy the contents of the /home partition to the /home directory. So how full is your /home partition?
 
Old 02-16-2013, 02:21 PM   #13
sedsed
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
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.
 
Old 02-16-2013, 02:55 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
1 members found this post helpful.
Old 02-16-2013, 02:59 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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.
 
  


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
Can an existing suse 10.0 hard drive partition be re-sized? sirius57 Linux - General 5 02-10-2008 04:22 PM
How to partition hard drive to install SuSE ngjunkie0011 SUSE / openSUSE 13 03-16-2007 11:41 PM
Need help on New SuSE install and hard drive partition / initialization. DocPCPlus SUSE / openSUSE 1 04-06-2006 01:37 AM
How do I partition my hard drive with Suse 9.0? SILVERPENGUIN SUSE / openSUSE 3 02-21-2005 03:39 PM
SuSe Hard Drive Partition Help... Cliekid Linux - Distributions 3 05-14-2004 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:02 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