Posts with the tag Filesystem

Migrate Existing ext3 Filesystem to ext4

The following collection of commands shows how to migrate your partition formatted with ext3 to an ext4 filesystem. The safest way is to do this when the partition is unmounted. However, if the partition to convert is where the root filesystem of your Linux distro is stored and you don't...

Read on

Sketch of an Advanced HDD / Partition Setup with high availability (mdadm software raid), encryption (dm-crypt) and high flexibility (lvm volume management)

Recently I found an interesting comment on an article about Fedora 16 maybe using btrfs as default file system: The author Vanger explained his current hard disk / partiton setup on a server and how he hopes to get a more efficient system with btrfs. More than the outlook...

Read on

Logical Volume Manager

sudo apt-get install lvm2

To create a logical volume on a loop device (/dev/loop1 stored in ~/.lvmcontainer):

dd if=/dev/zero of=~/.lvmcontainer bs=512 count=2048000
sudo losetup /dev/loop1 ~/.lvmcontainer
sudo pvcreate /dev/loop1 # initialize /dev/loop1 as a physical volume
sudo vgcreate volg1 /dev/loop1 # create the volume group volg1, consisting of /dev/loop1
sudo lvcreate -L...

Read on

The btrfs File System

The btrfs file system is the future of linux file systems.

sudo apt-get install btrfs-tools     
sudo mkfs.btrfs /dev/sdXY


  • efficient snapshots (and subvolumes)
  • automatic calculation of hashes for data and metadata (better data integrity)
  • transparent compression (mount option compress)
  • solid state disk optimization (mount option ssd)
  • copy on write (better data...

Read on

Boot Info Script

T get the boot_info_script, run:

cd ~/Downloads
wget -O

To execute the boot_info_script and thus get information about your bootable partitions etc., run:

sudo bash ~/Downloads/



Read on

Have a Deep Look into the File System

Tools you might want and/or need:


Read on

Remove the 5% root quota of an ext2 / ext3 partition

Usually 5% of the storage of an ext2 or ext3 volume are reserved for the root user. You can use tune2fs to make that space available to other users!

tune2fs -m 0 /dev/sdb1

Only do this for non-system partitions (as you might need the "root quota" to recover from full...

Read on

Solve Boot Problems: The Kernel Did Not Find the Root Partition Using its UUID

On startup the system hung because the root UUID was not found.

So when I ran sudo blkid — executed from a live cd — it didn't show the root partition (all other partitions UUIDs were listed).

But tune2fs showed me its UUID

sudo tune2fs -l /dev/sda2

So I tried...

Read on

Have a look at your MBR using `dd`, `hexdump` and `file`

With two little tools (dd and hexdump) you can use your command line to inspect / investigate the master boot record of a hard disk.

The command is

sudo dd if=/dev/sda bs=512 count=1 | hexdump -C

where /dev/sda is the hard disk you want to inspect.

So here I provide an example...

Read on


To produce an ISO image of a directory (with -J Joliet extensions; with -r Rockridge extensions; with -R Rockridge extensions preserving rights and ownerships; with -V to set the Volume-ID)

mkisofs -J -R -o image.iso -V "Data Backup" folder/data

More information to be found in Linux User, 6/2006 p....

Read on

Formatting a USB stick on Ubuntu: Spaceloop XL 8GB bz CnMemory

Newly bought the MBR contained:

philipp@lion:~$ sudo dd if=/dev/sdb bs=512 count=1 | hexdump -C
[sudo] password for philipp: 
1+0 records in
1+0 records out
512 bytes (512 B) copied, 4.8121e-05 s, 10.6 MB/s
00000000  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 08 22 00 ...

Read on

Recover Deleted Files on an ext3 File System


  • unrm
  • ext3grep
  • foremost



Read on

Transfer HDD Software Raid from IB-NAS-4220-B to workstation computer

I'm writing this post because I want to get away from my Raidsonic IB-NAS-4220-B, a dedicated network access storage (NAS) device. Instead I want to put the two S-ATA hard disks into my Ubuntu linux home server. It should use software raid1 just as the NAS did before and I...

Read on

Backup using disk dump – dd

Note: The following commands have all to be run as the super user (root) as raw access to partitions is not permitted to normal users.

A simple bit by bit backup of the partition 9 on the hard disk /dev/sdx:

dd if=/dev/sdx9 of=imagefile bs=2048

You can also pipe it into gzip...

Read on