Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 1998 16:04:56 +1100
From:      "John Saunders" <john.saunders@scitec.com.au>
To:        "FreeBSD current" <freebsd-current@FreeBSD.ORG>
Subject:   RE: Booting 3.0-RELEASE in a non-standard setup
Message-ID:  <002901be219f$21d16400$6cb611cb@saruman.scitec.com.au>
In-Reply-To: <199812030958.LAA14987@ceia.nordier.com>

next in thread | previous in thread | raw e-mail | index | archive | help
FYI (Information obtained from this weekends hacking)

It is possible to have FreeBSD 2.2.x and 3.x co-existing on
the same disk in different partitions. What makes this possible
is the new boot blocks by Robert Nordier. You also need to make
certain that the 2.2.x partition comes first in the partition
table (although I don't think it need come first on the disk).

So how is it done?

Case 1:

You have FreeBSD 2.2.x on your wd0 drive in the s1 slice and
you have a spare partition (s2 slice) for 3.0.

Simply boot off the CDROM (or floppies) and do a normal install
proceedure. You will note when you get to the disklabel editor
that the 2.2.x (s1 slice) partitions are listed, do not touch
these. At this stage you may decide not to create swap space for
3.0 and let the 2.2.x swap space get used by both systems.
Otherwise you can create a swap partition inside your s2 slice.

Reboot your system into 2.2.x and mount the root 3.0 filesystem
(wd0s2a) on /mnt then do "disklabel -B -b /mnt/boot/boot1 -s
/mnt/boot/boot2 wd0s2" to upgrade to the new boot blocks. Edit
the /mnt/etc/fstab file to fix up the swap entries (if you are
sharing swap space then no need to fix anything).

Reboot your system and then using BootEasy press F2 and hopefully
3.0-RELEASE will boot up.

Case 2:

You have FreeBSD 2.2.x on your wd2 (second) drive in the s1
slice and you have a spare partition (s2 slice) for 3.0.

Simply boot off the CDROM (or floppies) and do a normal install
proceedure. You will note when you get to the disklabel editor
that the 2.2.x (s1 slice) partitions are listed, do not touch
these. At this stage you may decide not to create swap space for
3.0 and let the 2.2.x swap space get used by both systems.
Otherwise you can create a swap partition inside your s2 slice.

Reboot your system into 2.2.x and mount the root 3.0 filesystem
(wd2s2a) on /mnt then do "disklabel -B -b /mnt/boot/boot1 -s
/mnt/boot/boot2 wd2s2" to upgrade to the new boot blocks. Edit
the /mnt/etc/fstab file to fix up the swap entries (if you are
sharing swap space then no need to fix anything). Also edit the
/mnt/boot.config and add a single line with "1:wd(2,2,a)kernel"
but don't include the " characters.

Reboot your system and then using BootEasy press F5 to switch to
the second drive then F2 and hopefully 3.0-RELEASE will boot up.

Sharing swap:

Sysinstall notices that the slice used for 2.2.x has a swap
partition and happily adds this to the /etc/fstab file. If you
create swap space in your 3.0 slice then sysinstall will add
both the 2.2.x swap space and the 3.0 swap space to your
/etc/fstab file. If you don't create any in the 3.0 slice
then only the 2.2.x swap space is added to /etc/fstab.

Boot Blocks:

The default boot blocks installed with 3.0 will only start
2.2.x. So no matter what function key you press, 2.2.x will
get started.

The new boot blocks can be written by the disklabel program
with 2.2.x. disklabel -B -b boot1 -s boot2 <drive:slice>

The new boot blocks load the /boot.config file which
specifies the information needed to load the kernel from
the correct slice and mount the correct root filesystem.
It appears to be impossible to specify this information in
any way other than editing the file from another running
system. The old boot blocks allowed you to enter this
from the command line. We probably need a ctrl sequence
to escape into a command line for this.

If you press any key the /boot/loader file will be started
and it won't work properly in the case where the BIOS
drive number doesn't match the wd drive number. So never
press a key, let the boot block load the kernel directly.

Cheers.
--   .   +-------------------------------------------------------+
 ,--_|\  | John Saunders    mailto:John.Saunders@scitec.com.au   |
/  Oz  \ | SCITEC LIMITED   Phone +61294289563  Fax +61294289933 |
\_,--\_/ | "By the time you make ends meet, they move the ends." |
      v  +-------------------------------------------------------+


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002901be219f$21d16400$6cb611cb>