Working with GBI

News and Announcements related to GhostBSD
kraileth
Posts: 312
Joined: Sun Sep 04, 2016 12:30 pm

Working with GBI

Post by kraileth »

For GhostBSD GBI is obviously an important piece of the project. I've tried twice to get into it a little bit and understand how it works. However my Python skills are nearly non-existent and thus it's not too easy for me. The fact that the wiki page is only a stub doesn't help much, either.

I did play with pc-sysinstall to get GELI working (and found a few issues that need to be taken care of). However I only managed to use it to install FreeBSD as I have no idea how to do it with GhostBSD.

So I'm asking for help here:

1) How does the installer work? Or rather: Is it even just one installer?
2) I've stumbled across ginstall.py which looks like a text-based installer. What is the status of that? Can it be used today?
3) I know that GBI creates a cfg file for pc-sysinstall and let's it take care of the actual installation. How does that work? I found the file that gbi creates to be invalid. Here's an example:

Code: Select all

# Installation Mode
installMode=fresh
installInteractive=no
installType=GhostBSD
installMedium=dvd
packageType=livecd

# System Language

localizeLang=de
localizeKeyLayout=de

# Timezone
timeZone=Europe/Berlin
enableNTP=yes

# Disk Setup
disk0=ada0
partition=all
bootManager=none
partscheme=GPT
commitDiskPart

# Partition Setup
disk0-part=UFS+SUJ 110474 /
disk0-part=SWAP 0 none
commitDiskLabel

# Network Configuration
hostname=test

# Network Configuration

# Set the root pass
rootPass=a

# Setup user
userName=tester
userComment=tester
userPass=a
userShell=/bin/tcsh
userHome=/home/tester
defaultGroup=wheel
userGroups=operator
commitUser
runScript=/usr/local/bin/iso_to_hd
runCommand=pkg install -y de-libreoffice
Pc-sysinstall doesn't even know the installType "GhostBSD" for example. Why does the installation work anyway despite those issues?

4) I did not find any debug mode or anything in GBI. How do you debug it or test things?
5) How can I make final changes to the cfg before the actual installation begins?

PS: Eric: Are you willing to accept pull requests for things like renaming variables (see here: https://github.com/kraileth/gbi)? One of the things that I learned from our programmers was that meaningful names are important. And while you of course know your variables, other people looking at the code probably don't and (like me) have to look up where they are defined to understand what they mean.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Working with GBI

Post by ASX »

Pc-sysinstall doesn't even know the installType "GhostBSD" for example.
It does, in some pc-sysinstall subscript.
User avatar
ericbsd
Developer
Posts: 2125
Joined: Mon Nov 19, 2012 7:54 pm

Re: Working with GBI

Post by ericbsd »

Pc-sysinstall doesn't even know the installType "GhostBSD" for example. Why does the installation work anyway despite those issues?
pc-sysinstall in FreeBSD is outdated and we use the pc-sysinstall in our github.
PS: Eric: Are you willing to accept pull requests for things like renaming variables (see here: https://github.com/kraileth/gbi)? One of the things that I learned from our programmers was that meaningful names are important. And while you of course know your variables, other people looking at the code probably don't and (like me) have to look up where they are defined to understand what they mean.
I just started recently to name my variable to explain what it does and fill free to change the name
1) How does the installer work? Or rather: Is it even just one installer?
3) I know that GBI creates a cfg file for pc-sysinstall and let's it take care of the actual installation. How does that work? I found the file that gbi creates to be invalid.
GBI is made to prepare partitions for and the dot cfg file for TrueOS pc-sysinstall, I have kind of implemented my own database for fake partitioning of drives. The cfg is not invalid it use our fork of pc-sysinstall from TrueOS on GitHub.
2) I've stumbled across ginstall.py which looks like a text-based installer. What is the status of that? Can it be used today?
Ginstall was the first installer that GhostBSD have gotten and it is out of date from years ago.
4) I did not find any debug mode or anything in GBI. How do you debug it or test things?
There is no real debug mode for it other then the code failing to execute, the start of installation log and pc-sysinstall fail log.
5) How can I make final changes to the cfg before the actual installation begins?
You can use our pc-sysinstall by it self to install GhostBSD or FreeBSD pc-sysinstall is a full CLI installer by it self.

If you want GELI to work focus mo making it work with pc-sysinstall first.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Working with GBI

Post by ASX »

I have just realized that pc-sysinstall is not under github/ghostbsd/ports, and therefore is not merged into the ports tree, and not built in our repos.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Working with GBI

Post by ASX »

Not to forget that pc-sysinstall is a pain in the ### ... overdesigned with respect to GhostBSD needs.
User avatar
ericbsd
Developer
Posts: 2125
Joined: Mon Nov 19, 2012 7:54 pm

