Difference between revisions of "Talk:Change root"

From ArchWiki
Jump to: navigation, search
(Example)
m (Mounting / Unmounting: remove closed discussion)
 
(39 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Example ==
+
== Multiple chroots ==
  
I posted an example of a chroot in a home directory. If you can complete it or correct it, please do. If you can't, please don't remove it.
+
Is it possible to have multiple Chroots on the same target device? {{Unsigned|17:06, 23 July 2010‎|Cotton}}
  
== Questions ==
+
== Update file system ==
  
* Is it possible to have multiple Chroots on the same target device? --unknown
+
Can chroot be used to update the entire root file system?  After the chroot, running the mount command reports {{ic|/dev/root on / type ext3}} with /dev/root being a symbolic link to /dev/mmcblk0p2.  Unmounting /dev/root and /dev/mmcblk0p2 both report invalid argument.  Rereading the partition table using {{ic|blockdev --rereadpt /dev/mmcblk0}} reports device or resource busy.  My guess it mmcblk0 is busy because /dev/mmcblk0p2 is still the root file system under the changed root file system I am using now.  Before doing a chroot, I kills all the applications but the shell used to run chroot.  Any suggestions on how I can successfully reread the partition table in this use model? --[[User:Tfischer|Tfischer]]
  
* Should {{ic|/dev/pts/}} be included?  I've seen this before [https://help.ubuntu.com/community/Grub2#ChRoot here].  --[[User:Gen2ly|Gen2ly]] 16:32, 21 November 2011 (EST)
+
== About using arch-chroot in other linux distributions ==
** Depends what you want to do from the chroot: https://bbs.archlinux.org/viewtopic.php?id=143329 --[[User:DSpider|DSpider]] ([[User talk:DSpider|talk]]) 10:02, 19 August 2012 (UTC)
 
  
* Is the '''"Run graphical chrooted applications"''' section really necessary? I have chrooted from an x86_64 distribution (Parted Magic) into my current i686 Arch system and running graphical applications worked just fine. All I had to do was to start them from the chroot terminal. Seems like an unnecessary piece of information to me. --[[User:DSpider|DSpider]] ([[User talk:DSpider|talk]]) 10:02, 19 August 2012 (UTC)
+
My interest with the added tip wasn't about packaging for other distributions (I didn't even mention the word 'package'). It was only to provide a quick explanation about how to use arch-chroot from another distribution for the sole purpose of chrooting into Arch itself. This was motivated by a personal issue, where I had to use arch-chroot from another linux distribution to access my arch partition, due to a filesystem/boot error.  
 +
Also, notice that this tip wasn't really related to [[Install from Existing Linux]] -- no mentions about 'installations' either.
  
== Comments ==
+
[[User:Thiagowfx|Thiagowfx]] ([[User talk:Thiagowfx|talk]]) 17:18, 19 December 2014 (UTC)
 +
 
 +
:''arch-chroot'' is just a bash script (i.e. it is not ''compiled'' as the tip said), so why not just extract the script from the Arch package and use it on the other system? I think that it is a standalone script (i.e. not sourcing other parts) so it should just work... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:06, 19 December 2014 (UTC)
 +
 
 +
:: Okay, the reason for compiling / running 'make' is that, in the tarball I indicated in the tip, the only thing that is present regarding arch-chroot is an 'arch-chroot.in' file. 'make' is necessary for m4 to replace what needs to be replaced in this file, thus creating our final 'arch-chroot' bash script. Maybe using the term 'compile' wasn't a good idea, but the user should 'make' anyway (or, at least, manually get rid of the lines calling 'm4'). I won't insist on this, though, it is yours the final decision; I just wanted to say the reason for including the tip, I thought it could be useful for someone. [[User:Thiagowfx|Thiagowfx]] ([[User talk:Thiagowfx|talk]]) 19:13, 19 December 2014 (UTC)

Latest revision as of 14:39, 11 April 2017

Multiple chroots

Is it possible to have multiple Chroots on the same target device? —This unsigned comment is by Cotton (talk) 17:06, 23 July 2010‎. Please sign your posts with ~~~~!

Update file system

Can chroot be used to update the entire root file system? After the chroot, running the mount command reports /dev/root on / type ext3 with /dev/root being a symbolic link to /dev/mmcblk0p2. Unmounting /dev/root and /dev/mmcblk0p2 both report invalid argument. Rereading the partition table using blockdev --rereadpt /dev/mmcblk0 reports device or resource busy. My guess it mmcblk0 is busy because /dev/mmcblk0p2 is still the root file system under the changed root file system I am using now. Before doing a chroot, I kills all the applications but the shell used to run chroot. Any suggestions on how I can successfully reread the partition table in this use model? --Tfischer

About using arch-chroot in other linux distributions

My interest with the added tip wasn't about packaging for other distributions (I didn't even mention the word 'package'). It was only to provide a quick explanation about how to use arch-chroot from another distribution for the sole purpose of chrooting into Arch itself. This was motivated by a personal issue, where I had to use arch-chroot from another linux distribution to access my arch partition, due to a filesystem/boot error. Also, notice that this tip wasn't really related to Install from Existing Linux -- no mentions about 'installations' either.

Thiagowfx (talk) 17:18, 19 December 2014 (UTC)

arch-chroot is just a bash script (i.e. it is not compiled as the tip said), so why not just extract the script from the Arch package and use it on the other system? I think that it is a standalone script (i.e. not sourcing other parts) so it should just work... -- Lahwaacz (talk) 18:06, 19 December 2014 (UTC)
Okay, the reason for compiling / running 'make' is that, in the tarball I indicated in the tip, the only thing that is present regarding arch-chroot is an 'arch-chroot.in' file. 'make' is necessary for m4 to replace what needs to be replaced in this file, thus creating our final 'arch-chroot' bash script. Maybe using the term 'compile' wasn't a good idea, but the user should 'make' anyway (or, at least, manually get rid of the lines calling 'm4'). I won't insist on this, though, it is yours the final decision; I just wanted to say the reason for including the tip, I thought it could be useful for someone. Thiagowfx (talk) 19:13, 19 December 2014 (UTC)