Tiny Core Linux
		Tiny Core Base => TCB Talk => Topic started by: Rabie on January 25, 2022, 03:05:47 PM
		
			
			- 
				Hi There,
 
 is there a way to make TinyCore boots from a boot media with both legacy and UEFI if the PC doesn't support legacy boot?
 
 i am using TinyCore x64 with the bootloader extlinux.
 
 Thank you
- 
				Hi Rabie
 I kind of sounds like you answered your own question.
 
 Regardless of what you do to the boot media, how could you expect to boot it legacy mode if the hardware
 does not support legacy mode?
 
- 
				Hi Rich,
 
 i may have asked the question wrong.
 
 how could you expect to boot it legacy mode if the hardware
 does not support legacy mode?
 
 it has to boot with UEFI if the PC doesn't support legacy! Not with legacy if its not supported  ;D
 
 
- 
				
 it has to boot with UEFI if the PC doesn't support legacy! Not with legacy if its not supported  ;D
 
 
 AFAIK usually this choice of which to prioritise  is handled by the system bios.
 
 wrt how to setup a hdd/usb ect  see
 
 http://forum.tinycorelinux.net/index.php?topic=20939.0 - How to make a legacy bios/uefi dual boot usb stick with syslinux
 
 http://forum.tinycorelinux.net/index.php/topic,19364.0.html -  Howto make a legacy bios/uefi dual boot usb stick with grub2
 
 
- 
				hi mocore,
 
 http://forum.tinycorelinux.net/index.php?topic=20939.0 - How to make a legacy bios/uefi dual boot usb stick with syslinux 
 yes i already found this topic but i couldn't really follow the instructions.
 
 is Syslinux the same as extlinux ?
 
- 
				Hi Rabie
  ... is Syslinux the same as extlinux ? Syslinux and extlinux are both found in the  syslinux.tcz  extension.
 
 From the  .info  file:
  ----- Snip -----
 bootloaders for MS-DOS FAT filesystems (SYSLINUX),
 network booting (PXELINUX),
 bootable "El Torito" CD-ROMs (ISOLINUX), and
 Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX).
 ----- Snip -----
 Found here:
 http://tinycorelinux.net/12.x/x86/tcz/syslinux.tcz.info
 
- 
				Hi Rich,
 
 Syslinux and extlinux are both found in the  syslinux.tcz  extension. 
 i see.
 
 I have installed TinyCore on a USB media and can boot with it but only with legacy.
 
 It would be nice, if you told me step by step how do i make the same USB media boot on a UEFI system.
 
 You already helped me so much before.
 
 Thnx
- 
				Hi Rabie
 I've only had to deal with  UEFI  once, and this was the writeup I followed:
 http://forum.tinycorelinux.net/index.php/topic,22848.msg143377.html#msg143377
 
- 
				is Syslinux the same as extlinux ?
 
 They are the same family, just different design for different file system.
 If your boot media is FAT(32) use syslinux
 If it is EXT2(,3,4) use extlinux
 
 It would be nice, if you told me step by step how do i make the same USB media boot on a UEFI system.
 
 Which part do you have trouble with ?
- 
				Hi polikuo,
 
 first i have an understanding question.
 when i try to make the USB-Stick bootable with both legacy and UEFI, should i follow the instruction on an new attached USB-Stick or on the same boot Stick i use ?
 
 when i try to do your instruction from: http://forum.tinycorelinux.net/index.php/topic,20939.0.html
 
 i get like 9 Partitions
 sudo gdisk /dev/sdb
 sdb   sdb1  sdb2  sdb3  sdb4  sdb5  sdb6  sdb7  sdb8  sdb9
 i continue anyway with:
 sudo gdisk /dev/sdb
 GPT fdisk (gdisk) version 1.0.4
 
 Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present
 
 
 ***************************************************************
 Found invalid GPT and valid MBR; converting MBR to GPT format
 in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
 typing 'q' if you don't want to convert your MBR partitions
 to GPT format!
 ***************************************************************
 
 
 Warning! Secondary partition table overlaps the last partition by
 33 blocks!
 You will need to delete this partition or resize it in another utility.
 
 
 
 but that seems to be wrong in my case, cause all sdb* Partitions are mounted and in the next step you say:
 
 formatting
 
 tce-load -wil dosfstools
 mkfs.vfat /dev/sdb1
 mkfs.vfat /dev/sdb2
 mkfs.ext4 /dev/sdb3
 sudo rebuildfstab
 
 
- 
				Hi Rabie
  ... when i try to make the USB-Stick bootable with both legacy and UEFI, should i follow the instruction on an new attached USB-Stick or on the same boot Stick i use ? ...  The instructions are for a stick which is not mounted and the contents will be destroyed.
 
 
- 
				Which part do you have trouble with ? i don't get this part
 
 # follow gdisk instruction to set up MBR hex code and bootable flags
 07       # M$
 n        # not bootable
 EF       # ESP
 y        # personally I prefer putting all the files together
 83       # Linux filesystem
 n        # if you pick the 3rd partition as the bootable partition, use extlinux to install the boot loader
 x        # go back to expert menu
 
 i was asked from gdisk to create entry for GTP:
 
 Creating entry for GPT partition #1 (MBR partition #1)
 Enter an MBR hex code (default 07):
 Set the bootable flag? (Y/N): n
 
 Creating entry for GPT partition #2 (MBR partition #2)
 Enter an MBR hex code (default 83):
 Set the bootable flag? (Y/N): n
 
 GPT partition #3 does not exist or is too big; skipping.
