It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
rojimboo: You're free to do what you want, but I don't think you get my point. A ridiculously slow booting machine is a sign of something very wrong, and it's the opposite of 'irrelevant, endless and futile' to fix it as it is a glaring issue that affects a lot of things. But to each his own ;)

By the way, is the windows bootup/operations as slow?
Well nothing else seems to ever be wrong with the computer - everything works perfectly fine except for the slow boot and my inability to get this to run in UEFI, even though I can generally use UEFI mode with CSM disabled (I'm in it right now).

avatar
rojimboo: Previously you mentioned modifying the config file, so I'm not sure.
I had to change where it says "/vmlinuz" to "/boot/vmlinuz" because that's the only way I can get the script to run without an error (it's looking in the wrong directory by default, but I don't know why, and by the way, why is "linuz" spelled with a z instead of an x?).

avatar
rojimboo: So it boots up fine with this method in legacy bios mode?
Yes, the ZIP file method works fine in Legacy/CSM/BIOS mode, and so does the ISO method if I burn it onto a USB drive with a single partition using UNetbootin (by the way, the USB writing program built into Mint doesn't allow specifying a partition, so that's probably not viable for this).

avatar
rojimboo: Maybe it needs to have the EFI partition present already and the normal one after it, before running the script and copying the tar. Try creating the partitions manually following a guide, like for example in the Arch wiki. ESP+ext4 partitions for example if you don't need swap.
I don't know the website and page for that - do you happen to have a link? In any case, I followed a guide on this page:

https://forums.linuxmint.com/viewtopic.php?f=42&t=287353

Look for the third post, which has a heading that says "UEFI - Hybrid Install". I did basically that except that instead of using the Linux Mint installer, I used UNetbootin to put my ISO onto the third partition.

Actually, I just tried this method a few minutes ago, and after I put the ISO onto the partition I couldn't boot it. I tried booting in CSM mode (which I need to do initially, so that I can get into it and then install GRUB from inside of Mint), but it gave me two relevant boot options: one to boot to the third partition and the other to boot to the drive itself. When I tried the third partition the screen went black with a flashing cursor near the top, and the red light on the USB stick stayed on and didn't flash. It just stayed like that for a long time so I restarted and booted with the drive itself instead of the partition. This caused it to automatically go back into my UEFI setting for some reason that I can't figure out, but when I said to close and discard changes then it went into GRUB, but the only things listed were the partitions on the HD, so I think it was just booting my HD the normal way and ignoring the USB drive completely at that point.

avatar
rojimboo: That means EFI setup/partition is not setup properly. Try manually creating the partitions as mentioned in point 3, before copying the tar and running the script.

By the way, you said you were CERTAIN uefi is enabled for your other boots. How are you confirming UEFI is working?
That's what I did. And the way that I know UEFI is enabled is that first of all, I disabled CSM (which means that it's in UEFI mode, right?), and secondly, whenever I'm in that mode, the text that it prints when booting an OS looks different, and so does the logo, and the initial text for entering the BIOS/UEFI settings, so there are a lot of visual clues as to which mode I'm using.

avatar
rojimboo: Whatever floats your boat dude :). I just find it incredibly hard to relate to someone living so backwards that they can't even conveniently show the offending error message when asking people to troubleshoot something for them, haha.
Privacy is the most important thing in the world to me. The reason why I started using Linux in the first place is because I got sick of trying to keep Windows 10 spyware disabled (which is almost impossible to do). For that matter, I don't like touch screens because they get smeared over time, and it's much harder to type on a little screen with my thumbs rather than a keyboard. I'm a programmer and a gamer, so obviously I prefer a desktop with a nice, huge monitor, excellent video card, all gaming peripherals and a keyboard and mouse. And I hardly ever talk on the phone except maybe once a month or less. So you tell me, is there any good reason why I should spend that kind of money to buy something that I wouldn't even use, and which would make me uncomfortable to even have on me, because of their absolute disrespect for anyone's privacy?

avatar
rojimboo: Well seeing as I got conflicting info about this approach 1, I'll wait for your answers to my questions, especially the one about using default settings for linux-live-kit. Then, before abandoning this approach and trying out a new, I think it's worthwhile just to explore how to make it UEFI bootable as that seems to be the only issue remaining (apart from something seriously wrong with your rig haha). But Unetbootin or other live usb creators could help us probably to make an UEFI bootable custom live usb, without the linux-live-usb script.
I'm not sure how you got conflicting info, but I'll clarify anything if you need me to do so. I hope I've answered your questions now though. I did use the default settings for Linux Live Kit, except for changing the path to vmlinuz, which was necessary just to get it to work at all. Other than that there weren't really any settings to configure. I just ran the script.

Yes, getting it compatible with UEFI is the only remaining issue, and I don't see why there'd be anything wrong with my computer - it's bran new, for God's sake!

UNetbootin doesn't make anything UEFI-bootable, at least in my experience. Like I said, I used it and it made a drive that only booted when I have CSM enabled.

As for making the drive without using the linux-live-usb script, what do you mean? You're not talking about Live Kit, are you? Or are you talking about a USB burning program? In any case, I'd still need to use Live Kit to make the ISO in the first place (I've tried making ISO files directly from the data on my HD using things like dd, and that doesn't work).

avatar
rojimboo: Oh and finally, what does the custom iso look like mounted? Have you explored it to look for boot config files especially? I found where they are on the Arch ISO for example, and by modifying them people can control the bootup process and partition/drive mounting, but I don't have access to your ISO.

I do have a spare USB key. Might reproduce this and experiment a little with linux-live-usb :)
Well that sounds like a good method to try, but I'm not sure which files are the "boot config" files, or where they're located, or what I'd be looking for exactly. And I'm not sure whether I have any software for mounting an ISO file instead of just burning one. I have stuff like that for Windows, but I'm not sure what I'd use to do that in Linux.

If you test it, please keep a step-by-step guide of what you did!
10 minutes ?:O wth does it check hdd crc each boot or what?
i bet you setup bios falsely as rojim said it shouldnt take that long at all
What's crc? I didn't set up the BIOS (at least not initially) - it's how it was included with the computer, and the only things I've changed are toggling CSM on and off, enabling virtualization (which I hadn't even done by the time I started using Linux), and disabling Secure Boot (which actually happened automatically when I installed Linux).
avatar
HeresMyAccount: What's crc? I didn't set up the BIOS (at least not initially) - it's how it was included with the computer, and the only things I've changed are toggling CSM on and off, enabling virtualization (which I hadn't even done by the time I started using Linux), and disabling Secure Boot (which actually happened automatically when I installed Linux).
you should check throu the bios settings then, read the manual what means what while you do it
Well I tried one more thing: I ran sudo fdisk -t dos /dev/sdb and then it went slightly differently than I remembered. I thought I just had to press the keys p, a, w, q (print, activate, write, quit), but this time it seemed to want a command so I had to press Enter after each one, and the p worked fine, but then the a gave me an option of a partition to activate (the third one was default and seemed to already be activated), so I activated the first one, thinking that it would cause it to boot in the Legacy/BIOS partition that I made. But then when I booted (in CSM) it said it can't find the OS.

EDIT: This is ridiculous - I just searched how to create a bootable UEFI USB drive and got results for things like Rufus (which won't work because it's only compatible with Windows), and that Suse Image Writer thing (which doesn't seem to have a package that I can use - only RPM and YMP). And UNetbootin doesn't seem to be able to do it as far as I can tell. Which program can make it boot in UEFI and also runs in Linux? Maybe I'll try dd, but I don't know if that will work either (especially since it's so low-level, I wouldn't be surprised if it just copies the thing directly and doesn't bother to put any bootable information which isn't already there).
Post edited December 10, 2020 by HeresMyAccount
Well, I also tried a method involving 7z, as presented here:

https://techbit.ca/2018/09/creating-a-bootable-ubuntu-uefi-usb-drive/

But it wouldn't boot. Then I tried running the script for making it bootable, and it said:

./extlinux.x64: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: .
Error installing boot loader.
Read the errors above and press enter to exit...
I tried many things, and my conclusion is that

a) linux-live kit does not have a working UEFI solution
b) linux-live kit barely works in legacy bios mode and in general does not allow for a nice customising experience
c) You can't manually install a bootloader with correct mount parameters as chroot:ing into a USB stick with merely an ISO burnt onto it will not work. Ie. you have to rely on 3rd party scripts and utilities as part of the custom live usb iso creation.

