Tiny Core Extensions > TCE Tips & Tricks

How to make a legacy bios/uefi dual boot usb stick with syslinux

(1/4) > >>

polikuo:
This tutorial will teach you how to boot tiny core from a usb stick on legacy bios and uefi machines.

Note that It is suggested to use corepure64 as most efi/uefi are 64-bit.

For GRUB2 lovers, see:
http://forum.tinycorelinux.net/index.php/topic,19364.0.html

To create a GPT USB stick, you'll need gdisk.

--- Code: ---tce-load -wil gdisk
--- End code ---

To create a hybrid USB stick, you'll need a EFI System Partition.
The code below format the USB into 3 partitions.
1. M$ data with ntfs (a "share" partition)
2. ESP
3. ext4 TC installation

create partitions with gdisk

--- Code: ---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

--- End code ---
formatting
--- Code: ---tce-load -wil dosfstools
mkfs.vfat /dev/sdb1
mkfs.vfat /dev/sdb2
mkfs.ext4 /dev/sdb3
sudo rebuildfstab

--- End code ---
setup syslinux
--- Code: ---tce-load -wil syslinux mtools glibc_gconv
syslinux -i /dev/sdb2
# Note that extlinux uses path instead of device:
# extlinux -i /mnt/sdXY/path/to/your/boot/directory
mkdir -p /mnt/sdb2/EFI/BOOT
cp /usr/local/share/syslinux/efi*/syslinux.efi /mnt/sdb2/EFI/BOOT/BOOTX64.EFI
# default path for 64-bit syslinux UEFI firmware
# use "BOOTIA32.EFI" for 32-bit UEFI
sudo dd if=/usr/local/share/syslinux/gptmbr.bin of=/dev/sdb bs=440 count=1
cp /usr/local/share/syslinux/efi*/ldlinux.e64 /mnt/sdb2/EFI/BOOT
cp /usr/local/share/syslinux/efi*/libutil.c32 /mnt/sdb2/EFI/BOOT
cp /usr/local/share/syslinux/efi*/libcom32.c32 /mnt/sdb2/EFI/BOOT
cp /usr/local/share/syslinux/efi*/vesamenu.c32 /mnt/sdb2/EFI/BOOT
cp /usr/local/share/syslinux/libutil.c32 /mnt/sdb2
cp /usr/local/share/syslinux/libcom32.c32 /mnt/sdb2
cp /usr/local/share/syslinux/vesamenu.c32 /mnt/sdb2
cp core.gz vmlinuz /mnt/sdb2/

--- End code ---
syslinux.cfg example:

--- Quote ---UI vesamenu.c32
DEFAULT tc

LABEL tc
MENU LABEL Tiny Core
KERNEL /vmlinuz
INITRD /core.gz
APPEND ...

--- End quote ---
Place the syslinux.cfg file to /mnt/sdb2 AND /mnt/sdb2/EFI/BOOT

ALL done !  :D
Reboot and test.

    [EDIT]: Added missing  cp  comand and changed  sdc  references to  sdb  as requested.  Rich

hamak:
Have anyone got this to work on a UEFI only system?

hamak:
NOW this tutorial works PERFECT!!!
For other users that have Acer Aspire ES11 ES1-132, just change these lines and it will work for you too:

mkdir -p /mnt/sdb2/EFI/Linux
cp /usr/local/share/syslinux/efi*/syslinux.efi /mnt/sdb2/EFI/Linux/BOOTX64.EFI
cp /usr/local/share/syslinux/efi*/ldlinux.e64 /mnt/sdb2/EFI/Linux
cp /usr/local/share/syslinux/efi*/libutil.c32 /mnt/sdb2/EFI/Linux
cp /usr/local/share/syslinux/efi*/libcom32.c32 /mnt/sdb2/EFI/Linux
cp /usr/local/share/syslinux/efi*/vesamenu.c32 /mnt/sdb2/EFI/Linux

coreplayer2:
hamak,

So, this path "/EFI/Linux/BOOTX64.EFI" is unique to your notebook?

I thought you said earlier that "/EFI/BOOT/BOOTX64.EFI" worked too?

Rich:
Hi coreplayer2

--- Quote from: coreplayer2 on January 09, 2019, 12:37:17 PM ---hamak,

So, this path "/EFI/Linux/BOOTX64.EFI" is unique to your notebook? ...
--- End quote ---
It seems his Acer laptop has a list of  "acceptable"  paths hardcoded into it it:
http://forum.tinycorelinux.net/index.php/topic,22410.msg140356.html#msg140356


--- Quote ---I thought you said earlier that "/EFI/BOOT/BOOTX64.EFI" worked too?
--- End quote ---
That worked on a different machine he tried it on:
http://forum.tinycorelinux.net/index.php/topic,22410.msg140424.html#msg140424

Navigation

[0] Message Index

[#] Next page

Go to full version