Off-Topic > Off-Topic - Tiny Tux's Corner

a rant/discussion about grub bootloaders - MBR and EFI

(1/5) > >>

aus9:
Hi

I do not wish to pollute some excellent posts
"Howto make a legacy bios/uefi dual boot usb stick with grub2 " by Juanito
http://forum.tinycorelinux.net/index.php/topic,19364.0.html

coreplayer2 observation on how difficult it is to turn off UEFI (and related matters)
http://forum.tinycorelinux.net/index.php?action=post;quote=143186;topic=22848.15;last_msg=146885

coreplayer2 instruction to make EFI bootable USB
http://forum.tinycorelinux.net/index.php?action=post;quote=143377;topic=22848.30;last_msg=146885

out-of-date wiki grub legacy to grub2 (some parts by me)
http://wiki.tinycorelinux.net/doku.php?id=wiki:grub2_from_grub1

an observation that the wiki is incomplete. Some forum posts might be better off being a sticky?

and I saw some recent posts on another bootloader, grub4dos
And that got me thinking....dangerous I know  ;D

While wiki is not edittable...
We may need a grub2 into MBR (bios has no UEFI firmware) as  post by Juanito's post uses efi

We may need a post on grub2 without using UUID. Altho UUID does eliminate issues for removable drives, this does not impact on laptop users....so IMHO keep it simple (stupid)

I am tempted, in the unofficial remaster area....to provide a download image for usb stick of a recent
TC product that might be able to be flashed by a windows 10 user?

Hopefully some nice posters like "you know who" and no pressure....anyone else who cares, might like to add further suggestions or dismiss mine as they see fit.



PDP-8:
I've often thought about a remaster for the new kids on the block with modern uefi-only hardware in their households.

How to introduce them to the joys of a very small simple linux, that they can blow away and re-create, and slowly get into the joy of the shell and dd'ing a new stick from that, severing the ties from using another machine over time?

Thought process:

1) Modern kids don't care about iso9660 and burning a read-only stick.  If they want, they get all secure with stuff like that later.

2) Burn TC64 with an ext4 partition, and and efi partition as a distributable iso.  Sure go ahead and use Etcher, Rufus or whatever that will dd to the card anyway. Don't need to make it huge because:

3) Like piCore, after installation one simply expands the ext4 partition.  However, this means that you'll want the efi partition as the first one, and the ext4 as the secondary.

4) Put the iso image inside the image again - this way, young minds can explore the wonders of "dd" instead of using a 3rd party burner on Windows once they get the system booted.

5) Optionally create an old-school ncurses interface to do a dd to the included iso in case they want to burn another, yet are still confused or scared of the cli initially.

It doesn't have to be a full Tinycore either, but just simple core to act as an installer for some, or a total environment for those that dig just the cli.

But I know what you are saying.  There are those like myself who are unix end-users, and not necessarily interested in being admistrators for hardware - although with TC you tend to go into the gray-zone where you pick up these skills at time moves on. :)

KISS: Make it boot uefi-only, put the iso inside the iso, add tools or not to separate the initial bond relying on 3rd party windows burners, since for many, they have no idea on how/where to start, or what information is fresh or stale.

Right - so let's do this tonight shall we?  The devs have given us the tools.  It's up to us.

jazzbiker:
Hi, PDP-8!

You're right - nobody wants to read books, even "Into the Core", just a wonderful one. And, again, as the proposed image will be written to the stick, instead of burning CD (or how this sparkling toy is named, I can be mistaken, when they were 2, they took this things from the stack in the father's room corner and throw them into the air, like a frisbee, ooeee!!! ), means there are no reasons to make it read-only. So it must be some image intended for USB-sticks only, right?

Probably, MBR and GPT choices of partition table must be made.

Containing 2 partitions:

1. EFI with grub. Everywhere about 100Mb is recommended, but grub occupies only less than 8M, I don't know, what are the reasons to make it bigger? it's FAT

2. Minimum of distribution files - vmlinuz64,rootfs64.gz,modules64.gz - less than 16M for TC11.1, ext4 without journal

