MT300A

Posted by Balaso 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
MT300A
August 21, 2017 04:47PM
I noticed that you said "The image for the Glinet MT300N & Glinet MT300A are generated." in the development notes. I was curious if the image was set up to take advantage of the SD card board on the router. Is install able to be done with it or is thumb drive still the way to go? I spent some time with it this weekend. The image loaded successfully, but I am having trouble getting it to run the install folder on SD or thumb drive.
Re: MT300A
August 22, 2017 06:18PM
Hi,
thank you for testing and playing around with the development image. It is highly appreciated.

In fact, 4 weeks after I created the image, I learned from the internal SD card port. I don't own one for myself.. so I was just picking one of the glinet products to test the multi-arch build.

I did not add additional modification which take account of the SDport. So, you need to modufy the router a bit to get the SDcard reader working. To start with that, I need to know, if the sdcard slot is detected on your device (for example, comparing to a normal LEDE image) ?

If yes, you need to find out the device node for the SD card , lets say /dev/mmc0p1 (for the first partition).
The partition on the SDCard needs to be FAT32 (yes...) and you need to change the extRoot configuration to use /dev/mmc0p1 instead of /dev/sda1 -> edit
vi /etc/ext.config

After this a reboot might trigger the autoinstall off the SDcard if the install folder is available.


best regards
Matthias
Re: MT300A
August 23, 2017 05:20AM
I installed the kmod-sdhci-mt7620 package and that allowed the SD card to bee seen by the system. I am able to see a mount for /dev/mmcblk0p1 using the df command. If I set that as the target in ext.conf I can see that the install.log is created, but there appears to be a problem with extRoot as install does not complete correctly. Here is the log:

