Once more unto the breach, dear friends….

Ubuntu-Studio 15.04

It is time to have yet another go at getting the whole workhorse machine up and running with a nice, clean and – hopefully – stable Linux machine using the variant of Ubuntu designed to handle audio (and other media) known as Ubuntu Studio.

The main reason I use Windows rather than Linux is for the power of Windows editing apps and, to be honest, the games I occasionally play in the evenings. Having said this, if I can get all the work I need to do done in a Linux environment, a dual-boot machine might be the answer! At the moment, my main boot hard drive has gone down but it has allowed me to install Studio 15.04 from a flash drive  – woohoo!

Ubuntu Studio uses a Desktop based on the XFCE Windows Manager (which you can also see in Xubuntu) and so it is very clean and clear, albeit it somewhat cut-down and short of all the bells and whistles that mark the Gnome and KDE versions of Ubuntu. So, where to begin? Most of my data exists on external hard drives and additional hard drives in my main PC, so these need to be accessible to my (linux) machine and the other machines on my LAN (all Windows). To save you reading any further (other than for academic interest) – these steps failed!

Samba! Cha-cha-cha! Networking with Windows

Following the advice on the Ubuntu Help site, I shall try and set up the Windows networking in Linux using the command-line. I will just show you the commands I used here and my comments for brevity. for explanations, follow the link and read the chat 😉

To start, I shall try to switch to Superuser mode as I am going to be doing a lot of Root work. So:-

sudo su
<enter password when requested>

This logs me in as root! Yay! Then:

apt-get -y install samba

to install the ‘samba’ sharing software…

smbpasswd -a <user>

to create a Samba user. You’ll be asked for a new password for the Samba user (I used the same username as my normal one), and then to confirm it. The next instruction is to create a Directory (folder) to be shared. I assume all of my external HDDs can be linked to in this directory.

mkdir /home/<user name>/<folder name>

so as my everyday username is ‘gary’, I chose the following:

mkdir /home/gary/shares

Updating Configurations

Now we can go about setting up the samba configurations… First to make a copy of the samba configurations file (samba.conf) to our home folder.

cp /etc/samba/smb.conf ~

Open the configurations file and then

gedit /etc/samba/smb.conf

Now to add the Words of Power to the end of the conf file!

[<folder name>]
 path = /home/<user name>/<folder name>
 available = yes
 valid users = <user name>
 read only = no
 browseable = yes
 public = yes
 writable = yes

where user name and folder name are those we decided on earlier. Remember linefeeds and spaces are all important here. Now save and exit.

Ooh! Exciting times! Time to restart and test

Type the following to restart the samba system:

service smbd restart

Oh, that seemed to go well. We can test it with:

testparm

Lots of information, but I noticed “loaded services file OK” and my additions have been listed at the end of the dump. Woohoo!

Now for the Client

That’s the server installed, and it’s now time to install the Client.

apt-get install smbclient

Seemed to go OK. Hmm.. how to proceed from here though? It’s a little unclear. I did figure out that the Domain name of the samba share is ‘WORKGROUP’, so that’s pretty handy. Using:

smbclient -L //<my @pc name>/<folder name> -U <user name>

shows me a list of shares that my samba user has available to use and from that I can see the other machines on my network and the printer. I’m not sure why my Linux machine does not have a name though…

Is this your vehicle then, sir?

I’ve just spotted that the ‘shares’ folder I set up has the owner ‘root’ (because I was typing everything as a Superuser) so I may need to change the ownership back to my samba user, ‘gary’, before it will work. So, to do this I typed:

chown gary /home/gary/shares

which did the job. ‘gary’ is my local username, and ‘shares’ is the <folder name> we have been using so far. Using the File Explorer (Thunar in my case), I could right click on the folder icon and see that owner was now me (‘gary’) but the group owner was still ‘root’. so using the drop down I could change the owner to ‘sambashare’ (that seemed like it might be the right thing to do) with Read/Write permissions. I allowed it to apply the permissions recursively as well.

Exploring the Network

By clicking on ‘Browse Network’, I was shown a ‘Windows Network’. Clicking on this, showed me a ‘WORKGROUP’ folder. Opening this, brought up a password dialog. So I entered <username>, Domain was already ‘WORKGROUP’, and my samba password. Rats!!!! Failure. It did not open the workgroup for browsing.

 

Hmmm…..   back to the drawing board 😦

Advertisements

Preparing for Installation

As the workstation is using 3 monitors, I was somewhat concerned that I would lose functionality with Linux but a little bit of research told me that the chances of getting the third monitor to work were good.

The first step was to download the Ubuntu Studio distro (12.04 LTS) which I did from UbuntuStudio.org. I chose the 64 bit version to make full use of the hardware in the Workstation. As I wanted to install the distro from a USB Flash drive and not a DVD, I then downloaded the wonderful little tool from Pendrive Linux that does it all for you.

There are excellent instructions on how to install the iso image that you download from the studio website onto your flash drive, so I’ll skip over that bit…

