↓
 

A Pipe and a Keyboard

A sort of Linux scrapbook

  • Home
  • About
  • Software
  • List of posts

Tag Archives: Linux

Post navigation

<< 1 2 3 4 5 6 … 10 11 >>

How to install Mint beside Windows 7

A Pipe and a Keyboard Posted on December 10, 2013 by RichardMay 17, 2017

So you want to install Linux Mint on a PC that already runs Windows?

This is quite a simple task and the only proviso is that you have sufficient spare capacity on your hard disk.  Linux requires about 8Gb for the operating system and you will need some space for all your files, so I would suggest a minimum of 20Gb.

Before we start, back up all your data.  It's very unlikely that anything will go wrong, but just in case…..

First of all you'll need to download Linux Mint (32-bit or 64-bit depending on your processor. Not sure? Use 32-bit).

The difference between MATE and Cinnamon is essentially one of taste – they are different desktops with roughly the same software behind them.

Once downloaded, burn a DVD using the .ISO file.

In Windows, right-click on Computer –

Pic1
(Click any image to enlarge)

Select Mange and click on Disk Management.

Pic2

Here you can see the layout of my hard disk (Disc 0).  It has two partitions: a System Reserved area and the C: drive.  The latter is the one we want to mount Linux in and the top line shows it has 41.19Gb of spare space.  We need to resize that partition to make room for Linux as the latter needs its own file system.

Right click on the area labeled (C:) and select Shrink Volume.

Pic3

After a bit of thought it will pop up a window telling you how much free space you have and giving an area to enter the amount of space to shrink in Mb.  I entered 20000.  Click on Shrink.

Pic4

After a short while it will display the new disk layout.  We now have three partitions – System Reserved, C: and 19.53Gb of Unallocated space.  (I know I entered twenty but it will adjust that to the nearest suitable size).  That Unallocated space is where we are going to install Linux.

Pic5

Place your Linux Mint DVD in your drive and restart (assuming your BIOS is set to boot off a DVD before the hard disk!)

Linux will load and you should see the following –

Pic6

At this stage Mint is running off the DVD.  We want to install it, so double click on the Install icon.  It will ask which language to use.  Select and click Continue.  It will then confirm that you are plugged in (if you're using a laptop), that you are connected to the Internet and that there is enough space available (it reckons 8.1Gb is enough!).  Click continue.

You will now be asked for your preferred Installation Type.  It has detected that there is another operating system and the first option is to install alongside.  This is the quick and dirty method.  The second option is to delete your Windows and use the entire disk.  Do NOT select that!  The bottom option (Something Else) is my preferred one as it gives greater control over how the disk is used.

Pic8

Here we see the disk layout again, with the System Reserved at the top -Windows 7 Loader, followed by the Windows partition, and then the area marked free space at the bottom (Linux reads this now as 20973Mb which is fine).

Pic9

Select the free space and click on the little + button.  We are about to add a Swap partition (all Linux distros require a Swap partition to use as disk memory)

[N.B. See Notes at the bottom of this post regarding partitions and sizes]

I have set the swap size to 2000Mb for the purpose of this exercise. Normally a Swap partition should be equal to around twice the PC's memory, but if the PC has over 2Gb memory then the Swap size isn't so critical).  I have selected "Swap area" in the drop-down list beside "Use as:".

Once that's done, the Swap partition will appear in the window, and naturally the free space has shrunk a bit.  Select the free space again and once more click +.

This time we'll set up the Root area where Linux itself resides.  All operating system files will go in here and it needs around 8 to 10Gb.  I have set this example at 8000Mb.  "Use as:" can default to "Ext4 journaling file system" and the Mount point (very important) is set to /.  Click OK.

Pic11

Our free space is now down to 10973Mb.  Select the free space, and once more click on +.  As we want to use all this space, let the size default.  The only thing to set is "Mount point".  This should be set to "/home".  Click OK.

Your screen should now look like this:

Pic12

Note the second and third columns – it is important that they are correct.  If you have made an error, simply select the errant line and click change.

That's the hard bit done.

Click on "Install Now".

Pic13

You will be brought through a series of screens to select your location, and keyboard (I always find that Mint detects those correctly).  You will be asked for your name, username and the password of your choice and then you can sit back and relax as Mint installs itself.

When it has finished, it will either automatically eject the DVD or as you to remove it.  Reboot and you will see the following screen

Pic14

Arrow down or up to select Windows or Linux and that is it.

 

NOTES ON PARTITIONS AND SIZES

Generally I like to install Linux in three partitions – Swap, Root (/) and Home (/home).  It is quite possible to manage with two where everything is installed in the Root partition but this has one major disadvantage.  Root is where Linux resides, while Home is where all your documents, preferences and settings are held and placing them all on one partition can make reloads problematic.

In the unlikely event that you have to reinstall Linux, simply go through the above procedure, but when it comes to the partition, select / , select "change" and make sure "format partition IS selected.  Then select /home  and make sure "format partition IS NOT selected.  This will give you a fresh install of the operating system but all your documents, settings and preferences will remain intact.  You will have to re-install any extra software but those preferences and settings will remain intact too.

The machine I am using at the moment has 4Gb of memory which is plenty for Linux.  I have therefore set my Swap size fairly low at 3Gb.  I might add, the partition is rarely used!

I have allocated 10Gb for the Root partition to allow for some slack.  Even with all my software loaded, that is currently running at 5.55Gb so there is loads of slack room.

My /home partition is currently set at around 150Gb which is ample for my needs. 

A little tip….  I use a few programs such as audio and video editors that create massive temporary files.  Normally these files will be created in the Root partition, and if the partition is relatively small (as mine is) the programme can easily complain.  The simple fix is to go into the Preferences of these programmes and set the temp folder to a folder in the Home partition.

 

Posted in Linux, Tech stuff | Tagged Linux | Leave a reply

Google Earth and ia32-libs

A Pipe and a Keyboard Posted on November 14, 2013 by RichardDecember 10, 2013

I recently installed Linux Mint 16 [Petra] RC [64 bit Cinnamon edition] and came across a problem.  This may have been due to the release not being complete, but a search showed that this is quite a common problem.

[Note: since I wrote this piece the final version of Cinnamon was released and it was fixed]

When I tried to install Google Earth I was informed that a dependency – ia32.libs wasn't met, and the installation failed.

Naturally I tried installing the missing library, but apparently it has been depreciated.

Time for a workaround.

I first ensured that libc6:i386 lsb-core were both installed.

Next I downloaded the latest package from Google - google-earth-stable_current_amd64.deb into my Download folder.  I created a sub-folder "GoogleEarth" and using Archive Manager I extracted the contents of the DEB file into GoogleEarth.

I then opened the file GoogleEarth/DEBIAN/control in a text editor and removed the following line

Depends: lsb-core (>= 3.2), ia32-libs [Line 7]

I then created a new package using the command dpkg -b GoogleEarth/ [from within my Download folder].

It took a while, but that created a new file in Downloads called GoogleEarth.deb.

Install that using GDebi Package Installer, and away she goes!

 

Posted in Linux, Tech stuff | Tagged Linux | 7 Replies

Shell scripting and LFTP

A Pipe and a Keyboard Posted on May 11, 2013 by RichardMay 11, 2013

I have been introducing myself to Linux shell scripting.

I maintain a fair number of WordPress installations, and part of that maintenance is the task of backing them up.  The actual backups are easy as they are done by simple scripts on the servers which are called by CRON tabs.  Each server has three tabs – one to backup the database (on a nightly basis), one to backup critical files, such as uploaded files and configuration files (run once a week) and one to backup the entire site (run once a month).

