Sylvarwolf Linux Blog

Trials of a Linux Newbie

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.

November 25, 2007 Posted by sylvarwolf | Desktop, gutsy, linux, ubuntu | , , , , | 4 Comments

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.

 

 

September 29, 2007 Posted by sylvarwolf | Desktop, samba, ubuntu | , , , , , , , , | 3 Comments