Josef “Jeff” Sipek

Yet Another Box Using XFS

Finally! Approximately 28 hours after I started I finally got my laptop’s root filesystem to be XFS. Yay! Here’s a quick summary of what I did:

  1. boot with init=/bin/bash
  2. make sure that / is mounted read-only
  3. mount my external firewire drive read-write
  4. use dd to copy the entire root partition to a file on the external disk
  5. run sha1sum on the disk image and the partition (just to make sure that I got everything exactly the way it is)
  6. reboot into knoppix/other live CD (I happened to have a copy of SLAX)
  7. mkfs.xfs the partition
  8. mount the partition, and the disk image (using -o loop=/dev/loop9)
  9. cp -a the files from the disk image to the partition
  10. chroot to the new partition
  11. edit /etc/fstab to reflect new filesystem type
  12. run grub to install the new stage 1.5
  13. reboot, and enjoy the new filesystem

It is rather simple procedure. The thing that made it take so long (instead of ~3-4 hours) was the fact that GRUB didn’t want to work. It took me more than a day to figure out that downgrading grub to 0.91-2 would do the trick.

2 Comments »

  1. The dd thing is unnecesary, a "tar cpvf" is more useful, or a first copy with "cp -a", why do the dd on the first place?

    Comment by [unknown] — January 1, 1970 @ 00:00

  2. I like to have the disk image handy in case I were to screw up so badly, or I had to quickly revert to previous state... It is guaranteed known-to-work state that I can go (quickly) back to. Also, I had something like 95% of the partition used, so tar wouldn't have saved me much - on the contrary, I think it was faster dd'ing the disk than copying the files (it is just one looong sequence of reads/writes compared to a mix of all sort of operations, lookups, opens, close, reads, writes, etc.)

    Comment by [unknown] — January 1, 1970 @ 00:00

Atom feed for comments on this post.

Leave a comment

Powered by blahgd