From nobody@FreeBSD.ORG Fri Sep 24 11:01:57 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 5C46114D47; Fri, 24 Sep 1999 11:01:57 -0700 (PDT)
Message-Id: <19990924180157.5C46114D47@hub.freebsd.org>
Date: Fri, 24 Sep 1999 11:01:57 -0700 (PDT)
From: bigduppy@hotmail.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Not able to use NT boot loader to boot FreeBSD from certain partitions
X-Send-Pr-Version: www-1.0

>Number:         13934
>Category:       i386
>Synopsis:       Not able to use NT boot loader to boot FreeBSD from certain partitions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    grog
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 24 11:10:01 PDT 1999
>Closed-Date:    Fri Sep 24 17:36:58 PDT 1999
>Last-Modified:  Fri Sep 24 17:59:37 PDT 1999
>Originator:     Alan Searchwell
>Release:        Walnut Creek FreeBSD 3.2
>Organization:
Jamaica
>Environment:
Cyrix 586 CPU, SIS 80486 PCI chipset (2 IDE channels), Award BIOS
IDE channel 1, 1 Quantum 3.8GB HD LBA mode
IDE channel 2, 1 Quantum 2.5GB HD LBA mode, 1 Goldstar 8240B CD-ROM
Adaptec 2940 SCSI Controller w Panasonic 7502 CDR
SoundBlaster AWE64 sound card
Actiontec ISA V.90 Modem (DT56010) 
Diamond Stealth 3D 2000 4MB video card
Disk 0, Slice 1, 700MB, Dos 6.22
Disk 0, Slice 2, 1400MB, Linux Mandrake 6.0
Disk 0, Slice 3, 700+MB, unused
Disk 0, Slice 4, 900+MB, extended (130MB NTFS for swap file, balance DOS)

Disk 1, Slice 1, 700MB, Hopefully FreeBSD
Disk 1, Slice 2, 1000MB, NTFS (NT 4.0)
Disk 1, Slice 3, 130MB Linux Swap
Disk 1, Slice 4, 840+MB DOS
>Description:

I can install Linux or Windows NT anywhere on either HD as long as it
the partiion starts below a certain point. That point is somewhere
about 1000MB from the start of the drive.

I have been trying to install FreeBSD my PC, at first on Disk 0 above
DOS and Linux. In that configuration I could boot FreeBSD by marking
it's partition active but I could not seem to issue the equivalent dd
command to copy the boot sector to a file. The FAQ mentions the input
parameter "if=/dev/rsd0a". Is this a special device for the "root
sector" or something? I tried using "if=/dev/wd0s3" and
"if=/dev/wd0s3" and got a message "device busy".

I then reconfigured my second disk (Disk 1) to have 700MB unused and
then the NT partition so I could put FreeBSD on the first partition on
the second drive. I have not even beeen able to boot FreeBSD in that
configuration. I use the FreeBSD boot selector to select the second
disk for booting and then select FreeBSD from the second boot menu. I
now have to figure out how to get rid of the "Panic: cannot mount
root" message.

Would it be too dificult to modify the FreeBSD boot process to allow
the sort of flexibilty that Linux (and NT) have in order to facilitate
hobyists like me. I want to learn more about Unix (FreeBSD/Linux) and
do not have the resources to have each OS on it's own PC.

The booting feature in Linux that I like is the ability to use a boot
diskette and type in "vmlinuz root=/dev/hdXY" where X is the disk
letter (as in hda thru hdd) and Y is the slice number. Having booted I
can mount my DOS partition and use the DD to copy the boot sector to
my "bootsect.lnx" file. I have check the newsgroups, FAQs and did a
search engine search and it seems a couple other people have had this
problem. The most succesful solution seems to be to use the free OS BS
(OS boot selector) program.

>How-To-Repeat:

>Fix:

Create a boot floppy system that can pass control to the boot sector
of any slice in order to boot FreeBSD. Make sure that however control
is passsed to the boot sector code, it will reliably boot the
system. Linux is all open source so I don't expect that the wheel will
have to be re-invented here. I would attempt it myself but I'm not a C
programmer yet (self taught VB programmer).

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: grog 
State-Changed-When: Fri Sep 24 17:36:58 PDT 1999 
State-Changed-Why:  
Configuration question, not a bug.  Question answered. 


Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: grog 
Responsible-Changed-When: Fri Sep 24 17:36:58 PDT 1999 
Responsible-Changed-Why:  
grog closed this PR. 
>Unformatted:

Greg Lehey, 25 September 1999

	Corrected gross format breakage.  Please don't make lines more
	than 75 characters long unless they are quotes of machine
	output.

	I'm not sure why you want to use dd to copy bootstraps; this
	is done automatically by the installation.  I'm not sure what
	you're referring to in the FAQ, but /dev/rsd0a (now
	/dev/rda0a) is the raw device for the root file system on the
	first drive.  I don't understand what you want to do, since
	you say you could boot FreeBSD.

	The second problem ("panic: cannot mount root") is dealt with
	in the FAQ:

	2.25 I get a ``panic: cant mount root'' error when rebooting the
	system after installation.
	
	This error comes from confusion between the boot block's and
	the kernel's understanding of the disk devices.  The error
	usually manifests on two-disk IDE systems, with the hard disks
	arranged as the master or single device on sepa- rate IDE
	controllers, with FreeBSD installed on the secondary IDE
	controller.  The boot blocks think the system is installed on
	wd1 (the second BIOS disk) while the kernel assigns the first
	disk on the secondary controller device wd2.  After the device
	probing, the kernel tries to mount what the boot blocks think
	is the boot disk, wd1, while it is really wd2, and fails.
	
	To fix the problem, do one of the following:
	
	  1.  At the Boot: prompt, enter 1:wd(2,a)kernel and press
	      Enter. If the system starts, then run the command
	
	         echo "1:wd(2,a)kernel" > /boot.config
	
	
	      to make it the default boot string.
	
	  2.  Move the FreeBSD disk onto the primary IDE controller,
	      so the hard disks are consecutive.
	
	  3.  Rebuild your kernel, modify the wd configuration lines
              to read:
	
	      controller	   wdc0    at isa? port "IO_WD1" bio irq 14 vector  wdintr
	      disk	   wd0	   at wdc0 drive 0
	      # disk       wd1     at wdc0 drive 1 # comment out this line
	
	      controller	   wdc1    at isa? port "IO_WD2" bio irq 15 vector wdintr
	      disk		   wd1	   at wdc1 drive 0 # change from wd2 to wd1
	      disk		   wd2	   at wdc1 drive 1 # change from wd3 to wd2
	
	      Install the new kernel.  If you moved your disks and
	      wish to restore the previous configuration, replace the
	      disks in the desired configuration and reboot.  Your
	      system should boot successfully.
	
	I'm not sure what flexibility the Linux version gives you.  It
	appears that you have to use dd to install things, and there
	is already support for everything you appear to want to do.
	Check oader(8) and loader.conf(5) for more details.

	PR closed: this wasn't a bug, just a configuration
	misunderstanding.  It would be better if you send this kind of
	issue to FreeBSD-questions in future.