- 
				Hi Rabie
 
 My tutorial destroys everything on an USB stick
 
 Back in the days, windows only allow a single partition on an USB stick.
 
 If windows finds more, it would read the first partition and pretend that the rest do not exist.
 
 Therefore, I setup a FAT32 partition as the first for file sharing between the systems.
 
 You don't need this if you're not using TC that way.
 
 I put my EFI in the second partition when TC takes the third.
 
 i get like 9 Partitions 
 sudo gdisk /dev/sdb
 sdb   sdb1  sdb2  sdb3  sdb4  sdb5  sdb6  sdb7  sdb8  sdb9
 i continue anyway with:
 sudo gdisk /dev/sdb
 GPT fdisk (gdisk) version 1.0.4
 
 Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present
 
 
 ***************************************************************
 Found invalid GPT and valid MBR; converting MBR to GPT format
 in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
 typing 'q' if you don't want to convert your MBR partitions
 to GPT format!
 ***************************************************************
 
 
 Warning! Secondary partition table overlaps the last partition by
 33 blocks!
 You will need to delete this partition or resize it in another utility.
 
 
 This means your disk/USB is not a GPT one.
 Converting from MBR to GPT may cause data loss.
 It's not a must, but most machine that use UEFI prefer GPT format.
 
 Which part do you have trouble with ? i don't get this part
 Which part of my tutorial do you have trouble with ?
- 
				Hi polikuo,
 so i have done the following Part successfully
 
 sudo gdisk /dev/sdb
 # main menu
 o        # create a new empty GUID partition table (GPT)
 n        # add a new partition
 # number, size, type = 0700
 n        # add a new partition
 # number, size, type = ef00
 n        # add a new partition
 # number, size, type = 8300
 # now we'll create a hybrid MBR for legacy BIOS
 x        # extra functionality (experts only)
 # expert menu
 r        # recovery and transformation options
 h        # make hybrid MBR
 1 2 3    # assign partitions to MBR
 # Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N):
 n        # we're using syslinux
 # follow gdisk instruction to set up MBR hex code and bootable flags
 07       # M$
 n        # not bootable
 EF       # ESP
 y        # personally I prefer putting all the files together
 83       # Linux filesystem
 n        # if you pick the 3rd partition as the bootable partition, use extlinux to install the boot loader
 x        # go back to expert menu
 # expert menu
 a        # set attributes
 2        # your legacy bootable partition
 2        # boot flag attribute code
 w        # write table to disk and exit
 
 i have trouble with the following:
 
 formatting
 
 tce-load -wil dosfstools
 mkfs.vfat /dev/sdb1
 mkfs.vfat /dev/sdb2
 mkfs.ext4 /dev/sdb3
 sudo rebuildfstab
 
 
 in my case is the Device "sdd" but There is no sdd2 and sdd3
 
  /dev/sdd*
 /dev/sdd   /dev/sdd1
 
- 
				Hi Rabie
 What does this return:
 fdisk -l /dev/sdd
- 
				in my case is the Device "sdd" but There is no sdd2 and sdd3
 
 
 Hi Rabie.
 It looks like the partition table is not updated to the kernel.
 Did you run gdisk with sudo ?
 Anyway, replug your USB should do the trick.
 If not, run rebuildfstab
 sudo rebuildfstab
- 
				Hi Rich, hi polikuo,
 
 it turns out, that i did something wrong. Now i have the 3 Partitions after i have tried it again.
 fdisk -l /dev/sdd
 Disk /dev/sdd: 3727 MB, 3908042752 bytes, 7632896 sectors
 1017 cylinders, 121 heads, 62 sectors/track
 Units: sectors of 1 * 512 = 512 bytes
 
 Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
 /dev/sdd1    0,33,3      2,88,11           2048      20470      18423 9211K  7 HPFS/NTFS
 /dev/sdd2 *  2,88,21     27,34,39         20480     204700     184221 89.9M ef EFI (FAT-12/16/32)
 /dev/sdd3    27,36,15    272,104,9       204800    2047000    1842201  899M 83 Linux
 /dev/sdd4    0,0,2       0,33,2               1       2047       2047 1023K ee EFI GPT
 
 Partition table entries are not in disk order
 
 so i am stuck now with the configuration from syslinux.
 
 this is not the full configuration right ?
 UI vesamenu.c32
 DEFAULT tc
 
 LABEL tc
 MENU LABEL Tiny Core
 KERNEL /vmlinuz
 INITRD /core.gz
 APPEND ...
 
 This is how i modified your example:
 
 UI vesamenu.c32
 DEFAULT tc
 
 LABEL tc
 MENU LABEL Tiny Core
 KERNEL /mnt/sdd2/vmlinuz64
 INITRD /mnt/sdd2/corepure64.gz
 APPEND ...      #what should be in APPEND
 
 
 What should i do if i pick the 3rd partion as the bootable partion ?
 83       # Linux filesystem
 n        # if you pick the 3rd partition as the bootable partition, use extlinux to install the boot loader
 
 
 
 
