Jump to content

Clover General discussion


ErmaC
29,866 posts in this topic

Recommended Posts

That doesn't make any sense. If unsigned long is a UINT64 then unsigned long long is also a UINT64. long is a special type that can either be an int or a long long depending on the platform, linux usually makes it long long but stilllllllll.... Why are neither of them following the standard that has existed for thirty years???? There is no way to check the size of type in preprocessing so what the hell. Maybe it's preparsing the line wrong, try

#if defined(__GNUC__) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L))

What does it say the value of __STDC_VERSION__ is for both of those examples?

 

EDIT: C89 does not support %llx so it can't output that error. You need to turn off extensions. GCC should be using -pedantic and -Werror flags, which it appears not to be.

 

EDIT2: Don't you need to specify c89, c99 or c11, not the gnu extension versions?

  • Like 1
Link to comment
Share on other sites

EDIT2: Don't you need to specify c89, c99 or c11, not the gnu extension versions?

I was going to ask this, but you were faster. Seems the right one, since it seems to be a matter of language version, not GNU C or not. The ___GNUC___ macro seems redundant.

 

 

Sent from my MI 5s using Tapatalk

Link to comment
Share on other sites

No, because __STDC_VERSION__ is not defined by MSVC and MSVC always allows %llx because it just makes some insane combination of c89/c99/c11.............. Yay! Such great specification readers apparently.

 

EDIT: The actual support provided for %llx may actually have been introduced in an earlier version but it appears to be accredited to C99. So I bet that gnu89 actually is one of the later proposals from the 1990s that eventually became c99 or even just c99.

EDIT2: I can't find any reference to %llx in any of the standard specifications before c99. So I don't know what the heck.

EDIT3: I see actually that __STDC__ will be 1 when actually conforming to the standard, so maybe it should be:

#if defined(__GNUC__) && (!defined(__STDC__) || (__STDC__ == 1)) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L))

But jeez way too complicated. Just conform to the specs, don't understand trying to add all this {censored} that no one needed but then uses because you make them....

 

EDIT4: The wording on the way the __STDC__ macro is defined is stupid and confusing. I can't tell if it not being defined means that it is c89 or that it is not conforming... Either way why.... whhhhyyyyyyyyy??????????

 

EDIT5: Just noticed too that long long wasn't introduced until c99, so gnu89 is definitely not a compliant implementation. What are the values of those predefined macros??

  • Like 1
Link to comment
Share on other sites

Hi,

 

I want to use a 640MB USB stick as a clover boot stick, using EFI boot. But I seem to be unable to make it work. I tried to format it with GPT+HFS, no boot. I also tried GPT+FAT16, but no boot. diskutil always shows me that no EFI partition was created... I guess I need a EFI partition on the usb stick to boot in efi mode (being available as EFI boot drive)?

 

After those steps, I always installed clover with boot0af.

 

How do I setup this stick so it boots clover in EFI mode?

Link to comment
Share on other sites

Hi,

 

I want to use a 640MB USB stick as a clover boot stick, using EFI boot. But I seem to be unable to make it work. I tried to format it with GPT+HFS, no boot. I also tried GPT+FAT16, but no boot. diskutil always shows me that no EFI partition was created... I guess I need a EFI partition on the usb stick to boot in efi mode (being available as EFI boot drive)?

 

After those steps, I always installed clover with boot0af.

 

How do I setup this stick so it boots clover in EFI mode?

 

Hi.

You need MBR (Master Boot Record) + MS-DOS (FAT) 

It works fine with Legacy & UEFI boot. 

  • Like 2
Link to comment
Share on other sites

Hi,

 

I want to use a 640MB USB stick as a clover boot stick, using EFI boot. But I seem to be unable to make it work. I tried to format it with GPT+HFS, no boot. I also tried GPT+FAT16, but no boot. diskutil always shows me that no EFI partition was created... I guess I need a EFI partition on the usb stick to boot in efi mode (being available as EFI boot drive)?

 

After those steps, I always installed clover with boot0af.

 

How do I setup this stick so it boots clover in EFI mode?

If you "Always install clover with boot0af" there is no need to make the USB as GPT, just format it as Master Boot Record and MS DOS

Link to comment
Share on other sites

Hi,

 

