WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Proposal: GUI Installer for UEFI  (Read 3099 times)

Offline LotusDew

  • Newbie
  • *
  • Posts: 11
Proposal: GUI Installer for UEFI
« on: August 17, 2023, 04:10:30 AM »
Hi All,

I am a relatively new user of TC over last 2-3 months and I am not going back to anything else. I love it.

With a lot of help from the forum posts and other links available on internet I managed to boot a scsi enabled HP sever in UEFI. The process is trivial for experienced users but perhaps not suitable for people who just want to hard install to try out.

I was looking at the installer for Ubuntu which is written in Dart and I was thinking we can port that for TC.

Before I begin, wanted to check anyone thinks its a bad idea or if there is something already on these lines I am not aware of. Obliviously it will be open source and GPL etc - but thought of asking first.

Finally thanks a lot to everyone who made this wonderful OS distribution. I am really enjoying it.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Proposal: GUI Installer for UEFI
« Reply #1 on: August 17, 2023, 04:45:18 AM »
You might want to take a look at the tc-install extension.

Offline LotusDew

  • Newbie
  • *
  • Posts: 11
Re: Proposal: GUI Installer for UEFI
« Reply #2 on: August 17, 2023, 08:02:59 AM »
Yes sure - I am basically thinking a installation flow which enables UEFI partitions and allows for some custom partitioning and also uses grub as a boot menu. Do you mean its better to work on the current GUI installer instead of writing one from scratch ?

The idea is to be able to plug in a USB and it should just work. As of now it took me some time to get things up and running and I had specific motivation to boot minimal linux. I am thinking other fresh users might not commit as much as I did when I got started.

Any suggestions ?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Proposal: GUI Installer for UEFI
« Reply #3 on: August 17, 2023, 08:39:53 AM »
I mentioned the tc-install extension in case you found it useful - I’ve no particular suggestions.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 723
Re: Proposal: GUI Installer for UEFI
« Reply #4 on: August 17, 2023, 09:39:35 AM »
Hi LotusDew
Write one from scratch if you can.
Hacking tc-install isn't worth the effort.
The logical difference between legacy BIOS and UEFI is enormous.
If you know something that's working and can be ported to TC, feel free to do that.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal: GUI Installer for UEFI
« Reply #5 on: August 17, 2023, 09:41:41 AM »
Hi LotusDew!

Yes sure - I am basically thinking a installation flow which enables UEFI partitions and allows for some custom partitioning and also uses grub as a boot menu.
When I became tired of manual installations I've wrote the grub.cfg and install script implementing proposed by Juanito dual-boot BIOS+UEFI grub-based scheme. If it is intersting You can take a look at https://github.com/AndreyDobrovolskyOdessa/grub.cfg-forTinyCoreLinux.
I want to warn that it makes only partitioning and installs bootloaders. It is intended for manual distribution files copying, supporting various TC versions, flavours and configs on the same drive. The idea was to exclude grub.cfg editing necessary each time for new boot menu entry. Working fine since TC11, TC14 tested.

The idea is to be able to plug in a USB and it should just work.

Sure the USB drive installation is the best way to try TinyCore. Especially if it is dual-boot :-)

If I am not mistaken Ubuntu uses its own UEFI signature for secure boot machines. Is it?

Wishing success!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Proposal: GUI Installer for UEFI
« Reply #6 on: August 17, 2023, 10:50:30 AM »
We'll happily accept alternative installers. Porting Ubuntu's might be a bit counterintuitive due to all the deps though (imagine having to install 50mb of files in order to install the 15mb distro), but if it's easy for you to work with, do try.
The only barriers that can stop you are the ones you create yourself.

Offline Leee

  • Full Member
  • ***
  • Posts: 122
Re: Proposal: GUI Installer for UEFI
« Reply #7 on: August 17, 2023, 03:37:13 PM »
After having found Sandisk 64 GB USB 3.0 flash drives on the cheap, I've recently been fooling around with writing an installer script for grub2-multi which basically codifies juanito's procedure as outlined in

https://forum.tinycorelinux.net/index.php/topic,19364.0.html

My effort is currently a shell script, no GUI involved.  It has some manual/interactive bits (fdisk) which is mildly unsatisfying.

The script goes that extra mile and nukes the device with dd before starting the partitioning etc and makes a clumsy attempt at generating a grub.cfg file ( that's a separate script and it  really needs a complete rewrite!    :b  ).  I haven't yet got around to the part where it actually downloads the "distribution_files" nor the part where it downloads a list of extensions (with dep resolution) - those are taken care of in scripts I've already written if I can only remember where I left them (might be time to learn some "git", I suppose).

A few questions that might save me some research time and/or false starts:
  • In the grub2-multi install (described in juanito's post (linked above)), what's a good starting LBA for the first partition?  The grub2 install failed when I used 32 (which was the default).  It works fine with 256 but I suspect that's wasting some trivial amount of space.
  • Similarly, what's a good size for the second partition (the EFI partition)?  20 MB works nicely but, again, is probably wasting some trivial amount of space.
  • Does the EFI partition have to be formatted vfat or would something else work as well?
  • What's a good batch mode partitioning tool?  (is there such a thing?)
Once I have the script complete and working on its own, what would be the recommended way to wrap a GUI around it?  I've never done anything non-trivial in tcl/tk, but I feel like that might be a nice project.

---
Re. secure boot - someone told me that you can just "borrow" the signing key from ubuntu and it just works.  I'm skeptical, but haven't tried it since a) I  don't have an ubuntu installation laying around and b) I really don't care if I have to leave secure boot turned off.  But, in the interest of thoroughness, it's kind of an interesting idea.  Anyone have any experience with such things?
core 15.0 x86_64

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal: GUI Installer for UEFI
« Reply #8 on: August 17, 2023, 05:04:57 PM »
Hi Leee,

I've recently been fooling around with writing an installer script for grub2-multi which basically codifies juanito's procedure as outlined in

https://forum.tinycorelinux.net/index.php/topic,19364.0.html

I was following the same HowTo.

A few questions that might save me some research time and/or false starts:
  • In the grub2-multi install (described in juanito's post (linked above)), what's a good starting LBA for the first partition?  The grub2 install failed when I used 32 (which was the default).  It works fine with 256 but I suspect that's wasting some trivial amount of space.

I don't remember why but I used 2048 as the start.

   
  • Does the EFI partition have to be formatted vfat or would something else work as well?

As far as I know not all motherboard vendors follow the UEFI specs completely and may fail accessing UEFI partition of another but vfat type.

   Once I have the script complete and working on its own, what would be the recommended way to wrap a GUI around it?  I've never done anything non-trivial in tcl/tk, but I feel like that might be a nice project.

I can agree with You that for TinyCore it would be nice to have both GUI and text versions of the installer.

Have a nice Core!

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 281
Re: Proposal: GUI Installer for UEFI
« Reply #9 on: August 17, 2023, 07:52:00 PM »
  • What's a good batch mode partitioning tool?  (is there such a thing?)

GNU Parted can accept partitioning commands from the command-line. I only ever use it interactively because I always want to control partitioning manually, but it's easy to imagine that it could work well in a script too, and it seems to have options that are designed for that.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 723
Re: Proposal: GUI Installer for UEFI
« Reply #10 on: August 17, 2023, 08:47:51 PM »
What's a good batch mode partitioning tool?  (is there such a thing?)

You can printf the commands and pipe them into fdisk
I believe you can do the same for gdisk
It's probably a better idea to go GPT since we're talking about UEFI here
Don't forget to tell the kernel that the disk layout has been changes
Code: [Select]
sudo rebuildfstab
« Last Edit: August 17, 2023, 08:49:45 PM by polikuo »

Offline Leee

  • Full Member
  • ***
  • Posts: 122
Re: Proposal: GUI Installer for UEFI
« Reply #11 on: August 18, 2023, 12:42:26 AM »
Thanks jazzbiker.
Re. starting LBA - since it's working with "256" I'll continue to use that, though that will eventually be either a command-line option or a config file option.  Or both, I suppose, with command line option taking precedence over config file.

Re. vfat - Since I was mainly curious about the EFI partition format because of a nagging (and possibly unfounded) lack of confidence in all things FAT, and since it seems to be working just fine for this purpose, I'll just continue using vfat for the EFI partition.
I'll confess that the graphical wrapper is the most likely to fall by the wayside if life gets interesting, though it doesn't seem like there's much risk of that.

@ CNK and Polikuo - Thanks to you guys, as well.
Without having looked into either method in any detail, I like the -idea- of command line options for GNU Parted better than the -idea- of driving an interactive program with a pipe.

But, if I decide to use the pipe strategy to drive gdisk then I'll likely do the same with fdisk to keep it symetrical.

Nothing wrong with using GPT, though I would expect to use the multiboot install primarily on USB sticks rather than HDDs or SSDs and I would not expect to see a USB stick over 2 TB nor needing more than 4 partitions.  This, of course, from a forward-looking guy who once said, "I'll just get the 32 bit version of Win7 Pro since the machine only has 4 GB of RAM anyway..."  (Still using that box 13 years later, wishing it would do any good to add more ram... though it might actually be time to retire it anyway, if only because the fan is loud.)

Of course I initially forgot to sudo rebuidfstab -  I was so frustrated after trying for several hours to build everything on "/dec/sdc" that I'm lucky that's the only thing I forgot!    :o

core 15.0 x86_64

Offline LotusDew

  • Newbie
  • *
  • Posts: 11
Re: Proposal: GUI Installer for UEFI
« Reply #12 on: August 18, 2023, 01:34:38 AM »
Hi All,

Yes, I think I am definitely going to try to contribute back with some opensource GUI installer.

I was able to make TC boot UEFI using the instructions on https://www.parkytowers.me.uk/thin/Linux/TinycoreUSB_UEFI.shtml

The Ubuntu installer is written in Dart and I think I will put something together which has the same flow as the Ubuntu installer.

Also, I had SCSI drives enabled servers where I wanted to install. As a newbie I found it quite challenging to understand that you need to remaster initramfs and put it essentially inside the initiramfs for the scsi drives to be visible to load the extensions. In hindsight its very obvious - but it took me quite a bit of tinkering to make it to work. I am fascinated by minimal OS (check out http://www.kolibrios.org/en/) - but TinyCore is the best option when you want to do real world things.

Status now
1. Learning Dart

Plan
1. Create a SCIS and basic video driver embeded initramfs
2. Use Dart for basic UI on boot and partitioning etc
3. Research a bit more on UEFI bootloaders and integrate grub
4. Make the git repo available


Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal: GUI Installer for UEFI
« Reply #13 on: August 18, 2023, 03:39:05 AM »
Hi LotusDew!

If You will be able to grok the Ubuntu installer and replicate the steps it performs for secure boot in some script, I think it would be the great step forward for TinyCore. Instead of wasting You efforts on GUI ;-) GUI doesn't expand functionality, usually its purpose is to shrink it. Installer is not the daily driver (in case it is You are in trouble), I really don't understand the reasons for installer to have GUI. I was sure TinyCore is not intended for the pads. Maybe I am wrong.

Have a nice Core!

Offline mocore

  • Hero Member
  • *****
  • Posts: 641
  • ~.~
Re: Proposal: GUI Installer for UEFI
« Reply #14 on: August 19, 2023, 07:32:20 AM »
Instead of wasting You efforts on GUI ;-)
GUI doesn't expand functionality, usually its purpose is to shrink it.

wrt gui's this : usbimager, seams like a useful alternative to a dedicated "install" gui

by this i mean script can/*SHOULD* just create an image file ( which could be tested in virtual machine ect or real hw )

then if gui is necessary 
 usbimager : https://forum.tinycorelinux.net/index.php/topic,26366.0.html
is an option
just select scripted-install.img and target device .