Discussion:
i386 installation
(too old to reply)
Askfor
2016-10-30 17:01:22 UTC
Permalink
I am trying to install 7.02 on old 32-bit x86 laptop. I have primay
partition marked as type FreeBSD, in absence of better designation,
It appears that installer accepts it as location, but keeps asking me
for permission to change MBR. I am getting nervous when someone mentions
MBR. What is installer trying to do ? I have other things on that disk.
Is it trying to install some sort of boot loader into MBR ?

I also have some prior experience with FreeBSD. At that point I'd expect
installer to start asking about slices and mount points.
John McCue
2016-10-30 19:34:34 UTC
Permalink
Post by Askfor
I am trying to install 7.02 on old 32-bit x86 laptop. I have primay
partition marked as type FreeBSD, in absence of better designation,
It appears that installer accepts it as location, but keeps asking me
for permission to change MBR.
Are you trying to install NetBSD on a FreeBSD slice ?
I never tried to install NetBSD along side other OS's.
What other OS's are on the system ?
Post by Askfor
I am getting nervous when someone mentions
MBR. What is installer trying to do ? I have other things on that disk.
Is it trying to install some sort of boot loader into MBR ?
It will install aboot loader in MBR, FreeBSD and some Linuxs
do the same. I would expect there would be a way to bypass
it, maybe look at:

https://www.netbsd.org/docs/guide/en/chap-exinst.html
Post by Askfor
I also have some prior experience with FreeBSD. At that point I'd expect
installer to start asking about slices and mount points.
See above, but yes it will eventually ask about partationing

John
Askfor
2016-10-31 00:17:48 UTC
Permalink
Post by John McCue
Post by Askfor
I am trying to install 7.02 on old 32-bit x86 laptop. I have primay
partition marked as type FreeBSD, in absence of better designation,
It appears that installer accepts it as location, but keeps asking me
for permission to change MBR.
Are you trying to install NetBSD on a FreeBSD slice ?
I never tried to install NetBSD along side other OS's.
What other OS's are on the system ?
No, I just marked the partition as type FreeBSD using fdisk which comes
with majority of Linux distributions. If I understand it correctly BSD's
are creating slices inside disk partition they occupy. I was hoping
NetBSD will see te partition as default choice.

I am tying to run NetBSD alongside Slackware Linux.
Post by John McCue
Post by Askfor
I am getting nervous when someone mentions
MBR. What is installer trying to do ? I have other things on that disk.
Is it trying to install some sort of boot loader into MBR ?
It will install aboot loader in MBR, FreeBSD and some Linuxs
do the same. I would expect there would be a way to bypass
No. I can deal with it. I can restore original MBR and boot NetBSD from
LILO, which boots Slackware, too. It is pretty much standard. I just
wanted to make sure that installer doesn't change my partition layout.

BTW, is there any way it could use Linux swap partition as swap ? I
suppose not, but doesn't hurt to ask.
Claudio Calvelli
2016-10-31 07:00:51 UTC
Permalink
Post by Askfor
No, I just marked the partition as type FreeBSD using fdisk which comes
with majority of Linux distributions. If I understand it correctly BSD's
are creating slices inside disk partition they occupy. I was hoping
NetBSD will see te partition as default choice.
Try marking the partition as type NetBSD (type a9) rather than FreeBSD,
I expect the NetBSD installer won't touch a FreeBSD partition.
Post by Askfor
BTW, is there any way it could use Linux swap partition as swap ? I
suppose not, but doesn't hurt to ask.
It's possible but not necessarily easy. The easiest would be to make
Linux see the NetBSD swap, which will appear as an extended partition
(assuming your kernel has the appropriate configuration); however you need
to run "mkswap" on it every time you boot Linux (NetBSD should see that
without any problem as long as it's marked type swap in the disklabel;
Linux will normally ignore the type in the partition table and check
for a swap signature inside the partition).

