WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Gparted Live on uefi machines  (Read 8106 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Gparted Live on uefi machines
« on: November 26, 2021, 04:48:24 PM »
So Gparted Live is a great utility for making your own TC sticks if you want.  It has a minimal environment, but if you want to nab files with a browser, Netsurf works well enough for convenience.

Some notes: To save anything, one must mount a filesystem first and direct your saved work there.  You have to manually start networking / dhcp, (easy) so just plugging in your ethernet cable is not enough. :)

UEFI / only modern machines: instead of using the ISO, you may find it much easier to boot using only the archived ZIP image instead.  Casual use of the project site kind of leads you towards using the iso, but their ZIP file alternative has a great benefit.  You'll mostly want to use the amd64.zip file, not the iso. 

On a uefi-only machine, all you have to do is unarchive/unzip it to a fat32 thumbdrive.  While there are special exe and sh files to make it bootable after you unarchive it, in many cases that is not even necessary!  Merely unzipping the image to a usb stick is all that is needed for it to be detected and bootable.  You'll have to make that determination if it doesn't work first try and have to use the sh/exe routines because of your hardware.

The documentation for Gparted Live kind of leads you to believe that you *have* to use the special sh/exe routines, but that is NOT mandatory for a lot of the newer boxes. 

That's a huge surprise I first encountered in Porteus on modern boxes.  Now I see that Gparted Live does the same thing.  It's a good reassurance that if you want to build your own 64 bit TC, these options are available.
« Last Edit: November 26, 2021, 05:04:20 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Gparted Live on uefi machines
« Reply #1 on: November 28, 2021, 04:46:37 AM »
I'm so confused since I'm not a boot  expert.

Using just the zip file distribution, (not the iso), unarchived to a fat32 thumbdrive, I let gparted look at itself on the drive.

All gparted shows is one single fat-32 partition.  And only one flag, lba.

That's it!  No esp, no boot flag, not needing to run special exes, or shells, nothing, yet here it is running on any uefi-only machine I throw it at.

It works, but I've got a long road ahead of me trying to figure out how *that* works. 
That's a UNIX book! - cool  -- Garth

Offline gadget42

  • Hero Member
  • *****
  • Posts: 817
Re: Gparted Live on uefi machines
« Reply #2 on: November 28, 2021, 05:41:22 AM »
interested in replicating your experiment. which exact gparted live did you download? thanks!
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Gparted Live on uefi machines
« Reply #3 on: November 28, 2021, 05:05:42 PM »
Sure - I got it here.  Just be sure to get the ZIP file, not the iso:

https://sourceforge.net/projects/gparted/files/gparted-live-stable/1.3.1-1/

The instructions for it are on the site but use the "MANUAL" method-B which uses the zip file.  All the other methods use the cd-iso.  Method-b from either inside another linux system or windows works fine.

https://gparted.org/liveusb.php

There is some good material in method-b to help ensure it will work.  But if you distill it down, for most, it simply consists of "Unzip the file to your usb-stick.  Reboot". :)  It really is that simple.  For *some*, after the process, they may have to run the exe or sh file on that newly created drive.  I don't.

From Windows, all that was needed was to right-click the zip file, and do an "extract all" to the usb stick.  I don't hang out in windows much, but I tested it with the default unzipper of windows just to make sure.

It may seem like it's taking awhile during the process, but if you look closely, much of that is the squashfs file.

Note: Porteus is similar.  While distributed as an iso, it is merely enough to mount the iso, and simply copy the files to the target thumbdrive.  Their own docs indicate that on uefi machines, the exe and sh files are not necessary, but who reads the usb-install docs? Many members of that community assume that an iso /has/ to be used with dd installers, but that is not true for modern machines.

Much like not reading Bmarkus' helpful doc file for PiCore imploring one to expand the partition, but I digress.  :)

So taking my experience with Porteus' install not needing to use the exe or sh files to make it bootable, I did the same with Gparted Live.  And sure enough, no special routines to make Gparted Live bootable were needed.

There's some very special magic to make this kind of simplicity work, but I can't put my finger on how such a seemingly simple process works, or if there is some sort of design compromize that isn't immediately apparent.
« Last Edit: November 28, 2021, 05:30:52 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Gparted Live on uefi machines
« Reply #4 on: November 29, 2021, 03:17:30 AM »
This could be explained by your stick not being "clean" - previous experiments may have left a bootloader in the MBR, etc. If you nuke the MBR (dd if=/dev/zero of=/dev/sdX bs=1M count=1) and create fresh partitions, it probably won't boot with just unzipping.
The only barriers that can stop you are the ones you create yourself.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Gparted Live on uefi machines
« Reply #5 on: November 29, 2021, 04:22:24 AM »
Hi Curaga!  Good thought, but just to make absolutely sure, I pulled a fresh Samsung usb stick out of the blister packaging with default factory fat32 formatting.

Booted just fine.  Freaks me out. :)

Here is a snippet of the "usb-installation.txt" file from the Porteus iso, that many don't see since they never attempt to mount it and just dd it without thinking:

Code: [Select]
Porteus can be installed to a flash drive or hard
drive in several ways.

FOR EFI SYSTEMS:
Ensure the first partition is of type FAT32.
a) Copy the EFI, boot and porteus folders onto the FAT32 partition.
You may create a second partition with a linux filesystem for the porteus folder.
If you do so, you need to add the from=/mnt/sdb2 cheatcode to the porteus-v4.0-x86_64.cfg file.
This file is located in the porteus folder.

