[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: uswsusp not detecting swap during Debian testing install



On Thu, Jul 12, 2007 at 11:41:07AM -0500, Sebastian P.Luque wrote:
> On Thu, 12 Jul 2007 12:25:04 -0400,
> lsorense@csclub.uwaterloo.ca (Lennart Sorensen) wrote:
> 
> [...]
> 
> > As long as swap is larger than ram, suspend should be OK with it.
> 
> > Of course it is imposible to have 4 primary partitions if you have any
> > logical partitions since the logical partitions all share a primary
> > slot.
> 
> I don't know much about partition types, so I tried to guess what was
> needed by googling and reading what I have in my desktop.  All I know is
> that swap needs to be logical, and the Debian installer automatically
> guessed that / and /home should be primary.  The ntfs partitions are, of
> course, the Vista partitions.

Swap can be primary too.  There isn't any requirement either way.  The
only real issue is that the partition with the boot files has to be
primary, nothing else matters.

> > Is /home by any change logical too?  If not, you probably don't have a
> > swap partition since there was nowhere to put it.  There is of course no
> > reason /home should be a primary partition anyhow.
> 
> Why is there no reason for that?  Anything wrong with setting it primary?
> 
> At any rate, there were only about 3 more steps to take during Debian
> installation, and although I couldn't read the questions (screen garbled
> as described), I just hit RET to accept the defaults.  That seemed to get
> me through installation, and even installing GRUB to MBR and recognizing
> the Vista OS!  I can boot into any of them without problems now.  It was
> hard to find anything related to the problem with uswsusp, but someone
> (http://linux.dobeyracing.net/how_to/toshiba_p200_laptop/Linux_on_Toshiba_Satellite_P200.php)
> found the problem got solved with kernel 2.6.21 (Debian testing DVD comes
> with 2.6.18), so I'm going to try that.

The way the partition table works on PCs is that there is room for 4
entries.  Those are your 4 primary partitions.  That's it.  No more
bytes left for partition entries.  To get around this, logical
partitions were invented, which use a special primary partition called
an extended partition.  This special partition contains another
partition table at the start with room for 4 more primary partitions.
In the extended partition you make a primary partition for your logical
drive, and if you need more, you make another primary partition
containing an extended entry.  The extended entry then has another
partition table at the start where you put another primary partition for
your second logical partition, and you just keep repeating for all yoru
logical drives.

This means one primary entry is required in order to support any number
of logical partitions.  So you can have either 4 primary partitions and
0 logical, or you can have 3 primary + 1 one extended + any number of
logical partitions.

The extended partition should be automaticaly crated by the partition
tool when you create logical partitions.

Since all the logical partitions share a single extended partition
entry, all your logical partitions must to contiguous on the disk (you
can have another primary partition in the middle of your logical
partitions).

For example at boot the kernel detects one of my drives like this:

hdi: hdi1 hdi2 hdi3 < hdi5 hdi6 hdi7 > hdi4

That means hdi1 is primary, hdi2 is primary, hdi3 is extended and
contains hdi5, hdi6 and hdi7, and then hdi4 is primary.

It looks like this:

# fdisk -l /dev/hdi

Disk /dev/hdi: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdi1   *           1       29065    14648728+   7  HPFS/NTFS
/dev/hdi2           60946       80788    10000462+  83  Linux
/dev/hdi3           80788      158816    39326521+   5  Extended
/dev/hdi4           38754       60945    11184768   83  Linux
/dev/hdi5           80788       82764      995998+  82  Linux swap / Solaris
/dev/hdi6           82764      102144     9767488+  83  Linux
/dev/hdi7          102145      158816    28562656+  83  Linux

So since you have two primary partitions with NTFS, then you have 2 left,
so you make one be your root filesystem, the other extended with the
logical partitions for /home and swap inside.  Or you could make one be
the root filesystem, and the other a LVM volume, and then make swap and
/home inside LVM (which is what I tend to do).  LVM allows resizing and
conbining multiple drives later one, which is pretty handy.

--
Len SOrensen



Reply to: