I have an old Compaq laptop that I thought I’d put Ubuntu on. Unfortunately the hard disk is damaged and there must be bad sectors on it. Ubuntu therefore refuses to install.
I know – I should get a new hard disk and be done with it, but all I wanted to do was have a spare machine for testing and messing about. I also wanted to do some tests with Ubuntu and WiFi, and my desktop PC is hardwired and doesn’t use WiFi. If I was doing anything serious with the laptop I’d get a new hard disk for it – but I’m not, so I won’t.
As I say, Ubuntu checks the integrity of the disk before commencing the main part of the installation and refuses to install. Windows XP of course was either oblivious or uncaring – it installed without a murmur.
Wubi is an installer for Ubuntu that runs within Windows. It makes it easy to set up a dual-boot system. It also allows you to uninstall Ubuntu and revert to a single-boot Windows machine by going to the Add/Remove Programs settings within Windows and removing the Ubuntu entry.
I wondered. If Windows had gone over-written the bad sectors with Windows files, the Wubi installer wouldn’t have to check those areas of the hard disk. Perhaps I could get Ubuntu on to that disk through Windows, even though the naked Ubuntu install refused to co-operate.
Wubi is a small program (1.45 Mbyte), it doesn’t include the installation files themselves. I downloaded it and dropped it into a folder with the Ubuntu 11.04 ISO image file and started the Wubi.exe. it located the Ubuntu ISO image, and offered me a few settings I could provide values for, such as user name, password and how much of the hard disk to set aside as the Ubuntu partition.
It churned away to itself for a little while and then rebooted the laptop and the normal Ubuntu installation took place. When that was finished I had a dual boot laptop with Ubuntu 11.04 and Windows XP.
Some years ago a friend of mine asked me to go over to his house to help him set up access to a Windows PC from an Ubuntu one. To cut a long and frustrating story short, we tried everything we could think of for an entire afternoon and still failed miserably. It was with a heavy heart then, that I turned to that same task again today.
I wanted to have access to a shared drive on a Windows XP laptop. I was amazed to find the answer after only a short period of Googling. These are the steps that I needed. The laptop in question is on a workgroup, and there is no password – it just boots straight up. It is attached wirelessly to the same network that my Ubuntu box is cabled onto.
I created a folder called davetest on the laptop & shared with read/write access. I checked that I could see it and that I had read/write access to it from another Windows laptop just to verify that the share was working. It was.
On my Ubuntu PC I opened a terminal and typed:
sudo apt-get install smbfs
As I understand it (and I’ll gleefully admit I’m no expert in this) SMB (Server Message Block) is a network protocol used to access such things as printers and shares between network nodes. The smbfs package allows Linux to interact with the SMB protocol via the Linux file system (hence smb fs).
I had to create a folder on the Ubuntu PC in the media folder on which the remote share would be mounted:
sudo mkdir /media/laptop
I then had to edit the fstab file:
sudo gedit /etc/fstab
I added the following line to the bottom of the file (note that this should all entered on one long line):
//<IP Address>/davetest /media/laptop cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
<IP Address> = IP of laptop
davetest = name of shared folder on laptop
uid = The user ID of the user who will take ownership of the mounted files
Finally I used the mount command to mount the shared folder onto the Ubuntu file system at the /media/laptop location:
sudo mount -a
I received no error messages, so I proceeded to the first and simplest test:
This listed the files in the shared folder on the Windows laptop. I experimented further and through the usual means I verified that I could copy files to the location, delete files and change files. The new file system location was accessible through the terminal windows and through Nautilus.
Makes me wonder what the deuce we were doing all those years ago, and why it was such an epic failure.