Some things I tried after creating a linux-live folder (a 9gb file due to bloated Arch installation of mine haha):

1. Using the default script after creating an ISO from the folder and mounting it to /mnt/iso
The default bootinst.sh does not create an EFI partition, thus it can never work. This is evidenced by many support tickets on the github, so somewhere along the ride it broke or it never worked for UEFI. It's also poorly documented that the partition needs to be MBR and does not work with GPT at all. This information was buried in support tickets by the creator.

2. Manually creating a fat32 EFI partition separate from a ext4 one, and installing a bootloader onto it (GRUB):
My process was this:

Partition and mount:
sudo cfdisk /dev/sdX
sudo mkfs.fat -F 32 /dev/sdXn
sudo mkdir /mnt/boot
sudo mount /dev/sdXn /mnt/boot/
sudo mkfs.ext4 /dev/sdXk
sudo mkdir /mnt/iso
sudo mount /dev/sdXk /mnt/iso

Copy live folder:
sudo cp -r ~/programs/tmp/linux-usb-data-9935/linux-usb/ /mnt/iso/
sudo cp -a ~/programs/tmp/linux-usb-data-9935/linux-usb/boot/. /mnt/boot/

Install GRUB and create the grub cfg (that last command is missing but it's something with grub-mkconfig):
grub-install --target=x86_64-efi --efi-directory=/mnt/boot/ --bootloader-id=GRUB --boot-directory=/mnt/iso/linux-usb/boot

This last step did not work as you need to be either chroot:ed in on the mount, or booted already in live USB. So actually this last step messed up my Arch distro proper install's boot loader unfortunately and I had to rescue it from my other Manjaro one with chroot, hahah. Serves me right for not reading the Arch wiki thoroughly (they warned about this).

3. Making an ISO from the folder, and burning it with various live USB creators
I think most, if not all live usb creators don't actually make partitions and install bootloaders on there - they assume the ISO handles that already. I tried Gnome multidisk writer, Suse imagewriter and didn't even bother with UnetBootin and Etcher after reading they do not setup boot partitions/loaders. I didn't try ventoy, which seems a bit different, but I doubt it creates a separate EFI fat32 partition with a bootloader and efi stub. In any case, as the ISO we are working with from linux-live kit is not setup properly (especially for UEFI), there's only so much an ISO burner can do. Garbage in, garbage out.

Approach 3 (I think. I lost count) - Alternative Custom live linux ISO creators:
I don't know if you already tried this one, but I think I googled a solution for you for making a custom live linux iso on ubuntu distros (Cubic = Custom Ubuntu ISO Creator):

ostechnix .com /how-to-create-a-custom-ubuntu-live-iso-image-with-cubic/

(you need to get rid of spaces due to me not being able to post links) Alternatively find it by googling :)

There are very clear instructions how to make a custom live linux iso there, with your set packages and anything else you need. It's specifically for Ubuntu distros and will work on Mint. You can add/remove packages/files/kernels and it will chroot you to customise it later via terminal, so it's amazing (this is the step that fails under linux-live kit). And it has a GUI for most of it :)

Then, just burn the ISO with any live USB creator (gnome-multidiskwriter is super simple for example) and it should work! UEFI will work as long as your current Mint is UEFI, as it picks up the system files from there when making the custom ISO, according to the documentation.

An alternative custom linux live ISO creator is arch-iso, which is apparently very powerful. It's also more complicated and it's Arch based so you would have to learn a bunch of new stuff and commands coming from Mint/Ubuntu. But it's also an option.

But I think Cubic is the best option right now. Definitely abandon all hope with a working linux-live kit ISO and UEFI (or even a decent legacy bios live install).

Let me know how it goes.
yeah when i tried out linux i had problems with uefi too , dunno what i did to make it work sorry:I
i think i used rufus with tweeking settings
Post edited December 10, 2020 by Orkhepaj
rojimboo, I've read your whole post, and it seems somewhat disheartening (though I'm not sure why you think that Live Kit doesn't even work well for Legacy/BIOS/CSM, considering that's what I've already used it for and it seems to work fine for that).

As for it not being compatible with UEFI at all, that's bad news, and I'm sorry that you messed up your own system in the attempt, but I know of a fairly easy way to reinstall GRUB in case you ever need to do it (you need to boot into GRUB with a different Linux installation, like on a USB stick, and if you don't have one then use an installer to make one and then boot that, then from the GRUB screen, tell it to run Linux on your HD, and once you're booted into that, just reinstall GRUB - I've had to do this MANY times, because every time you install Mint directly onto a USB stick it messes up GRUB on the HD, because of a weird glitch).

As for burning the image, I can't even get Imagewriter to install on Mint because there's only YMP and RPM files, and neither of those are compatible with my package manager. Is there somewhere that I can get it in a compatible format, or otherwise, isn't there any ISO burning software that can automatically make a UEFI partition that will automatically boot whatever I burn onto the USB stick?

As for CUBIC, I've heard of that, but isn't that one that you must run software to modify the ISO directly and may possibly have a command prompt to do so? Here's the only problem with that: I'd feel much more comfortable with one that works the way that Live Kit or Ubuntu Imager do (have you tried that one at all?), because there are a LOT of customizations that I have to make in terms of configuring system settings, installing software, configuring the settings in the software, temporarily enabling and then later disabling a lot of Internet stuff (and also setting up DNS things, etc.), uninstalling a bunch of extra software that I don't want to be in the final ISO, etc.

And I'm not sure that I'd be able to do ALL of the things that I need to do from only the terminal! In fact, there are many of those things that I'm not sure exactly how I would do that, or whether it's possible without using the GUI. And there are settings which are presumably stored in configuration files, but I don't always know which ones, or where exactly in the file it's stored, and what I'm looking for, etc.

So this is the reason why I had initially chosen to use Live Kit, and why I also tried Ubuntu Imager. What do most people do when they have to do this much customization?

EDIT: Or am I misunderstanding something about CUBIC? Because if it can do things the way that I've described then I'd like to know, but it's just that from what I read, it seems like everything must be done through a terminal.
Post edited December 10, 2020 by HeresMyAccount
avatar
rojimboo: grub-install --target=x86_64-efi --efi-directory=/mnt/boot/ --bootloader-id=GRUB --boot-directory=/mnt/iso/linux-usb/boot

This last step did not work as you need to be either chroot:ed in on the mount, or booted already in live USB. So actually this last step messed up my Arch distro proper install's boot loader unfortunately and I had to rescue it from my other Manjaro one with chroot, hahah. Serves me right for not reading the Arch wiki thoroughly (they warned about this).
Where do they warn about this? I've only seen the warning where they specifically instruct you to use --boot-directory if you're not in a chroot. I assume it should work. (Also you probably should use --removable flag if you're making a bootable USB stick, but this should make no difference as far as breaking your existing install goes.. unless the thing that got messed up was your efi boot manager entry, in which case --removable *does* help and chroot or running a live USB does *not* help)

Is grub-install broken? I think I took a glance at the code during the discussion in the earlier thread and I wasn't exactly impressed with what I saw (not that I've ever been particularly impressed by grub).. but I no longer remember what I found back then.
Post edited December 10, 2020 by clarry
Do you happen to know of a live ISO generator which can create an ISO from an installed OS (the way Live Kit does) but is compatible with UEFI? It seems that Ubuntu Imager is, but that one doesn't seem to work.
avatar
HeresMyAccount: Do you happen to know of a live ISO generator which can create an ISO from an installed OS (the way Live Kit does) but is compatible with UEFI? It seems that Ubuntu Imager is, but that one doesn't seem to work.
Why specifically from an installed OS, instead of something like Unetbootin, Fedora Media Writer, Etcher, or such?

And yeah, Linux Live USB has been dead since 2015. The creator vanished some time after adding support for Ubuntu 15 to the tool.
Vanished? How so? Why? And the other things that you mentioned aren't the same, because all they do is burn the ISO, but I need to make the ISO with a customized live mode, which is what Live Kit does, by transforming an installation into a live ISO, but the only problem with that is it doesn't seem to be compatible with UEFI, which I need.
avatar
HeresMyAccount: As for burning the image, I can't even get Imagewriter to install on Mint because there's only YMP and RPM files, and neither of those are compatible with my package manager. Is there somewhere that I can get it in a compatible format, or otherwise, isn't there any ISO burning software that can automatically make a UEFI partition that will automatically boot whatever I burn onto the USB stick?
Not to my knowledge - I don't think it's the job of the ISO burner to figure out complex partitions and bootloaders for different distro isos.

As for a simple ISO burner - you should have gnome-multi-writer for example in your repo already.

avatar
HeresMyAccount: As for CUBIC, I've heard of that, but isn't that one that you must run software to modify the ISO directly and may possibly have a command prompt to do so? Here's the only problem with that: I'd feel much more comfortable with one that works the way that Live Kit or Ubuntu Imager do (have you tried that one at all?), because there are a LOT of customizations that I have to make in terms of configuring system settings, installing software, configuring the settings in the software, temporarily enabling and then later disabling a lot of Internet stuff (and also setting up DNS things, etc.), uninstalling a bunch of extra software that I don't want to be in the final ISO, etc.

And I'm not sure that I'd be able to do ALL of the things that I need to do from only the terminal! In fact, there are many of those things that I'm not sure exactly how I would do that, or whether it's possible without using the GUI. And there are settings which are presumably stored in configuration files, but I don't always know which ones, or where exactly in the file it's stored, and what I'm looking for, etc.
You really should check out the linked guide, if you haven't already, and then try out Cubic. Everything you mentioned can be done seemingly, and more. Mostly through the GUI (you can even copy paste files if you're afraid of the terminal for some reason ;) and more effectively and powerfully through the chrooted terminal.

