Showing posts with label hard disk. Show all posts
Showing posts with label hard disk. Show all posts

How to Resize a VirtualBox Disk

While working with VirtualBox I made the mistake of underestimate the disk space I would require for the usage of Kubuntu 16.04. Not the operation system itself, but the additional application I actually would need.

That forced me to increase the disk space, a task that resulted in a lot of work that initially expected.

I followed the Derek Molly tutorial "Resize a VirtualBox guest Linux VDI Disk under Windows Host" with some differences due to the problems I faced.
I was unable to not use the recommended gParted, so I ended up trying a similar solution.

I used System Rescue CD, that includes lots of system tools, in an obvious rescue bundle, including gParted. Booting the CD image was not a problem and I got a shell. I typed "startx" to load the window manager and quickly found gParted. From that point on, the tutorial was back on track and I was able to increase the disk space.

System Rescue CD is a great tool and I totally recommend it. I just needed to use gParted for this problem, but it comes with lots of software that can be a life saver.

./M6

You're in Lisbon and have a problem on an Apple product?

The Mac hard disk died. After a RAM upgrade it worked fine for one week and then, just died...
A friend had exactly the same problem, he also upgraded the RAM and the Mac hard disk died.
Coincidence?
Probably...
I went to pick it up today and talked with the assistant about it. He said it was a coincidence, that he had two more Macs with the same problem, one had a RAM upgrade and the other was factory default...
Coincidence?
Maybe, may be not.

But what's really important is the assistance. If you ever have a problem on an Apple product and you're in Lisbon, just take it to Tou Aqui Tou AĆ­. Yes, the name (in portuguese) is... let's be nice and just call it, different... But the guys there are good, and that's what really count.

./M6

Why has my Mac become so slow?

Last week my Macbook Pro start to get really slow... The week before I upgraded the RAM from 4GB to 8GB, then there was a Lion update and finally I've installed Microsoft Office for Mac.

Then, things started to get real slow... 
And by real slow, I mean, 20 minutes to boot...
Since there were three major modification to the system on the same week.

I started by checking if it could be caused my the RAM upgrade. I've found that it was a possibility, but it would probably not be it, since it worked fine some days after the memory upgrade. Nevertheless, I changed to the original RAM, to see if it was it, and, as I expected, it was not.

Over the time, it became even more slow... At some point, it would not even boot and it started to heat...
That's when I decided to make a system recover.
Pressing ALT + CMD + P + R all at the same time until the apple logo comes up boots up the repair partition with the disk utilities and system repair options.
After a quick check with Disk Utility, which yield no problems whatsoever. Nevertheless, I performed a system repair.
It also took a lot of time but eventually it finished.
But the first boot did not happened... It got stuck and started to heat again...

I decided that it would probably require a clean installation.
I booted the repair options again, now also taking too long to load, formatted the partition and installed the Lion again.
But again, the boot failed!

It was time to get the Snow Leopard boot DVD that came with the computer.
Loading from the DVD, by pressing C during boot, was quite fast. Much faster than loading from the hard drive. 
Now, that's quite unusual! And the repair system was running faster than the version from the hard drive.

By now I was thinking it could be I/O problems, and thus performed another disk verification and repair with Disk Utility. It came out OK. After performing a clean installation, also taking ages (the estimate time was 35 minutes and it took 2 hours), I was able to perform a boot into my fresh install Snow Leopard. 
The boot was still slow and the Apple "Welcome" video was not synchronized with the audio, it had a lot of freezes and took too much time to play...
By now, I was convinced it was a hard disk problem.

Again, the Disk Utility stated that the hard drive was fine. I performed a simple test: open a Terminal. A simple and small application on a clean 8GB RAM system took around 30 seconds... And when I fired Safari, it took over a minute, with a maximum of 78kb/second of I/O speed...

After some research, I've found that the Disk Utility that Apple ships is a peace of crap. Simply stated: Disk Utility sucks. It is totally non-reliable.
I've also found out that slow systems are a good indicator of a dying hard drive.
And finally, I've found good software that didn't lie to me: SMART Utility.
As soon as I've opened SMART Utility, it stated a set of problems, including bad sectors and SMART failure.

That was it! 

Disk Utility sucks.
If Apple packed a decent disk utility it would have saved me a lot of much time. And, thinking about it, how hard can it be to pack a decent disk utility nowadays?

Here's a good topic about all this: 

./M6

Recovering from a bad Hard Disk Crash

Last time I've used my computer I burned a DVD Video with K3B and shutdown openSUSE as usual.

Yesterday, when I turned the computer on, it went directly into GRUB shell which allowed me to execute some commands with no real use to me.

Obviously something was wrong, and I though that it was the Master Boot Record (MBR) that got corrupted, as I've already have experienced before.
So I got the openSUSE installation disk and boot with it in order to fix the problem. I've requested the fix option from the menu but then something weird happened.
When scanning the hard disk, it displayed a message that there was something wrong and I would not be able to edit the disk partitions. I checked the partitions and the information seems to show that everything was OK.
I needed something else to see what was wrong with the hard disk and to fix it.

I grabbed an old Knoppix CD, version 3.3, the only one that I know that loads correctly on my Acer laptop (by the way, don't by an Accer if you wish to have Linux on a laptop), and checked the disks. This is not the first time I use Knoppix to save a system, it's actually one of my companion disks.
Knoppix automatically mounted both windows partitions correctly but the Linux EXT4 and Swap partitions were missing.
Now I start to get worried...

I got into a shell and checked the partitions with fdisk.
I detected the problem immediately: I had two partitions starting at the same cylinder! I even recall its number, 2086.
The second partition had an Id of f, which is awkward since the Id is a numeric value, and was marked as the boot partition. Using fdisk to see what my chances were of correcting this I realized that a drastic solution would probably be the only solution. When I deleted that second weird partition, the following partitions were gone to.

So, before I do something that I could regret latter, I checked the content of the Windows partitions to find out that if anything would go wrong I already had a backup of everything.
The data on the Linux partition seemed already lost, so I would have to settle for the backups.
On the other hand, I was still able to save everything from the Windows partitions, but that would be unecessary.

I finally decided what to do and how to do it.
I've deleted that second weird partition, defined the first partition as boot and saved the partition table.
I could have tried to recreate the partition table with fdisk, but since I had backups of everything, I just went for the full disaster scenario.

I then rebooted with the openSUSE installation disk, created a second partition, that I reserved to replace the lost second partition for Windows, and created a third one for Linux, where I installed openSUSE.

When openSUSE installation finished I've reboot and started Windows, which loaded just fine from the saved first partition. When Windows loaded, it was time to format that previous reserved second partition as NTFS.

The whole thing took me a couple of hours but I got both Windows and openSUSE up and running again. Today I'll restore the backups, which will probably take a couple hours more.

Moral of the story:
  1. Always have a Knoppix disk at hand.
  2. Backups are a tech best friend.

./M6