This shows you the differences between two versions of the page.
|
system_lab46.offbyone.lan [2010/06/27 20:18] wedge |
system_lab46.offbyone.lan [2010/07/01 09:41] (current) wedge |
||
|---|---|---|---|
| Line 64: | Line 64: | ||
| debootstrap squeeze /mnt http://mirror/debian | debootstrap squeeze /mnt http://mirror/debian | ||
| - | # Set some key config files | + | # Set some key config files (copy from the host) |
| cp -f /etc/network/interfaces /mnt/etc/network | cp -f /etc/network/interfaces /mnt/etc/network | ||
| cp -f /etc/apt/sources.list /mnt/etc/apt # and rename lenny to squeeze | cp -f /etc/apt/sources.list /mnt/etc/apt # and rename lenny to squeeze | ||
| Line 70: | Line 70: | ||
| # Hop into the new filesystem | # Hop into the new filesystem | ||
| chroot /mnt | chroot /mnt | ||
| + | |||
| + | # Mount /proc filesystem | ||
| mount -t proc proc /proc | mount -t proc proc /proc | ||
| - | # Perform some necessary maintenance | + | # Perform some necessary maintenance; remove or edit /etc/hostname, I delete it |
| rm -f /etc/hostname | rm -f /etc/hostname | ||
| + | |||
| + | # Set root's password | ||
| passwd | passwd | ||
| + | |||
| + | # Update local package database | ||
| aptitude update | aptitude update | ||
| Line 87: | Line 93: | ||
| ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime | ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime | ||
| - | # Hop out | + | # unmount /proc |
| umount /proc | umount /proc | ||
| + | |||
| + | # Leave the chroot | ||
| exit | exit | ||
| + | |||
| + | # unmount the disk image | ||
| umount /mnt | umount /mnt | ||
| </code> | </code> | ||