/boot/ directory path

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk
Sun Aug 8 17:37:48 PDT 2004


> :I see a fair number of hardcoded paths to `/boot/foo' in the
> :few source files I've looked at so far.  Basically, I want
> :DFly to always look at /dboot/foo and ignore the presence of
> :any /boot.  Then I pass this path to `grub'.
> :Is this a reasonable thing to try, or am I off my rocker?

>     I think you will find it more trouble then it's worth.

Sounds like a challenge to me :-)

Anyway, it actually seemed to have the desired effect as far
as `loader' goes, and I'm finally able to boot straight into
DragonFly on my Firewire disk on this ten-year-old machine.
Yay.

Of course, in order for it to work in general, rather than
for my specific case (where `grub' does all the dirty work
to find /dboot/loader), I'd need to get `boot2' to grok this
path as well, which would require a bit more study on my part
to get it to compile properly -- I bet this is what you were
referring to.

Anyway, I'm overjoyed, because now I'm free of BIOS limitations
on partition geometry or numbers or physical hardware, as I
plan to use this principle for /cboot (FreeBSD-current), /5boot,
/3boot (FBSD RELENG_x), and whatever else will fit.  As for the
trouble it saves me (setting up a disk in the traditional way
to boot as many as ten different OSen), what trouble I found
was well worth it.

(Unfortunately, what with boot2, it's not an all-purpose hack
that anyone should use -- only for my specific case, wanting
to use `grub' to select from differently named `/boot's on
a single filesystem.  However, I wonder if this Makefile is
in need of the following patch just for consistency -- not
that it makes much sense to override BINDIR, but one can do
so earlier in this makefile...)

--- /stand/obj/hacks/DragonFly-src/source-hacks/sys/boot/i386/loader/Makefile-ORIG	Sun Aug  1 23:45:19 2004
+++ /stand/obj/hacks/DragonFly-src/source-hacks/sys/boot/i386/loader/Makefile	Sun Aug  8 22:10:10 2004
@@ -113,9 +113,9 @@
 .PATH: ${.CURDIR}/../../forth 
 FILES=	${PROG}.help loader.4th support.4th loader.conf
 FILES+= screen.4th frames.4th beastie.4th
 FILESDIR_loader.conf=	/boot/defaults
 
-.if !exists(${DESTDIR}/boot/loader.rc)
+.if !exists(${DESTDIR}${BINDIR}/loader.rc)
 FILES+=	${.CURDIR}/loader.rc
 .endif

 

thanks
barry bouwmsa






More information about the Kernel mailing list