I want to use a 640MB USB stick as a clover boot stick, using EFI boot. But I seem to be unable to make it work. I tried to format it with GPT+HFS, no boot. I also tried GPT+FAT16, but no boot. diskutil always shows me that no EFI partition was created... I guess I need a EFI partition on the usb stick to boot in efi mode (being available as EFI boot drive)?

 

After those steps, I always installed clover with boot0af.

 

How do I setup this stick so it boots clover in EFI mode?

 

You need to make sure it is formatted as FAT32. It does not matter if it is GPT or MBR just that the actual partition is FAT32 (for GPT it will be an EFI partition which you will need to specially setup and probably can only do from linux or your disk will get read funny, for MBR just make one FAT32 partition). You'll probably need to set the cluster size to the smallest possible size you can so that it uses more than 65536 and does not fallback to FAT16. Try formatting the disk in linux or windows, that usually works better for me.

If you "Always install clover with boot0af" there is no need to make the USB as GPT, just format it as Master Boot Record and MS DOS

 

Haha, didn't even notice he said that..... Yeah, listen to Pavo and don't do this, this is for legacy booting.

 

EDIT: Oh man, that is so not clear, sounds like I said to do and not to do the same thing. To clarify, just format as one MBR FAT32 partition but do not install boot0af, do no install any bootX stuff, that's all for legacy. It may make your disk not UEFI bootable depending on your firmware.

  • Like 2
Link to comment
Share on other sites

You need to make sure it is formatted as FAT32. It does not matter if it is GPT or MBR just that the actual partition is FAT32 (for GPT it will be an EFI partition which you will need to specially setup and probably can only do from linux or your disk will get read funny, for MBR just make one FAT32 partition). You'll probably need to set the cluster size to the smallest possible size you can so that it uses more than 65536 and does not fallback to FAT16. Try formatting the disk in linux or windows, that usually works better for me.

 

Haha, didn't even notice he said that..... Yeah, listen to Pavo and don't do this, this is for legacy booting.

 

I can tell that FAT32 + GPT does not work here. It won't boot then here, the boot process even freezes, until I remove the stick. What works is MBR+FAT32, thx @vandroiy2012

  • Like 1
Link to comment
Share on other sites

I can tell that FAT32 + GPT does not work here. It won't boot then here, the boot process even freezes, until I remove the stick. What works is MBR+FAT32, thx @vandroiy2012

 

When you create a GPT with a FAT32 volume (which you most likely created a FAT16 volume because of the size), you are actually creating both an EFI partition and a FAT partition. Both probably got created as FAT16 because of the size of the disk. It needs to be FAT32 because that's the only driver that most firmwares have because don't think many people are booting from floppy disks.

 

EDIT: Also did you install to the EFI partition of that disk or the FAT partition? If you installed to the FAT partition and installed boot0af on that partition the firmware will ignore it as not UEFI bootable.

Link to comment
Share on other sites

apianti: The hard drive utility never created an efi partition on that 640mb stick, even with GPT. And I don't know how to create it manually on macos.  I installed clover on the only existing FAT partition then. My mainboard bios seems to freeze then, maybe a bug?

Link to comment
Share on other sites

apianti: The hard drive utility never created an efi partition on that 640mb stick, even with GPT. And I don't know how to create it manually on macos.  I installed clover on the only existing FAT partition then. My mainboard bios seems to freeze then, maybe a bug?

 

Ummmm.... No. GPT must have an EFI partition or it's not a GPT disk, it's just a malformed MBR disk. Maybe you just didn't see it cause it's not mounted unless you do it manually?

 

EDIT: I'm assuming you are using macOS disk utility, which is why I suggested using linux or windows to format the disk. Disk utility probably made the EFI partition FAT16 which caused your firmware to hang trying to access it.

Link to comment
Share on other sites

Guys, the topic is "Difficulties creating UEFI bootable flash drive with Clover". Instead, all of you suggested using MBR "because it's easier". If there is a problem with the Clover package, trying to install Clover on USB drive, then your answers are not helpful at all !!!

@Funky frank you didn't answer my question: how exactly did you format that drive and exactly how are you trying to install Clover on it?

Some shots/dumps from Terminal with sudo diskutil list would be helpful.

Link to comment
Share on other sites

apianti, no, I used "diskutil list" after macos diskutility formatting. there is no efi partition.  The MBR+msdos combination works fine though, as I wrote. So my bios seems to be capable of reading FAT16. Also I assume FAT16 actually nowadays is the same as FAT32. I don't have linux.