As the workstation is using 3 monitors, I was somewhat concerned that I would lose functionality with Linux but a little bit of research told me that the chances of getting the third monitor to work were good. Two of the three monitors are plugged straight into the graphic card. The third is using a USB to DVI interface for which there is no official Linux driver … but there may be some workarounds.

So, once the BIOS had been set to boot from the USB drive first, it was time to give Ubuntu Studio a test drive and check how much of the hardware was still working!

The First Major Problem: Partitioning!

Everything seemed to work well, including the wireless mouse and so on. The third monitor had a nice green screen, which I was hoping to see. It indicated to me that I had a good chance of getting it working – as promised.

I started the installation program and it confirmed I had at least 7,5 Gb of HDD space, a working internet connection and asked me whether I wanted to download updates as I installed (“yes, please”) and whether I wanted third-party licensed software, such as MP3 decoders (“definitely, yes, please!”)! So, I hit continue, and after quite a while waiting…..

….I was faced with my first problem.

I was offered 3 choices: 1) Install alongside Windows (the choice I wanted!), 2) Replace Windows or 3) Something else (????). I clicked on the first choice only to discover that it would not allow me to install Ubuntu on my C Drive, but only on the external Hard Disk! I was not a happy camper! 🙂

Exploring all of the options in Choice No. 3 seemed to offer no safe way of making any room on my Primary disk for the Ubuntu installation. It was then I remembered using a partition resizing utility from the days back when…!!! A quick search through the system utilities menu revealed the program I sought: Gparted.

Gparted – Holy Grail of Partitions

Identifying which of the drives was my boot drive (the Hitachi and not the Seagate) as windows labels weren’t applied was a minor irritation, and I soon found that by right clicking on /dev/sdb I could click on the re-size option and actually drag the boundary to left to make enough room. I left about 200 Gb and noticed that for formatting this new partition I had lots of choices, including a swap drive (I had forgotten that Linux required a swap drive!) and the new ext4 format. So, I chose this – leaving about 10 Gb to be formatted as swap drive.

Following a reboot, I again entered the Installation program and was disappointed to find that Choice 1 was still only showing my external HDD. Choice no. 3, however showed all my new partitions – yay! I had an /dev/sdb2 as ext4 and a /dev/sdb3 as swap!

Almost there now…

I needed to show the installer where to put its Linux. I had to set a mount point. The column is clear in the partition table, but how to do it? Doubling clicking the partition line brought up a dialogue where I was again asked what type of formatting I required (ext4 – d’oh!), whether I wanted to change the size, a tick box for formatting (ticked this as it was probably best to format it afresh) and a mount point option! I clicked the drop-down and selected the  ‘/’ symbol, which I remember as being the symbol for ‘root’ or the starting point.
All looking good…. and all that remained was to click the “Install now” button! So here goes…..

It’s asking me my time zone (guessed it correctly), then the keyboard layout I want to use – all the while copying files in the background – and then asked me for my login details. You then get to play with a pretty slideshow showing you all the wonders of your soon-to-be-in-your-grubby-mitts installation! Ooh – exciting stuff! 🙂

Partitioning, Mount Points and other Gems in Ubuntu 7.10

Power Cuts

Two days ago we had several power cuts that completely managed to scrag my hard drives in logan and cerebro (the Fileserver), Ho hum… Time for a re-install, I guess. Good job the data on the file server was on a separate hard drive. Having done some research since the first install, now might be the time to add some security to the systems by utilizing several partitions to protect the data. The idea being that if the system goes down I can work on that and configuration as well as user data remains safe.

Partitions? Why bother?

When Ubuntu installs, it sets itself up in one large partition and up to this point I have used the Guided – Use Entire Disk option. So why use separate partitions for some of the installation? Well, I figure there are several advantages. It goes like this:

Partition Use

/ The root (/) partition stores the core system files and apart from some small additions and re-compiles will remain relatively fixed. Being separate from everything else should give it extra security.

/usr This directory holds user tools, compilers and other stuff. This will surely grow as I add stuff and being separate will allow easier and more secure re-installs.

/var This directory holds the log files, spool files and other stuff that changes a lot. Giving it a partition all to itself, it means that a runaway system generating loads of data will fill this small partition up rather than taking over the whole system. There is a type of system attack that generates millions of log entries with the aim of toileting free space so a separate storage space for these files seems a really good idea.

/tmp Temporary files could also possibly grow beyond belief, so that same logic applies here.

/home
Placing the home directories on their own partition prevents users from filling up the hard drive and enforces a primitive form of quota management. This will have to do until I can figure out how to get home directories on the server.

The Plan

Logan has a 250 Gb hard drive and that gives 236 Gb to Linux. During the installation process, I choose Manual rather than either of the Guided partitioning systems. The first step is to delete the suggested partitions before setting up my own plan.

/ 25 Gb
swap 3 Gb
/usr 50 Gb
/home 50 Gb
/var 50 Gb
/tmp 72 Gb

On reflection I might change the home directory to 72Gb and reduce /tmp to 50Gb.

Mount Points

