Download Latest Version Grub_Themes.tar.gz (28.0 MB)
Email in envelope

Get an email when there's a new version of Install Grub 2 dir themes

Home
Name Modified Size InfoDownloads / Week
readme.txt 2023-01-03 21.6 kB
Grub_Themes.tar.gz 2023-01-01 28.0 MB
Totals: 2 Items   28.0 MB 0
Set of Grub 2 themes ( AgeOfSystems ; Cameleon ; Dark_Colors_Grub2_theme )
Script to easy install them
Some tutorials

To install extract theme and simply run the:

sudo bash install_grub2_dir_theme.sh 
or
bash install_grub2_dir_theme.sh

Exaple:
wget -O Grub_Themes.tar.gz https://master.dl.sourceforge.net/project/install-grub-2-dir-themes/Grub_Themes.tar.gz
tar -xf Grub_Themes.tar.gz
cd Grub_Themes
sudo bash install_grub2_dir_theme.sh 


# Tips_Test_Tricks.txt
#----------------------#


 !!! ### ### ###

 echo " Read or edit it !"
 echo " To edit multiple documents is good to use KATE’S TAB BAR PLUGINS"
 echo " For global change in all themes is good to use kfilereplace"
 echo " Tilde is a very nice text editor for the console/terminal"
 echo "* shellcheck program seems to be good for debug my charming bugs i a game."
 exit

 !!! ### ### ###

 Very important things:

 If you overwrite your first system/data device you will also lose mbr
 and the partition table! along with data on first partition
 So the best solution is to be prepared for such situations and:

 1. Create first partition, let say 15G and use it only for testing / playing.
 In typical incidents of overwriting ( sda - sda1 ) you lose only data
 in first 1-10G, but also MBR and partition table!

 2. So create a usb stick or use second device with grub and fdisk or sfdisk
 and write their information about partition table or make copy of mbr
 and partition table using dd command. So after disaster mistake or strange
 behavior of installers you will be able to go back almost immediately without
 loss of your important data stored on above partitions areas..
 ( I lose it twice, trying install Grub 2 into partition /unstable/
 or during manipulation in partitionmanager/fdisk - fix order -
 porably it write GPT into old MBR place? = 0 or a lot of partitions )

 Simplest - text info:

 fdisk -l > disk_info.log
 and use those informations to recreate the partition table..

 Using dd on mbr:

 <code>
 sudo fdisk -l # =

 </code>

 ### cat----------------------------------------------------------------

 /dev/sda1            2048   30732344   30730297  14,7G 83 Linux
                      ^^^^
 ### cat----------------------------------------------------------------

 and use start sector as count parameter to store area before first partition.
 To store in file:


 # to store MBR in file along with disk prtition table and "embedding area"
 !!! ###  NOTE: ### ###
 # "embedding area" can hold part code of boot loaders and restoring only mbr
 # not always can back all to previous state
 <code>

 sudo dd if=/dev/sda of=sda_mbr_dpt_gap.img count=$^^^^

 </code>

 <code>
 # to restore file to device
 sudo dd if=sda_mbr_dpt_gap.img of=/dev/sda

 </code>

 ### Or ###

 1. Create first possible smallest partition (boot) and store it along with mbr
 2. Second for paly/testing
 3. Rest partitions for use

 sudo fdisk -l # =
 ### cat----------------------------------------------------------------
 /dev/sda1 2048   30732344   30730297  14,7G 83 Linux # (this is big partition :)
           $^^^   $^^^^^^^
 /dev/sda2 30732345   61464689   30732345  14,7G 83 Linux

 ### cat----------------------------------------------------------------

 and use it:
 # to store mbr in file
 sudo dd if=/dev/sda of=sda_mbr_dpt_gap.img count=$^^^
 # to strore mbr and (boot) partition
 sudo dd if=/dev/sda of=sda_mbr_dpt_gap_part.img count=$^^^^^^^

 If you need more info about the partition structures
 https://en.wikipedia.org/wiki/GUID_Partition_Table
 https://en.wikipedia.org/wiki/Partition_type

 4. Dividing a disk into partitions is an art in itself. :)
 The home directory is intended for user data and most often it is mounted
 from a different partition, so as not to mix the system files and user data
 .. It seems convenient if we wanted to use different system distributions
 and the same data for our user, but... So much theory , and in practice
 in the home directory the operating system installs config files..
 for environments. This data can affect the compatibility and hang of
 programs.
 The solution may be installing the home directory on the partition "/"
 - "root" with distribution and only linking directories with clean data
 for programs. Someone makes assumptions and then makes jokes about them.

 Tips.. ( today disks are big enough.. let play )
 So in the case of old mbr. For systems, we will create all three basic
 partitions ( the "primary" partitions, so we can run from them old
 versions of windows / dos, which require it along with the boot flag
 and the possibility of hiding them from other systems from this stable)
 About 20GB or more each and then "extended" for other types partition.
 The first partition on the extended partition is best used as a "swap"
 partition - 2GB or 4GB 8GB [ See - Some examples with can help with swap area ]
 ( for hibernate process /kernel parameter - "resume=/dev/sda$X"/
 better allocate more than amount of RAM ) and then allocate the rest of the
 partitions to homes / data and linux distributions..
 (I created 13 such partitions, and the last one is for large amount of data)

 !!! ###  NOTE: ### ###
  The MBR - first sector of device - 512 bytes,
  but those 512 bytes seems to be divided into three different structures.
  So the MBR mean only first sector of any device (FSD - MDR), contains three
  different structures and copying them together to difrent drives
  or back all of it after repartiton can lead to ovewrite two or three
  different things.
  So in old style BIOS and prtition table:
  1. Bootstrap (MBR) 446 bytes #
  2. Partition table. 64 bytes #
  3. Signature. 2 bytes        #

  And after 512 bytes of first sector
  4. Gap (MBR), or "embedding area" and which is usually at least
     62*512 - 31 KiB (DOS compability) or 2048*512. Can hold stage "1.5 - 2"
     But in new style all rest of code boot loader is stored in "stage 2"
     hardcoded as blok list on filesytem belong to partition # FIXME
     // I used to have a non-professional calculator pretending to be a 32-bit
     machine, and called the Amiga and so far I can not go out of the way as
     the professionals can handle such a mess in stiff structures, to whimsically
     correct and avoid the end was not seen. So do not be naive. Geeks and
     business like leaves areas for be necessary to explain, upgrade, repair.
     Even if it sometimes means that I can not do it better, because they will
     have a problem which I can become.//

     Bootstrap - parts of MBR

     Depending on the operating system and platform, the bootstrap code might
     actually only be anywhere from 434 to 446 bytes as parts of that
     region might be set aside for other purposes, such as the disk signature
     and disk timestamp. On most modern operating systems, 440 is the
     upper limit as the last 6 bytes are set aside for the 4-byte disk
     signature at offset 0x01B8 and a 2-byte field indicating the read-write
     state of the drive at offset 0x01BC (with 0x00 indicating read-write
     and 0x5A5A indicating a read-only drive).

     Partition Table

     First and foremost, the MDR contains something called the partition table
     64 bytes, which is an index of up to four partitions that exist on
     the same disk

     Boot Signature

     On IBM-compatible PCs (basically, everything) the final two bytes of
     the 512-byte MBR are called the boot signature and are used by the BIOS
     to determine if the selected boot drive is actually bootable or not.
     On a disk that contains valid bootstrap code, the last two bytes of the
     MBR should always be 0x55 0xAA.5If the last two bytes of the MBR do not
     equal 0x55 and 0xAA respectively, the BIOS will assume that the disk
     is not bootable and is not a valid boot option – in this case, it will
     fall back to the next device in the boot order list (as configured in
     the BIOS setup). For example, if the first boot device in the
     BIOS is set as the USB stick and the second is the local hard disk,
     if a USB stick without the correct boot signature is plugged in,
     the BIOS will skip it and move on to attempt to load from the local disk.
     If no disk in the boot device list has the correct 0x55 0xAA
     boot signature, the BIOS will then display an error such as the infamous
     “No boot device is available” or “Reboot and select proper boot device.”

     Partition Boot Sector

     The bootstrap code in the MBR will usually load a sequence of bytes from
     the start of the active partition /chainloading/.
     The exact layout of a partition depends what filesystem the partition
     has been created or formatted with, but generally looks something like
     this:

 B│  |CMOS|
 I│
 O│  >----------------------- MASTER DISK RECORD 512 -------------------->
 S│  |-------------------------------------------------------------------|
  |  | BOOTSTRAP |<             PARTITION TABLE 64              >| BOOT  |
 M┌<-| CODE      |PARTITION 1|PARTITION 2|PARTITION 3|PARTITION 4| SIGN  |
 B│  |    446    |    16     |    16     |    16     |    16     | 0xAA55|
 R│  >------------------------------------------------------------------->
  │
 L│  >------------------------------------------------------------------->
 O├->|------ GAP ---- 62*512 - 31 KiB (DOS compability) or 2048*512------|──┐
 A│  >------------------------------------------------------------------->  ▼
 D||                                                                        |
  └─────┬───────────────────────────────────────────────────────────────────┘
        │
        │
        ▼ ┌────────────────────────────┐
     >---------------------- PARTITION ▼ ON DISK ------------------------>
     | JUP | FILESYSTEM HEADER | BOOTSTRAP CODE | END SECTOR (0x55;0xAA) |
     >------------------------------------------------------------------->
  ┌──────────────────────────────────┘
  │  >------------------------------------------------------------------->
  └->├->| BOOT MENU INTERACTIONS | -> | OPERTING SYSTEM KERNEL |
     >------------------------------------------------------------------->

   /On a little-endian machine like all x86 CPUs, that would be a single
   word 0xAA55 while on a big-endian architecture like PowerPC, it would
   be read and written as 0x55AA./

   Again, depending on the OS and filesystem, the exact layout of the
   partition will certainly differ.
   But this represents a close approximation to what you’ll normally see:

   A single JMP (jump) instruction, which is the assembly equivalent of a
   goto command.
   /Assembly is the most primitive programming language, and consists of
   individual instructions directly read and executed by the CPU/

   The filesystem header, which will contain information specific to and
   important for the filesystem itself.
   Another bootstrap code segment, containing the next stage of
   the bootloader process.

   An end-of-sector marker, very similar to the 0x55 0xAA boot signature
   we saw earlier in the MBR.

   This is all usually packed into the first sector of the partition, which
   is normally again only 512 bytes long, and again, can’t fit too much
   data or instructions. On modern filesystems for newer operating systems,
   the bootstrap code can take advantage of enhanced BIOS functionality
   to read and execute more than just 512 bytes, but in all cases,
   the basic steps remain the same:

   The MBR loads the first 512 bytes of the active partition into the memory
   and instructs the CPU to execute them.
   The very first (three) bytes of the partition bootsector contain a single
   JMP instruction, telling the CPU to skip xx bytes ahead and execute
   the next stage of the bootloader from there.
   The CPU follows the JMP instruction and seeks to the beginning of the
   bootstrap code contained within the partition bootsector, and starts to
   execute.

   The bootstrap code in the partition is not the end of the road, it’s only
   another step along the way. Because of how little space is
   allocated for the bootstrap code in the partition bootsector, the code it
   contains normally ends with another JMP command instructing the CPU
   to jump to the next sector in the partition, which is often set aside
   for the remainder of the partition code. Depending on the filesystem,
   this can be several sectors in length, or however long it needs
   to be to fit this stage of the bootloader.

   https://www.gnu.org/software/grub/manual/legacy/grub.html#Embedded-data
   https://neosmart.net/wiki/mbr-boot-process/


  #---------------------#
  ### BIOS     |  CMOS
      Programs |  Config Data

   Bios - can be changed by specify way - "flashing" and after it
   stays without changes.
   Typical separate chip 64K of programs ( Flash ROMs are much bigger )

   Cmos - volatile config data.
   Changed via BIOS CMOS setup and kept alive with battery.
   Typically 128K of data, often on southbridge ( CMOS often is bigger 64K )
   The CMOS chip is also referred to as
   RTC (real-time clock), NVRAM (non-volatile RAM), or CMOS RAM:

   BIOS

   BIOS stands for Basic Input/Output System. BIOS is a program that every
   personal computer microprocessor uses in order to start the computer.
   After you turn it on the BIOS helps computer to start. All the data flow
   between connected devices such as Keyboard, Mouse, Monitor, Printer
   and the operating system can only be managed with BIOS.
   BIOS is a built-in program installed already in your computer when you
   first purchase it. But it’s not mandatory that the installed BIOS is the
   one installed by manufacturer’s.
   User can also install BIOS in their personal computers and vendor’s too.

   BIOS is a program made easily accessible to the microprocessor on EPROM
   (Erasable Programmable Read-Only Memory). Whenever the computer get’s
   turned on microprocessor gives control to the BIOS which is located at
   the same place where EPROM is located. The first thing BIOS assures
   after starting up your computer is that every attached device is working
   properly and then BIOS loads the operating system into RAM from your
   hard drive.

   CMOS

   RAM chips, flash memory chips, and other types of memory chips use
   complementary metal-oxide semiconductor (CMOS pronounced SEE-moss)
   technology because it provides high speeds and consumes little power.
   CMOS technology uses battery power to retain information even when the
   power to the computer is off. Battery-backed CMOS memory chips, for example,
   can keep the calendar, date, and time current even when the
   computer is off. The flash memory chips that store a computer’s startup
   information often use CMOS technology.

   What’s the Difference Between Software and Firmware?

   In electronics, specifically, any device that does computing, you will run
   into the terms software and firmware. The difference between the two can be
   a little hard to define as they both, in general, refer to data stored
   within a hardware device.

 Firmware                     Device Driver            Software

 Class of coputer software    Class of software that   Class of instructions
 that provides the low-level  enables the system       that tells the computer
 control for the device's     software to communicate  how to perform a
 specific hardware.           witch firmware and       particular task.
                              control devices.

 More difficult to update.    Device drivers are       Much easier to changing
 Requires special program     pretty much as Firmware. If we have something and
 and procedure and often      Device specific mostly   it works..
 another pices of hardware.   written by the
 Stored in a hardware in      manufacturer of a
 read-only or flash memory.   device.

 Used to control hardware     Device driver ensures    Low and high level
 in low-level functionality.  smooth functioning of    functionality
 Gives life to the hardware.  device and allow it to
 Basic input/output task.     be used with different
                              operating systems.

 Writen using low-level      For exaple a graphics     Writen in low and high
 languages. Common example   driver enables the OS     level languages
 of a firmware is (BIOS).    to communicate with
                             and control video card.


 Hardware                           Software

 Physical components of a computer  Is a set of instructions designed
 or electronics systems.            to perform a task. Mainly called program.

 Hardware is further divided into   There are two main types of software:
 input devices, output devices,     system software and application software.
 secondary storage devices and
 internal components.

 More tangible from the outside     More tangible from inside in ran
 Easy to touch outside electrons    Electrons inside structures ;)

 Developed using physical tools     Developed using physical tools to write
 and a process to physically        an intellectual design of a set of
 create an object.                  instructions to be executed inside
                                    electronics structure to produce
                                    a physical effect.

 When damaged, it can be repaired   When damaged, it can be repaired
 or replaced with a new component   from a backup or replaced with a
                                    new installation.

 Starts working as intended after  Starts working as intended after
 powering up and loading           writing inside a functional
 the software to the structure of  dedicated hardware.
 switches and wires.

 Ex: Chisel and keyboard           Ex: Keyboard and text editor

 In general, tools, material, time differ.
 Destiny is always changing.