- 
				this is not the full configuration right ?
 UI vesamenu.c32
 DEFAULT tc
 
 LABEL tc
 MENU LABEL Tiny Core
 KERNEL /vmlinuz
 INITRD /core.gz
 APPEND ...
 
 This is how i modified your example:
 
 UI vesamenu.c32
 DEFAULT tc
 
 LABEL tc
 MENU LABEL Tiny Core
 KERNEL /mnt/sdd2/vmlinuz64
 INITRD /mnt/sdd2/corepure64.gz
 APPEND ...      #what should be in APPEND
 
 Hi Rabie
 You have clearly misunderstood the syntax of Syslinux
 /vmlinuz means look from the top of your partition
 If you put your file at say /mnt/sdd2/boot/vmlinuz
 The syntax would be /boot/vmlinuz
 
 What should i do if i pick the 3rd partion as the bootable partion ?
 83       # Linux filesystem
 n        # if you pick the 3rd partition as the bootable partition, use extlinux to install the boot loader
 
 That means
 extlinux -i /mnt/sdd2/path/to/extlinux.conf
 Note that, while they are the same family, they use different commands during installations.
- 
				Hi polikuo,
 
 Can't i just use extlinux in the 3rd partition like this ?
 
 DEFAULT corepure64
 LABEL corepure64
 KERNEL /tce/boot/vmlinuz64
 INITRD /tce/boot/corepure64.gz
 APPEND ##my parameter##
 
 extlinux -i /mnt/sdd3/tce/boot/
 extlinux: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: /mnt/sdd3/tce/boot/
 it seem like the Directory ist not ext4 although we did format the partition with ext4 like this:
 mkfs.ext4 /dev/sdb3
 
 and in the 2nd Partition the EFI boot ?
- 
				Can't i just use extlinux in the 3rd partition like this ?
 
 I have no clue, never try that.
 
 extlinux -i /mnt/sdd3/tce/boot/
 extlinux: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: /mnt/sdd3/tce/boot/
 it seem like the Directory ist not ext4 although we did format the partition with ext4 like this:
 mkfs.ext4 /dev/sdb3
 
 Did you mount your partition ?
 Extlinux uses file path, which requires mounting.
 
 Syslinux on the other hand, use device name.
 You likely need to unmount the partition
- 
				Hi Rabie
 Can't i just use extlinux in the 3rd partition like this ?
 
 DEFAULT corepure64
 LABEL corepure64
 KERNEL /tce/boot/vmlinuz64
 INITRD /tce/boot/corepure64.gz
 APPEND ##my parameter##
 
 If you mean setting the 3rd as legacy boot partition
 You need to mark it bootable with gdisk
 
 it seem like the Directory ist not ext4 although we did format the partition with ext4 like this:
 mkfs.ext4 /dev/sdb3
 
 You mean sdd right?
 Is that a typo, or have you formatted a wrong partition
- 
				Hi polikuo,
 
 Did you mount your partition ?
 Extlinux uses file path, which requires mounting.
 i will try that.
 
 If you mean setting the 3rd as legacy boot partition
 You need to mark it bootable with gdisk
 yes this is exactly what i meant.
 
 i did mark the 3rd partition as bootable but somehow i can't get this to work.
 
 
 mkfs.ext4 /dev/sdb3
 
 You mean sdd right?
 Is that a typo, or have you formatted a wrong partition
 yes i meantmkfs.ext4 /dev/sdd3it was a typo
 
 i will write you tomorrow, what i exactly did. Because the new USB won't boot neither from UEFI or Legacy  :(  :(
 
