Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Installing on LFS
On Nov 16, 5:01pm, Eduardo Horvath wrote:
} On Sat, 14 Nov 2015, Paul Goyette wrote:
} > On Sat, 14 Nov 2015, Paul Goyette wrote:
} >
} > > I've been trying to install NetBSD on an LFS partition. sysinst allows
} > > me to set the partition table fstype to 4.4LFS but when I tell it that
} > > the partitions are OK, it reports
} > >
} > > No bootcode for specified FS type of root partition |
} > >
} > > >Hit enter to continue
} > >
} > > (This is within a qemu virtual machine.)
} >
} > Hmm, OK, it appears that sysinst doesn't know which bootcode to use for
} > lfs partitions.
} >
} > Since lfs version 1 is deprecated, and any new partitions default to
} > lfs version 2, would the following patch be acceptable??
} >
} > Index: md.h
} > ===================================================================
} > RCS file: /cvsroot/src/usr.sbin/sysinst/arch/amd64/md.h,v
} > retrieving revision 1.1
} > diff -u -p -r1.1 md.h
} > --- md.h 26 Jul 2014 19:30:44 -0000 1.1
} > +++ md.h 14 Nov 2015 11:59:00 -0000
} > @@ -66,6 +66,7 @@
} > #define BOOTXXDIR "/usr/mdec"
} > #define BOOTXX_FFSV1 "bootxx_ffsv1"
} > #define BOOTXX_FFSV2 "bootxx_ffsv2"
} > +#define BOOTXX_LFS "bootxx_lfsv2"
} >
} >
} > /*
} >
} >
} > Similar changes could also be made to other arch's if they support lfs.
}
} Does the amd64 first stage bootloader support LFS?
}
} Remember, the LFS filesystem cleaner may decide to relocate blocks of
} existing files to other parts of the disk during garbage collection. The
} the first level bootloaders for several architectures, due to limited
} space, encode a list of disk blocks containing the second level bootloader
} as part of the first level bootloader. I know sparc works that way, I
} thought x86/amd64 did as well. Over time, those disk blocks may get
} reclaimed and then your machine won't boot any more.
The way amd64 (and i386) boots is that code in the first sector
(sector 0) looks for the NetBSD partition (type 169) and simply
reads the first 14(?) sectors from there and executes it. If it
is NetBSD's code in sector 0, then there may or may not be an OS
selection menu. However, it's not critical that it be NetBSD's
code as they all do the same thing. The code that is read by the
code in sector 0 comes from the bootxx_<fstype> files. That code
is responsible for finding and loading /boot, and is the first bit
of code that actually needs to understand the filesystem. /boot
in turn, loads /boot.cfg, presents the menu if any, and loads and
executes the kernel.
Just as a side note, /boot puts the system into 32-bit mode.
Prior to that, the system is in real mode (essentially behaving
like an ancient IBM PC with an 8086 processor). The amd64 kernel
is responsible for putting the system into 64-bit mode.
}-- End of excerpt from Eduardo Horvath
Home |
Main Index |
Thread Index |
Old Index