Pages

Monday, November 5, 2018

Fedora 29 : the new Fedora 29.

It has been announced for some time to launch Fedora.
Today I have appeared on the interface the possibility to change the old Fedora 28 to Fedora 29.
The interface appeared and I had to click the Download button and then the Install button.
The download process was fast. If you do not have enough disk space then the installation will not work.
After you click the Install button, the installation process will take care of the installation.
Finally, a reset of the distribution will start the new Fedora 29.
I have not found any irregularities or operating problems.
From now on, my posts, tests, and tutorials will be with Fedora 29.

Friday, November 2, 2018

Fedora 28 : Create a ISO image with stage2 and kernel ELF .

The tutorial for today solves the problem of creating an ISO image.
This image can be run and test with QEMU tool emulator like any ISO CDROM image.
You can build your kernel with any assembler and use this steps to test it.
I used the FASM assembly tool. Into my fasm folder I create these folders:
[mythcat@desk fasm]$ mkdir -p iso/boot/grub
You need a stage2 file known like: stage2_eltorito.
This file uses the El Torito is a specification for bootable CD using BIOS functions.
The GRUB supports the no emulation mode in the El Torito specification.
El Torito file booting begins by the Boot Record of the ISO 9660 filesystem at block address 0x11.
You can get this file from your Linux distro of you can find installed into old GRUB.
Put this file into grub folder:
[mythcat@desk fasm] cp /usr/lib/grub/i386-pc/stage2_eltorito  iso/boot/grub/
Use fasm tool with your kernel and use this commands to create the ISO file:
[mythcat@desk fasm]$ ./fasm kernel.asm 
flat assembler  version 1.73.04  (16384 kilobytes memory)
2 passes, 16756 bytes.
[mythcat@desk fasm]$ cp kernel.o iso/boot/kernel.k
[mythcat@desk fasm]$ cat > iso/boot/grub/menu.lst << EOF
> default 0
> timeout 1
> title fasm multiboot
> kernel /boot/kernel.k
> EOF
[mythcat@desk fasm]$ genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4
 -boot-info-table -o mykernel.iso iso

I: -input-charset not specified, using utf-8 (detected in locale settings)
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 920
Total directory bytes: 4096
Path table size(bytes): 34
Max brk space used 24000
241 extents written (0 MB)
Now you can test the result:
[mythcat@desk fasm]$ qemu-system-i386 -cdrom mykernel.iso
This is result of my kernel:

Sunday, October 28, 2018

Fedora 28 : The edb debugger.

Today I tested one debug for assembly language.
I used FASM programming language because is very flexible.
The main goal was to find a good debugger and I try the edb debugger.
If you try to use the Fedora dnf tool then you get an older version of this debugger.
[root@desk mythcat]# dnf install edb.x86_64

Because this package is old I try to compile it from source code from github.
Let's see this steps:
[mythcat@desk fasm]$ git clone --recursive https://github.com/eteran/edb-debugger.git

Cloning into 'edb-debugger'...
remote: Enumerating objects: 192, done.
remote: Counting objects: 100% (192/192), done.
...
[root@desk mythcat]# dnf install git make qt5-devel gcc gcc-c++ boost-devel cmake capstone-devel
...
[mythcat@desk edb-debugger]$ mkdir build
[mythcat@desk edb-debugger]$ cd build

[mythcat@desk build]$ cmake ..
-- Boost version: 1.66.0
-- Checking for module 'capstone>=3.0.4'
--   Found capstone, version 3.0.5
-- Checking for module 'libgvc>=2.38.0'
--   Package 'libgvc', required by 'virtual:world', not found
-- Checking for module 'double-conversion'
-- Looking for C++ include double-conversion/double-conversion.h
-- Looking for C++ include double-conversion/double-conversion.h - not found
CMake Warning at CMakeLists.txt:56 (message):
  libdouble-conversion header wasn't found.  32- and 64-bit floating-point
  values will be showed with max_digits10 digits of precision instead of
  shortest representation.


-- Checking for module 'gdtoa-desktop'
--   Package 'gdtoa-desktop', required by 'virtual:world', not found
CMake Warning at CMakeLists.txt:113 (message):
  gdtoa-desktop package wasn't found.  80-bit floating-point values will be
  showed with max_digits10 digits of precision instead of shortest
  representation.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/mythcat/fasm/edb-debugger/build

[mythcat@desk build]$ make
Scanning dependencies of target edb_autogen
...
You can see the executable file named edb into the build folder.
Just run it and the debugger starts.
Into the next image you can see a simple executable run into this debugger:

Monday, October 22, 2018

Fedora 28 : Alien, Steam and Fedora distro.

Today I tried an incurs in converting deb files into packages rpm for Fedora 28.
As you well know, the alien utility is used to solve this problem.
The Debian package I tried to convert is the Steam gaming utility.
[mythcat@desk ~]$ su
Password: 
[root@desk mythcat]# dnf search alien
Last metadata expiration check: 0:02:59 ago on Mon 22 Oct 2018 08:15:33 PM EEST.
========================= Name Exactly Matched: alien ==========================
alien.noarch : Converter between the rpm, dpkg, stampede slp, and Slackware tgz
             : file formats
