Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2002 19:36:52 +0200
From:      "Siegbert Baude" <Siegbert.Baude@gmx.de>
To:        <justsovanilla@yahoo.co.in>
Cc:        <freebsd-questions@freebsd.org>
Subject:   Re: Installing on a logical DOS partition
Message-ID:  <001601c2326f$88330980$406a3c86@whwurm.uniulm.de>
References:  <1027437286.70211ffcjud@myrealbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Piyusch,

Piyush wrote:
> The program shows the primary dos partition and extended dos partition
but
> not any logical partitions under the extended partition......the
logical
> partition on which I wish to install Fbsd is the last one.......if I
delete
> a 'slice' of a particular size will fbsd delete any other partitions?

Jud wrote:
> The second alternative might work if you have Linux
> handy and it groks Windows logical and extended
> partitions (I don't know anything about Linux).  Try
> deleting the DOS partition, changing it to a
> Linux partition, and see if FreeBSD understands it.
> If it does, install there.

This way will work, but be very careful, you are operating on the heart
of your hard disk management.
So if you have any precious data on this disk: Backup first, make sure
you can retrieve your data from these backups!

So then in Linux call your fdisk like:

fdisk /dev/hda

change the display of the units with the "u" command as it is easier to
handle LBA block numbers than CHS numbers. Type "p" and write down all
the numbers. This will enable you to restore the state of your hard
disk, if anything goes wrong. Changing the MBR doesn`t actually destroy
your data, but can make it impossilbe to access it anymore. If you
exactly restore the information you just wrote down, it is possible to
regain access.

You were lucky so far, as the partition you want to use is the last in
your extended partition. This makes it easy to reduce the size of the
extended partition and reuse the gained space for a primary partition.

So if your layout is for example like:

primary partition 1: LBA 1 - LBA 10000
extended partition: LBA 10000 - LBA 40000
logical partition 1: LBA 10000- LBA 20000
logical partition 2: LBA 20000- LBA 30000
logical partition 3: LBA 30000- LBA 40000

Maybe the beginning of logical partition 1 is actually on 10001 (one
block needed to write the EMBR), but this is not important. Just use the
numbers as you have them now.


Now you want to use logical partition 2 then you have to get to the
following layout:

primary partition 1: LBA 1 - LBA 10000
extended partition: LBA 10000 - LBA 30000
logical partition 1: LBA 10000- LBA 20000
logical partition 2: LBA 20000- LBA 30000
primary partition 2: LBA 30000- LBA 40000

You get the idea?

So the first thing is to delete logical partition 3 (Linux fdisk would
probably show this as partition 7). Then you have to resize the extended
partition, i.e. adjusting the end block from 40000 to 30000. I don't
know, if Linux fdisk will allow this directly or if you have to delete
all the logical and extended partitions first and then recreate them
with the correct numbers. Just try, there will be no harm, if you just
quit the fdisk with "q". Only if you hit "w" the changes are actually
written to disk!
If you have the correct values for the extended partition and logical
partition 1 and 2 create a new primary partition 2 with "n" and give it
all the available space you just freed by deleting logical partition 3.
To be sure you can change the type to FreeBSD, but I believe FreeBSD
sysinstall will recognize the primary partition independent of its type.
So it should be possible to install FreeBSD there now.

If what I wrote is not clear to you, ask first before dong dumb things.
Maybe this is a good time to pay your local guru a beer to accompany
your steps. :-)

BTW, it is possible to use logical partitions  as FreeBSD mount devices,
but you have to do all the magic by hand, as the tools don`t support
this.

And final note: In FreeBSD DOS/Linux partitions are called slices. Such
a slice is then separated into FreeBSD partitions (no DOS/Linux
equivalent exists) with sysinstall. FreeBSD partition c is the complete
disk, a ist the partition which contains the / mount point, b is swap
space. So you can use d and up for /var, /usr, ... mount points, if you
want.

Ciao
Siegbert


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001601c2326f$88330980$406a3c86>