Manjaro Linux Forum

Contributions & Artwork => Community Contributions => Topic started by: Esclapion on 22. March 2015, 14:29:47

Title: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 22. March 2015, 14:29:47
Hi all  :)

https://aur.archlinux.org/packages/mhwd-chroot/

For the moment, tested with xfce and lxqt only. To install :

Code: [Select]
yaourt -S mhwd-chroot
Screenshots :

(http://www.auplod.com/u/audlpo4fd22.png)

(http://www.auplod.com/u/alpudo4fd23.png)

It's more sane to quit the chroot with Ctrl-D or exit than to close the windows.


For more infos on chroot, see HERE (https://wiki.archlinux.org/index.php/change_root).  ;)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 22. March 2015, 18:56:14
this works beautifully.

i have tested it in virtualbox:
1. i installed manjaro net edition with lxqt packages from the AUR in virtualbox.
2. i put the latest manjaro lxqt iso image in virtualbox and booted it. then, i installed mhwd-chroot in it. i started "chroot" from the start menu and i could access 1. i could update 1. and install packages easily.

i have 2 questions:
- is there a terminal command to start mhwd-chroot from the terminal?
- is it possible to not be logged in as root? (so i can build and install packages from the AUR without being root)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 22. March 2015, 19:10:50
Thanks for your tries  :)

1) to chroot in the same terminal, you can call :

Code: [Select]
[sudo] mhwd-chroot-shell
2) from the terminal, to chroot in a new window :

Code: [Select]
[gksu|sudo] mhwd-chroot
3) from the manual :

Quote
Only a privileged process (Linux: one with the CAP_SYS_CHROOT capability) may call chroot().

So, it seems not possible as simple user.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 22. March 2015, 22:57:28
i did some more testing with xterm, lxterminal, qterminal, and urxvt in the latest manjaro lxqt.
the commands you mentioned worked in all of them, except urxvt:
Quote
[manjaro@manjaro ~]$ sudo mhwd-chroot
/usr/bin/mhwd-chroot: Zeile 18: rxvt: Kommando nicht gefunden.
Quote
[manjaro@manjaro ~]$ gksu mhwd-chroot

(gksu:3311): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(gksu:3311): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
/usr/bin/mhwd-chroot: Zeile 18: rxvt: Kommando nicht gefunden.
but "sudo mhwd-chroot-shell works.

i remember it worked in my last test in urxvt. this is strange.


p.s.: i translate this line:
Code: [Select]
Zeile 18: rxvt: Kommando nicht gefunden.
Code: [Select]
line 18: rxvt: command not found.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 22. March 2015, 23:03:50
another question:
is there a way to specify the root partition of the manjaro i want to chroot into?

something like
Code: [Select]
sudo mhwd-chroot sda3
or
Code: [Select]
sudo mhwd-chroot /dev/sda3
would make sense.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 22. March 2015, 23:35:40
1) I think the content of thour environment variable $COLORTERM is bad. Installation problem ? I must add a test on that.

2) no simple.  :-\  All is mounted (/boot, /home, etc...); but the chroot will always be done on the partition containing really the folder /etc.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 23. March 2015, 00:43:08
All is mounted (/boot, /home, etc...); but the chroot will always be done on the partition containing really the folder /etc.
ah. ok.
i am just concerned about what happens, when there are 2 or more linux installations on my computer. what will happen?
will mhwd-chroot choose the first /etc it finds (other than the system, which executes mhwd-chroot)?

it is nice, mhwd-chroot shows me the root (or rather /etc) partition.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 23. March 2015, 02:17:56
Quote
i am just concerned about what happens, when there are 2 or more linux installations on my computer. what will happen?

I have 3 Linux installations on my PC, and I'm now on the main, sda6 :

(http://www.auplod.com/u/upload4fe03.png)

maybe I will add more details in the future, but >= 3  Linux installations is a rare case.*

(edit)
Btw, I find a bug : It's not Entrer (french) but Enter (english).  ;D

* I have also a W7, but it's ignored by the tool.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 23. March 2015, 13:53:06
this looks great!
i know that 3 linux installations on one systems are a rare case, but this makes mhwd-chroot feel more complete.


if you are looking for better english, just replace "list of the found systems" with
Code: [Select]
List of found systems
or
Code: [Select]
Found systems
or
Code: [Select]
Found Linux systems
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 23. March 2015, 22:22:04
New version 1.1-1.

(http://www.auplod.com/u/paolud4ff7b.png)

Some cosmetics changes (label added in the list, etc...), filter to avoid a bad value in $COLORTERM, better umount, comment lines of fstab filtered.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 28. March 2015, 00:00:34
Hi guys, trying to install mhwd-chroot on a live system to access logs of non bootable system.

I get this error when installing mhwd

Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 28. March 2015, 02:25:23
It's because yaourt is not good installed : it needs base-devel or a part of this, at least.

In your case, it miss binutils, to install with pacman :

Code: [Select]
sudo pacman -S binutils
But it's strange that you don't have that.   :o
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 28. March 2015, 04:21:08

But it's strange that you don't have that.   :o

@ escalapion Im using manjaro-xfce-0.9.0-dev-x86_64.iso from 22-03-2015 to test calamares.

I'm trying to gather info to help resolve this issue : https://forum.manjaro.org/index.php?topic=21531.15 (https://forum.manjaro.org/index.php?topic=21531.15)

Thank's for your help
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 28. March 2015, 19:33:04
Hi guys,  :-[ i'm sorry this disturb again ... another error trying to install mhwd-chroot from still same live installer.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 28. March 2015, 19:56:36
Always another piece of yaourt missing...  OK, we can use the simplest solution :

Code: [Select]
sudo pacman -S base-devel
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 28. March 2015, 21:29:05
Thank's esclapion working now !
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Lukimya on 29. March 2015, 01:23:32
The gui causes my mousepad only to flash and crash. running in terminal produces


Code: [Select]
[zatox@zatox ~]$ sudo mhwd-chroot-shell

No linux system found !
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 29. March 2015, 01:27:45
The gui causes my mousepad only to flash and crash. running in terminal produces


Code: [Select]
[zatox@zatox ~]$ sudo mhwd-chroot-shell

No linux system found !

Which DE and wich terminal is installed ?

What's the value of COLORSHELL ?
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Lukimya on 29. March 2015, 03:46:38
Which DE and wich terminal is installed ?

What's the value of COLORSHELL ?

Mousepad and xfce. I havent set any color values for the shell.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 29. March 2015, 12:42:39
Sorry, error. What's the result of

Code: [Select]
echo $COLORTERM
mousepad is not a terminal, it's a text editor. I have also xfce, and it works...  :o
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Lukimya on 29. March 2015, 13:13:29
Sorry, error. What's the result of

Code: [Select]
echo $COLORTERM
mousepad is not a terminal, it's a text editor. I have also xfce, and it works...  :o

:D yes sorry, of course it is the xfce4 terminal, the evening got the better of me. Well for me after i put the password the screen flashes as if it would be opening a terminal window then crashing immediately.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 29. March 2015, 15:41:36
I did a mix between COLORSHELL and COLORTERM for the same reason.  ;D

But I don't see what can happens... I have a 0.8.12 "Ascella", and it works fine.   ::)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 31. March 2015, 00:18:14
New release 1.2. Complete rewriting of the terminals management. The package no more depends of gksu or kdesu. If none of both is present, it disappears from the menu.

Can be called from the terminal, under root or not, with available terminal emulator  or not.

konsole and kdesu are supported.

More than 10 partitions per disk are now authorized.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 31. March 2015, 01:32:15
Bonjour esclapion,

this is the result i have when i try to use the new version.

Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 31. March 2015, 02:01:55
I don't understand.  ::) You do a manually chroot, so you go to the installed version, and after you call mhwd-chroot.

If you have only one installed system, it can't do again a chroot ?

From the live, install mhwd-chroot and use it directly ?

You absolutely don't need all those mounts...  :o mhwd-chroot is done to replace them.

(edit)

You can't do a chroot from the installed version to the live, because the live is not installed.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Loup on 31. March 2015, 02:53:31
I don't understand.  ::) You do a manually chroot, so you go to the installed version, and after you call mhwd-chroot.

If you have only one installed system, it can't do again a chroot ?

From the live, install mhwd-chroot and use it directly ?

You absolutely don't need all those mounts...  :o mhwd-chroot is done to replace them.

(edit)



You can't do a chroot from the installed version to the live, because the live is not installed.

Sorry to disturb, misunderstanding of the tool and chroot.

Thank's for your time
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 31. March 2015, 11:20:00
No disturb, thanks for the tries.  :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: mermouy on 16. April 2015, 22:12:36
Just tried this tool, I must I'm actually with Enlightenment DE, so it may obviously come from it...  :P
Anyway i just look for any log but I can't find any...? Where should I look for log or any info?
About what it does (visually at least), it just does'nt want to stay on desktop, and appear almost 0.5 s then disapear as fast as it came...

Hope I can help in some way... We may have a look at this sometime, as I will not have much free times this days...
Ciao and, BTW it looks like a nice tool!
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 16. April 2015, 22:26:44
dmesg must work. Now, the fact you have a journal or not... I don't know enlightenment.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: dhope on 17. April 2015, 01:09:14
This'll make a really nice addition to the live iso, great work!  ;D
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 04:21:27
Thank you so much esclapion for this brilliant tool! :)
Its extremely helpful!
Just successfully installed the wireless-driver and did a complete system  update of a fresh install from the secondary install - that was fun! :D
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 13:28:16
What's the proper way to finish mhwd-chroot?
Do I simply close the terminal?
I have to say again. This tool is extremely useful for me :) Like that I can do my system update on both installations (stable and unstable) without rebooting into the other installation - ingenious! Bravo again!! :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 21. April 2015, 14:05:50
What's the proper way to finish mhdw-chroot?

i always do a (or two)
Code: [Select]
exit
command(s). but i am not sure, whether this is the proper way.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 14:15:00
looks very convincing anyway! :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 21. April 2015, 14:17:14
exit or Ctrl-D. it's the same.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 14:17:28
On opening mhwd-chroot I realize that most of the time I have to start it twice.
The first time I see the terminal window flashing up briefly and then it disappears again.
Then when I start it a second time it opens properly...
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 21. April 2015, 14:18:52
Maybe with sudo mhwd-chroot we could see an error message ?
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 14:25:42
indeed ;)
I was just about to post this:
Code: [Select]
# mhwd-chroot
xfce4-terminal -e mhwd-chroot-shell
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 21. April 2015, 14:31:31
I have got that, but after several tries, when I stopped bad the chroot. I don't know exactly what it is.

You have that only with the Live ?

I have that no more, it starts at first click.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 14:43:19
I'm using it from a secondary hard-installation right now.
Have just rebooted and I get the same message. But when I start it like this it DOES open every single time!
Maybe it is just content after it has been able to tell me about its complaints? ;) :D
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 21. April 2015, 14:47:04
I will have a look, thanks.  ;) The problem is that I don't have more it.  ::)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 21. April 2015, 14:52:26
No problem! Don't worry - its working perfectly. I am more than happy already :)
Just thought it will be good for you to know ;)
Thank you very much.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 24. April 2015, 16:00:43
I can't reproduce the problem here.  ::) I have only to start twice in VBox, if i end (bad) the chroot by  closing the window..

I need more details, if possible.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: oberon on 24. April 2015, 16:10:11
True. There is a connection to the way I quit the session.
When I end it properly with exit its fine. When I just close the terminal window the next time I start mhwd-chroot I have this flashing up and disappearing...
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 24. April 2015, 17:12:00
Maybe I will trap the HANGOUT signal ? To see...
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: dyfi on 04. May 2015, 11:18:48
Installed on laptop and desktop - nice piece of software - thanks.
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 04. May 2015, 11:27:02
 :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: flipper on 19. May 2015, 17:39:43
Hi Esclapion, this is really a nice tool. I already used it succesfully in a KDE4 environment, but testing it on a virtualbox KDE plasma 5 to KDE plasma 5, gives me:

Code: (text) [Select]
manjaro@manjaro ~]$ LANG=C mhwd-chroot
kdesu konsole --separate -e mhwd-chroot-shell
Don't need password!!

pci id for fd 10: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
kf5.kservice.sycoca: Trying to open ksycoca from "/home/manjaro/.cache/ksycoca5"
Calling notify on "Sound"
Changing audio state from  Phonon::LoadingState  to  Phonon::StoppedState
Calling notify on "Taskbar"
0 88080389
Changing audio state from  Phonon::LoadingState  to  Phonon::StoppedState
Changing audio state from  Phonon::StoppedState  to  Phonon::PausedState
Changing audio state from  Phonon::PausedState  to  Phonon::PlayingState
Changing audio state from  Phonon::PlayingState  to  Phonon::StoppedState


It's not a biggy, but I always try those things out before a case of emergency  :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: excalibur1234 on 01. June 2015, 15:31:45
i have just added mhwd-chroot to the wiki:
https://wiki.manjaro.org/index.php?title=Restore_the_GRUB_Bootloader#Use_mhwd-chroot
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: Esclapion on 01. June 2015, 15:38:48
Nice, thanks.  :)
Title: Re: New AUR package "mhwd-chroot" to test !!!
Post by: sender on 25. March 2016, 14:31:48
See https://aur.archlinux.org/packages/mhwd-chroot-extended/ for a clone of this package with NVMe storage support.

@Esclapion feel free to merge :)