C
Askfor
2016-10-31 15:11:10 UTC
Permalink
Post by Claudio Calvelli
Post by Askfor
No, I just marked the partition as type FreeBSD using fdisk which comes
with majority of Linux distributions. If I understand it correctly BSD's
are creating slices inside disk partition they occupy. I was hoping
NetBSD will see te partition as default choice.
Try marking the partition as type NetBSD (type a9) rather than FreeBSD,
I expect the NetBSD installer won't touch a FreeBSD partition.
Somehow I missed type NetBSD, but yes it is there
Post by Claudio Calvelli
Post by Askfor
BTW, is there any way it could use Linux swap partition as swap ? I
suppose not, but doesn't hurt to ask.
It's possible but not necessarily easy. The easiest would be to make
Linux see the NetBSD swap, which will appear as an extended partition
(assuming your kernel has the appropriate configuration); however you need
to run "mkswap" on it every time you boot Linux (NetBSD should see that
without any problem as long as it's marked type swap in the disklabel;
Linux will normally ignore the type in the partition table and check
for a swap signature inside the partition).
That is more like impossible. I am using old laptop for testing and
there is not tto much space on HD. But, I guess it would do. NetBSD is
small and I've got 11GB. I have some more space in logical partition,
and as far as I remeber from FreeBSD it is possible to have slices
across different partitions.
John McCue
2016-10-31 23:02:09 UTC
Permalink
Askfor <***@nowhere.net> wrote:
<snip>
Post by Askfor
That is more like impossible. I am using old laptop for testing and
there is not tto much space on HD. But, I guess it would do. NetBSD is
small and I've got 11GB. I have some more space in logical partition,
<snip>

True, NetBSD is quite small, my system has 20 gig Drive and
using 4G Total (including X). /home uses a bit under 2G.

John
John McCue
2016-10-31 23:05:48 UTC
Permalink
Askfor <***@nowhere.net> wrote:
<snip>
Post by Askfor
I am tying to run NetBSD alongside Slackware Linux.
LILO should be able to boot NetBSD, just
a matter of getting lilo.conf setup.

John
Yannick Duchêne
2018-10-09 18:00:58 UTC
Permalink
Post by Askfor
I am trying to install 7.02 on old 32-bit x86 laptop. I have primay
partition marked as type FreeBSD, in absence of better designation,
It appears that installer accepts it as location, but keeps asking me
for permission to change MBR. I am getting nervous when someone mentions
MBR. What is installer trying to do ? I have other things on that disk.
Is it trying to install some sort of boot loader into MBR ?
I also have some prior experience with FreeBSD. At that point I'd expect
installer to start asking about slices and mount points.
A few days ago, I installed NetBSD on a 32bits machine where I already have Ubuntu with GRUB and here is what I did:

I said “No” when the installer wanted to modify the MBR (like you, it frightens me).

In Ubuntu, I changed `/etc/grub.d/40_custom` to add this:

menuentry "NetBSD" {
savedefault
insmode ufs
set root=(hd0,2)
knetbsd /netbsd --root=wd0f
}

`(hd0,2)` because I installed it on the BIOS second partition, and `wd0f` this what NetBSD mount as root. `wd0f` is a slice, `wd0b` is the whoe BIOS partition and it does not work with it.

You may need to adjust `(hd0,2)` and `wd0f` to match yours. Ensure `/etc/grub.d/40_custom` is executable and run `sudo update-grub`, then reboot to test.

It was working, but I wanted to start NetBSD with chain‑load, which is cleaner (to me at least).

In Ubuntu, I changed again `/etc/grub.d/40_custom` to now have this:

menuentry "NetBSD" {
savedefault
set root=(hd0,2)
chainloader +1
}

I did an `update-grub` and tested with a reboot, It was no working, GRUB complaining the sector signature or something like that was not OK. It was meaning the PBR (Partion Boot Record) was not OK.

To write a proper PBR without touching the MBR, from NetBSD (I temporarily restored the previous `/etc/grub.d/40_custom`, for this), I did this:

cp /usr/mdec/boot /boot
dumpfs -s /dev/rwd0f # To check it’s the device mounted as `/`
installboot -v /dev/rwd0f /usr/mdec/bootxx_ffsv2

Search for the man page about `installboot` to learn more about this key command.

Then I rebooted (with the second `/etc/grub.d/40_custom`), and GRUB was not complaining anymore, and NetBSD started properly, its own way. As a Bonus, I now have a menu for NetBSD boot methods, which you can edit in `/boot.cfg`.
Loading...