Re: landisk boot.fs

David Young <[email protected]>
Newsgroups gmane.os.netbsd.devel.installation
Message-ID <[email protected]>
On Wed, May 02, 2007 at 09:16:22AM +0100, Nick Hudson wrote:
> Hi,
> 
> Based on Hubert's work I've updated the landisk install stuff a bit. I've 
> committed the creation of an INSTALL kernel and installation/misc directory. 
> So, you'll need -current and
> 
> 	ftp://ftp.netbsd.org/pub/NetBSD/misc/skrll/landisk-boot.tgz
> 
> to build the WIP boot.fs.
> 
> It still doesn't create a bootable disk. I suspect MBR problems.

I create an MBR like this, where nc/nt/ns are the # cylinders, #
tracks/cyl, # sectors/track on the target disk (see disktab(5)), ASIZE
and ESIZE are the size of BSD partitions 'a' and 'e' (MBR partitions 0
and 1), and IMAGE is the name of the file I write the disk image to:

        _FDISK="$TOOL_FDISK -c $DESTDIR/usr/mdec/mbr"
        _FDISK="$_FDISK -F -t $DISKTAB -T $DISKTYPE -f"
        _FDISK="$_FDISK -b $nc/$nt/$ns"
        $_FDISK -i $IMAGE
        $_FDISK -u -0 -s 169/$ns/$ASIZE $IMAGE
        $_FDISK -u -1 -s 169/$(($ns+$ASIZE))/$ESIZE $IMAGE
        $_FDISK -a -0 $IMAGE

BTW, I create partition 'a' like this:

        $TOOL_MAKEFS -x -F $DESTDIR/metalog.image -N $INSTDIR/etc \
            -o bsize=4096,fsize=512 -m ${ASIZE}b $TGT_IMAGE $INSTDIR || exit 1
        $TOOL_DISKLABEL -F -f $DISKTAB -w $TGT_IMAGE $DISKTYPE || exit 1
        biosboot=$DESTDIR/usr/mdec/bootxx_ffsv1
        CUW_INSTALLBOOT="$TOOL_INSTALLBOOT -o console=${CUW_BOOT_CONSOLE}"
        $CUW_INSTALLBOOT $TGT_IMAGE $biosboot

Dave

-- 
David Young             OJC Technologies
[email protected]      Urbana, IL * (217) 278-3933
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.