Showing posts with label Software Engineering. Show all posts
Showing posts with label Software Engineering. Show all posts

Thursday, October 12, 2023

How to Read ext4 in Mac OS Ventura

Accessing ext4 filesystems on macOS can be tricky due to a lack of built-in support for this Linux filesystem. But for Mac OS Ventura users, there's a neat workaround to achieve this via ext4fuse, even if the installation throws up an error like: "ext4fuse: Linux is required for this software." 

Prerequisites

Ensure you have Homebrew installed and updated on your system to facilitate the installation of other necessary tools. If not, you can install it using the following terminal command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

First, create a custom ext4fuse formula that you'll use for Homebrew. Open a text editor and save the following script as `ext4fuse.rb`:

class MacFuseRequirement < Requirement

  fatal true

  satisfy(build_env: false) { self.class.binary_mac_fuse_installed? }

  def self.binary_mac_fuse_installed?

    File.exist?("/usr/local/include/fuse/fuse.h") &&

      !File.symlink?("/usr/local/include/fuse")

  end

  env do

    ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse"

    unless HOMEBREW_PREFIX.to_s == "/usr/local"

      ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib"

      ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include/fuse"

    end

  end

  def message

    "macFUSE is required. Please run `brew install --cask macfuse` first."

  end

end

class Ext4fuse < Formula

  desc "Read-only implementation of ext4 for FUSE"

  homepage "https://github.com/gerard/ext4fuse"

  url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz"

  sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f"

  license "GPL-2.0"

  head "https://github.com/gerard/ext4fuse.git"

  bottle do

    sha256 cellar: :any, catalina:    "446dde5e84b058966ead0cde5e38e9411f465732527f6decfa1c0dcdbd4abbef"

    sha256 cellar: :any, mojave:      "88c4918bf5218f99295e539fe4499152edb3b60b6659e44ddd68b22359f512ae"

    sha256 cellar: :any, high_sierra: "fc69c8993afd0ffc16a73c9c036ca8f83c77ac2a19b3237f76f9ccee8b30bbc9"

    sha256 cellar: :any, sierra:      "fe8bbe7cd5362f00ff06ef750926bf349d60563c20b0ecf212778631c8912ba2"

    sha256 cellar: :any, el_capitan:  "291047c821b7b205d85be853fb005510c6ab01bd4c2a2193c192299b6f049d35"

    sha256 cellar: :any, yosemite:    "b11f564b7e7c08af0b0a3e9854973d39809bf2d8a56014f4882772b2f7307ac1"

  end

  depends_on "pkg-config" => :build

  on_macos do

    depends_on MacFuseRequirement => :build

  end

  on_linux do

    depends_on "libfuse"

  end

  def install

    system "make"

    bin.install "ext4fuse"

  end

end

Steps to Install ext4fuse on Mac OS Ventura 13.6

1. Install macFUSE:

MacFUSE is essential for ext4fuse, run the following command to install it:

   brew install --cask macfuse

2. Install ext4fuse:

Use the custom formula created earlier to install ext4fuse:

 brew install --formula --build-from-source ./ext4fuse.rb

Note: Ensure you run this command from the directory where `ext4fuse.rb` is located.

3. Remove osxfuse (if applicable):

If you have osxfuse installed, it might be prudent to remove it since it has been renamed and superseded by macFUSE:

brew rm --cask osxfuse

4. Read Disk

 If you've successfully installed `ext4fuse` by following the previous instructions and you want to mount an ext4 filesystem, you would generally use a command like what you've provided. However, ensure that `/dev/disk2s1` represents the correct path to your ext4 partition. Also, remember that to mount filesystems, you might need the appropriate permissions.

Here’s a breakdown of your commands and what they do:

mkdir ext4_mount

This command creates a directory named `ext4_mount` in your current working directory. This directory will act as a mount point for the ext4 filesystem.

sudo ./ext4fuse /dev/disk2s1 ~/ext4_mount -o allow_other

This command tries to mount the ext4 filesystem found at `/dev/disk2s1` to the `ext4_mount` directory you created. The `-o allow_other` option allows other users to access the filesystem.

Note:

  1. Ensure `/dev/disk2s1` is correct for your system. You can use the `diskutil list` command to check all available drives and partitions.
  2. The `sudo` command is used to grant administrative permissions and will ask for your password.
  3. Ensure that your user has the necessary permissions to access the mount point. The `-o allow_other` flag should allow this, but ensuring the user has the right permissions on the mount point itself is also prudent.
  4. Keep in mind that `ext4fuse` is read-only, meaning you will be able to read files but not write to the ext4 filesystem.

Always remember to unmount the filesystem once you’re done using it to prevent any data corruption:

sudo umount ext4_mount

Or, if you mounted it using `FUSE`, you might need to use:

sudo diskutil umount ext4_mount

Using ext4 filesystems on macOS via `ext4fuse` allows for cross-platform data access, which can be quite handy for those using macOS and Linux environments simultaneously. Always remember to interact with filesystems and disks with caution to prevent any data loss.

Wrapping Up

Once you've gone through these steps, your macOS should be equipped to read ext4 filesystems via ext4fuse. The ability to access ext4 filesystems can be quite invaluable for cross-platform work or in scenarios where you have Linux data that you want to access on your macOS system. Ensure to check the mounted volume, and you should be able to access your ext4 data transparently on Mac OS Ventura.

For those consistently working with Linux filesystems, consider exploring additional GUI-based tools for a smoother workflow when interacting with ext4 volumes on macOS.

Source:

https://github.com/gerard/ext4fuse/issues/66

Thursday, November 3, 2005

Thesis about Software Metrics

Thesis PaperI wrote thesis about Software Metrics written in Indonesian language. Here is the abstract:

Software metrics is used to measure various aspects of software development process. Measure is very useful to determine, for instance, how much effort have been expended upon a development project.
This topic essentially applies metrics calculation techniques to real software development projects. Software metrics used to estimate effort spent in software development project.
The result of this research is a guidelines that can be used to estimate effort of software development project in man-hours.

Abstract in Indonesian:
Metrik perangkat lunak digunakan untuk mengukur berbagai macam aspek dari proses pengembangan perangkat lunak. Pengukuran sangat berguna untuk mengetahui, salah satunya adalah besar usaha yang diperlukan dalam suatu proyek pengembangan perangkat lunak.
Topik ini membahas penggunaan kalkulasi metrik pada pengembangan perangkat lunak nyata. Metrik perangkat lunak digunakan untuk melakukan estimasi usaha yang diperlukan dalam proyek pengembangan perangkat lunak.
Hasil dari penelitian ini adalah berupa petunjuk-petunjuk yang dapat digunakan untuk melakukan estimasi besar usaha dalam proyek pengembangan perangkat lunak yang dihitung dalam satuan orang-jam.

Download proposal, full thesis, and paper here:
http://static.wahyu.com/uploads/pub/2005/Proposal_Skripsi_Wahyu.pdf
http://static.wahyu.com/uploads/pub/2005/Skripsi_Wahyu.pdf
http://static.wahyu.com/uploads/pub/2005/Makalah_Skripsi_Wahyu.pdf

Friday, June 3, 2005

Internship to Create Our Own Linux Distro

InternshipI have done an internship during the period 7th April 2005 to 6th May 2005 at Yogyakarta, with Plastic Soldier Factory Pte Ltd, a company which is located in Singapore. My online supervisor in work was Benjamin. My main activity in company was to create prototype of Linux distribution, called easyPC, over the internet.

I am very grateful to Audrey Koh & Budi Wijaya, as Directors of Plastic Soldier Factory Pte Ltd, for giving me the opportunity to do internship with the company. I am also very grateful to Dr. Ir. Tumiran M.Eng, as Head of Electrical Engineering Department, for giving me permission to do internship, and also to my lecturer, Sri Suning Kusumawardani, ST, MT for assisting me during the period.

The objective of this report is to describe development process of designing an easy-to-use interface Linux distro for senior citizens who are first-time computer users, covering especially the development processes at Plastic Soldier Factory Pte. Ltd, Singapore.

Here is my full internship report:
http://static.wahyu.com/uploads/pub/2005/Internship_Report_Wahyu.pdf