Wed Aug 23 03:03:03 2017 daemon.info logread[1106]: Logread connected to 192.168.1.2:9999
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : executing run_test_installation_destination
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : Testing if installation destination by extendRoot is available.
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : Something happend to extendRoot filesystem. Printing debug output...
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : Mount output
Wed Aug 23 03:03:04 2017 user.notice root: /dev/root on /rom type squashfs (ro,relatime)
Wed Aug 23 03:03:04 2017 user.notice root: proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
Wed Aug 23 03:03:04 2017 user.notice root: sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
Wed Aug 23 03:03:04 2017 user.notice root: tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
Wed Aug 23 03:03:04 2017 user.notice root: /dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
Wed Aug 23 03:03:04 2017 user.notice root: overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
Wed Aug 23 03:03:04 2017 user.notice root: tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
Wed Aug 23 03:03:04 2017 user.notice root: devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
Wed Aug 23 03:03:04 2017 user.notice root: debugfs on /sys/kernel/debug type debugfs (rw,noatime)
Wed Aug 23 03:03:04 2017 user.notice root: /dev/mmcblk0p1 on /mnt/usb type vfat (rw,noatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : dmesg | grep sd
Wed Aug 23 03:03:04 2017 user.notice root: [   16.436331] mtk-sd: MediaTek MT6575 MSDC Driver
Wed Aug 23 03:03:04 2017 user.notice root: [   16.465519] sdhci: Secure Digital Host Controller Interface driver
Wed Aug 23 03:03:04 2017 user.notice root: [   16.471902] sdhci: Copyright(c) Pierre Ossman
Wed Aug 23 03:03:04 2017 user.notice root: [   16.477979] sdhci-pltfm: SDHCI platform and OF driver helper
Wed Aug 23 03:03:04 2017 user.notice root: [   24.350393] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.361744] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.372617] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.382285] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.391554] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.400973] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.410356] random: ubusd: uninitialized urandom read (4 bytes read, 48 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: [   25.784614] random: ubusd: uninitialized urandom read (4 bytes read, 51 bits of entropy available)
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : dmesg | grep loop
Wed Aug 23 03:03:04 2017 user.notice root: [    0.007577] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
Wed Aug 23 03:03:04 2017 user.notice root: [   24.881329] loop: module loaded
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : dmesg | grep ext
Wed Aug 23 03:03:04 2017 user.notice root: [   14.306186] block: extroot: not configured
Wed Aug 23 03:03:04 2017 user.notice root: [   19.271339] block: extroot: not configured
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer.sh : Exiting box-installer routine
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer_start.sh : Multiple line auto_package found. Shifting 1st line to auto_package_done
Wed Aug 23 03:03:04 2017 user.notice root: /bin/box_installer_start.sh : Initiating reboot after installation
Wed Aug 23 03:03:04 2017 user.notice : /bin/box_installer_start.sh : Logging install log to USB-Stick
Re: MT300A
August 23, 2017 06:48PM
Ok, this is not that bad. I am assuming we know what we are doing, so we are changing the configuration that the auto-install will work again. The script is hanging in a situation, which tries not to break something because the configuration has some mismatches.

The box installer is thinking that the first step of the extenRoot installation is already done: configure /mnt/usb mount-point and the extRoot mount. The last point is missing, because I can see /mnt/usb on the mount printout, but not the ext-filesystem. So lets re-initialize it with

/etc/init.d/ext init

After this, you can trigger the automatic installation:

/etc/init.d/ext start
box_installer_start.sh

Well, let's see what will happen :-)

best regards Matthias
Re: MT300A
August 25, 2017 01:20AM
Reinitializing worked perfectly. After running the command, I had to rename the auto_package file. The earlier script had changed it to auto_package_done. Once I changed it back it ran fine. I am having trouble with the forum now. I do not see the config.pl file and when I run
/opt/piratebox/bin/board-autoconf.sh
I see:
sed: bad option in substitution expression
sed: /opt/piratebox/share/board/config.pl: No such file or directory
sed: /opt/piratebox/share/board/config.pl: No such file or directory
sed: /opt/piratebox/share/board/config.pl: No such file or directory

I connected the box to the internet and ran
sed: /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard
, but no luck. I may try moving the zip file manually and running it. Do you think that should do it?



Edited 1 time(s). Last edit at 08/25/2017 01:21AM by Balaso.
Re: MT300A
August 25, 2017 07:27PM
can you verify if the piratebox-mod-imageboard module was installed by the auto installer?
Checkout the install.log, use opkg list or post the content of the auto_package_done file.
Re: MT300A
August 26, 2017 01:57AM
Using opkg list, I do see piratebox-mod-imageboard - 1.2.0-6 listed.
Re: MT300A
August 26, 2017 04:15AM
Ok, then try the following please:

mv /opt/piratebox/share/board /opt/piratebox/share/board_old
KAREHA_RELEASE=kareha_3.1.4.zip
cp /mnt/usb/install/$KAREHA_RELEASE  /opt/piratebox/tmp
/opt/piratebox/bin/install_piratebox.sh imageboard

Thanks for your investigation. I think I found the issue: With piratebox 1.2 the install_piratebox.sh command does not need the Pirateboxconfig as a parameter anymore... this adjustment was missing for the imageboard package file.

Congratulation, you discovered a bug thumbs up

Best regards Matthias
Re: MT300A
August 26, 2017 04:44AM
The commands ran successfully until the last one. It extracted, but with errors. I get a 404 error when you visit the forum link and running the configuration script (board-autoconf) return a msg about the board not installed. Here is a screenshot of the console output.

Re: MT300A
August 26, 2017 05:10AM
Ok, I am sorry, my fault. You need to create board folder first:

mv /opt/piratebox/share/board /opt/piratebox/share/board_old
KAREHA_RELEASE=kareha_3.1.4.zip
cp /mnt/usb/install/$KAREHA_RELEASE  /opt/piratebox/tmp
mkdir /opt/piratebox/share/board
chown nobody:nogroup  /opt/piratebox/share/board
/opt/piratebox/bin/install_piratebox.sh imageboard
Re: MT300A
August 26, 2017 04:03PM
Ahh, I should have seen that myself.

This worked for the most part. The chown command gave me an operation not permitted error. Also, when I ran the board-autoconf script, sed gave out a bad option in substitution expression. I don't know if those errors are ok, but I can confirm that the board did install and the autoconf script did work.
Re: MT300A
August 27, 2017 09:06AM
Hi,
the permission issues are ok, because FAT32 does not support the set attributes.

Quote

sed gave out a bad option in substitution expression
this might be the result of a special character in your password... but anway, I am hunting the bad option substitution for while without success.. it seems LEDE is breaking some sed standard.

Matthias
Re: MT300A
November 26, 2017 12:27PM
I just added the possibility to install additional driver packages during the image generation.

Then it is possible to change the ext.config before installing via USB stick. So you can change the "device pointer" to the SDCard instead.

best regards
Matthias