- 
				Hi polikuo,
 
 so here is exactly what i did:
 
 
 sudo gdisk /dev/sdd
 
 Command (? for help): o
 This option deletes all partitions and creates a new protective MBR.
 Proceed? (Y/N): y
 
 Command (? for help): n
 
 Partition number (1-128, default 1):1
 First sector (34-7632862, default = 2048) or {+-}size{KMGTP}:2048
 Last sector (2048-7632862, default = 7632862) or {+-}size{KMGTP}: 20470
 Current type is 'Linux filesystem'
 Hex code or GUID (L to show codes, Enter = 8300): 0700
 Changed type of partition to 'Microsoft basic data'
 
 Command (? for help): n
 Partition number (2-128, default 2):2
 First sector (34-7632862, default = 20480) or {+-}size{KMGTP}:20480
 Last sector (20480-7632862, default = 7632862) or {+-}size{KMGTP}: 204700
 Current type is 'Linux filesystem'
 Hex code or GUID (L to show codes, Enter = 8300): ef00
 Changed type of partition to 'EFI System'
 
 
 Command (? for help): n
 Partition number (3-128, default 3):3
 First sector (34-7632862, default = 204800) or {+-}size{KMGTP}:204800
 Last sector (204800-7632862, default = 7632862) or {+-}size{KMGTP}: 2047000
 Current type is 'Linux filesystem'
 Hex code or GUID (L to show codes, Enter = 8300): 8300
 Changed type of partition to 'Linux filesystem'
 
 Command (? for help): x
 
 Expert command (? for help): r
 
 Recovery/transformation command (? for help): h
 
 Type from one to three GPT partition numbers, separated by spaces, to be
 added to the hybrid MBR, in sequence: 1 2 3
 Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n
 
 Creating entry for GPT partition #1 (MBR partition #1)
 Enter an MBR hex code (default 07): 07
 Set the bootable flag? (Y/N): n
 
 Creating entry for GPT partition #2 (MBR partition #2)
 Enter an MBR hex code (default EF): EF
 Set the bootable flag? (Y/N): y
 
 Creating entry for GPT partition #3 (MBR partition #3)
 Enter an MBR hex code (default 83): 83
 Set the bootable flag? (Y/N): y
 
 Recovery/transformation command (? for help): x
 
 Expert command (? for help): a
 Partition number (1-3): 3
 Known attributes are:
 0: system partition
 1: hide from EFI
 2: legacy BIOS bootable
 60: read-only
 62: hidden
 63: do not automount
 
 Attribute value is 0000000000000000. Set fields are:
 No fields set
 
 Toggle which attribute field (0-63, 64 or <Enter> to exit): 2
 Have enabled the 'legacy BIOS bootable' attribute.
 Attribute value is 0000000000000004. Set fields are:
 2 (legacy BIOS bootable)
 
 Expert command (? for help): w
 
 Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
 PARTITIONS!!
 
 Do you want to proceed? (Y/N): y
 OK; writing new GUID partition table (GPT) to /dev/sdd.
 The operation has completed successfully.
 
 formatting:
 mkfs.vfat /dev/sdd1
 mkfs.fat 3.0.26 (2014-03-07)
 
 mkfs.vfat /dev/sdd2
 mkfs.fat 3.0.26 (2014-03-07)
 
 mkfs.ext4 /dev/sdd3
 mke2fs 1.44.4 (18-Aug-2018)
 /dev/sdd3 contains a ext4 file system
 created on Thu Feb  3 16:17:50 2022
 Proceed anyway? (y,N) y
 
 #sudo rebuildfstab
 
 #sudo mount /mnt/sdd3
 
 #sudo extlinux -i /mnt/sdd3
 /mnt/sdd3 is device /dev/sdd3
 
 #sudo cp /usr/local/share/syslinux/efi64/syslinux.efi  /mnt/sdd2/EFI/BOOT/BOOTX64.EFI
 
 #sudo dd if=/usr/local/share/syslinux/gptmbr.bin of=/dev/sdd bs=440 count=1
 1+0 records in
 1+0 records out
 440 bytes (440B) copied, 0.000828 seconds, 518.9KB/s
 
 #sudo cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 #sudo cp /usr/local/share/syslinux/efi64/libutil.c32 /mnt/sdd2/EFI/BOOT
 #sudo cp /usr/local/share/syslinux/efi64/libcom32.c32 /mnt/sdd2/EFI/BOOT
 #sudo cp /usr/local/share/syslinux/efi64/vesamenu.c32 /mnt/sdd2/EFI/BOOT
 #sudo cp /usr/local/share/syslinux/libutil.c32  /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/vesamenu.c32  /mnt/sdd2
 
 #sudo cp /mnt/sdb1/tce/boot/corepure64.gz  /mnt/sdd2
 #sudo cp /mnt/sdb1/tce/boot/vmlinuz64  /mnt/sdd2
 
 #sudo mount /mnt/sdd2
 #sudo extlinux -i /mnt/sdd2
 #sudo cp -a /mnt/sdb1/tce/boot/extlinux/* /mnt/sdd2/       ## in this diractory is the config file for extlinux  "extlinux.conf  ldlinux.c32    ldlinux.sys"##
 
 
 so what about the files: (firstrun mydata.tgz ondemand/ optional/ onboot.lst  xwbar.lst  ) shouldn't i also move to /mnt/sdd2 ?
 
 what am i doing wrong ?  :-\
 
 
 
