LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 02-09-2008, 05:13 PM   #1
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
How can I create extended partition without GParted?


Please don't ask me why I wanna do this,thanks for any help!
 
Old 02-09-2008, 05:22 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Easy.

Try fdisk, available virtually in every Linux.

You can do it with cfdisk too but it doesn't have a facility to create one. However the first logical partition created the next primary partition slot, first one of sda1 to sda4 or hda1 to hda4 that has not been used, will be converted to the "extended partition". It is far better for the understanding of how an extended partition works.

Extended partition has no usable storage of its own. Users only store data in logical partitions. The extended partition is just a "border" defining the first sector of the first logical partition and the last sector of the last logical partition.

If you use terminal partitioning tools you can understand better how partitioning works. Gaparted actually does formatting in the same process so it complicates the matter.

Last edited by saikee; 02-09-2008 at 05:24 PM.
 
Old 02-09-2008, 05:22 PM   #3
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Ubuntu Slackware
Posts: 1,028

Rep: Reputation: 42
Have you looked at cfdisk?

edit: beaten
 
Old 02-09-2008, 05:49 PM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
The reason I am doing this is because I have 4 primary partitions,and I want to be able to boot some more OS-s,and the only way to do this is(I guess) by creating extended partition under primary partition.I don't have fdisk or cfdisk installed.I was looking for a way to do this from a CLI without any program,just simply by entering commands,can I do this?

Last edited by alan_ri; 02-10-2008 at 07:05 AM. Reason: (I guess)-forgat to say that
 
Old 02-09-2008, 05:54 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
No.
[c]fdisk is the command.

Wouldn't help anyway - the extended has to be one of the 4 base (primary) partitions. You'll have to delete (at least) one of your current partitions to get anywhere.
 
Old 02-09-2008, 05:59 PM   #6
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Ubuntu Slackware
Posts: 1,028

Rep: Reputation: 42
How do you know that they are not installed? They usually are!! Have you tried ~>cfdisk {insert disk here} ??
 
Old 02-09-2008, 06:08 PM   #7
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
Thanks for the explanation syg00,I never used it so I did't know if it is program or command,but I remember when installing some OS it prompted me with that if I wan't to boot it I had to make extended partition under primary one,but did't suggested that I have to delete primary partition(there was 4 of them),and I don't wanna do that if it's possible.
 
Old 02-09-2008, 06:11 PM   #8
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
esteeven:command not found
 
Old 02-09-2008, 06:47 PM   #9
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Alan

How are you becoming root and trying to find fdisk? If you use su you have to use su - in order to get the path. I have never seen a distro that did not include fdisk as part of the standard install.
 
Old 02-09-2008, 07:51 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
Doesn't need root, just need the proper pathing - Fedora do stupid things like that. Should work as "/sbin/fdisk ...".

There are commercial (Windoze) products (Partition Magic I would guess) that can convert one of your primaries to an extended. To do it manually you really need to back the data up and delete, allocate as extended (or logical if using cfdisk) and bring the data back. Parition number will change - can cause grief depending on your setup.
Also there can be issues of broken areas of free space being inaccessable - but that is no more likely than your present arrangement.
 
Old 02-09-2008, 08:42 PM   #11
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
sysg00

You are right about just needing the path. I would argue that it is not stupid. Do you really want just any user to be able to run fdisk?
 
Old 02-09-2008, 09:20 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
<rant>
Anybody can run "/sbin/<command-name> ..."
Security by obscurity ??? - nah, that's stoopid.

Ubuntu are equally (more) ludicrous - "fdisk -l" returns nothing; no message, nada.
"fdisk /dev/sda" gets "Unable to open /dev/sda". That at least hints at the solution - you need to use sudo.
Everybody (on standard install) probably has access to everything via sudo.

Bloody ridiculous.
</rant>
 
Old 02-09-2008, 09:37 PM   #13
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
And how is that different from everyone having access to everything using su -? If anything, sudo is the more flexible solution. The administrator can set up access to all, some or none of the potentially dangerous commands - and do that in a matter of seconds.
Also, security through obscurity is more helpful than you seem to think. Few administrators, regardless of OS, would fancy giving away what is installed or not. Sure, obscurity alone won't cut it but it is part of a good security policy.
 
Old 02-09-2008, 10:37 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
We can argue this elsewhere - not strictly relevant to this thread.
 
Old 02-10-2008, 06:51 AM   #15
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
It is here,now.Ok,my device is /dev/hda,and when I type: fdisk /dev/hda,this is what I get:

[root@localhost alan]# fdisk /dev/hda

The number of cylinders for this disk is set to 9729. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)

Unable to seek on /dev/hda

[root@localhost alan]#

Can you tell me what are the next steps to create that extended partition,or maybe I shouldn't,cause maybe I wan't be able to boot from there or will I?Also,why is there limitation with 4 primary partitions and what has to be done to have 10 OS on one HD?

Last edited by alan_ri; 02-10-2008 at 08:18 AM. Reason: I had no script enabled
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Gparted for a new partition mcbenus Linux - Software 10 09-09-2007 09:37 PM
Can I create logical drive under Extended Partition? DataSheet Linux - Newbie 3 01-25-2007 01:39 AM
[SOLVED] Safety: Primary Partition and Extended (Logical) Partition MBA Whore Linux - Security 11 01-03-2007 03:05 PM
What is command to create logical drive in extended Partition ozy777ozy Fedora 1 09-08-2004 03:43 AM
Booting from an extended partition - need a partition table editor Ouch_Taser Linux - General 2 02-10-2004 07:22 PM


All times are GMT -5. The time now is 09:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration