Linux - reiserfs setup
By: John McFarlane
<john.mcfarlane@rockfloat.com>
go to filesystems.. and put shift + y into the reiser box // we want it "compiled in", not "a module of" the kernel
exit and save
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
I'm finished with this step
This document was originally created on 10/20/2002
Last updated:
10/20/2002 @15:00
Abstract:
This document will go thru a step by step setup of the Reiser file system
on Red Hat 7.2 (Note: this howto is outdated).
Table of Contents:
- install distro (redhat 7.2 for this example)
- Compile reiser support into the kernel, 7.2:
- Compile your new kernel
- Install your new kernel
- add another entry boot entry into /etc/lilo.conf, here is an example lilo.conf (note the second image= stuff):
- Update your master boot record
- just to be sure, resolve any dependancies
- Finish up
- Setup any additional reiser dependancies
- Prepare your partitions
- Format the new partition(s) with reiserfs
- Update /etc/fstab
- Now that /dev/hdc1 is ready to be root we need to update lilo again
- Update the master boot record
- Copy the entire system to the temporary root partition
- We are now ready to boot to the temporary root partition
- hope you don't get a kernel panic
- upon bootup, mtab will show:
- now you need to make hda3 (the old root) reiserfs
- Copy the sytem back to the normal place
- Edit /etc/fstab yet again
- Edit /etc/lilo.conf
- now you gotta get /boot on reiser
- edit fstab, changing the filetype of /boot from ext2 to reiserfs
- DO NOT REBOOT UNTIL THE NEXT STEP IS COMPLETE.. OTHERWISE YOUR SCREWED
- reboot and now you got everything on reiser, including root and boot
- Changelog
1. install distro (redhat 7.2 for this example)
I'm finished with this step2. Compile reiser support into the kernel, 7.2:
root# cd /usr/src/2.4.7
root# make menuconfig
make sure "prompt for development and/or incomplete code..." is checked under: "code
maturity level options"
go to filesystems.. and put shift + y into the reiser box // we want it "compiled in", not "a module of" the kernel
exit and save
3. Compile your new kernel
root# make dep && make bzImage && make modules && make modules_install
4. Install your new kernel
cd to /boot and take note of the file /boot/vmlinuz, this is your current kernel
I'm finished with this step
cp /usr/src/linux-2.4.7-10/arch/i386/boot/bzImage /boot/vmlinuz-2.4.7-10.reiser
cp vmlinuz-2.4.7-10.reiser /boot/System.map
5. add another entry boot entry into /etc/lilo.conf, here is an example lilo.conf (note the second image= stuff):
prompt
timeout=100
default=linux-reiser
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
image=/boot/vmlinuz-2.4.7-10
label=linux-stock
read-only
root=/dev/hda3
image=/boot/vmlinuz-2.4.7-10.reiser
label=linux-reiser
read-only
root=/dev/hda3
6. Update your master boot record
run lilo to update the mbr with /boot and /etc/lilo.conf
I'm finished with this step
root# lilo
7. just to be sure, resolve any dependancies
root# depmod -a 2.4.7-10
8. Finish up
cross fingers and reboot :)
I'm finished with this step
9. Setup any additional reiser dependancies
upgrade to at least lilo 26.1
I'm finished with this step
root# rpm -ivh rpm-26.2.rpm
10. Prepare your partitions
say we have this fdisk -l
I'm finished with this step
hda1 = /boot
hda2 = swap
hda3 = /
hdb = clean
hdc = clean
use fdisk to add partitions hdb1 and hdc1 to hdb and hdc respectively
11. Format the new partition(s) with reiserfs
root# mkreiserfs -h r5 /dev/hdb1
root# mkreiserfs -h r5 /dev/hdc1
root# mount -t reiserfs /dev/hdb1 /hdb
root# mount -t reiserfs /dev/hdc1 /hdc
12. Update /etc/fstab
make your /etc/fstab look like this:
I'm finished with this step
/dev/hda1 /boot ext2 defaults 1 1
/dev/hda2 swap swap defaults 0 0
#/dev/hda3 / ext2 defaults 0 0
/dev/hdb1 /hdb reiserfs defaults 1 1
/dev/hdc1 / reiserfs defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
13. Now that /dev/hdc1 is ready to be root we need to update lilo again
Make /etc/lilo.conf look like this:
I'm finished with this step
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.7-10
label=linux
initrd=/boot/initrd-2.4.7-10.img
read-only
root=/dev/hdc1
14. Update the master boot record
Remember to run lilo -v to make sure you have lilo 26.1 or greater
I'm finished with this step
root# lilo
15. Copy the entire system to the temporary root partition
cp -ax / /hdc
16. We are now ready to boot to the temporary root partition
reboot when your sure all of the following happened:
I'm finished with this step
17. hope you don't get a kernel panic
I'm finished with this step18. upon bootup, mtab will show:
/dev/hda1 /boot ext2 0 0
/dev/hdb1 /hdb reiserfs 0 0
/dev/hdc1 / reiserfs 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
19. now you need to make hda3 (the old root) reiserfs
root# mkreiserfs -h r5 /dev/hda3
root# mount -t reiserfs /dev/hda3 /hda
20. Copy the sytem back to the normal place
Now that /dev/hda3 is reiserfs, you can copy the system back onto it
I'm finished with this step
root# cd /
root# cp -ax * /hda
21. Edit /etc/fstab yet again
Make it look like this:
I'm finished with this step
/dev/hda1 /boot ext2 defaults 1 1
/dev/hda2 swap swap defaults 0 0
/dev/hda3 / reiserfs defaults 0 0
/dev/hdb1 /hdb reiserfs defaults 1 1
/dev/hdc1 /hdc reiserfs defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
22. Edit /etc/lilo.conf
Update lilo.conf telling it to boot from your shiny new
reiser root partition:
I'm finished with this step
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.7-10
label=linux
initrd=/boot/initrd-2.4.7-10.img
read-only
root=/dev/hda3
23. now you gotta get /boot on reiser
root# mkdir /boot_good
root# cp -ax /boot /boot_good
root# ps -aux | grep klogd
--> kill *whatever the pid of klogd is
root# umount /boot
root# mkreiserfs -r5 /dev/hda1
root# mount -t reiserfs /dev/hda1 /boot
root# cp -ax /boot_good /boot
24. edit fstab, changing the filetype of /boot from ext2 to reiserfs
I'm finished with this step25. DO NOT REBOOT UNTIL THE NEXT STEP IS COMPLETE.. OTHERWISE YOUR SCREWED
Update the master boot record once again with the new lilo config:
I'm finished with this step
root# lilo
26. reboot and now you got everything on reiser, including root and boot
Congrats, hopefully your now looking at a system with both /root and /boot on reiserfs
Well done, you deserve coffee and a pop tart
I'm finished with this step
Well done, you deserve coffee and a pop tart
This document was originally created on 10/20/2002
Disclaimer:
This page is not endorsed by gentoo.org or any other cool
cats. Any information provided in this document is to be used
at your own risk.