logout: - $Author:
QuicklinksEndUserTest/VirtualisatonInstallierenKernel - TuningNetworkDisplay / PadsBock DevicesPrinterUSB-DevicesBenutzerSWServerInstall NotesGeneral/Hints |
Collection of installation & troublshooting info related to my linux (debian/mint/ubuntu) installations Linkshttp://www.debian.org/doc/manuals/securing-debian-howto/ap-chroot-apache-env.de.html JailsHowto Jail irssi und wohl andere auch - mittels Tools: mkjailenv ... chroot pivot_root schrootMöglichkeit mehrere Installationen per schroot aufzurufen (alt: dchroot) [??] - für Ubuntu? []X11 Probleme mit Berechtigung
/etc/schroot/schroot.conf [sid] description=Debian sid (unstable) type=directory location=/srv/chroot/sid priority=3 users=YOUR_USER groups=SOME_GROUP_LIKE_users root-groups=YOUR_ADMIN_USER run-setup-scripts=true run-exec-scripts=true debootstrap --arch i386 sid /srv/chroot/sid http://ftp.br.debian.org/debian installation Sid
$ xhost + (local:)
xchroot (ex openroot)Erweiterung chroot für X11
Bsp:
sudo xchroot -u lucky /mnt/u1004/ shotwell
workarround: sudo mount --bind /media/E0FD-1813/DCIM/ /mnt/u1004/mnt/cam/
dchroot ->schroot verwenden, da chroot depreciated
Config: (owned by root) /etc/dchroot.conf (1-spezifisch für dchoot) /etc/schroot/schroot.conf (2-für dchroot und schroot) [] - ziel-user?
chroot
http://www.internettablettalk.com/wiki/index.php?title=Running_Debian_chroot
LANG=C cmd (orig,engl) bsp:
mount --bind /proc /chroot/proc /od. mount -t proc none /chroot mount --bind /dev /chroot/dev # create some useful devices mkdir dev/pts test -b dev/null && mknod dev/null c 1 3 test -b dev/zero && mknod dev/zero c 1 5 test -b dev/tty && mknod dev/tty c 5 0 test -b dev/pts/0 && mknod dev/pts/0 c 136 0 test -b dev/pts/1 && mknod dev/pts/1 c 136 1 chmod 666 dev/null dev/zero dev/tty dev/pts/* cp /proc/mounts /chroot/etc/mtab cp /etc/resolv.conf /chroot/etc/resolv.conf Probleme:
[]-Grub Legacy zeigte nicht die korrekten Drives
Workarrounds:
mount --bind (z.B. /boot für Grub installationen auf fremder Disk) Installation mit X11 anwendenhints from: http://www.pixelbeat.org/docs/chroot.html
sudo cp /etc/resolv.conf /_inst/etc/ #Make DNS available to ubuntu sudo /usr/sbin/chroot /_inst #chroot to ubuntu root partition mount /proc #make /proc virtual filesystem available mount /sys #make /sys virtual filesystem available mount /home #separate or shared partiton [su - pogay ] #Change user from root to me . /etc/environment && export LANG #need to explicitly set locale (." "/etc...) /dev ... mount --bind /dev /_inst/dev #/dev/null dev/pt/x others...(additonal mounts can be made after starting chroot). X11:
enable TCP access (in host)
[] - tests - restart X-first
in /etc/X11 Xwrapper.config sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config (or in editor) [startx /usr/X11R6/bin/twm -- :1&] minimal GUI [startx -- :1 &] #opens new grafical console alt-F8 .. [ok]gdm (for Ubuntu, as root) - minor errors couldn't initialize HAL, otherwise functinal chroot-terminal can be closed without affecting the new gdm instance pivot_root
mount -t ext3 /dev/hda5 /mnt mount --bind /mnt/home/.../newroot/ /mnt2 Und das Beste ist, jetzt kann man /mnt sogar unmounten, ohne dass /mnt2 verschwindet und dahin das Root-Verzeichnis wechseln. umount /mnt pivot_root /mnt2 /mnt2/initrd www.knoppix.net/wiki/Pivot_Root_Install
Probleme:
[]-Achtung: gilt dann für ganzes System
Script um ein neues ext2-System zu testen (von Fabian Franz Pro Linux) #!/static/sh insmod /modules/jbd.o insmod /modules/ext3.o mount -t proc proc /proc echo 256 > /proc/sys/kernel/real-root-dev umount /proc mount -t ext3 /dev/hda5 /mnt /bin/mount --bind /mnt/home/ffranz/newroot /mnt2 umount /mnt /static/pivot_root /mnt2 /mnt2/initrd |