As you set the size of a partition (25000 for 25 Gb, for example) the dialog asks for a mount point and doesn’t offer me any choices. A Mount Point is a directory in the file system where the new partition is going to live, so all I’ve got to do here is type in the directory names listed above for each partition.

All have been set up and I click the go button, the rest of the system install flawlessly. Brilliant!

Powered by ScribeFire.

Let’s try the Ubuntu Desktop

Ubuntu Desktop 7.04

So the next step is to try the other installation disk for Ubuntu.

One download later, I have another iso to cut to disk. Not knowing how to reformat the disks for a clean install under Linux, I re-install Windows XP and boot into the installation CD. I do like the pretty loading screen. Silly I know but the black screen with the Ubuntu logo and the sliding progress bar makes me feel somewhat at home. I’m used to this sort of presentation with Windows and it gives me a degree of confidence that this installation knows what it is doing.

As with the server, the next most complicated decision I have to make during the installation process is how to format the Hard Drives. I don’t understand all of the options it gives me and I know I don’t want Windows to retain a partition on the machine so I opt for the Guided Entire Disc option. It takes about 25 minutes to install all of its packages and ask me to remove the CD prior to re-booting. All seems good so far.

Oh yes! It boots into a clean graphical screen with a login prompt. I enter the username and password that I have chosen and am presented with a very clear and clean desktop. This looks very good. A calm relaxing beige desktop with a taskbar, which I later discover is called a panel, at the bottom of the screen and another at the top. All of the hardware seems to have been detected, even the sound card. A quick browse amongst the buttons and options and I feel as though a have a full function PC at my control again. I’m very impressed.

Back to the article in Micro Mart and it talks about configuring something called Samba. You need Samba so that the Linux operating system knows how to access Windows shares and that is going to be essential if I want to use this machine as a File Server.

Samba Configuration

The instructions here are pretty simple.

1. Go to System>Administration>Network and re-enter the password. I have a wired network so I leave the first tab alone and go to the next one ‘General’. Here I can enter a hostname for the system and I choose ‘Server’ which seems to describe the machine pretty well. I notice that it has successfullyassigned an IP to the machine using DHCP supplied by my router, so all still looks good. Click Close and come out of this program.

2. Go to System>Administration>Shared Folders. At this point a little message has flashed up n the top Panel telling me system updates are needed. Now that’s more like it – the system has recognised that more software is needed and will install it for me, and in a Windows Update fashion, will keep my system up to date. Feeling better and better all the time. This all works beautifully and I can continue by going to the ‘General Properties’ tab on the Shared Folders program. This Administration menu seems more and more like Control Panel – so I’ve got some idea of what I’m doing – not much though 🙂

3. Here I can enter the Workgroup name I use for my Windows machines (MSHOME – not very original) and click on close.

 

4. Now it gets a bit scary – I have to edit the Samba configuration file! So, I go to Applications>Accessories>Terminal and up pops a Notepad like text editor. All it says is ‘gary@server:-$’ – mmmm….. Well, gary is my username, Server is the hostname so I guess I can understand this prompt and it looks like an MS-DOS command line. I then have to type ‘sudo gedit /rtc/samba/smb.conf’ here. It has asked me for a password again – the magazine didn’t say anything asbout this. OK, I’ll use the only one I know which is the one set up during the install process as the magazine says that sudo means the command is run as an administrator and not as a user. The ‘gedit’ bit is the actual Notepad like editor it is going to start and all the rest is the path and document I am going to be editing.

5. It works! I get a full screen text editor which has a huge configuration file loaded. I have to search through the file to find the ‘Home Directories’ bit and change the value browseable to yes (it was no original). I also have to un-comment the line. I also have to change ‘writeable’, a few lines down, to yes. So far so good. I can close the editor, saving the file.

6. Back at the Terminal screen, I have to set a Samba password which I can do by typing ‘sudo smbpasswd -a <username>’ where <username> is my username, i.e. ‘gary’. This is so that other machines on the network get a password to access the shared folders. Why do I have to do this? I’m on a secure home network – puzzlement. Still… it’s done.

7. OK, So I close the Terminal window now and go to Places>Home Folder. I right click amongst the folders displayed and create a new fold called ‘Share’. Right click again, and choose ‘Share Folder’. I select ‘Windows Network(SMB) and give it a share name of ‘Share’ – I understand this bit – it’s the same as the Windows way of doing things. A share can have a different name to the actual folder that is shared. I un-check ‘Read only’ as I want to be able to store stuff here and go to my Windows machine to test out the share. Apparently it should all work now.

 8.    Well, a new network place has popped up called ‘ share on Server server (Samba, Ubuntu) (Server)’. Looks good although how many times do I need to read the word ‘server’? I double-click on this and a Connect to Server password dialog box comes up. The username is set to SERVER/gary which all looks good and I have to type in my assigned Samba password. Ok, let’s do it. I also put a check in the ‘Remember my password’ box, that should stop me having to re-enter the password everytime!

9.        Success!!!!!   It works. I can create folders here and dump stuff over onto the file server to be retrieved at a later date. Definitely time for a coffee to celebrate.