By the way, if you actually want to use Linux properly, and especially troubleshoot issues, you're gonna have to overcome your fear/dislike of the terminal haha. I knew 0 commands a year ago, and now I recently started using Arch, (but with still a hell of a lot to learn). I only know Python, zero scripting languages, which is why custom scripts with poor documentation scare me (like in this case).

avatar
HeresMyAccount: So this is the reason why I had initially chosen to use Live Kit, and why I also tried Ubuntu Imager. What do most people do when they have to do this much customization?
Arch Iso, Manjaro Architect for arch based, I'm pretty sure, and Cubic for Ubuntus. At a glance, those seem the most popular and supported.

avatar
HeresMyAccount: EDIT: Or am I misunderstanding something about CUBIC? Because if it can do things the way that I've described then I'd like to know, but it's just that from what I read, it seems like everything must be done through a terminal.
Again, if the most complicated stuff you have to configure are custom configs and copying them over to the iso, then you can do everything you need to do in Cubic, mostly with the GUI. I can't guarantee you won't have to use the terminal (which shouldn't be a big hurdle on Linux), as I'm not sure what it is you're doing/configuring, but I bet 95% of what you need is achievable through the GUI.

Only way to know is read the guide and bonus for reading the Cubic documentation, and try it out. Good luck!

avatar
clarry: Where do they warn about this? I've only seen the warning where they specifically instruct you to use --boot-directory if you're not in a chroot. I assume it should work. (Also you probably should use --removable flag if you're making a bootable USB stick, but this should make no difference as far as breaking your existing install goes.. unless the thing that got messed up was your efi boot manager entry, in which case --removable *does* help and chroot or running a live USB does *not* help)

Is grub-install broken? I think I took a glance at the code during the discussion in the earlier thread and I wasn't exactly impressed with what I saw (not that I've ever been particularly impressed by grub).. but I no longer remember what I found back then.
Yeah, I'm still unsure what happened. I did use the --boot-directory option as per the Arch wiki. But I did not use the --removable option, so that might be it, you're probably right.

I doubt grub-install is broken, but I find the whole bootloader/boot partition setup process incredibly tricky to get right. I don't know if other bootloaders are the same, like syslinux, but the scope for error seems very large in general. And it's kinda crucial ;) Not being able to boot into a mounted root partition screws you over haha.
Post edited December 11, 2020 by rojimboo
avatar
clarry: Where do they warn about this? I've only seen the warning where they specifically instruct you to use --boot-directory if you're not in a chroot. I assume it should work. (Also you probably should use --removable flag if you're making a bootable USB stick, but this should make no difference as far as breaking your existing install goes.. unless the thing that got messed up was your efi boot manager entry, in which case --removable *does* help and chroot or running a live USB does *not* help)

Is grub-install broken? I think I took a glance at the code during the discussion in the earlier thread and I wasn't exactly impressed with what I saw (not that I've ever been particularly impressed by grub).. but I no longer remember what I found back then.
avatar
rojimboo: Yeah, I'm still unsure what happened. I did use the --boot-directory option as per the Arch wiki. But I did not use the --removable option, so that might be it, you're probably right.