While backup files on the server are all very well, they are not much use if the server collapses, so I need to transfer those backups, and this is where the need for shell scripting came in.

To retrieve the files, I initially had to fire up my FTP programme and then log into each server in turn, download the files and then delete redundant files from the server.  That proved to be an extremely tedious job and of course it had to be done every day.

My first and obvious idea was to create a simple shell script to log onto a server and FTP a file down onto the local machine.  There were two initial problems – I would have to have a script for each individual server, and there was the problem of specifying the file I wanted to download.  For various reasons I wanted to be able to specify precisely which file I wanted to download (and the actual names varied from server to server), so this involved wildcards.

My initial solution was to create an array of variables – one set for each server containing the server address, the username, the password and where the file was to be stored locally, and some variables that were specific to the day, as each backup file was time stamped.

MYDATE=$(date +”%d.%m.%y”)
REMOTEFILE=*$MYDATE.*

SERVER[0]=”domain1.com”
USER[0]=”user1″
PASSW[0]=”password1″
LOCAL[0]=”/home/sites/BlogBackups/Site1″

SERVER[1]=”domain2.com”
USER[1]=”user2″
PASSW[1]=”password2″
LOCAL[1]=”/home/sites/BlogBackups/Site2″

I then created a simple loop which cycled through the array, connecting to each server in turn, downloading the files and then deleting the files on the server.