[root@desk mythcat]# dnf install alien.noarch 
Last metadata expiration check: 0:05:58 ago on Mon 22 Oct 2018 08:15:33 PM EEST.

...
Complete!

[root@desk mythcat]# cd Downloads/

[root@desk Downloads]# alien --scripts -r steam_latest.deb
steam-launcher-1.0.0.56-2.noarch.rpm generated
The next step is the install process:
[root@desk Downloads]# dnf install steam-launcher-1.0.0.56-2.noarch.rpm
Last metadata expiration check: 0:17:36 ago on Mon 22 Oct 2018 08:15:33 PM EEST.
Dependencies resolved.
================================================================================
 Package              Arch         Version             Repository          Size
================================================================================
Installing:
 steam-launcher       noarch       1.0.0.56-2          @commandline       2.8 M

Transaction Summary
================================================================================
Install  1 Package

Total size: 2.8 M
Installed size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file / from install of steam-launcher-1.0.0.56-2.noarch conflicts with file from package filesystem-3.8-2.fc28.x86_64
  file /lib from install of steam-launcher-1.0.0.56-2.noarch conflicts with file from package filesystem-3.8-2.fc28.x86_64
  file /usr/bin from install of steam-launcher-1.0.0.56-2.noarch conflicts with file from package filesystem-3.8-2.fc28.x86_64
  file /usr/lib from install of steam-launcher-1.0.0.56-2.noarch conflicts with file from package filesystem-3.8-2.fc28.x86_64

Error Summary
-------------
The problem comes from the conversion and I try to see I have the correct packages into my Fedora 28 distro.
[root@desk Downloads]# dnf search filesystem-3.8-2.fc28.x86_64
Last metadata expiration check: 0:19:14 ago on Mon 22 Oct 2018 08:15:33 PM EEST.
No matches found.
[root@desk Downloads]# dnf search filesystem
Last metadata expiration check: 0:20:17 ago on Mon 22 Oct 2018 08:15:33 PM EEST.
======================= Name Exactly Matched: filesystem =======================
filesystem.x86_64 : The basic directory layout for a Linux system
====================== Name & Summary Matched: filesystem ======================
[root@desk Downloads]# dnf install filesystem.x86_64
Last metadata expiration check: 0:22:13 ago on Mon 22 Oct 2018 08:15:33 PM EEST.
Package filesystem-3.8-2.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
I try again to see is something new , but I got the same error.
[root@desk Downloads]# dnf install steam-launcher-1.0.0.56-2.noarch.rpm
In conclusion: Fedora distro solves a number of shortcomings in the field of package management, but the efforts of the development team do not resolve to cover user requirements. However, the alien utility remains a very important step in the development process that should be updated and optimized to implement new software. I would add here my attempts to create Fedora packets with software that works normally on this distro (Blender 3D - version 2.8).
Let's hope that the Fedora development team will resolve these issues until the next version of this distro.

Saturday, October 13, 2018

Fedora 28 : Fix XFS internal error XFS_WANT_CORRUPTED_GOTO .

It is a common kernel error created under certain predefined conditions.
...kernel: XFS internal error XFS_WANT_CORRUPTED_GOTO...
# xfs_repair -L /dev/mapper/fedora-root
# xfs_repair -L /dev/mapper/fedora-swap
# reboot
This will fix this error.

Wednesday, October 10, 2018

Fedora 28 : Testing Blender 2.80 .

I tested the new Blender 2.80 alpha 2 version and is working well.
You can start to download it from the official download page.
The next step: unarchive the tar.bz file and run the blender from the newly created folder.
I try to create a package but seems the tool not working with the .spec file.
This is a screenshot with this Blender 3D software running in my Fedora 28.

Thursday, October 4, 2018

Fedora 28 : Strife another golang game framework.

Today I tested this 2D game framework named Strife.
You can read more about this from the official website.
The development team tells us:
  "This a work in progress. It provides a very minimal toolset for rendering shapes, images, and text as well as capturing user input."
This game framework uses SDL2 libraries.
Strife is open source and available under the MIT license.
Let's start with installation into Fedora 28 distro.
[root@desk mythcat]# dnf install SDL2-devel.x86_64
[root@desk mythcat]# dnf install SDL2_ttf-devel.x86_64 
[root@desk mythcat]# dnf install SDL2_image-devel.x86_64 
[mythcat@desk ~]$ go get github.com/felixangell/strife
[mythcat@desk ~]$ cd $GOPATH/src/github.com/felixangell/strife
I test one example from installation folder with particles:
[mythcat@desk strife]$ cd example/particles
[mythcat@desk particles]$ go run particles.go
2018/10/04 22:13:18 initializing window  1280 x 720
2018/10/04 22:13:18 dpi, default_dpi =  0 72
2018/10/04 22:13:21 Loading font  /usr/share/fonts/DejaVuSans.ttf
2018/10/04 22:13:21 Failed to load font at '/usr/share/fonts/DejaVuSans.ttf'
 ' try setting a font yourself with strife.LoadFont
resize to  1280 x 960
resize to  1280 x 960
resize to  1280 x 720
resize to  1280 x 720
closing window!
This is result of the running example: