another web journey

Changing my HDD on my old laptop

General 6 minutes

Last weekend I worked on my old laptop:

  • removed the HDD
  • replaced with a fresh new SSD
  • installed Manjaro Xfce

Find below detailed steps if it can help anyone or my future self.

Prepare

  1. Make sure you know how to disassemble and re-assemble your laptop
  2. Make sure the target material is compatible with your hardware
  3. Erase previous disk
    • list disk to verify which one(s) should be shredded sudo fdisk -l. I found a dev/z-ram disk which probably has no data on it so I left it as is (I was using Linux Lite on that computer)
    • shred will overwrite data with random data multiple times. I used shred -n 5 -vzf /my/disk/path, see Linux : comment effacer un disque de manière sécurisée ? (in French). It took 8~ hours to complete

Operate

Depend on the machine obviously! Here are some useful links for me:

  • ASUS P452LA: changed disk to a 2.5" SATA SSD (instead of a HDD)
  • ASUS R541U iFixit, video: changed RAM to a 8Go one (instead of 4Go)

Install new OS

  1. Download the iso image
  2. Compare checksum (find expected checksum on OS maintenance website, click right on iso file > Properties > Hash (Sommes de contrôles) > paste expected checksum in field and click on calculate SHA256 for comparison - can take a few seconds
  3. Flash drive
    • insert USB key
    • find it's name with sudo fdisk -l
    • flash it with running sudo dd bs=4M if=/path/to/manjaro.iso of=/dev/sdb status=progress oflag=sync, see Create Manjaro Linux Bootable USB
  4. Boot on this key on target computer (ASUS: maintain F2 key after power up) and proceed to the installation Note: if you come across the fancy Asus BIOS Utility you may have to reset secure Boot. For this go to Advanced Mode (F7) then Security tab, go to the bottom of the page into Secure Boot section, open it and set Secure Boot Control to Disabled. If it's not working you may have to Enable again then go to Key Management section and click on Reset to Setup Mode.

Add swap partition or file if needed

Install apps

Firefox

  • Connect to Mozilla account to get all extensions

VSCode / CodeOSS

Extensions

  • ESLint
  • Better Comments
  • Error Lens
  • HTML-validate
  • indent-rainbow
  • Live Server
  • Nunjucks Template
  • Prettier - Code formatter

XAMPP

  • Get the app on XAMPP website
  • In a terminal: go to file location (typically cd Downloads), upgrade permissions (chmod +x xampp-linux-x64-8.2.12-0-installer.run or right click > Properties > Permissions > Mark Allow to be executable checkbox) and then execute (sudo ./xampp-linux-x64-8.2.12-0-installer.run)
  • Default install is in /opt/lampp. Later on to open the app run cd /opt/lampp sudo ./manager-linux-x64.run
  • You can grand all permissions to /opt/lampp/htdocs/ (sudo chmod 777 htdocs) if you need to work directly in this folder. Otherwise it may be possible to add Virtual Hosts Note: if running a server fails with error "/opt/lampp/bin/httpd: error while loading shared libraries: libcrypt.so.1" install libxcrypt-compat

Node.js

Install Node.js & npm

Configure git

git config --global user.email "you@example.com" git config --global user.name "Your Name"

Filezilla

Export / Import