24 octobre 2006

conversion ext2 vers ext3

Converting the / directory
First, think long and hard before deciding to convert the root directory. Ext3's primary purpose is shorter recovery from disaster rather than data loss prevention. Converting the root directory from Ext2 to Ext3 isn't difficult, but converting it back from Ext3 to Ext2 is a treacherous process fraught with problems. But, if you really must perform the Ext2 to Ext3 conversion on the root directory, here's how, assuming /dev/hda2 is mounted as the root directory and /dev/hda1 is mounted as /boot:

* Log in as root
* Edit /etc/fstab and change ext2 to ext3 on the line referencing the root directory.
* tune2fs -j /dev/hda2
* cd /boot
* mv initrd-2.4.18-26.8.0.img initrd-2.4.18-26.8.0.img.ext2
* mkinitrd initrd-2.4.18-26.8.0.img 2.4.18-26.8.0
* reboot

In the preceding, you MUST perform all the steps, including the mkinitrd, before rebooting. Failing to perform all the steps before rebooting produces a "buried shovel" where if only you could boot the machine, you could run the mkinitrd command, and if only you could run the mkinitrd command, you could boot the machine.

Aucun commentaire: