Author Topic: [Testers needed !!] chrepair : simple tool to chroot  (Read 2143 times)

0 Members and 1 Guest are viewing this topic.

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
[Testers needed !!] chrepair : simple tool to chroot
« on: 20. March 2015, 17:24:25 »
Hi all

The goal of this tool is to repair or modify an existing linux installation from another or from a livecd with a chroot.

For the moment, this tool manages :
- separate /boot and /home
- /tmp
- swap

It mounts also :
- /proc
- /dev
- /sys
- /dev/pts

and copy /etc/resolv.conf for have the Net on the target.

To download HERE.

Criticism or suggestions for improvement, even aesthetics, are welcome.  :)

« Last Edit: 20. March 2015, 17:27:10 by Esclapion »
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)

Offline marcin82

  • Vollwertiges Mitglied
  • ***
  • Posts: 120
  • Manjaro Linux - Polish Support
    • http://foum.archlinux.org.pl
  • Branch: Arch Linux
  • Desktop: Xfce
  • GPU Card: NVidia GTX 650Ti Boost
  • GPU driver: non-free
  • Kernel: uname -r
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #1 on: 20. March 2015, 19:41:38 »
My proposal:
Quote
root rights => root privileges

marcin'82

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #2 on: 20. March 2015, 20:44:35 »
Thanks, I change.  ;) It works, else ?
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)

Offline excalibur1234

  • Global Moderator
  • *****
  • Posts: 2508
  • Branch: unstable
  • Desktop: net-minimal + LXQt
  • GPU driver: video-nouveau
  • Kernel: 4.6
  • Skill: Intermediate
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #3 on: 21. March 2015, 14:05:31 »
so, you wrote a script to automate (parts of) this:
https://wiki.manjaro.org/index.php?title=Restore_the_GRUB_Bootloader

do i understand this right?
Need more information? Search here:   Manjaro Forum   |   Manjaro Wiki   |   Arch Wiki

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #4 on: 21. March 2015, 14:16:04 »
Not only. Normally, you can do what you will : install/remove a package, etc.. It's less limited

(edit)

For example, I do now the update via pacman -Syu of another installation.

« Last Edit: 21. March 2015, 14:38:15 by Esclapion »
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)

Offline ringo

  • Held Mitglied
  • *****
  • Posts: 9684
  • www.manjaro-nl.org
    • Manjaro Belgium + forum
  • Branch: unsourced
  • Desktop: xfce
  • GPU Card: Nvidia Geforce 8600 GT (acer 23inch)
  • GPU driver: Free*
  • Kernel: linux kernel
  • Skill: Novice
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #5 on: 21. March 2015, 20:49:03 »
this can growth to a nice tool.. :)
Dutch go the dutch site :)

Offline papajoke

  • Vollwertiges Mitglied
  • ***
  • Posts: 135
  • from www.manjaro.fr
  • Branch: stable/testing
  • Desktop: KDE4 and 5 - zsh
  • GPU driver: video-nouveau free
  • Kernel: x64
  • Skill: Intermediate
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #6 on: 23. March 2015, 01:23:08 »
chouette utilitaire

you can add linux name in choice  (with etc/lsb-release)

Code: [Select]
list_label=()
# Search for partitions containing /etc
...
        list[$nbpart]=$i
        list_label[$nbpart]=`grep -m 1 -o  '".*"$' $mountpoint/etc/lsb-release`
...
echo -e "\nList of the found systems"
...
        echo "$i) ${list[$i]}  ${list_label[$i]}"

my output (same grub):
Quote
List of the found systems
=========================
0) /dev/sda6 "Manjaro KDE"
1) /dev/sda7 "Manjaro Cinnamon"
2) /dev/sda8 "LMDE Cinnamon Edition"
3) /dev/sda9 "Arch Linux"

Please entrer your choice [0-3] :
« Last Edit: 23. March 2015, 02:28:47 by papajoke »

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #7 on: 23. March 2015, 01:37:55 »
It's an idea, yes, thanks.  :)

Now, a better version of the tool is in AUR under the name mhwd-tool, see HERE.
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)

Offline papajoke

  • Vollwertiges Mitglied
  • ***
  • Posts: 135
  • from www.manjaro.fr
  • Branch: stable/testing
  • Desktop: KDE4 and 5 - zsh
  • GPU driver: video-nouveau free
  • Kernel: x64
  • Skill: Intermediate
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #8 on: 23. March 2015, 12:31:57 »
not shure for your regex in fstab
dont read comment
best use of tabs(spaces)
Code: [Select]
grep -Es ' none[ ]{1,}swap[ ]{1,}' /etc/fstab | grep -v "^#"

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #9 on: 23. March 2015, 13:02:02 »
# is not always in the 1st column, if we go there.  ;)

(edit)
I don't understand your syntax and I have no swap to test. Will do some tries, but stay readable  (lol  ;D).

(re)
Why no add a ^[^#] at the begin of the regexp ? It avoids a pipe and a 2nd grep ? and the process are very heavy...  ::)

^[       ]*[^#]........
« Last Edit: 23. March 2015, 13:17:19 by Esclapion »
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)

Offline dyfi

  • Jr. Mitglied
  • **
  • Posts: 60
  • Skill: Novice
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #10 on: 03. May 2015, 13:40:21 »
If anyone has difficulty with a chrooted Debian install from Manjaro (with basic commands) the link below should help.  It worked for me.

https://bbs.archlinux.org/viewtopic.php?id=196922
« Last Edit: 03. May 2015, 13:44:08 by dyfi »

Offline Esclapion

  • Support Team
  • ****
  • Posts: 5523
    • manjaro
  • Branch: stable
  • Desktop: Lxqt
  • GPU Card: GTX 970
  • GPU driver: nonfree
  • Kernel: 4.4.6
  • Skill: Advanced
Re: [Testers needed !!] chrepair : simple tool to chroot
« Reply #11 on: 03. May 2015, 14:05:17 »
chrepair is now mhwd-chroot. Try it, it's in AUR.  ;)

No need of older tools.
Venez nous rejoindre sur l'IRC francophone
Patrice - Violence is the last refuge of the incompetent (Asimov)