Guys, the topic is "Difficulties creating UEFI bootable flash drive with Clover". Instead, all of you suggested using MBR "because that's easier". If there is a problem with the Clover package, trying to install Clover on USB drive, then your answers are not helpful at all.

@Funky frank you didn't answer my question: how exactly did you format that drive and exactly how are you trying to install Clover on it?

I already answered that above. I used the macos high sierra disk utility. Only MBR+msdos is bootable here, but not GPT+HFS or GPT+MSDOS. Also after selecting GPT formatting, there is no EFI partition created my disk utility, I checked that with "diskutil list". After the formatting I installed clover with boot0af on the first partition.

Link to comment
Share on other sites

apianti, no, I used "diskutil list" after macos diskutility formatting. there is no efi partition.  The MBR+msdos combination works fine though, as I wrote. So my bios seems to be capable of reading FAT16. Also I assume FAT16 actually nowadays is the same as FAT32. I don't have linux.

 

And I'll repeat myself then it was not a properly formatted GPT disk.... Don't make that assumption about FAT16 and FAT32 because it's 100% not accurate. Almost all Linux distros can run from a USB without needed to be installed, just by burning the ISO to the USB.

 

EDIT: How do you know your firmware reads FAT16? I very much doubt it does. That MBR partition is probably FAT32.

Link to comment
Share on other sites

btw. offtopic, regarding APFS, a frightening video: http://docs.macsysadmin.se/2017/video/Day3Session4.mp4


And I'll repeat myself then it was not a properly formatted GPT disk.... Don't make that assumption about FAT16 and FAT32 because it's 100% not accurate. Almost all Linux distros can run from a USB without needed to be installed, just by burning the ISO to the USB.

 

EDIT: How do you know your firmware reads FAT16? I very much doubt it does. That MBR partition is probably FAT32.

I just want to format a usb stick, man. I don't want to install linux just to be able to make an uefi bootable bootstick for clover. Yes, I also assume it is FAT32 and the disk utility just shows "FAT16" if it is below 4GB size.

Link to comment
Share on other sites

btw. offtopic, regarding APFS, a frightening video: http://docs.macsysadmin.se/2017/video/Day3Session4.mp4

I just want to format a usb stick, man. I don't want to install linux just to be able to make an uefi bootable bootstick for clover. Yes, I also assume it is FAT32 and the disk utility just shows "FAT16" if it is below 4GB size.

 

No, it's FAT16 then, and your firmware appears to be able to boot it fine, that does not mean it will boot a FAT16 EFI partition though.... I think, however, the problem was that the GPT disk was just not correctly formatted, I bet you didn't click on the disk itself instead of the partition and set the partition map format to GPT before formatting to one partition? I literally have a USB devoted to just having linux on it all the time just in case something happens because it always boots and can fix anything basically. And you don't install it you just put it on a USB or CD and boot from it and it runs like a normal OS, you could even run the ISO in a virtual machine and passthrough the disk you want to format....

 

EDIT: Jesus, that video makes it seems like APFS is terrible, it's like way slower than HFS+ and doesn't seem like it gives any advantage except in SSD+HDD mixed drives.

EDIT2: 24 hours to encrypt/decrypt for every ~200GB of the disk???!?!??!?!

EDIT3: At my previous job we had to encrypt every drive no matter what and every mac had the largest fusion drive, that would take like a week to encrypt, and it was at a university and is the law so we would have had to do it..... That's nuts.

Link to comment
Share on other sites

apianti, no, I used "diskutil list" after macos diskutility formatting. there is no efi partition.  The MBR+msdos combination works fine though, as I wrote. So my bios seems to be capable of reading FAT16. Also I assume FAT16 actually nowadays is the same as FAT32. I don't have linux.

I already answered that above. I used the macos high sierra disk utility. Only MBR+msdos is bootable here, but not GPT+HFS or GPT+MSDOS. Also after selecting GPT formatting, there is no EFI partition created my disk utility, I checked that with "diskutil list". After the formatting I installed clover with boot0af on the first partition.

As apianti said, something wrong happens in Disk Utility with this USB drive. The GPT formatted drive always has an EFI partition at the beginning, no matter what FS should be used for the rest.

  • Like 1
Link to comment
Share on other sites

