GeeXBoX 3.0 is a versatile Media Center/Home Theatre Linux Distribution (Debian based) with an impressive graphical design. Multiple Processor architectures are supported : Intel/AMD 32/64bit, but also PowerPC and ARM devices. A nice gadget is CuBoX (a 5 x 5 x 5 cm boxed ARM PC with 3W power consumption and less than 100g weight !) which uses GeeXboX as operating system.
By reading this thread I suppose that you don't want to burn the downloadable ISO image files to an optical disc to test it, but to use Grub4dos (G4D) on a bootable flash storage medium for this purpose. The running ISO has its own installer for flash media. Creating an image file from such a bootable flash drive offers a method to boot it with G4D again... and to integrate it in a multiboot environment.
My intention is to give you as much information as possible, so that you are able to comprehend the results of my tests.
Downloads (Sources and Tools)
GeeXboX 3.0 ISO image files:
- 32bit Intel/AMD: http://download.geex...ox-3.0-i386.iso
- 64bit Intel/AMD: http://download.geex...-3.0-x86_64.iso
- MD5 hash for the downloaded ISO Image (same URL without *.iso) to check integrity
- 7Zip (latest GUI version, used for extracting files from ISO): http://sourceforge.n...ad?source=files
- RMPrepUSB (latest version, used to create a bootable flash medium and a casper ext2 file): http://www.rmprepusb...b-beta-versions
- Wincontig (to get ISO files contiguous) contained in RMPrepUSB or http://wincontig.en....ic.com/download
- PartedMagic (latest version, used for creating (and resizing) a flash storage medium image): http://exo.enarel.eu...or/partedmagic/
- Notepad2 (tiny Windows TXT-(Script)-Editor with selectable Linux line endings): http://www.flos-free..._4.2.25_x86.zip
1. Testing GeeXBoX ISO image on a USB flash drive or flash card (non-persistent, i.e. all customization has gone on reboot)
- Create a Grub4dos bootable USB flash medium ( on an e m p t y flash storage medium of at least 1GB) and test it !
Use RMPrepUSB, follow steve6375's instructions ( creation and testing on r e a l machine ).
- Write ( or copy and paste content from below to) a 'menu.lst' file with Notepad2 (select Linux line endings (0x0A)) and store it on the flash medium (root folder; n o t folder 'root').
- Copy the appropriate GeeXboX Iso file to the same location.
- Test it on your machine.
* Change boot sequence in BIOS.
* BIOS does N O T support hot plugging, the flash medium must be connected b e f o r e you boot and enter BIOS.
* Be sure that only o n e external storage medium ( the booting one ) is present otherwise you will be dropped to a shell, because main system 'rootfs' is not found automatically.
menu.lst 1 (non-persistent, for testing; lines with leading number sign/# are comments and may be omitted)
#Initializing commands for Grub4dos menu color yellow/light-blue timeout 10 default 0 iftitle [find /geexbox-3.0-i386.iso] GeeXBoX 3.0 (ISO direct / Grub4dos)\nPersistence is not possible, so it's just for having a look at it. set ISO=/geexbox-3.0-i386.iso # You may of course use (a) subfolder(s). Just adapt the above path accordingly. # The following command uses cdbob's partnew suggestion (http://reboot.pro/topic/9916-grub4dos-isohybrided/page-2#entry88531), # elaborated by steve6375 (http://www.rmprepusb.com/tutorials/72---easyboot---a-grubdos-multiboot-drive-that-is-easy-to-maintain) ls (hd0,0)%ISO% > nul && partnew (hd0,3) 0x0 %ISO% > nul # For faster boot ISO images should be contiguous (not fragmented), otherwise they get memory mapped with the following commandline # which slows down booting tremendously. Use 'Wincontig' to defrag, if necessary. map %ISO% (0xff) || map --mem %ISO% (0xff) || map --mem --heads=0 --sectors-per-track=0 %ISO% (0xff) # GeeXBoX needs a hint where to find the main system file ('rootfs') # The following lines assumes that only one external storage medium exists and that it is the booting one. # Grub4DOS doesn't offer a way to detect the later Linux device name directly. Of course you know, that it's (hd0,3) here. set root=/dev/sda4 # Up to 4 built-in HDDs are supposed. Add more lines if needed. geometry (hd1) > nul && set root=/dev/sdb4 geometry (hd2) > nul && set root=/dev/sdc4 geometry (hd3) > nul && set root=/dev/sdd4 geometry (hd4) > nul && set root=/dev/sde4 # # ... just for the record # geometry (hd25) && set root=/dev/sdz4 # geometry (hd26) > nul && set root=/dev/sdaa4 # geometry (hd27) > nul && set root=/dev/sdab4 # ...geometry (hd31) > nul && set root=/dev/sdaf4 # Maximum for Grub4Dos reached ! #(hd32) -> (hd255) use ISO 9660 sector size (2048B instead of 512B)! # # If you drop to a shell, type "cat /proc/partitions | grep 139264" (no quotation marks) # at the prompt and you will see the device name to fill into the kernel line: root=/dev/sd... # On a non-US keyboard use keycodes via numpad for the special characters # Activate [NumLK] : slash = [Alt] + 47, pipe = [Alt] + 124 # 139264 is the size of the "ISO-Partition" (= ISO file) in kiB ("blocks" of 1024 B) # Size of the ISO file : 142,606,336 B = 139,264 kiB = 136 MiB # Show selected device name : echo -e \r\n ... using root=%root% \r\n && pause --wait=5 > nul map --hook > nul root (0xff) > nul kernel /vmlinuz root=%root% vga=789 quiet splash loglevel=3 # The following kernel line starts the persistent(!) installation of GeeXbox on another flash storage medium. # Select target carefully, HDDs are also shown ! You may accidently loose all their content ! # Flip Comment sign (#) of kernel lines to activate the appropriate function or create a second menu item # kernel /vmlinuz root=%root% vga=789 quiet loglevel=3 nocache systemd.unit=installator.target initrd /initrd
2. Persistent installation of GeeXBoX
There are two possibilities to get a persistent installation of GeeXbox :
A. Using its own installator (See commented-out kernel line in menu.lst 1)
You get a Syslinux booting ext4 (super)floppy with instantly running root filesystem 'rootfs' (squashfile needs not to be mounted externally),
resulting in a somewhat faster boot process. If the flash medium is big enough, you may even store media files within the ext4 filesystem.
For best compatibility I would prefer a second (FAT 32) partition on the same UFD for storage purposes which is seen by Windows.
But first you have to resize (shrink) the ext4 partition with Parted Magic (use 'Partition manager' = GParted or see Appendix below).
The whole space of the storage medium is used. The program uses about 500 MiB; the minimum space for settings, customization and downloaded add-ons should be another 500 MiB.
If you wish to thoroughly test and customize GeeXbox (with add-ons), I suggest that you use this installation for a longer period and then resize it with Parted Magic to a smaller or maybe bigger size.
See below, how to get it on a Grub4dos multi-booting flash drive (only one big file). Keep in mind, that FAT32 filesystem doesn't support files bigger than 4GB. But GeeXBoX is NTFS approved.
B. Using a 'casper-rw' ext2 file ( 4 files in total needed)
Its your decision how big this file needs to be ( Use RMPrepUSB to create one; GeeXBoX does N O T do it for you)
The casper file has to be on the same partition as file 'rootfs' (in any folder if path is given), because parameter 'root' is used for the location of both.
With the above used partnew method it's not achieveable ( ISO file fills whole partition; other locations are not scanned for the casper file)
menu.lst 2 (persistent with 'casper-rw' file)
# Create casper-rw ext2 file with RMPrepUSB (>= 500MB). # Extract vmlinuz, initrd and rootfs from ISO with 7Zip GUI version. # Create following structure on flash medium (paths for instructive purposes) and allocate the files accordingly. # (You may of course put all 4 files in root folder instead and omit the paths.) # # (driveletter / root folder) # | # -- GEEXBOX # | | # | vmlinuz # | initrd # | rootfs # | # -- casper # | # casper-rw # #Initializing commands for Grub4dos menu color yellow/light-blue timeout 10 default 0 iftitle [find /GEEXBOX/initrd] GEEXBOX 3.0 (Boot extracted files, persistent with casper file) set gx=/GEEXBOX set cp=%gx%/casper uuid (hd0,0) | set uuid= # UUID mounting solves the problem of changing device names on variably equipped systems. # Unfortunately ISO9660 standard doesn't offer a UUID, so it's no solution for ISO images. # (Volume) labels would be a way for both ISO and HDD/UFD partitions, and ISO label is easy to read with 'dd' from within Grub4Dos! # e.g Trinity Rescue Kit uses labels that way. set root=/dev/sdb1 # Default value if there is a fault in UUID detection; one built-in HDD (=/dev/sda1) should commonly fit ... # ... or use 'geometry' method additionally (see menu.lst 1) # The UUID format (length and grouping) depends on the filesystem. We extract UUID from the above commandline output. # ext2/3/4 uuid %uuid:~-36,36% && set root=UUID=%uuid:~-36,36% # fat32 uuid %uuid:~-9,9% && set root=UUID=%uuid:~-9,9% # ntfs uuid %uuid:~-16,16% && set root=UUID=%uuid:~-16,16% # 'uuid UUID' with an accepted format switches root to the appropriate partition, which is always (hd0,0). echo -e \r\n ... using root=%root% \r\n && pause --wait=5 > nul # 'rootrw' is a synonym for 'rw' (read/write) kernel %gx%/vmlinuz root=%root% rootfs=%gx%/rootfs rootrw vga=789 quiet splash loglevel=3 persistent=%cp%/casper-rw initrd %gx%/initrd
3. Booting a GeeXboX created ext4 image file with Grub4dos (my favourite method!)
- See Appendix on how to create an IMG file from the UFD content
menu.lst 3 (persistent within a read/write ext4 image file, booting with external Grub4dos)
#Initializing commands for Grub4dos menu color yellow/light-blue timeout 10 default 0 iftitle [find /_IMG/Linux/gxbox30.ext4] GeeXBoX V3.0 (Boot ext4 ptn via ext. Grub4dos) # Path names follow convention of steve6375's easy2boot system # So you may easily add it in such a multiboot UFD set MYFOLDER1=/_IMG set IMG=%MYFOLDER1%/Linux/gxbox30.ext4 # Check for used 4th partition parttype (hd0,3) | set check= set check=%check:~-5,4% # ext4 filesystem partition is not mountable with parttype 0x00 ! set pass=0 if %check%==0x83 set pass=1 if %check%==0x00 set pass=1 if %pass%==0 echo -e ERROR: Partion Table entry 4 already exists \n\r - so will not map %IMG% to ptn 4 \! && pause --wait=10 && configfile /menu.lst #Hint: Exclamation mark must be "escaped" (with a backslash), otherwise all following commands in this line will be ignored ! ls (hd0,0)%IMG% > nul && partnew (hd0,3) 0x83 %IMG% > nul set root=/dev/sdb1 Default value if there is a fault in UUID detection; one built-in HDD (=/dev/sda1) should commonly fit ... # ... or use above 'geometry' method additionally (menu.lst 1) uuid (hd0,3) | set uuid= # ext4; we expect nothing else here. uuid %uuid:~-36,36% && set root=UUID=%uuid:~-36,36% echo -e \r\n ... using root=%root% \r\n && pause --wait=3 > nul root (hd0,3) > nul kernel /boot/vmlinuz root=%root% rootfs=flat vga=789 quiet loglevel=3 rw initrd /boot/initrd
menu.lst 4 (persistent, booting with internal Syslinux)
#Initializing commands for Grub4dos menu color yellow/light-blue timeout 10 default 0 iftitle [find /_IMG/Linux/gxbox30.ext4] GeeXBoX V3.0 (Boot ext4 ptn via int. Syslinux) # Path names follow convention of steve6375's easy2boot system # So you may add it in such a multiboot UFD set MYFOLDER1=/_IMG set IMG=%MYFOLDER1%/Linux/gxbox30.ext4 # Check for used 4th partition parttype (hd0,3) | set check= set check=%check:~-5,4% # ext4 filesystem partition is not mountable with parttype 0x00 ! set pass=0 if %check%==0x83 set pass=1 if %check%==0x00 set pass=1 if %pass%==0 echo -e ERROR: Partion Table entry 4 already exists \n\r - so will not map %IMG% to ptn 4 \! && pause --wait=5 && configfile /menu.lst #Hint: Exclamation mark must be "escaped" (with a backslash), otherwise following command(s) in line will be ignored ! ls (hd0,0)%IMG% > nul && partnew (hd0,3) 0x83 %IMG% > nul root (hd0,3) > nul # UUID is contained in syslinux.cfg ! chainloader (hd0,3)+1
A p p e n d i x
1. Menu item for Parted Magic Tool
iftitle [find /_ISO/Linux/pmagic_2013_01_29.iso] Parted Magic 130129 (ISO direct) set MYFOLDER=/_ISO set ISO=%MYFOLDER%/Linux/pmagic_2013_01_29.iso ls (hd0,0)/%ISO% && partnew (hd0,3) 0x00 /%ISO% > nul map /%ISO% (0xff) map --hook root (0xff) > nul kernel /pmagic/bzImage iso_filename=/%ISO% edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 vmalloc=384MiB initrd /pmagic/initrd.img
2. How to create an ext4 file from GeeXBoX installator version
You need a second (Grub4Dos) bootable UFD bigger than the one with the GeeXBox installator version or bigger than the resized partition.
You do N O T loose your customization.
Use PartedMagic for the image file creation
- Boot Parted Magic and localize it (especially keyboard layout, if you use a non-US keyboard)
- Look in filesystem manager which device names (/dev/sd..) are used by the source and target UFD
- Open a Terminal window (click the monitor icon with the $ prompt)
- I assume here: your built-in HDD is '/dev/sda1'; your source UFD is '/dev/sdb1' and the target is '/dev/sdc1'
- Replace it with your possibly differing names.
- Type at the prompt and confirm each line ('dd' needs some time; there is no progression indicator):
mkdir -p /mnt/sdc1
mount /dev/sdc1 /mnt/sdc1
mkdir -p /mnt/sdc1/_IMG/Linux
dd if=/dev/sdb1 of=/mnt/sdc1/_IMG/Linux/gxbox30.ext4 bs=100M
- Copy the adequate menu.lst (3 or 4) file to the root of device sdc1 and test it.
3. How to resize a GeeXBox ext4 file
- Boot Parted Magic and localize it (especially keyboard layout)
- Find file gxbox30.ext4 (automatic drive mounting, when clicked in file manager) and write its path down.
*Open a Terminal window
*Type at the prompt and confirm each line (omit comments/#) :
# Your path to 'gxbox30.ext4' might vary !
# Check the filesystem, you see the used space with the block (= 4096B ) ratio
fsck.ext4 -p -v ./gxbox30.ext4
# dd appends 0x00 Bytes to gxbox30.ext4
# bs=blocksize (10MiB); count=loop counter (51 times) -> 510 MiB = 522.24 kiB
# B E S U R E to write '>>', otherwise your file gets O V E R W R I T T E N !
dd if=/dev/zero bs=10M count=51 >> ./gxbox30.ext4
# Growing the file system to fill the whole space ...
resize2fs -p ./gxbox30.ext4
# ... or shrinking the file system to a given size (490 MiB)
resize2fs -p ./gxbox30.ext4 490M
# Check filesystem again, it should still be 'clean'.
fsck.ext4 -p -v ./gxbox30.ext4
Perhaps you want to create a blank ext4 filesystem and copy all files from the source for safety reasons.
- Type at the prompt and confirm each line (omit comments/#) :
# Your path to 'newfile.ext4' and 'gxbox30.ext4' might vary !
# path to 'newfile.ext4'
# Create a new zero file
dd if=/dev/zero bs=10M count=125 > ./newfile.ext4
# Format the created file ...
echo y | mkfs.ext4 ./newfile.ext4
# Check its integrity
fsck.ext4 -p -v ./newfile.ext4
# ... create mountpoints ...
mkdir -p /mnt/source
mkdir -p /mnt/target
# ... and mount source and target.
mount /media/sdb1/_IMG/Linux/gxbox30.ext4 /mnt/source
mount ./newfile.ext4 /mnt/target
# Copy all files from source to target with PartedMagic file manager ...
# ... and unmount all at last.
# Check target's integrity again.
fsck.ext4 -p -v /media/sdc1/newfile.ext4
# Copy newfile.ext4 to its final destination and rename it.
4. GeeXBox site : http://www.geexbox.org/
For a documentation of the (kernel) commandline configuration parameters look at http://www.geexbox.o...d-boot-options/
Parameter 'init(=)' which is not explained in the documentation points to the initializing binary file of 'rootfs'. The default value is '/sbin/init'.
F1 (Help) within the ISO-/Syslinux menu indicates that there are localization parameters (lang=, keymap=), but the syntax of former GeeXBoX
versions (e.g. lang=fr_BE, keymap=azerty) doesn't work any more. It would be useful to have an appropriate keymap if you drop to the shell or enter it from the GUI with
[Ctrl] + [Alt] + [F1/F2] (back to GUI with [Alt] + [F4]). User name is 'root' and password, too.
GeeXBox V3.0 has some issues with big (> 1TB) USB connected HDDs (incessantly mounting/unmounting). Internal big HDDs cause no problems.
5. If you want to analyze the initial script of 'initrd' (with commandline parameter processing) , unpack it (TAR/GZ style) with 7Zip
and use Notepad2 to open 'init' (in / folder).
6. If you like to integrate GeeXBox into a collection of other bootable ISOs on one UFD, look for steve6375's Easy2Boot.
Have fun with GeeXBox !
Edited by COD11, 11 February 2013 - 07:16 PM.