Partition question

I’m currently trying to add OpenSUSE to my Laptop which already has Vista Ultimate installed, hoping I will end up with a dual boot system. :slight_smile:

Currently, my HD is divided into four partition: Vista Ultimate with Bitlocker enabled needs two partitions - one for the unencrypted boot files, and one for the rest of the system. Then I have an unencrypted partition for data that I don’t want encrypted, and finally the partition in which I plan to install Linux.

I have already installed OpenSUSE to that fourth partition, and it worked just fine. But now, I’d like to reinstall with LVM, so that I can use encryption as well. Upon installation, however, I get the following error:

Error
Failure occurred during following action:
Creating volume group system from
System error code was: -4004

I’m wondering if this is because I’m running out of (primary?) partitions? Seems like LVM, just like Vista Ultimate, needs two partitions, one for the boot files and one for the rest of the system. I’ve read something about a PC drive only being able to hold four partitions, so I’m wondering if I need to get rid of that extra unencrypted partition I have in order to get OpenSUSE with LVM installed. Or am I barking up the wrong tree?

Thanks!

Hi,

a normal PC can only handle four primary partitions.

So what you should do is to create an extended partition in that last primary partition you have, and create logical volumes in that extended partition.

HTH
Lenwolf

@SusiM
we could do with seeing a fdisk -l output or a screenshot of your disk in gparted

Have a look at this
Install openSUSE alongside Win7/Vista - A Guide

SusiM wrote:
> I have already installed OpenSUSE to that fourth partition, and it
> worked just fine. But now, I’d like to reinstall with LVM, so that I can
> use encryption as well.

I would suggest that you keep two partitions for opensuse, one for the
root filesystem and another one for LVM. It is possible to use a root
filesystem in an LV but doing so makes for interesting extra
dependencies and possible bug interactions, so keeping root outside the
LVM makes life simpler, IMHO.

As others have said, this will involve creating an extended partition.

Cheers, Dave

Like caf4926 I am very interested in yourfdisk l ouput, because

I have already installed OpenSUSE to that fourth partition, and it worked just fine.

can’t be true. You need at least two partitions to install Linux except in the very rare case where you have no Swap partition.

On 2011-02-07 19:36, hcvv wrote:
>
> Like caf4926 I am very interested in yourfdisk l ouput, because
>> I have already installed OpenSUSE to that fourth partition, and it
>> worked just fine.
> can’t be true. You need at least two partitions to install Linux except
> in the very rare case where you have no Swap partition.

which makes for just one partition :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-02-07 14:36, SusiM wrote:

> Code:
> --------------------
> Error
> Failure occurred during following action:
> Creating volume group system from
> System error code was: -4004
> --------------------

I’ve no idea about that one, sorry.

> partitions? Seems like LVM, just like Vista Ultimate, needs two
> partitions, one for the boot files and one for the rest of the system.

At least, yes.

> I’ve read something about a PC drive only being able to hold four
> partitions,

Yes and no. You are limited to four primaries, but if you make one of them
“extended”, this one can contain an unlimited number of logical partitions.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Are you sure about “unlimited number of logical partitions” (on linux)? I thought there was a limit in practice (15/16?) for sata drives but higher for IDE connected pata drives, or something like that. Please correct me if I remembered that wrongly. :slight_smile:

Linux has a 15 partitions limit on a sata drive, but I’m not sure if that includes the 3 primary partitions or its just for logical partitions. I think the limit is 60 logical partitions on an IDE connected drive.

On 2011-02-08 00:36, consused wrote:
>
> robin_listas;2287535 Wrote:
>>
>> Yes and no. You are limited to four primaries, but if you make one of them
>> “extended”, this one can contain an unlimited number of logical
>> partitions.
>>
> Are you sure about “unlimited number of logical partitions” (on linux)?

Yes, I am :slight_smile:

> I thought there was a limit in practice (15/16?) for sata drives but
> higher for IDE connected pata drives, or something like that. Please
> correct me if I remembered that wrongly. :slight_smile:

The word is “there was”. But there isn’t :wink:

The current limit is in the thousands, if there is a limit. The nodes are
assigned dynamically a number, but the number itself is not significant.
The previous limit was because the number had to be a byte.
Did you understand anything? :slight_smile:
I may have somewhere the email where the dev explained the new idea.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Not really, since a byte (hex FF) provides for 256 different values (0-255), but I’m probably missing something. Assuming the new limits are now implemented and not still an “idea” :), these were the old limits I referred to:

Linux has a 15 partitions limit on a sata drive, but I’m not sure if that includes the 3 primary partitions or its just for logical partitions. I think the limit is 60 logical partitions on an IDE connected drive.

Sata and pata (IDE) had different limits, I guess due to different geometry, but the same byte limitation?

Anyway it’s good the old limits are no longer. Do you know roughly when the change took place?

Since the kernel uses the libata driver for SATA and PATA disks. … starting with 2.6.21 (?) - don’t remember exactly.

Hmm, IIRC it was the libata driver that introduced the regressive 15 limit for scsi disks (hence sata), and sda naming applied to both sata and pata (around oS 10.3?). Anyway, I never needed to test that limit here :D. I guess it quietly and appropriately disappeared sometime during the 11.x series.

One should see the difference between the possibilities that MS-DOS partitioning had originaly (4 partitions) and the solution to that (also made long ago), by giving one of those four a special type (0F) and name (extended) and contents. This contents is the start of a chain of addresses on disk that each describe a partition (called “logical”) and a possible a next address in the chain. Now it looks as if such a chain could go on forever, offering am unlimited number of logical partitions. Ut there are limits in the space reserved for those disk addresses and maybe more.

But another limit lies in the software that interpretes this. And it is here that Linux kernel versions and the type of connection are important. In general I think that the number of partitions is enough in day to day practise, even with todays large disks. Those who want more then say 100 partitions on a disk will have organisational problems in any case lol!

This is where some looking at the partitioning schema itself may say: there is no limit. While others looking at what a specific piece of sofware (Kernel) can do with this will talk about limitations.

Yes, I guess you’re right. For a while this limitation applied to IDE disks too - depending on the driver you were using since both were available. At some point, later, they removed this limitation - which is a good think I guess (allowing me to mount my Unix slices again).

Henk, that’s a neat summary and conclusion. :slight_smile:

Brain saved from entering suspend/hibernate. :smiley:

On 2011-02-08 05:06, consused wrote:
>
> robin_listas;2287567 Wrote:
>>
>> The previous limit was because the number had to be a byte.
>> Did you understand anything? :slight_smile:

> Not really, since a byte (hex FF) provides for 256 different values
> (0-255), but I’m probably missing something.

I’ll explain.

> Assuming the new limits are
> now implemented and not still an “idea” :), these were the old limits I
> referred to:
>> Linux has a 15 partitions limit on a sata drive, but I’m not sure if
>> that includes the 3 primary partitions or its just for logical
>> partitions. I think the limit is 60 logical partitions on an IDE
>> connected drive.
> Sata and pata (IDE) had different limits, I guess due to different
> geometry, but the same byte limitation?

No, due to linux driver specifications.

The document is “/usr/src/linux/Documentation/devices.txt”. The device
nodes in "/dev/ have each a “major” number and a “minor” number - and both
are (were!) one byte in size:

cer@Telcontar:~> l /dev/sda*
brw-rw---- 1 root disk 8, 0 2011-01-29 22:15 /dev/sda
brw-rw---- 1 root disk 8, 1 2011-01-29 22:15 /dev/sda1
brw-rw---- 1 root disk 8, 10 2011-01-29 22:15 /dev/sda10
brw-rw---- 1 root disk 8, 11 2011-01-29 22:15 /dev/sda11
brw-rw---- 1 root disk 8, 12 2011-01-29 22:15 /dev/sda12
brw-rw---- 1 root disk 8, 2 2011-01-29 22:15 /dev/sda2
brw-rw---- 1 root disk 8, 3 2011-01-29 22:15 /dev/sda3
brw-rw---- 1 root disk 8, 4 2011-01-29 22:15 /dev/sda4
brw-rw---- 1 root disk 8, 5 2011-01-29 22:15 /dev/sda5
brw-rw---- 1 root disk 8, 6 2011-01-29 22:15 /dev/sda6
brw-rw---- 1 root disk 8, 7 2011-01-29 22:15 /dev/sda7
brw-rw---- 1 root disk 8, 8 2011-01-29 22:15 /dev/sda8
brw-rw---- 1 root disk 8, 9 2011-01-29 22:15 /dev/sda9

(In this computer I don’t have more than 15 partitions, so I can’t show
what happens)

And the definition is this:

8 block SCSI disk devices (0-15)
0 = /dev/sda First SCSI disk whole disk
16 = /dev/sdb Second SCSI disk whole disk
32 = /dev/sdc Third SCSI disk whole disk

240 = /dev/sdp Sixteenth SCSI disk whole disk

Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.

Se that the minor byte is used both to number disks and their partitions.
Only 4 bits are allocated for the partition, so we have 16 disks and
sixteen partitions for the major of “8”.

It is not a limitation of the driver, but a limitation of how the
major,minor numbers were originally defined many years ago. And the
definition was limited to use two bytes, because that was the kernel
definition. It was discussed to change to “word” instead, but it was not
accepted. In fact, from the posts i mention below, the change to “word” was
made, but not used (not used to have more device nodes, I mean).

> Anyway it’s good the old limits are no longer. Do you know roughly when
> the change took place?

On openSUSE 11.2. I’m unsure about 11.1, though.

