[Glastonbury] Chroot

Andrew M.A. Cater amacater at galactic.demon.co.uk
Thu Dec 4 20:02:59 GMT 2003


On Thu, Dec 04, 2003 at 12:00:56PM +0000, tim hall wrote:
> Martin,
> 
> As you asked, and I was too tired to explain anything properly last night - 
> this is roughly the relevant info. I'm sure you're well capable of figuring 
> this all out yourself, but I post this here in case anyone else has an 
> interest in doing this & fyi.
> 
> Debian-Reference ch:8.6.34
> 
> This is how my woody system looks:
> 
> # /etc/fstab: static file system information.
> #
> # <file system>	<mount point>	<type>	<options>		<dump>	<pass>
> /dev/hda6	/		ext2	errors=remount-ro	0	1
> /dev/hda9	none		swap	sw			0	0
> proc		/proc		proc	defaults			0	0
> /dev/fd0	/floppy			auto	user,noauto		0	0
> /dev/cdrom	/cdrom		iso9660	ro,user,noauto		0	0
> /dev/hda5	/boot		ext2	defaults			0	2
> /dev/hda7	/usr		ext2	defaults,noatime		0	2
> /dev/hda8	/home		ext2	defaults			0	2
> /dev/hda10	/tmp		ext2	defaults			0	2
> /dev/hda11	/var		ext2	defaults			0	2
> /dev/hdb5	/mnt		ext2	defaults			0	2
> proc-test	/mnt/proc	proc	none			0	0
> /dev/hdb1	/mnt/boot	ext2	defaults			0	2
> /dev/hdb6	/mnt/usr		ext2	defaults,noatime		0	2
> /dev/hdb7	/mnt/tmp		ext2 	defaults			0	2
> /dev/hdb8	/mnt/var		ext2	defaults			0	2
> /dev/hdb9	/mnt/home	ext2	defaults			0	2
> 
> [snipped from /etc/inittab]
> # /sbin/getty invocations for the runlevels.
> #
> # The "id" field MUST be the same as the last
> # characters of the device (after "tty").
> #
> # Format:
> #  <id>:<runlevels>:<action>:<process>
> #
> # Note that on most Debian systems tty7 is used by the X Window System,
> # so if you want to add more getty's go ahead but skip tty7 if you run X.
> #
> 1:2345:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty1
> 2:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty2
> 3:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty3
> 4:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty4
> 5:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty5
> 6:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty6
> 8:23:respawn:/usr/sbin/chroot /mnt /sbin/getty 38400 tty8
> 
> [and I added this to the bottom of /etc/gdm/gdm.conf]
> [servers]
> 0=Standard vt9
> 
> obviously you then have to do:
> 
> mount -a 	
> init q
> /etc/init.d/gdm restart
> 
> in the chrooted system, or something similar.
> 
> This now means I can access my testing/unstable system with [ctl][alt]F8 and 
> the gui is on [ctl][alt]F9
> 
> It's not perfect, I think there's a few things I need to find out about yet 
> [haha!] sometimes fsck complains about badly unmounted partitions, I have to 
> check what I'm doing in these circumstances - I suspect trying to reboot from 
> the wrong terminal is something to do with it. One day I'll get round to 
> using a sturdier filesystem like reiserfs, but it all takes time and reading 
> (so much reading!).
> 
> anyhow HTH
> 
> tim hall
> 
tune2fs -j /dev/hdXXX will turn your ext2 to ext3 - and take some space,
which Martin always complains about - but will make the whole thing 
fully journalled. I had a machine with a dodgy PSU which rebooted about
50 times in quick succession - ext3 meant that it had no file 
corruption.

> 
> _______________________________________________
> Glastonbury mailing list
> Glastonbury at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/glastonbury



More information about the Glastonbury mailing list