Welcome! Log In Create A New Profile

Advanced

Help with mariadb installation 1

Posted by Kuzma 
Kuzma
Help with mariadb installation 1
March 03, 2018 07:12AM
Hello everyone ;)
Who know how to install mariadb on latest rootfs(stretch)? cuz in stretch not support MySQL anymore... mariadb return dpkg errors when install it... :(



Edited 2 time(s). Last edit at 03/03/2018 03:54PM by bodhi.
Re: Linux Kernel 4.15.2 Kirkwood package and Debian rootfs
March 03, 2018 01:57PM
Kuzma Wrote:
-------------------------------------------------------
> Hello everyone ;)
> Who know how to install mariadb on latest
> rootfs(stretch)? cuz in stretch not support MySQL
> anymore... mariadb return dpkg errors when install
> it... :(
screenshot 2018-03-03 001.png
screenshot 2018-03-03 002.png
screenshot 2018-03-03 003.png
screenshot 2018-03-03 004.png
screenshot 2018-03-03 005.png
screenshot 2018-03-03 006.png
screenshot 2018-03-03 007.png
Bug mariadb
Can you show me how you install/configure your systemd? I think my problem in systemd... :/
Re: Help with mariadb installation 1
March 04, 2018 01:37AM
no, a problem not in systemd

install sytemd
1. https://forum.doozan.com/read.php?2,12096
2. ctrl+f "Updated 24 Jul 2017"
3. Scroll down to "Note2"
4. Follow the instruction

or you can make your own:

1. apt update; apt install qemu-user-static binfmt-support debootstrap
2. debootstrap --verbose --foreign --components main,contrib,non-free --include wpasupplicant,\
mc,screen,tmux,htop,bash-completion,mtd-utils,zip,unzip,p7zip-full,\
p7zip-rar,locales,lynx,u-boot-tools,openssh-server,e2tools,ncdu,net-tools,ntfs-3g,pciutils,\
rsync,samba,telnet,usbutils,wireless-tools,firmware-misc-nonfree,initramfs-tools,avahi-daemon,\
bzip2,dialog,groff-base,keyutils,nfs-common,nfs-kernel-server,smbclient,ntp,xz-utils,\
debian-keyring,devio,f2fs-tools,less,usbip --arch armel stretch /home/user/debootstrapfolder http://ftp.ru.debian.org/debian
3. cp /usr/bin/qemu-arm-static /home/user/debootstrapfolder/usr/bin/
4. env LANG=C env HOME=/root chroot /home/user/debootstrapfolder /bin/bash -c '/debootstrap/debootstrap --second-stage'
5. copy /boot/ from Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2,
6. update to the kernel to version 4.15.2 for instructions.


p.s. Sorry. I understand English but I write badly in it



Edited 1 time(s). Last edit at 03/04/2018 02:13AM by butaford.
Kuzma
Re: Help with mariadb installation 1
March 06, 2018 11:49AM
butaford, thanx for your help. I've trying reinstall all again and find one fail in my steps.
Where i can find initrd.img-4.15.2-kirkwood-tld-1?

Thanx for help in advance!
My console log:
root@GoFlexHome:/boot# mv uImage uImage.orig
root@GoFlexHome:/boot# cp -a zImage-4.15.2-kirkwood-tld-1  zImage.fdt
root@GoFlexHome:/boot# cat dts/kirkwood-goflexhome.dtb  >> zImage.fdt
root@GoFlexHome:/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d zImage.fdt  uImage
Image Name:   Linux-4.15.2-kirkwood-tld-1
Created:      Thu Nov  3 17:32:31 2016
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3936225 Bytes = 3843.97 kB = 3.75 MB
Load Address: 00008000
Entry Point:  00008000
root@GoFlexHome:/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.2-kirkwood-tld-1 uInitrd
mkimage: Can't open initrd.img-4.15.2-kirkwood-tld-1: No such file or directory
Re: Help with mariadb installation 1
March 06, 2018 02:52PM
install: dpkg -i linux-image-4.15.2-kirkwood-tld-1_1.0_armel.deb
or
Run: update-initramfs -c -k `uname -r`



Edited 1 time(s). Last edit at 03/06/2018 02:56PM by butaford.
Re: Help with mariadb installation 1
March 06, 2018 05:15PM
Kuzma,

> Where i can find
> initrd.img-4.15.2-kirkwood-tld-1?


Yes, like butaford said. You did not install the kernel with dpkg -i. It is automatically generated in step 3.

Quote

Updated 11 Feb 2018:

Kernel linux-4.15.2-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- Added HP T5325 flash type mx25l8005.
- Added USBIP supports.


Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.15.2-kirkwood-tld-1-bodhi.tar.bz2

md5
11f4c87ffb53b5adfd0a5405fc1ba247
sha256
90c3fd5f6a0628dfbde1403ae43ab4625688350435dec95eab08b95f7a43cfc8

This tarball contains 6 files:

Quote

linux-image-4.15.2-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.15.2-kirkwood-tld-1_1.0_armel.deb
config-4.15.2-kirkwood-tld-1
zImage-4.15.2-kirkwood-tld-1
linux-dtb-4.15.2-kirkwood-tld-1.tar
linux-4.15.2-kirkwood-tld-1.patch

And as always, please verify the hash of what you've downloaded!

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd
uImage
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx
dts/

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-4.15.2-kirkwood-tld-1-bodhi.tar.bz2
tar -xf linux-dtb-4.15.2-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (It is much better to generate uImage and uInitrd manually anyway):

cd /boot
apt-get remove flash-kernel
dpkg -i linux-image-4.15.2-kirkwood-tld-1_1.0_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option 4a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with the latest U-Boot for Kirkwood that suports FDT. This is the preferred method.

- Choose option 4b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please post questions, since each box has a different flavor in setting up the envs).

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.


- Generate the uImage and uInitrd.
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d vmlinuz-4.15.2-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.2-kirkwood-tld-1 uInitrd

- Set U-Boot envs for booting. The u-boot envs below are for 1st time upgrading, you don't need to do this step if you've installed the latest U-Boot for Kirkwood. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
mv uImage uImage.orig
cp -a zImage-4.15.2-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.2-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync
sync
sync
shutdown -r now

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Kuzma
Re: Help with mariadb installation 1
March 09, 2018 04:28AM
Hi!
Still not working :(
Maybe better show you my steps, and you can say what I doing wrong...
Write uboot:
kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.goflexhome.mtd0.kwb -p
setenv ipaddr 192.168.0.109
setenv serverip 192.168.0.101
tftpboot 0x800000 uboot.2017.07-tld-1.goflexhome.mtd0.kwb
nand erase 0x0 0x80000
nand write.e 0x800000 0x0 0x80000
reset

My Env:
GoFlexHome> printenv           
arcNumber=3338
baudrate=115200
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) init=/bin/systemd
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=4
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
ethact=egiga0
ethaddr=00:10:75:2a:2e:86
if_netconsole=ping $serverip
ipaddr=192.168.0.110
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.103
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2941/131068 bytes

GoFlexHome> reset

Write rootfs on my HDD:
# sdc1 formated in ext4 
cd /mnt/sdc1 
tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
cat <<END > /media/sdb1/etc/fstab
LABEL=rootfs    /               ext4    noatime,errors=remount-ro 0 1
END

Boot on GoFlex from HDD:
cd /boot
tar -xjf linux-4.15.2-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.15.2-kirkwood-tld-1.tar
apt-get remove flash-kernel 
dpkg -i linux-image-4.15.2-kirkwood-tld-1_1.0_armel.deb
mv uImage uImage.orig
cp -a zImage-4.15.2-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexhome.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.2-kirkwood-tld-1 uInitrd
sync 
sync
sync
shutdown -r now

I try do this steps with install systemd and systemd sytemd-sysv
Re: Help with mariadb installation 1
March 09, 2018 05:13AM
1. Try a step 4a instead of 4b
2. Сorrect a line:
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi

else bootm $load_uimage_addr; fi; fi
bodhi, is a report on an error



Edited 1 time(s). Last edit at 03/09/2018 05:14AM by butaford.
Re: Help with mariadb installation 1
March 09, 2018 05:21AM
butaford,

Thanks for reporting! I've found it also.

But it is a non-problem when the default envs image is flashed. IOW, we are not supposed to install u-boot without installing the default envs image :) Nevertheless, it will be corrected in the next release.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Help with mariadb installation 1
March 09, 2018 05:30AM
Kuzma,

A couple things.


> Write uboot:
>
> kwboot -t -B 115200 /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.goflexhome.mtd0.kwb -p
> setenv ipaddr 192.168.0.109
> setenv serverip 192.168.0.101
> tftpboot 0x800000
> uboot.2017.07-tld-1.goflexhome.mtd0.kwb
> nand erase 0x0 0x80000
> nand write.e 0x800000 0x0 0x80000
> reset
>

When you did this, only the internal envs are used. You also need to flash the default envs image.

However, that was not the problem. The problem is in step 4.

> mv uImage uImage.orig
> cp -a zImage-4.15.2-kirkwood-tld-1  zImage.fdt
> cat dts/kirkwood-goflexhome.dtb  >> zImage.fdt
> mkimage -A arm -O linux -T kernel -C none -a
> 0x00008000 -e 0x00008000 -n
> Linux-4.15.2-kirkwood-tld-1 -d zImage.fdt  uImage
> mkimage -A arm -O linux -T ramdisk -C gzip -a
> 0x00000000 -e 0x00000000 -n
> initramfs-4.15.2-kirkwood-tld-1 -d
> initrd.img-4.15.2-kirkwood-tld-1 uInitrd


You are not supposed to append the DTB to uImage. You are booting with new u-boot. So mount the rootfs on another Linux box and restore the original uImage.

cp -a uImage.orig uImage
sync
sync

And take it back to the GF Home and power up. Watch serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Kuzma
Re: Help with mariadb installation 1
January 11, 2019 01:00PM
Hi everyone! Sorry for long silence :|
I want say thanx for everyone who help me and write about resolving my problem!

I read some manuals and find one interesting thing :) Mariadb needs a swap!! >.<" I don't know why i don't use a swap before... I just forget it :) So... if you have seem problem with mariadb - try use a swap partition or file.

In my case better work swap file.

Thanx everyone again! ;)
Re: Help with mariadb installation 1
September 01, 2021 08:29PM
Kuzma Wrote:
-------------------------------------------------------
> Hi everyone! Sorry for long silence :|
> I want say thanx for everyone who help me and
> write about resolving my problem!
>
> I read some manuals and find one interesting thing
> :) Mariadb needs a swap!! >.<" I don't know why i
> don't use a swap before... I just forget it :)
> So... if you have seem problem with mariadb - try
> use a swap partition or file.
>
> In my case better work swap file.
>
> Thanx everyone again! ;)

Kazuma,

This thread is rather old, but I wanted to say thank you for your suggestion on installing the swap partition to make Mariadb functional on Kirkwood platforms. Mariadb is rather crucial in many of today's applications (Freeradius, Freepbx, etc.), and I spent a few hours trying to get Mariadb to work on my Pogoplug V4 until I came across this thread. Creating a swap partition alleviated all configuration & installation errors of Mariadb.

Thanks Kazuma!



Edited 1 time(s). Last edit at 09/01/2021 08:33PM by dumdedumda.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: