[SOLVED] chroot on v 3.5 A=/usr/local/sbin/newroot
Moderator: M. Eerie
[SOLVED] chroot on v 3.5 A=/usr/local/sbin/newroot
Hi
Just discovered I can't use relative sym links as they are find my real system (RAM drive) for an unpacked base XZM that I am attempting to mod.
https://wiki.archlinux.org/index.php/Change_root
offers 2 main methods AFAIK, which is better please and 2 more below
Using chroot or Using systemd-nspawn
At this stage I don't need any internet or run any gui app.....its command line interface only
Also mentions in this post
https://wiki.archlinux.org/index.php/Ch ... nvironment
Proot or Fakechroot
thanks for reading.
Just discovered I can't use relative sym links as they are find my real system (RAM drive) for an unpacked base XZM that I am attempting to mod.
https://wiki.archlinux.org/index.php/Change_root
offers 2 main methods AFAIK, which is better please and 2 more below
Using chroot or Using systemd-nspawn
At this stage I don't need any internet or run any gui app.....its command line interface only
Also mentions in this post
https://wiki.archlinux.org/index.php/Ch ... nvironment
Proot or Fakechroot
thanks for reading.
Last edited by aus9 on 27 Nov 2015, 00:52, edited 1 time in total.
Re: chroot which is better?
there appears to be a nice alternative here
https://shafeeqk.wordpress.com/2012/07/ ... ux-chroot/
so that makes it about 5 ways and counting
Code: Select all
mkdir /mnt/arch
mount /dev/<device-or-partition-name> /mnt/arch
cd /mnt/arch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/
chroot . /bin/bash
so that makes it about 5 ways and counting
- ncmprhnsbl
- DEV Team
- Posts: 3941
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Re: chroot which is better?
ive only used the basic chroot on the wiki to recover my arch install(from archbang livecd and porteus once i think) a few times..
systemd-nspawn sounds slightly easier... fewer setup steps...
systemd-nspawn sounds slightly easier... fewer setup steps...
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: chroot which is better?
And this is how I built Nemesis. All from a chroot (on any OS). systemd-nspawn looks very useful. Cheers.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
Re: [SOLVED] chroot which is better? A=systemd-nspawn
Yes you beat me to it. Just created my first successful sym link
for others to see a good result....in code box I use # to show output results
for others to see a good result....in code box I use # to show output results
Code: Select all
cd $UNPACK
systemd-nspawn
# Spawning container squashfs-root on /tmp/squashfs-root.
# Press ^] three times within 1s to kill container.
# xargs: `/dev/null': No such file or directory
# Failed to connect to bus: No such file or directory
<do commands>
exit
# logout
# Container squashfs-root exited successfully
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: [SOLVED] chroot which is better? A=systemd-nspawn
On Nemesis simply unpack the 001-core module to a folder.
Copy your /etc/resolv.conf file into the folder
cd into the folder and type: systemd-nspawn
Now you are inside your chroot (container) in the root folder.
To exit type: logout
Works just like chroot but without having to remember all the commands.
Copy your /etc/resolv.conf file into the folder
cd into the folder and type: systemd-nspawn
Now you are inside your chroot (container) in the root folder.
To exit type: logout
Works just like chroot but without having to remember all the commands.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
Re: [SOLVED] chroot which is better? A=systemd-nspawn
I am not sure systemd-nspawn is available now we have moved to openrc
Code: Select all
sudo pacman -S systemd-nspawn
error: target not found: systemd-nspawn
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: [SOLVED] chroot which is better? A=systemd-nspawn
Correct. Systemd is not available on Nemesis v3.4+.
I have a script I use called newroot instead. I may have left it in /usr/local.
I have a script I use called newroot instead. I may have left it in /usr/local.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
Re: [SOLVED] chroot which is better? A=systemd-nspawn
great its in the 001-core
/usr/local/sbin/newroot
/usr/local/sbin/newroot