+++·················
Date: Aug 2007
To: OS-en <opensuse@opensuse.org>
Subject: Re: [opensuse] opensuse-10,3beta2 on on64bit: IDE disk gets
recognised as /dev/sda
·················+±

In this mail a workaround was mentioned to allow for more than 16 partitions.

This other email explains the situation at that moment - I’ll copypaste:

+++·················
Date: Sat, 25 Aug 2007 23:48:21 -0400
From: Greg Freemyer <>
To: OS-en <opensuse@opensuse.org>

Libata being a part of scsi is considered a major shortcoming. The
plan according to the lkml-ide list is to eventually seperate it out
into its own infrastructure. Maybe use a /dev/diskX type of naming
convention.

If that is done they should be able to support more partitions again.

FYI: The core libata devels that I see on lkml-ide are:
Jeff Garzik - libata architect - Redhat employee
Tejun Heo - libata coder and extender - Novell employee
Alan Cox - libata/pata implementer - Redhat employee

In particular without Tejun Heo of Novell, the kernels sata support
would not have advanced much in the last couple years. Jeff just
doesn’t seem to have time to do much more than review the massive
amount of new code that Tejun produces. As an example 80% of Tejun’s
PMP code has still not been reviewed by Jeff and that was submitted a
couple months ago.

So if Novell is going to make a kernel push to support 16+ partitions
with libata it will likely be via getting Tejun to do the hard work of
turning libata into a full fledged subsystem under the overall
direction of Jeff Garzik.
·················+±

+++·················
Date: Tue, 12 Jan 2010 06:22:43 -0500
From: Felix Miata <>
To: opensuse@opensuse.org
Subject: Re: [opensuse] Maximum number of partitons

> What is the case with pre 10.3 systems? They use the old driver and see >
all IDE partitions, but how they handle SATA disks?

Until the 2.6.28 kernel, which means release of 11.2 with its 2.6.31,
SATA/SCSI/Firewire users were limited to 14 partitions with filesystems per HD.

>> However, in 11.2 you have again unlimited (AFAIK, really unlimited)
>> number
>> of partitions with scsi names, ie, the new library. This is new, and I
>> understand, pushed by suse/novell on the kernel :slight_smile:

Some other distros wanted upgraders to be forced to move to LVM if they
wanted more than 14 partitions/HD. Novell was in fact a proponent of a less
intrusive upgrade path, and instrumental in its implementation in libata.
·················+±

+++·················
Date: Tue, 12 Jan 2010 14:09:35 +0100 (CET)
From: Steffen Winterfeldt <@suse.de>
To: opensuse@opensuse.org
Subject: Re: [opensuse] Maximum number of partitions

On Tue, 12 Jan 2010, Felix Miata wrote:

> On 2010/01/12 11:19 (GMT+0100) Istvan Gabor composed:

>> 11.2 Reference guide says (Chapter 2.1.1): “The maximumnumber of logical
>> partitions is 15 on SCSI, SATA, and Firewire disks and 63 on (E)IDE
>> disks.”
>
> This part of the doc didn’t get the update it needed. 11.2 has a 2.6.31
> kernel. The post 11.1/2.6.27 kernels lifted the libata (necessary for SCSI,
> SATA, Firewire) restriction from 15 to (AFAIK) 63.

There is no longer a partition limit. It’s really unlimited (for most
practical purposes) now. E.g. on my test disk I have:

brw-rw---- 1 root disk 259, 301 Jan 12 14:50 /dev/sda204

Partitions just get free minor numbers assigned dynamically.
·················+±

Related bugzillas: 309070, 305095, 218122, maybe more.

But I did not locate where the work of Tejun Heo was explained. As you see,
it is pretty recent.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

:good::good: @robin_listas.

It shows how old decisions at all sorts of places can become a limit in a then unforseen future (like the “who would ever need more then four partitions” in the original DOS schema).

On 2011-02-08 22:06, hcvv wrote:
>
> :good::good: @robin_listas.
>
> It shows how old decisions at all sorts of places can become a limit in
> a then unforseen future (like the “who would ever need more then four
> partitions” in the original DOS schema).

Or 640 KB is enough :slight_smile:

Those decisions were good at the time. Later it can be seen the mistake,
but at the time it was simply not known what later would happen.

Or simply it was not possible to decide differently: memory was scarce
(expensive), so software had to use it sparely and wisely.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

hcvv wrote:

> But another limit lies in the software that interpretes this. And it is
> here that Linux kernel versions and the type of connection are
> important. In general I think that the number of partitions is enough in
> day to day practise, even with todays large disks. Those who want more
> then say 100 partitions on a disk will have organisational problems in
> any case lol!

I agree - but there is a potential case that makes this a useful option:
many users on a common server. Here, having a plethora of partitions would
make user security a little simpler at the price of more complex admin,
especially with encrypted partitions.

That’s a special case but flexibility is the goal, isn’t it?


Will Honea