#---------------------#
Partition Table

Main Differences Between Partition Table

MBR - msdos & GPT - gpt & Layout

MBR - Mastrer Boot Record - IBM 1982 - MS-DOS
GPT - GUID Partition Table - INTEL

GUID - (globally unique identifier) is a 128-bit text string that represents
        an identification (ID). Organizations generate GUIDs when a unique
        reference number is needed to identify information on a computer
        or network. A GUID can be used to ID hardware, software, accounts,
        documents and other items. The term is also often used in software
        created by Microsoft.

EFI - Extensible Firmware Interface.
      The EFI system partition (also called ESP - EFI System Partition))
      is an OS independent partition that acts as the storage place for
      the EFI bootloaders, applications and drivers to be launched by
      the UEFI firmware. It is mandatory for UEFI boot.

      If you give the FAT file system a volume name (i.e. file system label),
      be sure to name it something other than EFI. That can trigger a bug in
      some firmwares (due to the volume name matching the EFI directory name)
      that will cause the firmware to act like the EFI directory does not exist.


UEFI -  Unified Extensible Firmware Interface (Unified ???)
        1998 - „Intel® Boot Initiative”

CSM - compatibility booting - to ensure backward compatibility, UEFI firmware
      implementations on PC-class machines could support booting in legacy
      BIOS mode from MBR-partitioned disks through the Compatibility Support
      Module (CSM) that provides legacy BIOS compatibility. In this scenario,
      booting is performed in the same way as on legacy BIOS-based systems, by
      ignoring the partition table and relying on the content of a boot sector.