Re: Working with GBI

Post by ericbsd »

Yea that is why I finally stopped to sync from TrueOS repository.
User avatar
ericbsd
Developer
Posts: 2125
Joined: Mon Nov 19, 2012 7:54 pm

Re: Working with GBI

Post by ericbsd »

Depending on the direction we take for next releases we might have time to have GELI working if every one is welling to put time on pc-sysinstall. I might change the gb-sysinstall and take very different approach with it in a near future and we will make change that make sense for use. On thing I realy want to see is the GELI code to be fix for Grub and the loader for ZFS and UFS. GBI is already for GELI but pc-sysinstall in our GitHub does not support it well.

I know kraileth that you want that feature, if every one is willing to go true bsd-install and pc-sysinstall and fix the problem we might end up to have this ready for 11.1 which is due for July not that far.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Working with GBI

Post by ASX »

ericbsd wrote:... if every one is welling to put time on pc-sysinstall. ..
Honestly I think it is about time to ditch pc-sysinstall, and go with our own installer frontend/backend.
That said, I don't think it is a good idea to do this change now, and I would leave that for gbsd-12.
I know kraileth that you want that feature, if every one is willing to go true bsd-install and pc-sysinstall and fix the problem we might end up to have this ready for 11.1 which is due for July not that far.
kraileth is smart enoogh to do his own FreeBSD/GELI install, and add ghostbsd packages on top, that is not an issue.

Additionally, we still need to verify if grub/xorriso continue to work in freebsd/ghostbsd-11, because if not we will be forced to switch back to freebsd loader. (hopefully not). I would not spend efforts/times on grub before we have clarified the xorriso problem.

Not to forget that freebsd loader support boot environment, and this is also a feature I would like to see in ghostbsd-12. ;)
kraileth
Posts: 312
Joined: Sun Sep 04, 2016 12:30 pm

Re: Working with GBI

Post by kraileth »

ASX wrote:Honestly I think it is about time to ditch pc-sysinstall, and go with our own installer frontend/backend.
That said, I don't think it is a good idea to do this change now, and I would leave that for gbsd-12.
I'm willing to look into pc-sysinstall and in fact I'm doing that currently. But I totally agree that we've probably reached the point where it makes more sense to replace it. We're only ever doing fresh installs, there's no reason to support multiple "upgrade" options and such. I think I'm going to try and simplify things by putting together just the parts that we need for our installation.
kraileth is smart enoogh to do his own FreeBSD/GELI install, and add ghostbsd packages on top, that is not an issue.
That's actually not about me being able to do it or not. This is an issue that I would suppose a lot of other people also have. You said that you're going to Euro in Paris this year. You're certainly taking a laptop with you and it will also certainly run GhostBSD. Now you can also custom setup your system to use GELI. But some of our users probably can't - that's why some of them chose GhostBSD: Because it makes it extremely simple to set up a FreeBSD-based desktop system for them. And going abroad with an unencrypted laptop? That wouldn't give me a good feeling. Long story short: There are valid reasons why people might want/need GELI and we should support that.
Additionally, we still need to verify if grub/xorriso continue to work in freebsd/ghostbsd-11, because if not we will be forced to switch back to freebsd loader. (hopefully not). I would not spend efforts/times on grub before we have clarified the xorriso problem.
I agree that this is a more urgent issue. Having a working BETA release out soon would be nice.
Not to forget that freebsd loader support boot environment, and this is also a feature I would like to see in ghostbsd-12. ;)
Definitely! Maybe for those of us who prefer the FreeBSD loader anyway ( :P ) we can have it earlier. :mrgreen:
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Working with GBI

Post by ASX »

kraileth wrote:
kraileth is smart enoogh to do his own FreeBSD/GELI install, and add ghostbsd packages on top, that is not an issue.
That's actually not about me being able to do it or not. This is an issue that I would suppose a lot of other people also have. You said that you're going to Euro in Paris this year. You're certainly taking a laptop with you and it will also certainly run GhostBSD. Now you can also custom setup your system to use GELI. But some of our users probably can't - that's why some of them chose GhostBSD: Because it makes it extremely simple to set up a FreeBSD-based desktop system for them. And going abroad with an unencrypted laptop? That wouldn't give me a good feeling. Long story short: There are valid reasons why people might want/need GELI and we should support that.
Beside the difficult to make the changes to support GELI, that I think can be overcome easiy enough, I'm more worried about supporting user with an encrypted setup. Encryption is going to introduce furter complexity and I think we are not ready to support (I'm not ready at least); encryption is going to add complexity in the boot process, which is already complex due to BIOS/UEFI requirements, graphics requirements, etc.

We have yet t make a proper ZFS setup, to begin with. Please lets do one thing at a time.
Post Reply