Ubuntu installation on Magnia SG20: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 113: Line 113:
=== Network ===
=== Network ===


In order to get consistent numbering for the ethernet ports I modified /etc/iftab. It looks like this now:
Ubuntu wants the ethernet switch at /dev/eth0
 
and the Intel WAN interface at /dev/eth1
# Magnia SG20
So be it. I updated /etc/network/interfaces to match.
# These numbers are for the Intel (WAN)
eth0 SYSFS{device/vendor} 0x8086
# ..and the 7 port ethernet switch
eth1 SYSFS(device/vendor) 0x10ec
 
The ports came up wrong way round by default, eth0 was LAN and eth1 was WAN.
I think this is tied to the hardware detection program; the first interface it finds is always eth0. Editing /etc/iftab lets you set the order.
 
I used the vendor numbers so that it ''should'' work on any SG20.


The interfaces are configured in /etc/network/interfaces like this:
The interfaces are configured in /etc/network/interfaces like this:
Line 133: Line 124:


# The WAN interface (outside)
# The WAN interface (outside)
auto eth0
auto eth1
iface eth0 inet dhcp
iface eth1 inet dhcp


# The Ethernet Switch
# The Ethernet Switch
auto eth1
auto eth9
iface eth1 inet static
iface eth0 inet static
   address 192.168.123.101
   address 192.168.123.101
   netmask 255.255.255.0
   netmask 255.255.255.0
   gateway 192.168.123.254
   gateway 192.168.123.254
</pre>
</pre>

Revision as of 14:53, 28 July 2007

These instructions are my notes on how I installed Ubuntu from scratch onto a hard drive so that I could get Otter (a Toshiba Magnia) running.

If you just want to install the drive image that I built from this system, go back to Otter's page.

Connect hard drive to desktop system

In my case, the system is 8track. I use a ribbon cable and a 44pin laptop to 40 pin desktop IDE adapter. The drive is one of the 30 GB Toshiba 2.5" 4200rpm drives that came in the system when I got it.

Set up virtual machine

I create a VMware workstation virtual machine using the hard drive on /dev/hda and the cdrom connected to an ISO rescue image called "System Rescue CD".

Boot from the System Rescue CD

Use evmns to partition the hard drive and create filesystems. Create two volumes, the first is swap (500MB) the second is /root (3GB).

Putting swap first means that the second partition can easily be expanded to fill all available space. Make a reiser filesystem on /dev/evms/root and a swap filesystem on /dev/evms/swap.

The first two partitions are set up with RAID 1 in 'degraded mode' . This allows easily converting to a RAID mirror system at a future time.

Install Ubuntu

Boot from the Ubuntu Server install cd, use the "manual" option for partitioning, tell it to install Ubuntu into the third partition. Tell it to install LAMP (Apache + MySQL + PHP)

Remove CDROM and reboot.

Add extra repository

Add the repository for webmin, see http://www.webmin.com/ I also commented out the cdrom entry at the start of the file (/etc/apt/sources.list)

Install updates

apt-get update
apt-get upgrade
apt-get dist-upgrade

Install extra packages

  • openssh-server so that you can get shell access remotely
  • cupsys so that you can print to an attached printer
  • evms evmsn evmsgui evms-bootdebug support for RAID
  • mgetty mgetty-fax added to support incoming calls on modem line and faxing
  • nfs-kernel-server so I can share files with other Linux boxes
  • privoxy web advertising blocker
  • postfix mail handler; added but you will need to reconfigure
  • openvpn
  • lmsensors access to hardware, you want this if you use 'lcd' program

Webmin stuff

  • webmin web-based system management utility
  • cupsys-client added to allow webmin to do printer management
  • shorewall to manage the firewall; shorewall is supported in webmin

X11 stuff

(You probably will want openssh-server if you want to use these.)

  • xauth to allow connecting to X11 applications such as synaptic
  • oclock to test X11 connections, and for fun, run with "oclock -transparent &"
  • synaptic X11 GUI package manager

Removed

Removed the extra kernel

Copy everything to the EVMS volume

I've done this while the system is running but it's better to do it with a rescue cd so that files are not changing while copying takes place. Also you don't have to figure out how to exclude the in-memory filesystems and the device files that are created at boot time.

  1. Boot from System Rescue CDROM
  2. Mount partitions
  3. Perform copy; tar cf - /mnt/old | (cd /mnt/new; tar xpf -)

Make the new partition bootable

Still in the rescue disk...

mkdir /mnt/new
mount /dev/evms/root /mnt/new
cd /mnt/new
mount -o bind /sys /mnt/new/sys
mount -o bind /dev /mnt/new/dev
chroot /mnt/new su -l

You are now running in an environment that looks just like it will when you are done, so you can perform the installation commands now.

  1. Edit grub configuration to point at /dev/evms/root
  2. Run grub to install it in /dev/hda2
  3. Edit /etc/fstab to point at /dev/evms/root and /dev/evms/swap
  4. Make a new initrd --
VERSION="2.6.20-16-server"
cd /boot
mv initrd.img-$VERSION initrd.img-$VERSION.old
update-initramfs -k $VERSION -c
  1. Edit the /boot/grub/menu.lst file to point root at /dev/evms/root
  2. Run 'upgrade-grub' to update the menu.lst entries

Reboot!

Next step is to install the Magnia LCD program.

Network

Ubuntu wants the ethernet switch at /dev/eth0 and the Intel WAN interface at /dev/eth1 So be it. I updated /etc/network/interfaces to match.

The interfaces are configured in /etc/network/interfaces like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The WAN interface (outside)
auto eth1
iface eth1 inet dhcp

# The Ethernet Switch
auto eth9
iface eth0 inet static
  address 192.168.123.101
  netmask 255.255.255.0
  gateway 192.168.123.254