update from 1.0.2 to appCentral 2.1

myHD is an isolated (namespace (mnt, IPC, PID)) Ubuntu environment to run Ubuntu application displayed as ASUSTOR Asportal / Xorg applications.

Moderator: Lillian.W@AST

Post Reply
Darkmagister
Posts: 48
youtube meble na wymiar Warszawa
Joined: Sat Oct 27, 2018 4:36 pm

update from 1.0.2 to appCentral 2.1

Post by Darkmagister »

Hello,
i have ADM4 and i'm still using myHD for kodi (20 alpha now) and i had installed myHD 1.0.2 now i see that myHD is available as version 2.1 in appCentral, is it safe to update from there? or there is some special procedure? i would like to update the ubuntu version to the new 20.04 but i would like to keep everything from the kodi configurations and other ubuntu config, any suggestion ??

thanks
AS6404T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: update from 1.0.2 to appCentral 2.1

Post by father.mande »

Hi,

Normally it's possible to migrate from 1.0.2 to 2.1 and keep 18.04 Ubuntu, even it'snot 100% sure, because, my second NAS x86_64 with HDMI is out ... so I can't redo a test quickly.

In all case .
1 ... first do a backup of the actual myHD, stop it in terminal, then used backup myHD command or do it yourself.
... all folder are under /usr/local/.myHD
... the myHD backup normally used pigz, a gzip multi-processor to drastically reduce the elapse time to do the tar, even during the tar they used lot of CPU.
... pigz is available though Entware APKG or directly in /usr/local/AppCentral/myHD/bin (usage in tar is like : tar -c -I path_to_pigz path_to_tar_file.tgz folder_to_save
... in all case STOP myHD before saving folder, all folder are in /usr/local/.myHD/

Code: Select all

 # myHD help_backup
myHD Usage : Color signification Tested / Tested BUT take care / Not_tested or Not_available_for_now
=====================
myHD clean_for_backup [full] ... clear man, doc and clean apt cache : full : add an autoclean (so reduce drasticaly backup size)
------------------- autoclean force to RE download packages when update / install ... so NO return to previous version NO some tools (tweek for ex.)
myHD backup_env [full] ... save snapshot of 2004 Ubuntu env. incremental or new full / home folder / scipts folder
myHD backup_home ... save ONLY the home folder (all users) to keep settings for applications ...
myHD set_backup_folder PATH_TO_FOLDER ... change the default or actual backup FOLDER (default is /usr/local/AppCentral/myHD/_snapshot
myHD list_backup_folder ... list the actual backup_fodler
=====================
2 the myHD_home folder contains ALL your user settings (including kodi, so saving it and reuse it with new 2004 move your actual settings to the new Ubuntu.

3 switching to Ubuntu 20.04 can be done using myHD command : myHD switch_ubuntu_env 2004
... this normally install Ubuntu 20.04 and switch to systemd init mode (so no more bash nor tmux ... but more complete Ubuntu init) ... AND your home folder (astr) is keep.
... in case this don't work as well (a user report problem), you can do the install manually before switching
https://forum.asustor.com/viewtopic.php ... 393#p42918

4 when 20.04 is started, you must redo the change you done in 18.04, for ex. changing the repository for Kodi to use Kodi20, perhaps others change
... for MH-xxx application, some of them like kodi are "just" launcher so don't need change ... some other can require to remove and reinstall it when Ubuntu version is important (for ex. PlexMediaPlayer)

The target of myHD 2 is to move and replace Asportal by a more complete windows manager (Idesk mode), but "old" access even limited to restricted application cann be used as before.

N.B. if you don't want to start myHD (after installing 20.04 to change what are inside, you can launch 20.04 as a chroot
... the methodology is :
cd /usr/local/.myHD/2004
cp -p /etc/hosts /etc/hosname /etc/resolv.conf etc/
chroot . / bin/bash
/start_up.sh mount
apt-get update
apt-get dist-uphgrade
... do you change and install new application (you can get the list using dpkg in 18.04 if you are not sure)

/start_up.sh umount
exit

BUT perhaps all run fine using myHD switch_ubuntu_env 2004 :D :roll:

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: update from 1.0.2 to appCentral 2.1

Post by Darkmagister »

after long time i was able to update the app,
but no 2004 directory has been created in /usrl/local/.myHD

i've stopped myHD, made a backup of the directory, then update the app from the app central, and then use the command myHD switch_ubuntu_env 2004,
this was the output

Code: Select all

You have choice to switch to Ubuntu 2004
==== Normal stop require
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to talk to init daemon.
Now we have to wait for cleaning shell, that clean all potential residual things
Please wait ... shutdown is running
Please wait ... shutdown is running
myHD was stopped ... Mon Jun  6 16:04:35 CEST 2022
restore swaps /dev/xxx put off by systemd at myHD stop
Cron ubuntu_update_cron.sh have been canceled if exist
Run only after boot / reboot / update of myHD
===== uvcvideo is loaded ... nothing to do
=== squashfs is already loaded ... 
ENABLE ... asportal is Enable
NO myHD don't run no more with systemd or with bash 
ENABLE ... asportal is Enable
myHD start ... requested Mon Jun  6 16:04:40 CEST 2022
get keys from Asportal / get sound def.
myHD astr user exist ...
==== Check installation method
HUM! nothing in /usr/local/.myHD for version 2004
but now it doesn't work anymore, i can not start it and if i try the switch command again i will give me that it's already in 2004

Code: Select all

# myHD start
NO myHD don't run no more with systemd or with bash 
ENABLE ... asportal is Enable
myHD start ... requested Mon Jun  6 16:56:16 CEST 2022
get keys from Asportal / get sound def.
myHD astr user exist ...
==== Check installation method
HUM! nothing in /usr/local/.myHD for version 2004

Code: Select all

# myHD status
==== is myHD running ?
====  myHD is NOT running  
 myHD is not yet installed ... 
 DISPLAY LOG of Download then Install Ubuntu ... up to ==== END with FAILED or SUCCESS
/usr/local/bin/myHD: line 2349: can't open /tmp/download_myHD.log: no such file

IN CASE OF FAILURE ... start AGAIN : myHD to restart download and install
re-use status to display more LOG if not finished
====
AS6404T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: update from 1.0.2 to appCentral 2.1

Post by father.mande »

Hi,

I have to check, I have done update some time ago and don't test again ...
The problem seem that the install (in case of update) try to download 2004 when 2004 is delivered inside the APKG ??? so no chance to get it ...

Please wait or do the install manually :
... connect ssh terminal root (not admin) / your_admin_password
cd /usr/local/
chmod 777 .myHD
(in case access right changed by ADM update)
cd .myHD
stop myHD (myHD stop) ignore errors
create Ubuntu 20.04 LTS : (UNDER root not admin)
if exist myHD_scripts FOLDER ... just create a link : ln -s myHD_scripts myHD_2004_scripts this not used but compatibility.
if NOT follow the lines hereafter
tar xzf /usr/local/AppCentral/myHD/Delivery/myHD_2004_delivery_scripts.tgz
mv myHD_2004_scripts myHD_scripts
ln -s myHD_scripts myHD_2004_scripts

NOW add Ubuntu
tar xzf /usr/local/AppCentral/myHD/Delivery/myHD_delivery_2004.tgz
NOW keep your existing home folder (so also your settings)
... create a link : ln -s myHD_home myHD_2004_home this not used but compatibility.
OR generate a new home empty
tar xzf /usr/local/AppCentral/myHD/UBUNTU_2004_home_delivery.tgz
mv myHD_2004_home myHD_home
ln -s myHD_home myHD_2004_home

... NOW set 2004 as INSTALLED
confutil -set /usr/local/AppCentral/myHD/myHD_2004.conf 2004 INSTALLED TRUE

switch
restart myHD ( myHD restart ), don't forgot to move to jinit (systemd) to get better result
move to jinit can be done before restart using myHD command
confutil -set /usr/local/AppCentral/myHD/myHD.conf myHD CHRT jinit
... or via myHD : myHD set_use_jinit do it and restart myHD
then if all run as expected : myHD apt_upgrade_package perhapds long but include kodi etc.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: update from 1.0.2 to appCentral 2.1

Post by Darkmagister »

thank you so much, it's working now, and copying .kodi from the old home work as expected !!!!
AS6404T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: update from 1.0.2 to appCentral 2.1

Post by father.mande »

Hi,
Good :D and all my apologize for the inconvenience...
I continue to search why ... even now update from 1.x are rare. But I hate to don't understand :twisted: , even I want to have more time for the new update offering also Ubuntu 22.04 as engine.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Post Reply

Return to “myHD”