- 
				what am i doing wrong ?  :-\
 
 
 Here
 Don't set 2 bootable partitions.
 Creating entry for GPT partition #1 (MBR partition #1)
 Enter an MBR hex code (default 07): 07
 Set the bootable flag? (Y/N): n
 
 Creating entry for GPT partition #2 (MBR partition #2)
 Enter an MBR hex code (default EF): EF
 Set the bootable flag? (Y/N): y
 
 Creating entry for GPT partition #3 (MBR partition #3)
 Enter an MBR hex code (default 83): 83
 Set the bootable flag? (Y/N): y
 
 
 Also this one.
 Sorry, I've totally forgot about the difference between 32-bit and 64-bit.
 Our tc-install.sh script has been adjusted to handle that by me ages ago.
 mkfs.ext4 /dev/sdd3
 mke2fs 1.44.4 (18-Aug-2018)
 /dev/sdd3 contains a ext4 file system
 created on Thu Feb  3 16:17:50 2022
 Proceed anyway? (y,N) y
 
 Syslinux (https://wiki.syslinux.org/wiki/index.php?title=Filesystem) still does NOT support 64-bit ext filesystem yet.  :(
 Therefore, the proper command should be
 mkfs.ext4 -O '^64bit' -m 0 /dev/sdd3
 This is trivial
 #sudo ...
 
 You don't need "sudo" if you're already running as root.
 It may not do anything.
 
 extlinux doesn't really need sudo privilege.
 #sudo extlinux -i /mnt/sdd3
 /mnt/sdd3 is device /dev/sdd3
 
 
 Wrong place
 #sudo cp /usr/local/share/syslinux/libutil.c32  /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/vesamenu.c32  /mnt/sdd2
 
 You don't need these for UEFI on sdd2
 Put them in your /mnt/sdd3
 
 Now you're just messing around without knowing what you're doing.
 #sudo cp /mnt/sdb1/tce/boot/corepure64.gz  /mnt/sdd2
 #sudo cp /mnt/sdb1/tce/boot/vmlinuz64  /mnt/sdd2
 
 #sudo mount /mnt/sdd2
 #sudo extlinux -i /mnt/sdd2
 #sudo cp -a /mnt/sdb1/tce/boot/extlinux/* /mnt/sdd2/       ## in this diractory is the config file for extlinux  "extlinux.conf  ldlinux.c32    ldlinux.sys"##
 
 Wrong location...
 You don't need "sudo" either.
 Also, you'll need 2 sets of corepure64.gz, vmlinuz64 on both partition with this strategy.
 (putting UEFI and legacy BIOS on different partitions)
 
 In your case, they should be
 mount /mnt/sdd3
 extlinux -i /mnt/sdd3
 install /mnt/sdb1/tce/boot/extlinux/extlinux.conf /mnt/sdd3
 
(To prevent forum error, I use install instead of cp, they act the same anyway  :P)
 
 However, I'd rather do it this way
 mount /mnt/sdd3
 extlinux -i /mnt/sdd3/boot
 install /mnt/sdb1/tce/boot/extlinux/extlinux.conf /mnt/sdd3/boot
 install libcom32.c32 libutil.c32 vesamenu.c32 /mnt/sdd3/boot
 so what about the files: (firstrun mydata.tgz ondemand/ optional/ onboot.lst  xwbar.lst  ) shouldn't i also move to /mnt/sdd2 ?
 
 I would put them in /mnt/sdd3/tce instead.
- 
				Hi polikuo,
 
 Don't set 2 bootable partitions. if i didn't set the 2nd partition (sdd2) bootable, how should it boot from UEFI then ?
 
 Wrong place
 #sudo cp /usr/local/share/syslinux/libutil.c32  /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/vesamenu.c32  /mnt/sdd2
 You don't need these for UEFI on sdd2
 what do i need for the UEFI partition ?
 
 should i configure extlinux for both sdd2 and sdd3 ?
 
- 
				Don't set 2 bootable partitions. if i didn't set the 2nd partition (sdd2) bootable, how should it boot from UEFI then ?
 
 
 UEFI doesn't care, it has it's own rule.
 Just make sure the hex code of your UEFI partition is EF00
 
 Wrong place
 #sudo cp /usr/local/share/syslinux/libutil.c32  /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdd2
 #sudo cp /usr/local/share/syslinux/vesamenu.c32  /mnt/sdd2
 You don't need these for UEFI on sdd2
 what do i need for the UEFI partition ?
 
 
 These are for UEFI
 cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 cp /usr/local/share/syslinux/efi64/libutil.c32 /mnt/sdd2/EFI/BOOT
 cp /usr/local/share/syslinux/efi64/libcom32.c32 /mnt/sdd2/EFI/BOOT
 cp /usr/local/share/syslinux/efi64/vesamenu.c32 /mnt/sdd2/EFI/BOOT
 
 Those are for Legacy BIOS
 cp /usr/local/share/syslinux/libutil.c32  /mnt/sdd2
 cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdd2
 cp /usr/local/share/syslinux/vesamenu.c32  /mnt/sdd2
 
 
 should i configure extlinux for both sdd2 and sdd3 ?
 
 syslinux for sdd2
 extlinux for sdd3
- 
				Hi polikuo,
 
 so what about the files: (firstrun mydata.tgz ondemand/ optional/ onboot.lst  xwbar.lst  ) shouldn't i also move to /mnt/sdd2 ?
 I would put them in /mnt/sdd3/tce instead.
 where should i put those Files in the EFI partition ? in /mnt/sdd2/EFI/tce or /mnt/sdd2/EFI/BOOT/tce
- 
				so what about the files: (firstrun mydata.tgz ondemand/ optional/ onboot.lst  xwbar.lst  ) shouldn't i also move to /mnt/sdd2 ?
 I would put them in /mnt/sdd3/tce instead.
 where should i put those Files in the EFI partition ? in /mnt/sdd2/EFI/tce or /mnt/sdd2/EFI/BOOT/tce
 
 
 Hi Rabie
 
 These are TC files, you only need one copy.
 (firstrun mydata.tgz ondemand/ optional/ onboot.lst  xwbar.lst) 
 They don't belong to the bootloader.
 
 Normally we put them in a "tce" directory.
 In your case, it's better to put them in /mnt/sdd3/tce
 All you have to do is to tell the bootloader where tce directory is.
 tce=UUID="XXXX-XXXX"
 To find out what your UUID is
 blkid -s UUID /dev/sdd3
- 
				Hi polikuo,
 
 They don't belong to the bootloader.
 
 Normally we put them in a "tce" directory.
 In your case, it's better to put them in /mnt/sdd3/tce
 All you have to do is to tell the bootloader where tce directory is.
 Code: [Select]
 tce=UUID="XXXX-XXXX"
 
 To find out what your UUID is
 
 blkid -s UUID /dev/sdd3
 that i didn't know  ???
 
 now i have got the legacy partition (sdd3) to boot properly.
 
 The Problem is now the UEFI partition (sdd2)
 there is something wrong
 the USB Drive shows up in the UEFI bios as 2 devices like:
 USB 1
 USB 2
 but when i try to boot from them, it give:
 no bootable device detected please reboot and check
 
 is there something i am missing ?
 
 Command (? for help): n
 Partition number (2-128, default 2):2
 First sector (34-7632862, default = 20480) or {+-}size{KMGTP}:20480
 Last sector (20480-7632862, default = 7632862) or {+-}size{KMGTP}: 204700
 Current type is 'Linux filesystem'
 Hex code or GUID (L to show codes, Enter = 8300): ef00
 Changed type of partition to 'EFI System'
 
 
 Creating entry for GPT partition #2 (MBR partition #2)
 Enter an MBR hex code (default EF): EF
 Set the bootable flag? (Y/N): n
 
 mkfs.vfat /dev/sdd2
 
 syslinux -i /dev/sdd2
 
 #mkdir -p /mnt/sdd2/EFI/BOOT
 
 #cp /usr/local/share/syslinux/efi64/syslinux.efi /mnt/sdd2/EFI/BOOT/BOOTX64.EFI
 
 dd if=/usr/local/share/syslinux/gptmbr.bin of=/dev/sdd bs=440 count=1
 
 #cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 
 #cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/libcom32.c32 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/libutil.c32 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/vesamenu.c32 /mnt/sdd2/EFI/BOOT
 #cp corepure64.gz vmlinuz64 /mnt/sdd2
 
 
 
 i don't think that the problem ist the syslinux.cfg, because it doesn't even get there to load it.
 
- 
				the USB Drive shows up in the UEFI bios as 2 devices like:
 USB 1
 USB 2
 
 This is indeed weird  ???
 Usually, it should be something like
 UEFI USB
 USB
 
 Command (? for help): n
 Partition number (2-128, default 2):2
 First sector (34-7632862, default = 20480) or {+-}size{KMGTP}:20480
 Last sector (20480-7632862, default = 7632862) or {+-}size{KMGTP}: 204700
 Current type is 'Linux filesystem'
 Hex code or GUID (L to show codes, Enter = 8300): ef00
 Changed type of partition to 'EFI System'
 
 
 Creating entry for GPT partition #2 (MBR partition #2)
 Enter an MBR hex code (default EF): EF
 Set the bootable flag? (Y/N): n
 
 mkfs.vfat /dev/sdd2
 
 syslinux -i /dev/sdd2
 
 #mkdir -p /mnt/sdd2/EFI/BOOT
 
 #cp /usr/local/share/syslinux/efi64/syslinux.efi /mnt/sdd2/EFI/BOOT/BOOTX64.EFI
 
 dd if=/usr/local/share/syslinux/gptmbr.bin of=/dev/sdd bs=440 count=1
 
 #cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 
 #cp /usr/local/share/syslinux/efi64/ldlinux.e64 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/libcom32.c32 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/libutil.c32 /mnt/sdd2/EFI/BOOT
 #cp /usr/local/share/syslinux/efi64/vesamenu.c32 /mnt/sdd2/EFI/BOOT
 #cp corepure64.gz vmlinuz64 /mnt/sdd2
 
 
 
 This part looks fine, so it should work.
 
 I have no clue for now, I don't have a UEFI machine around right now for me to test.
 
 Have you tried it on other machine ?
 
 Have you locked your UEFI by accident ?
- 
				hi polikuo,
 
 Have you tried it on other machine ? not yet
 
 Have you locked your UEFI by accident ? no i can boot windows with the same machine with UEFI and i checked extra.
 
 I have no clue for now, I don't have a UEFI machine around right now for me to test. 
 you or someone else may have/has an Idea why it doesn't work ?
 i realy need to boot with UEFI  :-\ :-\
 
 i am using this machine: https://www.zotac.com/at/product/mini_pcs/ci329-nano
- 
				Have you locked your UEFI by accident ? no i can boot windows with the same machine with UEFI and i checked extra.
 
 I'm referring to the secure boot
- 
				Hi polikuo,
 I'm referring to the secure boot
 
 it's disabled.
 should it be enabled for UEFI?
 
 
- 
				Hi polikuo,
 I'm referring to the secure boot
 
 it's disabled.
 should it be enabled for UEFI?
 
 No, you should keep it disabled.
- 
				i am goin crazy!
 
 i don't know why it's not working.
 
 so i am gonna try grub with the tutorial from Juanito: http://forum.tinycorelinux.net/index.php/topic,19364.0.html
 
 But this part i don't unterstand:
 
 menuentry "corepure64" {
 linux /boot/vmlinuz64 quiet text tce=UUID="d4432cde-d21a-4d40-b44b-f097ce72cdba"/tce64 waitusb=10:UUID="d4432cde-d21a-4d40-b44b-f097ce72cdba"
 initrd /boot/rootfs64.gz /boot/modules64.gz
 }
 
 what i know that both of those files /boot/rootfs64.gz /boot/modules64.gz make the core file but i just have the Corepure64 file.
 
 so my question is:
 should i split the core into those files ? or how does it work ?
- 
				what i know that both of those files /boot/rootfs64.gz /boot/modules64.gz make the core file but i just have the Corepure64 file.
 
 so my question is:
 should i split the core into those files ? or how does it work ?
 
 
 Hi Rabie
 If you have corepure64.gz, use that.
 If you have rootfs64.gz and modules64.gz, you might wanna merge them together.
 cat rootfs64.gz modules64.gz > corepure64.gz
 I don't use GRUB2, but I think different bootloader use different syntax
 SYSLINUX:(comma)
 INITRD /boot/rootfs64.gz,/boot/modules64.gzGRUB2:(space)
 initrd /boot/rootfs.gz /boot/modules.gz
- 
				hi polikuo,
 
 yes, but if i just have the core file, would the syntax be like this?
 
 initrd /boot/corepure64.gz
 or it doesn't matter and still have to be like this :
 
 initrd /boot/rootfs64.gz /boot/modules64.gz
- 
				hi polikuo,
 
 yes, but if i just have the core file, would the syntax be like this?
 
 initrd /boot/corepure64.gz
 Hi Rabie.
 Yes, that should work.
- 
				hi polikuo,
 yes it did work, now i can boot from UEFI with grub  :)  :)
 
 but i still wanna know why it didn't work with syslinux   :-\  ???
 
 Thank you very much for teaching me so much  :)
