Replace HD in Dell Inspiron N5110
I am no stranger to replacing bad equipment in servers, desktops and laptops, but some laptops don’t make it easy. This was one.
A couple years ago I swapped out an aging hdd in an older Dell Inspiron with a new ssd and, boy, the performance improved drastically. Lately, I have been using a new(er) Inspiron, an N5110 and have noticed that it sure took a while for things like bootup and Chrome to initially load. It was really starting to annoy me, so I looked up the specs on the original hdd and found that there was a squirrel in there pounding out the bits with a chisel, so I decided it was high time for a modern drive and splurged on a 240Gb ssd. I assumed that this was a simple pull the panel off the bottom and swap kind of procedure like the old Dell, so I pulled off the hdd sized panel and boom. The only thing under there was more plastic and a small memory slot???!!
Not to be outdone I turned to youtube, just like an self respecting techie would and was pleased to find some instruction there. You can find the video i used here if you are interested:
That is where is starts to get fun. Apparently you have to disassemble THE ENTIRE LAPTOP to get the hdd out. You have to pull out the battery, memory, all the screws on the bottom, the dvd drive, then flip the machine over and pull off the keyboard, unscrew and pull off the top plate and all the ribbon cables, then unscrew and remove the entire motherboard and one of the monitor mounts. The hdd is underneath the motherboard. Unreal.
Believe it or not, after all that I only had one extra screw(?) and the laptop booted up on the first try. Now came the good part. How to get my existing Linux Mint install onto the new ssd. Normally I would have just used a disk cloning program or dd to do it but the old hdd was 500Gb and this new ssd is only 240Gb. There are also some complicated tutorials on the web on how accomplish this task but let me share with you the easy way.
Do a clean install of your OS. Really. With Linux it takes 15 minutes tops. Don’t bother with any of your configs or personalization. It’s a dummy install to not only get the partitioning correct on your ssd but generate the correct /etc/fstab file (or get the new uuids and make the correct partitions bootable.
Once you are done, boot into your install media again (I used USB because it was faster) and mount your new installation AND your old hdd (I used an external usb drive case for this). I made the directories I needed by doing (as root) “mkdir -p /mnt/newdisk ; mkdir -p /mnt/olddisk” and then putting things in place with “mount /dev/sda1 /mnt/newdisk ; mount /dev/sdc1 /mnt/olddisk”. I should mention here that my partitions were the default Mint layout with a big Linux partition first, then an extended partition, then swap, on both drives.
Once mounted I made a backup copy of the /etc/fstab on my olddisk (the hdd) and then I copied the /etc/fstab from the newdisk to the /etc/fstab on the olddisk. Now the fun part. Go to (cd) the /mnt/newdisk directory. MAKE SURE IT’S THE NEWDISK DIRECTORY, and “rm -rf *”. That is going to delete all the files you just installed. It’ll only take a second.
Next is the long part. I used rsync to copy all my old files over. If you aren’t a hoarder like me with six linux dvd isos in your download directory and 50Gb of music files, it’ll go a lot faster, but all the same, it’s pretty cool to watch. I did a “rsync -rvlpogdstHEAX /mnt/olddisk/ /mnt/newdisk”. Make note of those /’ in there or you’ll end up having to move stuff around afterwards. In retrospect, I think you could use just rsync -av, but ymmv. What you will see is every file on your old drive being copied to the new one. Like I mentioned, this takes a few minutes, just sit back or grab a coffee. Once it’s done you are *almost* ready.
The very last thing you’ll need to fix is your grub.cfg file. These days everyone wants to use uuid to assign devices and your boot file is still looking for your old hdd. Open up a couple terminals. In one, vi /mnt/newdisk/boot/grub/grub.cfg and in the other vi /mnt/newdisk/etc/fstab. In the fstab file you will see the uuid for your new ssd drive. It’s the first uuid mentioned and mounted at /. Io You need to replace the old one in there with the new one from your fstab. It’s easier than you think in vi. Just do a “:g/olduuidstring/s//newuuidstring/g” and hit enter where olduuidstring is your old uuid and newuuidstring is your new uuid from the fstab file. Once it is finished replacing you probably need to save it with a “:wq!” because your system will undoubtedly say it’s a read only file. The reboot! You should be greeted shortly with a much faster but very familiar linux install, complete with all your goodies.
One last note. You may want to increase the life of your ssd ehink in vi. Just do a “:g/olduuidstring/s//newuuidstring/g” and hit enter where olduuidstring is your old uuid and newuuidstring is your new uuid from the fstab file. Once it is finished replacing you probably need to save it with a “:wq!” because your system will undoubtedly say it’s a read only file. The reboot! You should be greeted shortly with a much faster but very familiar linux install, complete with all your goodies.cat by adding a couple options to your /etc/fstab file. Those options are discard and noatime. These options deal with extra disk writes that you really don’t need on ssd. Your / line options in the fstab should look something like “ext4 discard,noatime,errors=remount-ro 0 1”.
Enjoy!