BBS水木清华站∶精华区

发信人: cybergene (基因~也许以后~~), 信区: Linux        
标  题: [HowTo]Change / from e2fs to reiserfs 
发信站: BBS 水木清华站 (Sun Nov 12 01:26:48 2000) 
 
 
We'd first suggest you copy everything on your regular ext2 partition to 
 the spare partition. If the spare is smaller than your original data,  
compress your whole partition into a tar.gz file on the spare partition. 
 After making sure this worked correctly and all your files are there  
(and/or you have a good backup!), copy the /bin, /etc, /lib and /sbin  
directories (plus the mkreiserfs utility) to the spare partition. This  
is in preparation for booting off that partition so you can reformat the 
 original ext2 partition as reiserfs. 
Next, make a boot diskette with a ReiserFS-enabled kernel on it (don't  
forget to run lilo on the diskette!) and make sure it works (so you  
won't get stuck with an unbootable system.) After booting this diskette, 
 you should get a lilo: prompt. Enter "linux root=/dev/hd  
init=/bin/bash" at the lilo prompt. Your system should boot and stop  
at a bare bash "#" prompt. 
 
At the prompt (now off of your spare partition), try tar ztvf to test  
the backup archive if you did the compression step above (just to make  
sure you can get at your data still.) If you're convinced that you  
want to go ahead with the conversion, run mkreiserfs on your original  
ext2 partition, ERASING ALL DATA THERE (but you have the backup of  
course.) Then, mount the new partition somewhere as reiserfs and cd to  
the mount directory. Make sure the amount of free disk space is what you 
 expected (just as a double check), and untar your backup archive to  
restore everything. 
 
At this point, your data is on ReiserFS and you should be able to  
rerun lilo (make sure your default kernel supports ReiserFS!) on your  
normal root partition to get the kernel set up again. Unmount all  
partitions and reboot. If everything goes as planned, Linux should say  
"VFS: Mounted root ... as reiserfs" at some point, and you should be all 
 set. If the system doesn't boot, etc. you have your backup diskette and 
 can just boot off the spare partition to fix things. Make sure you have 
 the right ReiserFS-enabled kernel installed beforehand and all  
configuration files (especially lilo.conf) are up to date.  
 
  
 
-------------------------------------------------------------   
Matt T. Yourst Massachusetts Institute of Technology   
yourst@mit.edu 617.225.7690   
513 French House 476 Memorial Drive - Cambridge, MA 02136   
-------------------------------------------------------------   
 
 
-- 
  桃花坞里桃花庵,桃花庵下桃花仙;桃花仙人种桃树,又摘桃花卖酒钱。 
  酒醒只在花前坐,酒醉换来花下眠;半醒半醉日复日,花落花开年复年。 
  但愿老死花酒间,不愿鞠躬车马前;车尘马足富者趣,酒盏花枝贫者缘。 
  若将富贵比贫贱,一在平地一在天;若将贫贱比车马,他得驱驰我得闲。 
  别人笑我忒疯癫,我笑他人看不穿;不见五陵豪杰墓,无花无酒锄做田。 
 
 
※ 来源:·BBS 水木清华站 smth.org·[FROM: 211.99.240.122] 

BBS水木清华站∶精华区