For Bios systems, one needs to use either the windows exe or linux shell script to make it bootable after copying.

BUT, back to Gparted Live!  Same thing here!  Although it is a zip file, not an iso - but still, a simple extract and copy to a fat32 is all that is needed for uefi.  I should probably contact the gparted dev and inform them that some users may needlessly be using the exe or sh file.

To make matters worse, I even installed Porteus to a spare usb hard drive with spinning platters as a goof.  Just made it a big-ass fat32 drive, copied the files, and the freaking thing boots on uefi-only machines.

Didn't know whether to laugh or cry, because a quick glance at the drive partitioning says that something this simple is impossible! :)
That's a UNIX book! - cool  -- Garth

Offline gadget42

  • Hero Member
  • *****
  • Posts: 817
Re: Gparted Live on uefi machines
« Reply #6 on: November 29, 2021, 05:47:19 AM »
hypothesis: some manufacturers might be making the primary/machine/startup/code(basic-input-output-stuff) with the ability to read fat32 on anything the io can communicate-with/initiate-at-startup AND to actively look for actionable/bootable stuff(which is probably why "secure-boot" was then desired to keep the machine from running "just-any-thing/system/malware/etc").
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline nick65go

  • Hero Member
  • *****
  • Posts: 839
Re: Gparted Live on uefi machines
« Reply #7 on: November 29, 2021, 06:11:56 AM »
A good manufacture will build a FIRMWARE which allow you, the BUYER, to chose what EFI file and path to boot. To allow you to disable "secure"-boot. Because you bought the machine, you did not rented it, you are the owner.

Expertise is not gained doing the same thing 1000 times. It needs to do 1000 different things,  sometime learning from mistakes.

You have the parts of a weapon. With Linux you can shout yourself in the foot during assembling it. Instead M$windows is like a nanny, lead your hand with instructions, to not allow you to harm yourself; and you learn nothing because restrictions to experiment. But hey, you are more productive (slave) for your tasks (employer), because you can focus on "real" job of using the tools provided.
« Last Edit: November 29, 2021, 06:17:57 AM by nick65go »

Offline gadget42

  • Hero Member
  • *****
  • Posts: 817
Re: Gparted Live on uefi machines
« Reply #8 on: November 29, 2021, 06:41:27 AM »
@nick65go - agree wholeheartedly

nevertheless, it is probably for the best that some measures are put in place to limit malware/botnets/etc given the general-user-apathy of the 99-percent
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Gparted Live on uefi machines
« Reply #9 on: November 29, 2021, 06:26:49 PM »
Guys, this has absolutely nothing to do with secure-boot.  Which unless you have been locked out of the so-called bios by some other person, is easily disabled as part of the secure-boot spec.  And that is assuming that secure-boot is enabled by default, which on many consumer machines is NOT.

So this isn't about secure-boot.  And frankly, uefi is not the boogey-man many think it is.  We've talked that subject to death.  Somehow, I don't think Dell is paying attention to a handful of guys on the TC forum. :)

This is about how both Gparted Live and Porteus use similar techniques of mere /copying/ of distribution files to a fat32 partition to easily boot into modern machines, rather than having to even use dd.
That's a UNIX book! - cool  -- Garth

Offline gadget42

  • Hero Member
  • *****
  • Posts: 817
Re: Gparted Live on uefi machines
« Reply #10 on: November 29, 2021, 11:28:01 PM »
does it still do this if it is /copied/ to the 2nd/3rd/4th/etc fat partition?
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Gparted Live on uefi machines
« Reply #11 on: November 30, 2021, 07:58:02 PM »
Good question - I've never tried that.

Although for me, when I make usb drives, they are task-oriented, and dedicated, so I don't use highly multi-partitioned schemes.

About the only thing I do, is that IF I make a Porteus drive from the windows environment, is that once bootstrapped, I'll use the included gparted to shrink the original single fat-32 partition, and create an ext4 (or sometimes reiserfs) with the new space to hold my data to avoid those limitations of fat32.  So just 2 partitions is usually all I ever need.

However, for some coming from the windows environment, a huge fat32 may not be an issue if their needs are simply using a compressed porteussave.dat file.  (aka mydata.tgz kind of thing)

For Gparted Live, it is a dedicated utility stick to me and not an operating environment, although I guess some could use it that way.  Thus I don't care if it is a huge fat32 because it only has one or two tasks that I ask from it.  If I wanted to make it a working environment, I'd do much the same thing with shrinking and repartitioning of itself.

Here's the kicker!  I couldn't boot Gparted Live on my uefi-only machines with just the ISO!  So initially I just slammed the iso onto Ventoy, which worked.  But man, iso's are starting to pi** me off. :)

But there HAD to be a better way to avoid the 3rd-party loader baggage.  And there it was:  I read the gparted-live docs more carefully and noticed the zip file option.  Lo and behold, it was just like Porteus!  BLAM - up and running bootstrapped by itself with no 3rd-party front end needed for uefi-only.  And, based on the Porteus docs, I tried using it without any special exe or sh file afterwards, which is only needed for bios machines.

But good question - I'll have to test that as a goof because it's not really my style of ops, but might be useful for some others to know / test and report back!
« Last Edit: November 30, 2021, 08:00:56 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth