I had problems with the inode size of 256 bytes instead of the usual 128 bytes in ubuntu 9.04. My ext2 ifs and Acronis tools didn't recognize this partition anymore.
Since I didn't want to reinstall the system, I backed up the system with tar, reformatted the partition with mke2fs and restored the files. Here's how it can be done:
Boot another linux, e.g. from another partition (I have 5 linux partitions 8)) or from a live CD.
1) Become root:
2) Check the inode size of the partition (I assume /dev/sda9 here) and note the UUID:
Code:
# dumpe2fs -h /dev/sda9
3) Mount the partition (if not done already):
Code:
# mount -v /dev/sda9 /media/sda9
4) Save all files of the partition in a tar archive on another partition, e.g.:
Code:
# tar -c -z -f /home/ubuntu904.tgz -C /media/sda9 ./
5) Unmount the partition:
Code:
# umount -v /dev/sda9
6) Reformat the partition (check /etc/mke2fs.conf and man mke2fs):
Code:
# mke2fs -v -I 128 -j -L ubuntu904 -U <original UUID> /dev/sda9
7) Mount the partition again:
Code:
# mount -v /dev/sda9 /media/sda9
8] Restore the data:
Code:
# tar -x -z -f /home/ubuntu904.tgz -C /media/sda9
9) Unmount the partition:
Code:
# umount -v /dev/sda9
10) If you had installed a grub boot loader in the partition, restore it:
Code:
# grub
grub> setup (hd0,8) (hd0,8)
grub> quit
Regards
Mike
Keywords:
ubuntu 8.10, ubuntu 9.04, file system, unreadable, ext2, ext3, ext2 ifs, Acronis, partition, image, inode size, 128 bytes, 256 bytes, change, reformat
Bookmarks