As apianti said, something wrong happens in Disk Utility with this USB drive. The GPT formatted drive always has an EFI partition at the beginning, no matter what FS should be used for the rest.

 

I agree. I feel like disk utility never works right. I try not to format a whole disk in disk utility because it usually does not end up well. Will only reformat an HFS+ partition I created in linux to make it correctly journaled.

  • Like 1
Link to comment
Share on other sites

I agree. I feel like disk utility never works right. I try not to format a whole disk in disk utility because it usually does not end up well. Will only reformat an HFS+ partition I created in linux to make it correctly journaled.

Well, I can't do that, the flash drive I use for installing macOS is being used as MBR FAT32 most of the time, so... have no choice, but to use Disk Utility. You know, if I didn't have to use it with old computers (Windows XP), I would have formatted it permanently as GPT long time ago and GPT is supported by Windows 7+

Link to comment
Share on other sites

As apianti said, something wrong happens in Disk Utility with this USB drive. The GPT formatted drive always has an EFI partition at the beginning, no matter what FS should be used for the rest.

 

 

I agree. I feel like disk utility never works right. I try not to format a whole disk in disk utility because it usually does not end up well. Will only reformat an HFS+ partition I created in linux to make it correctly journaled.

 

FlashDrives under 1Gb are always formats without EFI partition in macOS Disk Utility.  

Link to comment
Share on other sites

Well, I can't do that, the flash drive I use for installing macOS is being used as MBR FAT32 most of the time, so... have no choice, but to use Disk Utility. You know, if I didn't have to use it with old computers (Windows XP), I would have formatted it permanently as GPT long time ago and GPT is supported by Windows 7+

 

Windows XP??? You should not be running that on any machine you don't want to be compromised, lol. You could format it in windows though too..... hahaha.

 

FlashDrives under 1Gb are always formats without EFI partition in macOS Disk Utility.  

 

I don't own a flash drive under 1GB or under 8GB actually, and I always have trouble, I even have trouble with internal SSDs and HDDs too. I think it's just disk utility is not really that great.... Especially when compared to something like gparted.

 

EDIT: Actually forgot I have this one 2GB card style one but I broke the card part so it doesn't fit into the USB port anymore.

EDIT2: Just remembered that once I needed to manually install an update on the macs at work and I had to use linux to format the disk to GPT so I could restore the update dmg image on it.... My boss and I spent like a whole day yelling at macs.  :hysterical:

  • Like 1
Link to comment
Share on other sites

No, it's FAT16 then, and your firmware appears to be able to boot it fine, that does not mean it will boot a FAT16 EFI partition though.... I think, however, the problem was that the GPT disk was just not correctly formatted, I bet you didn't click on the disk itself instead of the partition and set the partition map format to GPT before formatting to one partition? I literally have a USB devoted to just having linux on it all the time just in case something happens because it always boots and can fix anything basically. And you don't install it you just put it on a USB or CD and boot from it and it runs like a normal OS, you could even run the ISO in a virtual machine and passthrough the disk you want to format....

 

EDIT: Jesus, that video makes it seems like APFS is terrible, it's like way slower than HFS+ and doesn't seem like it gives any advantage except in SSD+HDD mixed drives.

EDIT2: 24 hours to encrypt/decrypt for every ~200GB of the disk???!?!??!?!

EDIT3: At my previous job we had to encrypt every drive no matter what and every mac had the largest fusion drive, that would take like a week to encrypt, and it was at a university and is the law so we would have had to do it..... That's nuts.

Yes, that let APFS look like a horror vision. I am already converting my High Sierra back to HFS (using 1:1 file cloning to HFS drive). I see no advantage at all for me using APFS.

 

Yes, I clicked the whole drive of course in disk utility, and not a partition :)

Link to comment
Share on other sites

Yes, that let APFS look like a horror vision. I am already converting my High Sierra back to HFS (using 1:1 file cloning to HFS drive). I see no advantage at all for me using APFS.

 

Yes, I clicked the whole drive of course in disk utility, and not a partition :)

 

Seems disk utility is not working correctly then... Good thing you don't really need GPT. As far as APFS, what happens when they start forcing use? Because you know that's coming. I swear they are forcefully obsoleting all of their products on purpose. We've already found out that's the case with iPhones, which every one suspected anyway.

Link to comment
Share on other sites

×
×
  • Create New...