BIOS supports both MS-DOS and GPT.
EFI  supports both MS-DOS and GPT.

But UEFI (the Microsoft/Intel version) does not. For "secure boot",
GPT is required.

Other Layouts
    aix   provides support for the volumes used in IBM’s AIX
    (which introduced what we now know as LVM);
    amiga provides support for the Amiga’s RDB partitioning scheme;
    bsd   provides support for BSD disk labels;
    dvh   provides support for SGI disk volume headers;
    gpt   provides support for GUID partition tables;
    mac   provides support for old (pre-GPT) Apple partition tables;
    msdos provides support for DOS-style MBR partition tables;
    pc98  provides support for PC-98 partition tables;
    sun   provides support for Sun’s partitioning scheme;
    loop  provides support for raw disk access (loopback-style)
    — I’m not sure about the uses for this one.

As you can see, the majority of these are for older systems, and you probably
won’t need to create a partition table of any type other than gpt or msdos.

For a new disk, I recommend gpt: it allows more partitions, it can be booted
even in pre-UEFI systems (using grub), and supports disks larger than 2 TiB
(up to 8 ZiB for 512-byte sector disks). Actually, if you don’t need to boot
from the disk, I’d recommend not using a partitioning scheme at all and simply
adding the whole disk to mdadm, LVM, or a zpool, depending on whether you use
LVM (on top of mdadm or not) or ZFS.

https://wiki.archlinux.org/title/EFI_system_partition
https://ramsdenj.com/2016/04/15/multi-boot-linux-with-one-boot-partition.html

 #---------------------#
 ### Boot loaders
Source: readme.txt, updated 2023-01-03