- 
				Hi polikuo,
 
 like i said i did exactly the steps from Juanitos Tuturial: http://forum.tinycorelinux.net/index.php/topic,19364.0.html
 and it does boot with UEFI.
 
 The only problem now, that i am getting the following error and after that i must start x manually   :-\
 
 SQUASHES error: zlib decompression failed, data probably corrupt
 SQUASHFS error: squashfs read data failed to read block Ox9d534
 SQUASHIS error: zlib decompression failed, data probably corrupt
 SQUASHES error: squashfs _read _data failed to read block Ox9dae4
 SQUASHIS error: zlib decompression failed, data probably corrupt
 SQUASHIS error: squashfs _read _data failed to read block Ox9e644
 SQUASHES error: zlib decompression failed, data probably corrupt
 SQUASHES error: squashfs read data failed to read block Ox9ebf4
 .SQUASHIS error: zlib decompression failed, data probably corrupt
 "SQUASHES error: squashfs_read data failed to read block Oxa3dd5
 SQUASHFS error: zlib decompression failed, data probably corrupt
 SQUASHFS error: squashfs _read _data failed to read block Oxa4329
 SQUASHIS error: zlib decompression failed, data probably corrupt
 I SQUASHES error: squashfs _read data failed to read block Oxa5569
 SQUASHES error: zlib decompression failed, data probably corrupt
 SQUASHIS error: squashfs _read _data failed to read block Oxa58bd
 SQUASHES error: zlib decompression failed, data probably corrupt
 SQUASHFS error: squashfs read_data failed to read block 0x8c970
 SQUASHIS error: zlib decompression failed, data probably corrupt
 SQUASHFS error: squashfs read _data failed to read block 0x8cd18
 SQUASHES error: zlib decompression failed, data probably corrupt
 SQUASHTS error: squashfs _read _data failed to read block OxBe15e
 rc _core: IR keymap rc-cec not found
 
 do you know what is that ?
 
 edit:
 
 i ran gdisk to check the USB drive and got that the partition is damaged!
 
 #sudo gdisk /dev/sdd
 GPT fdisk (gdisk) version 1.0.4
 
 Caution: invalid main GPT header, but valid backup; regenerating main header
 from backup!
 
 Warning: Invalid CRC on main header data; loaded backup partition table.
 Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
 on the recovery & transformation menu to examine the two tables.
 
 Warning! Main partition table CRC mismatch! Loaded backup partition table
 instead of main partition table!
 
 Warning! One or more CRCs don't match. You should repair the disk!
 Main header: ERROR
 Backup header: OK
 Main partition table: ERROR
 Backup partition table: OK
 
 Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: damaged
 
 Found valid MBR and corrupt GPT. Which do you want to use? (Using the
 GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT
 
 why whould that happen ? i have repeated the tutorial many times and i am getting the same thing
 
 what am i doing wrong ?
- 
				data probably corruptthe partition is damaged!
 
 I guess your hardware is failing.
 You should verify your extensions (and your corepure64.gz) like this
 tc@box: /tmp/md5 $ ls
 kmaps.tcz          kmaps.tcz.md5.txt
 tc@box: /tmp/md5 $ md5sum -c kmaps.tcz.md5.txt
 kmaps.tcz: OK
 tc@box: /tmp/md5 $ echo corrupt > kmaps.tcz
 tc@box: /tmp/md5 $ md5sum -c kmaps.tcz.md5.txt
 kmaps.tcz: FAILED
 md5sum: WARNING: 1 of 1 computed checksums did NOT match
 
- 
				Hi guys,
 
 I use USB-flash installed TinyCore and regularly (not so frequent, around once per month) check it with
 the help of attached script. The names of the corrupted extensions will be seen on the screen after the script exit.
 
 Have a nice Core!
 
 @Rabie, so Your partition has GPT table? You've mentioned that You followed the steps from Juanito's HOWTO, but he mentioned fdisk and MBR partition in his posts. I've never used gdisk, but seems that it don't want to work with MBR.
 
- 
				hi polikuo,
 I guess your hardware is failing.
 You should verify your extensions (and your corepure64.gz) like this
 
 yes you were right, there was one extainsion failing
 
 md5sum: can't open '/mnt/sda1/tce/optional/mylocale.tcz': No such file or directory
 /mnt/sda1/tce/optional/mylocale.tcz: FAILED
 md5sum: WARNING: 1 of 1 computed checksums did NOT match
 but i am still getting this:
 rc _core: IR keymap rc-cec not found
 should i mybe reinstall kemaps or is that something else ?
- 
				Hi guys,
 
 I use USB-flash installed TinyCore and regularly (not so frequent, around once per month) check it with
 the help of attached script. The names of the corrupted extensions will be seen on the screen after the script exit.
 
 Have a nice Core!
 
 thank you i will try the script later.
 @Rabie, so Your partition has GPT table? You've mentioned that You followed the steps from Juanito's HOWTO, but he mentioned fdisk and MBR partition in his posts. I've never used gdisk, but seems that it don't want to work with MBR.
 
 yes, i think that the USB drive wasn't formatted correctly  ;D
 
 
- 
				Why You say MBR is incorrect? I think it's all right. I use MBR.
			
- 
				I think polikuo is right, Your system exhibits unstable behaviour, some hardware problems are probably present, bad power, unstable contacts somewhere... Beware of possible storage damage. Try to power-off the system and check the cables.
			
- 
				Why You say MBR is incorrect? I think it's all right. I use MBR.
 
 
 i think you were right, that gdisk don't want to work with MBR.
- 
				is there a way to remove the message "Welcome to GRUB!" ?
			
- 
				Load grub2 sources, remove this message, compile and pack Your own extension :)
 By the way Arch includes grub-silent package.
