NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: preparing netbsd boot straps from gnu/linux



pierre-philipp braun <pbraun%nethence.com@localhost> writes:

>> Please explain more thoroughly what you are doing.  That makes it seem
>> like you are loading the kernel from a FAT32 partition, and I can't tell
>> how many partitions of what kind you have and why.
>
> I am trying to setup netbsd from gnu/linux, which means no `installboot`
> nor `disklabel` commands (unless I try to cross-compile those).

The netbsd build is set up for cross already.  So you can just
"./build.sh release" on Linux and get the tools (but read BUILDING in
src).  I'm not saying this is the only path, but it may be easier than
you think.

> This is an EXT2 partition, not FAT32.  This is a 1TB drive and I create
> a single 25GB NetBSD (a9) partition on it.  I could also use the entire
> disk.  And I try to get it used as root filesystem.  Hence `wd0c` or
> `wd0e`.  But only the latter works, as is recognized automatically by
> netbsd and has the 4.2BSD fstype.
>
> I did not try to do this from FreeBSD yet.

So an MBR with partition 1 is NetBDS, starting at ? and for 25G.
Presumably you made this with fdisk on linux.

Then a NetBSD disklabel in that partition that you actually wrote?

Then you probably ran Linux's newfs_ext2fs?  On what disk name, which
corresponds to what?

This is what I mean by really explaining what you did.

>> entire physical disk.  It does not make sense to have a fs on wd0c.  If
>> you wanted that, you'd use the a or e slot with the same values, with a
>> netbsd fs type code.
>
> yes this is what I do: trying to fsck and mount wd0e.

Also be clear about doing things under the linux installer vs when booted
into netbsd.

>> I am not following.  please be much clearer about what you are doing and
>> where the output is coming from.  I realize that you are posting the
>> part that you think is interesting, but the missing expected values are
>> critical context for others.
>
> Sorry, that output is coming from a the freshly
> netbsd-installed-system-from-a-gnu/linux-environment.  And it fails at
> fsck_ext2fs at boot time and when done manually.  I get into single user
> mode with that wd0e ext2fs mounted ro as /.  I can eventually switch to
> rw.  But fsck_ext2fs is not happy with the gnu/linux `mkfs.ext2
> -O^dir_index` filesystem.  This may actually be a bug.

True - most people do not use ext2 under netbsd for /.



Overall, I suspect the best path is to crossbuild netbsd and use the
netbsd tools under linux to make a netbsd install that is normal.

The other path is to really understand how ext2fs is laid out and boot
blocks, and also the issue about the differences in linux/netbsd ext2fs,
and fix all of that.


Home | Main Index | Thread Index | Old Index