Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After upgrading a Debian system from 5.0 to 6.0 (Lenny to Sqeeze), how do I go about upgrading the root filesystem (which in this case is also boot) from ext3 to ext4?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

This was no big deal at all, here's what I did:

  1. Edit /etc/fstab, replacing "ext3" with "ext4" for my root filesystem. (I also removed "barrier=1", which is now the default on ext4.)
  2. Reboot into single user mode with read only root filesystem.
  3. Run tune2fs -O extents,uninit_bg,dir_index /dev/DEV
  4. Reboot, again into single user mode with read only root filesystem. (Observe some mount warnings.)
  5. Run e2fsck -fDC0 /dev/DEV to patch up the filesystem.
  6. Reboot normally.

Most of this was taken from here.

share|improve this answer
    
FYI the EXT4 Howto URL is now ext4.wiki.kernel.org/articles/e/x/t/Ext4_Howto_d00b.html –  zarkdav Nov 11 '11 at 10:04
1  
You'll probably want to convert the files and directories on the filesystem to use "extents" too, by using chattr +e file on everything. –  Legooolas Jul 20 '12 at 22:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.