Jump to content


Latest Posts

I'm Sick of Updates
Forum: The Ettamogah Pub
Last Reply: skypilot (May 23 2013 05:38 PM)
ALL: MCEWebView
Forum: Windows Media Center Plugins & Addons
Last Reply: corylee20121970 (May 23 2013 01:46 AM)
Simple process for retuning?
Forum: Windows 7: Media Center & OS
Last Reply: aanda6 (May 22 2013 09:51 PM)
My Channel Logos XL!
Forum: Windows Media Center Plugins & Addons
Last Reply: aanda6 (May 22 2013 09:36 PM)

Recent Topics


Photo
* * * * * 1 votes

Arch Linux Backend Server Build - Mythtv/media sharing etc


  • Please log in to reply
403 replies to this topic

#1 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 21 September 2008 - 10:50 PM

Duffy/those interested,

Am going to use this thread to run through a server build using Arch Linux as the prefered backend system.

Basically the path followed will be something like:

1. Install Arch Linux (including partitioning of the main HDD)
2. Update the system to current (not required if you do an ftp install across the internet as we will do)
3. Install required software.
4. Configure software.
5. Repeat 3/4 until finished.
6. Advanced topics (extra server functionality, backups etc).

NOTE: 14/04/2010 - Some of the information contained in this thread will be out of date as things in open source land move so quickly. Primarily this guide discusses the installation of kdemod3. That is NO LONGER required and you should just install kde or xfce or a desktop manager of your choice. If this doesn't make sense to you right now it will as you continue on. The installation of Shepherd (the guide grabber), under Arch Linux has also changed slightly. Other threads detail the changes and it's best to search for an up to date one or ask!. Primarily though this thread will get you from start to end but I encourage anyone to create new threads asking questions where any information seems out of date or if you run into problems.

The suggested size of the root partition below is 10gb. While this is enough for the install I've found that 15gb is more in line with what is required now.


-Arkay.


I use Internode as an ISP and they have a full Arch Linux mirror (Bigpond users can now use the aarnet mirror unmetered). Anyone attempting this would do well to check if they have a local mirror with their ISP. For the sake of this thread I'll just use references to the Internode mirror, you can substitute your own if you have one, or just use the Internode mirror too. The difference being is that if you use your local ISP's mirror then all traffic will be un-metered saving you time and some $$$ on bandwidth.

First things to do will be to:

1. Download the Arch Linux ftp installation ISO. Available Here.
2. Download and print the Arch Linux Beginners guide. Available Here.
3. I would also read this.

Please print out the beginners guide or have a second computer or laptop next to you during install. It is unbelievably helpful during installation.

Resources to use if you get stuck with anything include:

1. Ask in here or if you want to try to find the solution yourself then
2. The Arch Linux Wiki - very comprehensive.
3. The Arch Linux Forums - if necessary.

Things required for install include:

- An active wired internet connection. Wireless is out of scope for this as I consider wireless to be inappropriate for any server solution. It's good to have wireless as well, but it shouldn't be your first option and it is NOT recommended to attempt this installation via wireless. All too often the end goal is completely missed due to fights with wireless before you even start. If wireless is your only option then go buy some Ethernet over power adapters or, at least for the installation and setup, run a cable across the floor! Then configure wireless afterwards if you want to.

- The location of the mirror you are going to use during the install. For this thread I recommend the Internode Arch mirror ( http://mirror.intern.../pub/archlinux/)

Grab the iso and the beginners guide and lets get started.

Cheers,

Arkay.

Notes (I was keeping these here as I had intended to write a complete guide at the end of this thread. Time and the fluid nature of open source software has prevented that from happening. These notes may be of use to you so I will leave them in place).

- The install disk downloaded is a network install image, it provides enough to boot from the cd, start networking and run the installer. The remainder of the installation will be done directly from the internet. Doing it this way means you get the very latest of everything on the first install. The alternative is to download the full install disk that will allow you to do the base install without a network, you can then update all the packages from the internet later on. The network install is my preference. It's fast using a local mirror and no updates are required on completion.

- Use DHCP by default on install and work through re-setting the IP address settings after install is complete - easier.

- Will need to go through each of the screens in the installer and document things that are not obvious, possibly with screen grabs.

- Remember to set mysql root password directly after mysql startup. Then set up the myth database with mysql -u root -p < /usr/share/mythtv/mc.sql.
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h <hostname> password 'new-password'

- The timezone offset in mythtv-setup should be set to None as long as your TZ (timezone), is set correctly Shepherd will take care of DST changes for you. The machine must also be set to use UTC in rc.local for the shutdown/wakeup scripts to work correctly.

#2 GuiGuy

GuiGuy

    MC Specialist

  • Members
  • PipPipPipPipPip
  • 525 posts

Posted 22 September 2008 - 01:01 AM

Am going to use this thread to run through a server build using Arch Linux as the prefered backend system.


We could fork something and make a "xpMediaCenter" distro!! :D

(just kidding)

#3 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 01:03 AM

We could fork something and make a "xpMediaCenter" distro!! :D

(just kidding)


the thought has crossed my mind. Tell you what. You do all the work and I'm in for it ;)

Cheers,

Arkay.

#4 Duffy

Duffy

    MC Guru

  • Members
  • PipPipPipPipPipPipPip
  • 1522 posts

Posted 22 September 2008 - 01:21 AM

Arkay

First question/s:

Reading through the ArchWiki beginners guide, its suggests four partitions (like you), but slightly different. The guide suggests a /var partition to contain, among other data, the ABS tree and the pacman cache. You make no mention of a /var partition but suggest a partition for where Mythbuntu will be installed.

Do I need to create a fifth partition for /var? If not, where would this data reside, if indeed I need this data?

The guide suggests 12gb for the root partition and 6gb for /var. If the /var data ends up in the root partition, I presume the size should be 18gb, somewhat different from your suggested size of 10gb?

Duffy

#5 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 03:54 AM

Yep. There'll be a bit of that. Just ignore it ;) The partitioning scheme I've supplied is all you need. /var will be inside the 10GB I've suggested. The ABS tree is not something we'll need and pacman cache will be small. Shouldn't need to worry about either of them as all the packages we will be using are part of the main Arch repositories. You can read up on ABS and 3rd party repositories if you have an interest in that (and you may later on), but we don't need to worry about any of that just yet.

Here's the info from my servers root partition:

/dev/sda3 12G 3.1G 8.4G 27% /

It's 12GB in size (because of a previous distro), 3.1G is used, 8.4 GB is available and that is with everything I use installed.

It will all become clear as we get into it but you could later on decide to put /var onto the lvm disks that we'll create. We will definitely be doing that for /home.

But for now just go with (I'll repeat it here as not everyone will read the other thread):

sda1 - 2 gb (formatted as swap space)
sda2 - 15 gb / filesystem
sda3 - 15 gb (unused)
sda4 - the rest of the space on the drive (leave it unused for now too)

NB: (edited 19/11/2010 to reference 15GB partition sizes).

Not sure how you want to handle this. Are you happy to go with the beginners guide? Or should we work through each part on-line?

My suggestion would be to go through the guide up to section 2.14.4.

Before we do 2.15 "creating users" we will want to set up your disks so that /home is under lvm control so we'll take a detour at that point.

The rest we'll pick through selectively as not everything after that is relevant for what we are planning on doing assuming you're going to use remote administration (headless setup), and don't need audio.

That's enough for a start. Let me know if there is anything that doesn't make sense or needs more explanation. Just take your time, do each step slowly and don't skip forward. If you miss bits it can be hard to diagnose later on ;)

Important things I can think of are:

1. Network setup. I use static addresses, it's just easier with Myth and server things. So I would choose a suitable IP for the backend server (outside the range of your routers DHCP addressing).

2. In the installer when you pick a source to install from select "custom", (bottom of the list), and enter the url of the internode mirror (http://mirror.intern.../pub/archlinux/).

3. Use ext4 for the / filesystem when asked. (edited 19/11/2010 - ext4 is now stable and better than ext3).

4. Bios etc configuration (before you start):


  • Turn off the onboard audio if you don't intend to use it.
  • Turn on AHCI for your drives.
  • Set sleep mode to S3 only.
  • Make sure the jumpers on your drives are removed (they'll be limited to Sata I otherwise).

5. The installer mentions output happening on tty5, can't remember if it tells you how to switch between them. If not then it's alt-f1 through f6 to switch through the virtual consoles so you can watch what is happening in the background.

Cheers,

Arkay.

#6 Gruelius

Gruelius

    MC Journeyman

  • Members
  • PipPipPip
  • 248 posts

Posted 22 September 2008 - 04:15 AM

Why arch? wouldnt debian or something slightly more beginner friendly be more approperiate?

Not suggesting a GUI over cli approach im just talkign about the ease of the debian setup process. The CLI installer makes it a synch to install to a lvm on a md raid1 array and boot off it!

im using etch with:
X2 3800+
1gb of ddr2
Asus M2n
2x500GB sata 2*500GB IDE disks in md raid5 with a lvm ontop
2X200gb disks in md raid1 with lvm ontop with the OS

#7 Duffy

Duffy

    MC Guru

  • Members
  • PipPipPipPipPipPipPip
  • 1522 posts

Posted 22 September 2008 - 04:41 AM

Arkay

Printed off the Beginner User guide. My plan of attack was to work through this and select the default options unless told otherwise - hopefully trying to minimise help from you/others.

Just as well you pre-empted me:

1. Network setup. I use static addresses, it's just easier with Myth and server things. So I would choose a suitable IP for the backend server (outside the range of your routers DHCP addressing).


Hadn't planned on this. When I get to this, I may need help.

2. In the installer when you pick a source to install from select "custom", (bottom of the list), and enter the url of the internode mirror (http://mirror.intern.../pub/archlinux/).


Understand

3. Use ext3 for the / filesystem when asked.


Understand

Turn off the onboard audio if you don't intend to use it.


Plan using this - optical into the Receiver.

Turn on AHCI for your drives.


Don't know what this means, but I'll work it out (must be somewhere in BIOS, just a matter of finding it).

Set sleep mode to S3 only.


Understand

Make sure the jumpers on your drives are removed (they'll be limited to Sata I otherwise).


Had to pull them out of the case to check, but no jumpers were present (P182 case does make it easy - thanks again for this suggestion)

5. The installer mentions output happening on tty5, can't remember if it tells you how to switch between them. If not then it's cntrl-alt-f1 through f6 to switch through the virtual consoles so you can watch what is happening in the background.


Understand.

I've burnt the iso to CD, so here goes.

Duffy

#8 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 04:57 AM

Plan using this - optical into the Receiver.


Whoa! Hangon there :) This is the backend server. No need for audio and this should be no where near a receiver. That's the front ends job. This is the server, can be in a completely different room, under the stairs/house if you like. It serves everything to the front end that does the video/audio output.

Just want to make sure we're on the same page?

Cheers,

Arkay.

#9 Duffy

Duffy

    MC Guru

  • Members
  • PipPipPipPipPipPipPip
  • 1522 posts

Posted 22 September 2008 - 05:01 AM

Ooops!

You're right. I'll disable audio.

Found ACHI in BIOS, but there are two references:

  • SATA RAID/ACHI mode

  • Onboard SATA/IDE ctrl mode
I've set both of these to ACHI. Correct?

Duffy

#10 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 05:03 AM

Why arch? wouldnt debian or something slightly more beginner friendly be more appropriate?

Not suggesting a GUI over cli approach im just talkign about the ease of the debian setup process. The CLI installer makes it a synch to install to a lvm on a md raid1 array and boot off it!

im using etch with:
X2 3800+
1gb of ddr2
Asus M2n
2x500GB sata 2*500GB IDE disks in md raid5 with a lvm ontop
2X200gb disks in md raid1 with lvm ontop with the OS


Arch's setup process is not difficult either. The reason I'm suggesting Arch is that I have done it that way and can therefore easily instruct. I don't have debian experience. The last time I installed debian during my distro search days a couple of years ago I wasn't impressed with it. It's no doubt the mother of distros but the way things are done in debian doesn't gel with me.

It's a common misconception that Arch is not beginner friendly. To an extent it's more beginner friendly as it explains not only how, but why, and that knowledge is invaluable in the end. Sure it probably makes it a little more difficult from an information overload perspective but it's worth it as you get the knowledge of how it all hangs together which makes upgrading/fixing/modifying easier in the end.

My thoughts are that if you get through an Arch build you can do anything with Linux, and any flavour. I don't believe the same is true of debian? but even if it is I can't help with something I know nothing about :)

I also don't think it's necessary to go to a complicated root under lvm setup for someone who has stated redundancy isn't an issue for them. I tend to agree, it makes kernel upgrades etc a bit of a nightmare (not that I've ever done it that way), but from what I've read it's a bit of a pain doing root disk lvm and we only really need it for this for the data drives. Arch is very easy to administer after the build is complete too.

Cheers,

Arkay

#11 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 05:04 AM

Ooops!

You're right. I'll disable audio.

Found ACHI in BIOS, but there are two references:

  • SATA RAID/ACHI mode
  • Onboard SATA/IDE ctrl mode
I've set both of these to ACHI. Correct?

Duffy


Yep :)

Cheers,

Arkay

#12 Duffy

Duffy

    MC Guru

  • Members
  • PipPipPipPipPipPipPip
  • 1522 posts

Posted 22 September 2008 - 05:47 AM

First hiccup

Computer won't boot froom CD.

Reset the boot priority to a USB stick where I had the file - also didn't work.

System message: Invalid system disk

Only file on the CD is archlinux-2008.06-ftp-i686.iso

I have a Ubuntu Live CD which I can boot from after changing my BIOS settings.

Should I try burning the file to a DVD rather than a CD or try another file?

Suggestions?

Duffy

#13 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 05:51 AM

First hiccup

Computer won't boot froom CD.

Reset the boot priority to a USB stick where I had the file - also didn't work.

System message: Invalid system disk

Only file on the CD is archlinux-2008.06-ftp-i686.iso

I have a Ubuntu Live CD which I can boot from after changing my BIOS settings.

Should I try burning the file to a DVD rather than a CD or try another file?

Suggestions?

Duffy


You mean when you look at the cd contents you see "archlinux-2008.06-ftp-i686.iso"?

If that's the case then you burnt it to the cd as a file, not as a CD image. What did you burn it with and how?

Cheers,

Arkay

#14 Duffy

Duffy

    MC Guru

  • Members
  • PipPipPipPipPipPipPip
  • 1522 posts

Posted 22 September 2008 - 05:56 AM

Nero.

Understand my error.

I use DVD decrypter and burn the image to a DVD.

Duffy

#15 arkay

arkay

    Grand Poobah

  • Global Moderators
  • 12402 posts
  • LocationMelbourne

Posted 22 September 2008 - 05:59 AM

Nah. You can use nero and a CD. Don't waste the DVD :)

In the menu in Nero you need to find something like "Burn cd image" or "burn iso", don't have nero handy. But it's there.

Cheers,

Arkay.