procount / pinn

An enhanced Operating System installer for the Raspberry Pi
1.08k stars 122 forks source link

Adding the *BSDs as options #59

Open win8linux opened 7 years ago

win8linux commented 7 years ago

Is is possible to add the BSDs as options in PINN? The ones that are available are FreeBSD (RPi3), RaspBSD, and NetBSD.

For users of the Raspberry Pi 3, these might help in filling up the directly interactive (disqualifying Win10 IoT) non-Linux OS spot in NOOBS/PINN vacated by the absence of RISC OS as an option.

procount commented 7 years ago

I previously looked at the netBSD image. Fdisk (util-linux 2.20.1 on Ubunutu 14.04) only shows the one FAT partition. The rootfs partition is not identified, so I don't know how to process it.

win8linux commented 7 years ago

The rootfs is probably using UFS. Support for UFS is dependent on the kernel's config when it was compiled. You can try running: sudo modprobe ufs and trying again.

I'd suggest mounting the image itself with something like this (refer to manpages for more details): sudo mount -t ufs -o ro,ufstype=ufs2 /dev/sdb2 /mnt/ and seeing what happens.

If that doesn't work, have a look at this and see if it works; it's a bit outdated, but the process should be similar. UFS support is mainly read-only, but the above link describes how to compile a kernel with read-write mounting capability.

For checking if your kernel has a UFS kernel module: ls -l /lib/modules/4.4.0-21-generic/kernel/fs/'

For example, here's mine: > $ ls -l /lib/modules/4.4.0-21-generic/kernel/fs/
total 244 drwxr-xr-x 2 root root 4096 Sep 5 2016 9p drwxr-xr-x 2 root root 4096 Sep 5 2016 adfs drwxr-xr-x 2 root root 4096 Sep 5 2016 affs drwxr-xr-x 2 root root 4096 Sep 5 2016 afs drwxr-xr-x 2 root root 4096 Sep 5 2016 aufs drwxr-xr-x 2 root root 4096 Sep 5 2016 autofs4 drwxr-xr-x 2 root root 4096 Sep 5 2016 befs drwxr-xr-x 2 root root 4096 Sep 5 2016 bfs -rw-r--r-- 1 root root 27390 Apr 19 2016 binfmt_misc.ko drwxr-xr-x 2 root root 4096 Sep 5 2016 btrfs drwxr-xr-x 2 root root 4096 Sep 5 2016 cachefiles drwxr-xr-x 2 root root 4096 Sep 5 2016 ceph drwxr-xr-x 2 root root 4096 Sep 5 2016 cifs drwxr-xr-x 2 root root 4096 Sep 5 2016 coda drwxr-xr-x 2 root root 4096 Sep 5 2016 configfs drwxr-xr-x 2 root root 4096 Sep 5 2016 cramfs drwxr-xr-x 2 root root 4096 Sep 5 2016 dlm drwxr-xr-x 2 root root 4096 Sep 5 2016 efs drwxr-xr-x 2 root root 4096 Sep 5 2016 exofs drwxr-xr-x 2 root root 4096 Sep 5 2016 f2fs drwxr-xr-x 2 root root 4096 Sep 5 2016 fat drwxr-xr-x 2 root root 4096 Sep 5 2016 freevxfs drwxr-xr-x 2 root root 4096 Sep 5 2016 fscache drwxr-xr-x 2 root root 4096 Sep 5 2016 fuse drwxr-xr-x 2 root root 4096 Sep 5 2016 gfs2 drwxr-xr-x 2 root root 4096 Sep 5 2016 hfs drwxr-xr-x 2 root root 4096 Sep 5 2016 hfsplus drwxr-xr-x 2 root root 4096 Sep 5 2016 hpfs drwxr-xr-x 2 root root 4096 Sep 5 2016 isofs drwxr-xr-x 2 root root 4096 Sep 5 2016 jffs2 drwxr-xr-x 2 root root 4096 Sep 5 2016 jfs drwxr-xr-x 2 root root 4096 Sep 5 2016 lockd drwxr-xr-x 2 root root 4096 Sep 5 2016 minix drwxr-xr-x 2 root root 4096 Sep 5 2016 ncpfs drwxr-xr-x 6 root root 4096 Sep 5 2016 nfs drwxr-xr-x 2 root root 4096 Sep 5 2016 nfs_common drwxr-xr-x 2 root root 4096 Sep 5 2016 nfsd drwxr-xr-x 2 root root 4096 Sep 5 2016 nilfs2 drwxr-xr-x 2 root root 4096 Sep 5 2016 nls drwxr-xr-x 2 root root 4096 Sep 5 2016 ntfs drwxr-xr-x 5 root root 4096 Sep 5 2016 ocfs2 drwxr-xr-x 2 root root 4096 Sep 5 2016 omfs drwxr-xr-x 2 root root 4096 Sep 5 2016 overlayfs drwxr-xr-x 2 root root 4096 Sep 5 2016 pstore drwxr-xr-x 2 root root 4096 Sep 5 2016 qnx4 drwxr-xr-x 2 root root 4096 Sep 5 2016 qnx6 drwxr-xr-x 2 root root 4096 Sep 5 2016 quota drwxr-xr-x 2 root root 4096 Sep 5 2016 reiserfs drwxr-xr-x 2 root root 4096 Sep 5 2016 romfs drwxr-xr-x 2 root root 4096 Sep 5 2016 squashfs drwxr-xr-x 2 root root 4096 Sep 5 2016 sysv drwxr-xr-x 2 root root 4096 Sep 5 2016 ubifs drwxr-xr-x 2 root root 4096 Sep 5 2016 udf drwxr-xr-x 2 root root 4096 Sep 5 2016 ufs drwxr-xr-x 2 root root 4096 Sep 5 2016 xfs

procount commented 7 years ago

That would also mean compiling UFS into the PINN kernel as well, and understanding how to adjust the partitions in UFS/xxxBSD through partition_setup.sh. I'm not saying no, but I'm afraid it will be low priority as I have plenty of other things to do beforehand. Unless you want to provide any of these as a NOOBS image and a PR to add UFS into PINN.....

win8linux commented 7 years ago

Does it have to be read-write? If not, then the PINN kernel could already be used as is since read-only UFS support is default since the 2.6.x versions (possibly further back).

procount commented 7 years ago

In a Linux rootfs, NOOBS/PINN needs to alter fstab to load the boot partition on the correct device. I have no knowledge of *bsd systems and what is required.

RISC OS uses a BLOB file containing its filesystem and RISC needs to be located at a particular offset/place on the device, which side-steps the issue. But this BLOB causes problems with Ubuntu 16 onwards as that filesystem has been enabled again and gets detected before the FAT partition table, whether RISC OS is installed or not, which is why I still use Ubuntu 14.

win8linux commented 7 years ago

If that's what is used with RISC OS, then is it possible to make BLOB files for *BSD systems? I'm not quite sure, but I don't think that the BSDs would necessarily require specific offsets/places on the device. It is an option, though; I'd suggest placing them near the end as the last partitions to be made.

BTW I'm using Linux Mint 18 KDE (based on Ubuntu 16.04), which would explain the prescence of the ADFS kernel module in my system.