Not less than 24M is the total.

If 1st time loaded with "base" bootcode, /etc/sysconfig/tcedir is pointing to the RAM /tmp/tce and no partitions are mounted. So during first boot fdisk and mkfs can be called (using /opt/bootlocal.sh) to utilize the remaining media space for the 3rd partition, which will contain tce directory for the consequent boots, without the "base".

So, the only customizing of the rootfs for such case is adding to the /etc/bootlocal.sh some checks for te existance of the 3rd partition on the drive, and, if not, calling fdisk and modifying "grub.cfg".

Is this what You are talking about?

nick65go:
my input:
1.I think that (for the spirit of TINY/minimal) is better ext2 instead of ext4 (even without journal). Speed of ext4 vs. ext2 does not matter much, mostly tcz are SMALL and read from USB (fast).
2. also EFI partition (basically FAT 32) can be as small as a "minimum" grub2.  grub2 is complex (near as a mini OS) but most of it for USB is not needed.FAT has a minim size; the number of clusters must be between [4085 65525] to format a valid FAT16 partition. So the partition must be greater enough to store 4085 clusters + metadata information such as FAT tables.
 

--- Code: ---mkfs.vfat -F32 -s 2 /dev/sda1
$ dd if=/dev/zero of=Fat16.bin bs=$((1024*1024)) count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB) copied, 0.0561285 s, 299 MB/s
--- End code ---
3. an "install" (no GUI) can be just an interactive shell script. But if the kids come from MS windows, they will not read the TC book first, so they risk (at the beginning) to destroy their windows anyway, it does not matter how many assumptions you made to protect their HDD. If they start with bad feelings, then most of them will not come back to linux very soon, if ever.

FYI: I build the smallest demo ISO, booting with grub2 in UEFI mode, to prove how small a grub2 +ext2 could be. [452 KB]

--- Code: ---grub-mkimage -v -d x86_64-efi -O x86_64-efi -o BOOTX64.EFI -p (cd0)/boot/grub part_msdos part_gpt fat iso9660
--- End code ---

Then add (in \boot\x86_x64-efi) the files:  boot.mod bufio.mod crypto.mod extcmd.mod gettext.mod normal.mod terminal.mod

Know-how:
UEFI can NOT boot from Floppy, UEFI need a ESP-tag Partition. We build a CD/DVD iso with this floppy inside.
1. Build a floppy with bfi.exe [as 160Kb], It will have only two files.
bfi -v -t=0 -l=UEFI -f=myISO-root\UEFI.FLP .\myFDD

2.Then copy UEFI.FLP to myISO-root\
Add a grub2 configuration as myISO-root\boot\grub\grub.conf
Add (in \boot\x86_x64-efi folders):
 boot.mod bufio.mod crypto.mod extcmd.mod gettext.mod normal.mod terminal.mod

3. Build the ISO with:
mkisofs_3.02a7.exe -z -J -sysid MyOS -appid NONE -no-pad -eltorito-alt-boot -b UEFI.FLP -no-emul-boot -o UEFI.iso myISO-root

4.test ISO with VirtualBox, or qemu 4.2.0 (has UEFI)
F:\MyProgs\App64\Qemu42\qemu-system-x86_64.exe -pflash F:\MyProgs\App64\Qemu42\edk2-x86_64-code.fd -cdrom UEFI.iso

PS: F:\5-Tools\new>bfi.exe
Build Floppy Image v1.0, Oct 2002Copyright (c) 2002 Bart Lagerweij. All rights reserved.
This program is free Software; you can redistribute it under the terms of the NU2 License
Creates a FAT12 floppy image from files.

jazzbiker:
Hi, nick65go!

As far as I understood PDP-8's proposal, and what i was writing about, there are no iso9660, no attempts to install something on the HD. Simply live TinyCore USB-stck with persistance on it without any need for other storage devices. Simply ready-to-use playground, just "don't touch anything outside and be happy", until You've learn what You are doing really. Plug-and-play, or so.

Navigation

[0] Message Index

[#] Next page

Go to full version