home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Partition renumbering ??

Thus spake William Case (billlinux [ at ] rogers [ dot ] com) [10/06/08 11:03]:
: >    Device Boot      Start         End      Blocks   Id  System
: > /dev/sda1               1        1305    10482381   83  Linux
: > /dev/sda2            1306        1560     2048287+  82  Linux swap / Solaris
: > /dev/sda3   *        1561        1573      104422+  83  Linux
: > /dev/sda4            1574       60801   475748910    5  Extended
: > /dev/sda5            1574        2878    10482381   83  Linux
: > /dev/sda6            2879        2891      104391   83  Linux
: > /dev/sda7            2892        4196    10482381   83  Linux
: > /dev/sda8            4197        4209      104391   83  Linux
: > /dev/sda9            4210        5514    10482381   83  Linux
: > /dev/sda10           5515        5527      104391   83  Linux
: > /dev/sda11           5528       60801   443988373+  83  Linux
: > 
: 
: I get:
: 
: ]# fdisk -l
: [snip]
:    Device Boot      Start         End      Blocks   Id  System
: /dev/sda1   *           1        4089    32844861    c  W95 FAT32 (LBA)
: /dev/sda2            4090        4982     7173022+   f  W95 Ext'd (LBA)
: /dev/sda5            4090        4982     7172991   83  Linux
: 
: [snip]
:    Device Boot      Start         End      Blocks   Id  System
: /dev/sdb1               2        4998    40138402+   f  W95 Ext'd (LBA)
: /dev/sdb5   *           2          11       80293+  83  Linux
: /dev/sdb6              12         164     1228941   82  Linux swap /
: Solaris
: /dev/sdb7             165        1184     8193118+  83  Linux
: /dev/sdb8            1185        3723    20394486   83  Linux
: /dev/sdb9            3724        4998    10241406    b  W95 FAT32
: 
: I see on sda my linux backup partition /dev/sda5 is part of the
: extended /dev/sda2 and what you say about starting the linux partition
: on the fifth partition is true.  However, and I never noticed it before,
: sdb1 is a W95 Ext'd partition.  sdb is my "linux" drive with only sdb9
: formatted as FAT32.  sdb9 is my backup partition for WindowsXP on sda.
: 
: I don't (remember) know how it got there; but it has been set up that
: way for a while.  I am always screwing around so it doesn't surprise me.
: 
:      1. What effect could that have had on running my Linux system, if
:         any?

None whatsoever.

:      2. What effect might that have had on grub, if any?

None whatsoever.

:      3. What is the best way of fixing it?  Doing a completely fresh
:         installation (including repartitioning and formatting) of Fedora
:         9 after backing up sdb9? All the other partitions are backed up
:         to sda5.

To follow the adage, if it ain't broke...

As was explained previously, the standard partition table (this changes with
EFI / GPT partitioning) only permits four partitions.  What this means is
you can only have four mount points.  There's a funky way around this, and
that is essentially to have a partition created that encompasses the remainder
of the drive, and provide what are called an 'extended' partition.  Note that
after your extended partition -- sdb1 -- the next partition is sdb5.  Also note
that sdb1 actually encompasses your *entire* drive.

The wording "W95 Ext'd (LBA)" is just the partition type, and it's a way to
instruct the computer about how to read the partition.  It doesn't mean that
it's a Windows partition, it just means that it's hidden from some Operating
Systems, and can address the full size of your disk.  This page explains it
better than I can:

	<http://homepages.tesco.net/J.deBoynePollard/FGA/determining-filesystem-type.html>

Look down the page for 0x05 ('extended') and 0x0f ("W95 Ext'd (LBA)")
partition type differences.  Note that it doesn't address any size concerns
with 0x05 partitions; there may or may not be any.  An easy way to find out
is to boot off a LiveCD, change the partition type to 0x05, reboot your
machine, and see if it works.  (I suspect it won't, as 0x05 doesn't seem to
support LBA.)

As far as adjusting your partition table, I only have two recommendations:

1) Do it.  It's fun.  It's an excellent learning experience.  While you're
at it, you probably want to read up on the boot cycle.

1b) Back up your data first.  You *will* lose it.  You'll also learn that
'losing' it doesn't mean it's lost, but you should be prepared to lose it
all anyhow.

2) Try to keep the partitions ordered.  In other words, don't have partition
2 end at a cylinder boundary before the beginning of partition 1.  It's not
*likely* anything will break this way, but a heck of a lot of programs will
complain.  Including fdisk.

Personal notes, I hate extended partitions.  For no real technical reason.
There's nothing that breaks when you use them.  But it tells me that you're
likely subjecting yourself to too many partitions (though, having said that,
it's not uncommon for a Linux server to have /, /tmp, /var, /home, and /usr
-- if not /var/mail -- on their own partitions), and it just seems dirty.
GPT is nicer.  Personal preference, I guess.