- 
				Edit: This was the bad message, please forget if You've seen the previous content. 
			
- 
				Hi jazzbiker,
 Load grub2 sources, remove this message, compile and pack Your own extension :)
 By the way Arch includes grub-silent package.
 thank you
- 
				does anyone know what this Error mean?
 
 rc _core: IR keymap rc-cec not found
- 
				It concerns remote controls (like your TV's), you can ignore it if you're not using any.
			
- 
				Hi curaga,
 
 It concerns remote controls (like your TV's), you can ignore it if you're not using any.
 
 
 i see, thnx  ;D
- 
				Hi
 
 I've found something.
 
 I think the dosfstools.tcz on x86_64 needs to be recompiled.
 
 This is what happens on CorePure64 13.0
 tc@box:~$ mkfs.vfat /dev/sdc1
 mkfs.fat 4.2 (2021-01-31)
 Cannot initialize conversion from codepage 850 to UTF-8: Invalid argument
 Cannot initialize conversion from UTF-8 to codepage 850: Invalid argument
 Using internal CP850 conversion table
 On PiCore-aarch64 13.1
 tc@pi3:~$ mkfs.vfat /dev/sda1
 mkfs.fat 4.2 (2021-01-31)
 I can load into UEFI GUI vesamenu with the re-formatted partition.
 However, something went wrong when I try to boot.
 I guess it'll take a while for me to find out why.
- 
				Hi again.
 
 It appears the cause is the kernel.
 
 TC 12 boots without any problem.
 
 TC 13 refuses to boot.
 
 I guess this might be related:
 https://wiki.syslinux.org/wiki/index.php?title=Common_Problems#Linux_EFI_kernels (https://wiki.syslinux.org/wiki/index.php?title=Common_Problems#Linux_EFI_kernels)
 Due to a bug in the configuration system, some EFI kernels are not safely relocatable. CONFIG_EFI now requires CONFIG_RELOCATABLE. Syslinux will (safely) attempt to load such a kernel at its preferred address and bail if the memory is not available. This will likely exhibit itself as working on some platforms while bailing on others (with different memory maps). 
 Wonderful, we'll need to recompile the kernel  :P
- 
				CONFIG_EFI now requires CONFIG_RELOCATABLE
 
 
 Hi yet again
 
 http://tinycorelinux.net/13.x/x86_64/release/src/kernel/config-5.15.10-tinycore64 (http://tinycorelinux.net/13.x/x86_64/release/src/kernel/config-5.15.10-tinycore64)
 CONFIG_RELOCATABLE=y
 CONFIG_EFI=y
 
 We do have those options enabled.
 This is getting nowhere  :(
- 
				Those conversion errors may mean it requires glibc-gconv.
			
- 
				Those conversion errors may mean it requires glibc-gconv.
 
 Hi curaga
 Both machine have mylocale.tcz onboot (depends on glibc_gconv.tcz)
 They have the same version, too.
 
 CorePure64
 tc@box:~$ mkdosfs --help 2> /dev/null
 mkfs.fat 4.2 (2021-01-31)
PiCore-aarch64
 tc@pi3:~$ mkdosfs --help 2> /dev/null
 mkfs.fat 4.2 (2021-01-31)
 Anyway, there are 2 problems.
 First, dosfstools.tcz is messing around.
 (a corrupted partition can't get Syslinux running at all, returns to "BIOS menu")
 Second, the kernel 13 simply can not boot with Syslinux UEFI, but kernel 12 can.
- 
				Hi polikuo,
 Sorry for the noobish 2 cents, but syslinux.tcz seems to be unchanged since TC7. Is it possible that rebuilding the extension will help?
- 
				Hi polikuo,
 Sorry for the noobish 2 cents, but syslinux.tcz seems to be unchanged since TC7. Is it possible that rebuilding the extension will help?
 
 Hi jazzbiker
 I don't think so, because the actual firmware that boot your system is precompiled. (files in share)
 Only the toolkit is compiled for tiny core. (files in bin, sbin)
- 
				First, dosfstools.tcz is messing around.
 (a corrupted partition can't get Syslinux running at all, returns to "BIOS menu")
 Second, the kernel 13 simply can not boot with Syslinux UEFI, but kernel 12 can.
 
 
 I'm booting TC13 x86_64 with Syslinux on a UEFI-only system (and I am sure that it's UEFI-only, though it doesn't need the boot drive to be GPT partitioned). It's installed on a dual legacy/UEFI MBR/GPT SD card following your tutorial (http://forum.tinycorelinux.net/index.php/topic,20939.0.html). But that was done with TC11, since then I've only replaced the corepure64.gz and vmlinuz64 files and updated the extensions to upgrade to TC12 then TC13.
 
 So it's not something wrong with the kernel that prevents booting, but perhaps something prevents the installation process from working when it's done from TC13?
 
 I tried mkfs.vfat myself and it gives me the same errors/warnings, but still seems to format an SD card OK and I can write file, remount, and read them back. I haven't tested extensively though (the card was already FAT formatted before, though an old directory was erased by the formatting so it did do something).