User Tools

Site Tools


technical:programming:shell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
technical:programming:shell [2022/08/14 23:12] – [chroot] jctechnical:programming:shell [2022/08/17 08:26] (current) jc
Line 7: Line 7:
 <code bash>startx </path/to/displaymanager> -- <display> <virtual-terminal></code> <code bash>startx </path/to/displaymanager> -- <display> <virtual-terminal></code>
  
-Start a Xorg server running fluxbox on display1 vt7+Start a Xorg server running fluxbox on display1 vt7.
  
 <code bash>startx /usr/bin/fluxbox -- :1 vt7</code> <code bash>startx /usr/bin/fluxbox -- :1 vt7</code>
  
-Start a Xorg server running emacs on display2 vt8+Start a Xorg server running emacs on display2 vt8.
  
 <code bash>startx /usr/bin/emacs -- :2 vt8</code> <code bash>startx /usr/bin/emacs -- :2 vt8</code>
Line 17: Line 17:
 ===== chroot ===== ===== chroot =====
  
-The ''chroot'' command changes the root directory. This can be useful when repairing a system in an unbootable state.+The **chroot** command changes the root directory. This can be useful when repairing a system in an unbootable state.
  
-A luks encrypted volume must be decrypted before it can be mounted. The ''cryptsetup'' command can be used to decrypt an luks encrypted volume.+A luks encrypted volume must be decrypted before it can be mounted. The **cryptsetup** command can be used to decrypt an luks encrypted volume.
  
-<code bash>cryptsetup open --type luks /dev/<partition> cryptvg</code>+<code bash>cryptsetup open --type luks /dev/<volume> cryptvg</code>
  
-Next the decrpyted volume will be mounted along with the ''/proc, /sys, /dev'' directories.+Next the decrpyted volume will be mounted along with the /proc, /sys, and /dev directories.
  
 <code bash>mount /dev/cryptvg /mnt; cd /mnt; mount -t proc /proc proc; mount --rbind /sys sys; mount --rbind /dev dev</code> <code bash>mount /dev/cryptvg /mnt; cd /mnt; mount -t proc /proc proc; mount --rbind /sys sys; mount --rbind /dev dev</code>
  
-Once the volume and diretories have been mounted chroot into the new root directory.+With the volume and directories mounted chroot into the new root directory.
  
 <code bash>chroot --userspace=<username> /mnt /bin/bash</code> <code bash>chroot --userspace=<username> /mnt /bin/bash</code>
- 
- 
technical/programming/shell.1660533122.txt.gz · Last modified: 2022/08/14 23:12 by jc