I doubt grub-install is broken, but I find the whole bootloader/boot partition setup process incredibly tricky to get right. I don't know if other bootloaders are the same, like syslinux, but the scope for error seems very large in general. And it's kinda crucial ;) Not being able to boot into a mounted root partition screws you over haha.
GRUB2 is definitely overcomplicated here. Well, the whole Linux ecosystem is overcomplicated, but GRUB2 doesn't help.. it embraces all the complexity instead of keeping things simple, stupid.

In principle, installing a UEFI bootloader is *extremely* simple: just partition using GPT, add the ESP, format it (FAT32), copy bootloader binary to efi/boot/bootx64.efi. That's all, it's ready to boot, no messing with efi vars, no need for chroots or a bajillion command line flags.

If you don't use --removable, grub won't install as boot/bootx64.efi. Instead it uses whatever bootloader-id you passed (or whatever default it can fish out). Some systems won't boot these by default, especially from removable media. To make it bootable, grub-install tries to mess with efivars to inform your efi boot manager about your new installation (if you bring up your system's boot menu at startup and you see something like "grub" or the name of your distro, that's where it came from.. and that's also why you can have stale entires for distros that you've uninstalled long since, sigh). Obviously, if this bootloader is on a USB stick and you move it to another computer, well, its efi boot manager hasn't been informed about the installation and it might not boot. I don't know what's supposed to happen if you install a new bootloader using the same id that's already used, but I imagine this could confuse your efi.

Of course, there's more to it than that because Linux and GRUB support a bajillion different filesystems, and grub-install wants to sniff around your rootfs to figure out which modules to install. None of this complexity exists e.g. in the OpenBSD bootloader.
Post edited December 11, 2020 by clarry