count=0
while [[ $count -lt ${#SERVER[@]} ]]
do
ftp -v -i -n ${SERVER[$count]} <<END_OF_SESSION
user ${USER[$count]} ${PASSW[$count]}
cd webspace/www/backups
lcd ${LOCAL[$count]}
mget $REMOTEFILE
mdelete $REMOTEFILE
bye
END_OF_SESSION
(( count++ ))
done

I as quite pleased with this effort as it ran perfectly and did precisely what I intended.

Until the end of the month, that is.

On the first of the month, I ran my script and it locked up.

A little investigation found the cause – it was downloading files greater than 200Mb, but on completing the download the script just stopped, for no apparent reason.  There were no error messages, no timesouts, nothing.  I searched the Web but couldn’t find any mention of a possible cure for this.  In the end I posted a query on a couple of forums, and while they didn’t provide an answer they did suggest something else – that I try something other than FTP.

Unfortunately, for various reasons none of the suggestions worked, so I started my own search and found LFTP.

LFTP is essentially FTP with a load more bells and whistles.  It took a while to sort it out as my only reference was the Web.

The basic command line to retrieve a file from the server is

lftp -u username,password ServerURL -e “get /webspace/www/backups/remotefile”

I modified this using mget rather than get as that allowed for wildcards.  I used a loop to cycle through my array and that’s where the fun began.

First of all it started throwing up warnings left right and centre about bad certificates.

WARNING: Certificate verification: Not trusted
WARNING: Certificate verification: Expired
WARNING: Certificate verification: certificate common name doesn’t match

This was easily cured by adding a line at the bottom of /etc/lftp.conf – set ssl:verify-certificate no 

My next problem was that it would access the first server all right but would refuse to connect to any other, giving an error that there was “No Route to Host”.  It was logging in all right on Port 21, but was then trying random ports to do the actual transfer and kept cycling through them.

I cured the long wait between cycles by adding three more lines to /etc/lftp.conf –

set net:timeout 10
set net:reconnect-interval-base 5
set net:reconnect-interval-multiplier 1

While that sped things up a bit, it didn’t solve the problem!  I tried forcing Active mode over Passive but that had no effect.

The solution in the end was to add yet another line to /etc/lftp.conf –

set ftp:ssl-allow false

I ran the script, deliberately including some large files and it worked.

My final script –

count=0
while [[ $count -lt ${#SERVER[@]} ]]
do
lftp -u ${USER[$count]},${PASSW[$count]} ${SERVER[$count]} -e “mget -E /webspace/httpdocs/backups/$REMOTEFILE -O ${LOCAL[$count]}; ; exit”
(( count++ ))
done

I added in a couple of extra features – the –E flag deletes the remote file but only on successful download, and the –O flag sets the target location for the file.  I ran it against the full server load (having previously uploaded some of the large files) and it ran perfectly.

LFTP is an immensely powerful tool as it provides such commands as MIRROR which can be used to mirror a local folder with a remote one.  I can see myself using it a lot more! 

Posted in Linux, Tech stuff | Tagged Linux | Leave a reply

How to cancel a print job

A Pipe and a Keyboard Posted on March 21, 2013 by RichardMay 9, 2016

Last night I wanted to print off a couple of pages.

I’m using Linux Mint 14 (Nadia) and a wireless HP Officejet J4680.

For some reason, the first page got stuck in the queue and refused to print.  What was worse, I couldn’t cancel it.  I tried all the usual rebooting but to no avail.  The Preferences –> Printers showed the queue but the Stop button had no effect.

The solution, as always is simple.

Open http://localhost:631/jobs/ in your browser.

That’ll do the trick.

Posted in Linux, Tech stuff | Tagged Linux | 3 Replies

Resetting an Iomega iConnect to default settings.

A Pipe and a Keyboard Posted on December 31, 2012 by RichardMay 9, 2016

I recently tried some hacking of my Iomega iConnect.

The exercise was interesting but not very fruitful!

I presume that was the cause as the box died on me and transformed itself into a dead black box that was too light to even work as a doorstop.  Time to rebuild!

My first action was to download the Imager from the Iomega site.

Next, format a flash drive as FAT32.  Unzip the downloaded image file and copy the eight files onto the flash drive.

Now comes the fun part!

Disconnect all USB devices from the iConnect, and plug the flash drive into the rear USB port.

Holding down the little reset button on the back panel (I used a jeweller’s screwdriver), reset the power to the unit.,  The front indicator will burn blue for a short while and then turn red.  You can now release the reset button.  After a while all the front LEDS will burn solid blue.  At that point, remove the flash drive and repower the device.

The iConnect is now restored back to its factory settings which poses a problem – how do you access it?  It has reverted to a default IP address which will not be on your home network or home PC, therefore, even if you knew the address you still cannot access the device!

My solution –

First, to be on the safe side, I downloaded the Iomega Storage Manager and installed it (they do give a Linux version but it complains about missing libraries so I used the Windows version).  Select your OS here and then select the Iomega Storage Manager link under “Download Software & Drivers”.

Now connect your iConnect directly to your PC using a network cable.  If you have a wireless connection to your network, disable that.

You now need to change your PC’s network setting to the IP address 169.254.1.2, and a subnet mask of 255.255.0.0.  The Storage Manager should now indicate that it has found the iConnect.  In my case, each time the iConnect has an IP address of 169.254.1.211, but that may vary.

Now point your browser at the discovered IP address and you should have access to the iConnect.

Set the device’s IP to one on your own network and repower it.

At this point, you will need to reset your PC’s IP address to its normal values (or just enable wireless if applicable), disconnect the iConnect from your PC and connect it to the network.  You should now be able to access it from a browser using the IP address you allocated it.

Happy hunting!

Posted in Tech stuff | Tagged Linux | 17 Replies

Post navigation

<< 1 2 3 4 5 6 … 10 11 >>

Recent Posts

  • GRUB problems
  • Tab bar broken again in Firefox 133
  • WP phpMyAdmin Session mismatch
  • When Linux slows down
  • Firefox broken again

Categories

  • Blogging
  • General
  • Linux
  • Media
  • Tech stuff
  • Writing

Blogroll

  • Head Rambles
  • Kirk M's Just Thinkin'
  • Wordpress Beginner
  • Wordpress Development

Archives

©2025 - A Pipe and a Keyboard - Weaver Xtreme Theme
↑