Difference between revisions of "Debian"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(ZNC)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=NTP=
 +
aptitude install ntp
 +
nano /etc/ntp.conf
 +
Change timezone:
 +
dpkg-reconfigure tzdata
 +
 +
=USB Stick Install=
 +
 +
From Notes Link Below:
 +
 +
Download boot.img.gz
 +
 +
*http://mirrors.kernel.org/debian/dists/sid/main/installer-i386/current/images/hd-media/
 +
 +
{{Note|It seems like you will need the right boot.img.gz to match the iso you are using}}
 +
So for mine:
 +
 +
*http://mirrors.kernel.org/debian/dists/squeeze/main/installer-i386/current/images/hd-media/
 +
 +
Download cd image:
 +
 +
*http://cdimage.debian.org/debian-cd/6.0.6/i386/iso-cd/debian-6.0.6-i386-xfce+lxde-CD-1.iso or whatever.
 +
 +
 +
Make sure your USB drive is NOT mounted, then type in the following (this next step will remove any existing partitions and data on the drive):
 +
 +
# umount /dev/sdb*
 +
# zcat boot.img.gz > /dev/sdb
 +
 +
This should only take a couple of seconds to finish. At this point, you’ll have a FAT16 formatted USB drive with a syslinux install on the drive. You will now need to mount the drive and copy the ISO image to the mount point.
 +
 +
# mount /dev/sdb /mnt
 +
# cp debian-504-i386-netinst.iso /mnt
 +
# sync
 +
# umount /dev/sdb
 +
 +
At this point, you have a fully prepared USB thumb drive with all the necessary bits in place to perform a USB installation on your netbook, or other hardware. When you boot from the USB stick, you’ll have the familiar Debian installer interface- automated installation, beginner and expert modes and a rescue environment. Because of this, I would recommend keeping the USB stick close at hand, should you need to troubleshoot your installation any time soon.
 +
 +
When you initialize the installation, the installer will look for an ISO file that contains the Debian software. It will start with /dev/sda, and work it’s way device-by-device and partition-by-partition in order, until it finds the ISO file. Because my drive is also recognized as /dev/sdb on my netbook, it only take a couple seconds. After it has found the ISO image, you’re ready to install, just like you would if you had booted off a CD.
 +
 +
==Notes==
 +
*http://pthree.org/2010/02/21/installing-debian-via-usb/
 +
 +
=Email=
 +
 +
*http://www.howtoforge.com/how-to-configure-automatic-updates-on-debian-squeeze
 +
 
=Xen=
 
=Xen=
 +
The Xen and debootstrap software in Squeeze (Debian 6.0) are very much newer than that in Lenny. Because of that, working with Xen becomes a lot easier.
 +
 +
The setup described here is tested for Debian Lenny and Ubuntu Maverick virtual machines, but should work for a lot more.
 +
 +
Dom0 (host)
 +
 +
First install the hypervisor, xen kernel and xen-tools. This can be done by a metapackage:
 +
 +
aptitude -P install xen-linux-system
 +
 +
To get Xen HVM support Xen 4.0 Wiki
 +
 +
apt-get install xen-qemu-dm-4.0
 +
 +
Debian Squeeze uses Grub 2 whose default is to list normal kernels first, and only then list the Xen hypervisor and its kernels.
 +
 +
You can change the default kernel to boot in two ways:
 +
 +
*by a modification to the value of GRUB_DEFAULT in the file /etc/default/grub . The value is an integer starting at 0 representing the order of the menuentry item to boot. You can see a list of all menuentry values in order by typing
 +
 +
grep menuentry /boot/grub/grub.cfg
 +
 +
Count to the number of the first Xen kernel, starting at 0, and enter it in the default file.
 +
 +
*Swap the default order of kernel detection in GRUB by moving configuration scripts around so that the script that detects normal kernel entries comes after the script that detects Xen dom0 entries:
 +
 +
mv -i /etc/grub.d/10_linux /etc/grub.d/21_linux
 +
 +
After either of these procedures, do an update to the GRUB configuration:
  
 +
update-grub
  
 
=Install=
 
=Install=

Latest revision as of 20:43, 27 October 2013

NTP

aptitude install ntp
nano /etc/ntp.conf

Change timezone:

dpkg-reconfigure tzdata

USB Stick Install

From Notes Link Below:

Download boot.img.gz

Note: It seems like you will need the right boot.img.gz to match the iso you are using

So for mine:

Download cd image:


Make sure your USB drive is NOT mounted, then type in the following (this next step will remove any existing partitions and data on the drive):

# umount /dev/sdb*
# zcat boot.img.gz > /dev/sdb

This should only take a couple of seconds to finish. At this point, you’ll have a FAT16 formatted USB drive with a syslinux install on the drive. You will now need to mount the drive and copy the ISO image to the mount point.

# mount /dev/sdb /mnt
# cp debian-504-i386-netinst.iso /mnt
# sync
# umount /dev/sdb

At this point, you have a fully prepared USB thumb drive with all the necessary bits in place to perform a USB installation on your netbook, or other hardware. When you boot from the USB stick, you’ll have the familiar Debian installer interface- automated installation, beginner and expert modes and a rescue environment. Because of this, I would recommend keeping the USB stick close at hand, should you need to troubleshoot your installation any time soon.

When you initialize the installation, the installer will look for an ISO file that contains the Debian software. It will start with /dev/sda, and work it’s way device-by-device and partition-by-partition in order, until it finds the ISO file. Because my drive is also recognized as /dev/sdb on my netbook, it only take a couple seconds. After it has found the ISO image, you’re ready to install, just like you would if you had booted off a CD.

Notes

Email

Xen

The Xen and debootstrap software in Squeeze (Debian 6.0) are very much newer than that in Lenny. Because of that, working with Xen becomes a lot easier.

The setup described here is tested for Debian Lenny and Ubuntu Maverick virtual machines, but should work for a lot more.

Dom0 (host)

First install the hypervisor, xen kernel and xen-tools. This can be done by a metapackage:

aptitude -P install xen-linux-system

To get Xen HVM support Xen 4.0 Wiki

apt-get install xen-qemu-dm-4.0

Debian Squeeze uses Grub 2 whose default is to list normal kernels first, and only then list the Xen hypervisor and its kernels.

You can change the default kernel to boot in two ways:

  • by a modification to the value of GRUB_DEFAULT in the file /etc/default/grub . The value is an integer starting at 0 representing the order of the menuentry item to boot. You can see a list of all menuentry values in order by typing
grep menuentry /boot/grub/grub.cfg

Count to the number of the first Xen kernel, starting at 0, and enter it in the default file.

  • Swap the default order of kernel detection in GRUB by moving configuration scripts around so that the script that detects normal kernel entries comes after the script that detects Xen dom0 entries:
mv -i /etc/grub.d/10_linux /etc/grub.d/21_linux

After either of these procedures, do an update to the GRUB configuration:

update-grub

Install

Misc HowTo's

Easy Software Raid

  • Install
  • English
  • US
  • AE
  • Create Partitions on Each Drive using guided partitioning (create it on one disk, go back and do the other)
  • Create RAID Devices
  • Select usable area and assign filesystem and mountpoint
  • Select usable area and assign swap