
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.sabayonlinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;feed=atom&amp;action=history</id>
		<title>HOWTO: chroot from a LiveCD - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;action=history"/>
		<updated>2013-05-18T12:22:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.4</generator>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=20378&amp;oldid=prev</id>
		<title>Aposteeltje at 21:21, 11 December 2012</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=20378&amp;oldid=prev"/>
				<updated>2012-12-11T21:21:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:21, 11 December 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{i18n| [[HOWTO: chroot from a LiveCD|en]] [[Tr:HOWTO: chroot from a LiveCD|tr]]}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{i18n| [[HOWTO: chroot from a LiveCD|en]] [[Tr:HOWTO: chroot from a LiveCD|tr]]}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{Note|When you have LVM Volumes, or Encrypted Volumes, and want to Chroot,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Please read these sections first:&amp;#160; [[HOWTO: Mount LVM]] &amp;amp; [[HOWTO: Mount Encrypted Partition]]}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Boot a Sabayon Linux LiveCD/DVD or other Live disc. Get to a virtual terminal (console) or open a Konsole/Terminal window on the Desktop, and log-in as the root user.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Boot a Sabayon Linux LiveCD/DVD or other Live disc. Get to a virtual terminal (console) or open a Konsole/Terminal window on the Desktop, and log-in as the root user.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aposteeltje</name></author>	</entry>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=19948&amp;oldid=prev</id>
		<title>Hatalar205 at 16:30, 14 November 2012</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=19948&amp;oldid=prev"/>
				<updated>2012-11-14T16:30:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:30, 14 November 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{i18n| [[HOWTO: chroot from a LiveCD|en]] [[Tr:HOWTO: chroot from a LiveCD|tr]]}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Boot a Sabayon Linux LiveCD/DVD or other Live disc. Get to a virtual terminal (console) or open a Konsole/Terminal window on the Desktop, and log-in as the root user.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Boot a Sabayon Linux LiveCD/DVD or other Live disc. Get to a virtual terminal (console) or open a Konsole/Terminal window on the Desktop, and log-in as the root user.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hatalar205</name></author>	</entry>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=9075&amp;oldid=prev</id>
		<title>Fitzcarraldo: Added note about logging in as the root user.</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=HOWTO:_chroot_from_a_LiveCD&amp;diff=9075&amp;oldid=prev"/>
				<updated>2010-12-11T09:54:42Z</updated>
		
		<summary type="html">&lt;p&gt;Added note about logging in as the root user.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Boot a Sabayon Linux LiveCD/DVD or other Live disc. Get to a virtual terminal (console) or open a Konsole/Terminal window on the Desktop, and log-in as the root user.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Make sure the LiveCD/DVD you use is for the same architecture as the architecture of the installation on the hard disk, i.e. to chroot to a 64-bit installation (e.g. amd64) you cannot use a 32-bit LiveCD/DVD (e.g. x86), and vice versa. You will see an error message &amp;quot;chroot: cannot run command `/bin/bash': Exec format error&amp;quot; if you try to chroot from a LiveCD/DVD of a different architecture.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Whilst it is possible to mount filesystems from within the chrooted system, this is not recommended. The reason for this is that the LiveCD/DVD environment won't know about these mounted systems, so if you forget about them and leave them mounted when you exit from the chroot environment, they will not be unmounted properly when the system shuts down, which could cause damage to the filesystems on those mounts.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mount the root partition of the installed system (and, if you have /boot on a separate partition, mount that too). If separate partitions are used for other areas of the system (for example, a separate partition for /var/log) then you will need to mount them too. Additionally, mount the /dev and /proc filesystems so that they can be used by the chrooted environment. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following example, /dev/hda1 is the /boot partition and /dev/hda3 is the root partition. Obviously replace those with the device names for ''your'' boot partition (if you have one) and ''your'' root partition. If your partition names are of the form /dev/'''s'''d&amp;lt;letter&amp;gt;&amp;lt;number&amp;gt; rather than /dev/'''h'''d&amp;lt;letter&amp;gt;&amp;lt;number&amp;gt; then obviously use that form instead. Obviously, if you do not have /boot on a separate partition to / (root) then you should omit the mount and umount commands referring to /boot.&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;# mkdir -p /mnt/sabayon/boot&lt;br /&gt;
# mount /dev/hda3 /mnt/sabayon&lt;br /&gt;
# mount /dev/hda1 /mnt/sabayon/boot&lt;br /&gt;
# mount -t proc none /mnt/sabayon/proc&lt;br /&gt;
# mount -o bind /dev /mnt/sabayon/dev&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So now we are set to enter into our installed system:&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;# chroot /mnt/sabayon /bin/bash&lt;br /&gt;
# env-update&lt;br /&gt;
# source /etc/profile&lt;br /&gt;
# export PS1=&amp;quot;(chroot) $PS1&amp;quot;&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should then end up with the following prompt:&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;(chroot) #&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grub2 reads the /etc/mtab file to ascertain the filesystems that are currently mounted, so /etc/mtab must be up-to-date. If you do '''not''' have a separate boot partition then update /etc/mtab using the following command:&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;(chroot) # grep -v rootfs /proc/mounts &amp;gt; /etc/mtab&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
or the following command if you '''do''' have a separate boot partition:&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;(chroot) # cp /proc/mounts /etc/mtab&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From now on, you can enter commands as if you were using your installed system directly. You could, for example, install a package by using either the equo or emerge commands. The ability to act directly on the installed system like this is very useful in the event that something is broken and you cannot boot to a working system. You might want to revert to an earlier version of a video driver that you know works, or you might want to fix the kernel config and rebuild it because a change you made to the kernel earlier resulted in a kernel panic when you rebooted. And so on.&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;(chroot) # &amp;lt;enter any command you want&amp;gt;&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have finished, you can exit from the chroot environment and unmount the drives:&lt;br /&gt;
&lt;br /&gt;
{{Console| &amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;(chroot) # exit&lt;br /&gt;
# umount /mnt/sabayon/boot /mnt/sabayon/dev /mnt/sabayon/proc /mnt/sabayon&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot the PC. If your actions during the chroot session were successful then your installed system should boot normally.&lt;/div&gt;</summary>
		<author><name>Fitzcarraldo</name></author>	</entry>

	</feed>