LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-25-2003, 02:08 PM   #1
hawkpaul
Member
 
Registered: Nov 2001
Location: Black Mountain , NC
Distribution: Debian
Posts: 46

Rep: Reputation: 15
Converting Email server from RedHat ( :( grrrr) to Debian


I have always used RedHat so that is where I am comming from. I will never use it again and have totally switched to Debian due to RedHat's recent actions.

That said... I have a server running RedHat 9 with Postfix and Squirrel mail on it. I want to convert it to Debain.

We have not actually started using the server so there is no important email that needs to be saved.

My first thought was to just start with a clean install of Debian. Is this the best course? If so here is my config.

The machine is a Compaq Proliant Server
My first problem is that I have 4 hard drives

2 - 9 gig scsi harddrives
2 - 4 gig scsi harddrives

The way I configured this with RedHat was to set up the two 9 gig drives, one of the 4 gig drives and 3.4 gig of the second 4 gig drive as a linux volume of aboout 25 gig. This is where I mounted the / partition.

I then set up a 500mb swap partition and a 100 mb boot partition with what was left of the second 4 gig drive.

When I start the install of debian it sees my hard drives as:
/dev/sda ---- with a 9gig partition type = LVM
/dev/sdb ---- with a 9gig partition type = LVM
/dev/sdc ---- with a 4gig partition type = LVM
/dev/sdd ---- with a 3.4gig partition type = LVM
--a 500 mb swap partition
--and a 100 mb partiton type = ext3

1) How do I set up a volume to install Debian on?
2) Am I going about this in a horribly wrong way?
3) Why the hell did I decide to go with RedHat in the first place?

Thanks so much for your help.

Paul
debian convert

p.s. PLease let me know if you need more info.
 
Old 12-03-2003, 03:01 PM   #2
Sylhouette
Member
 
Registered: Oct 2001
Location: Beverwijk (Holland
Distribution: Red Hat 7.1
Posts: 132

Rep: Reputation: 15
I do know little about LVM
But searcking with google i came up to this

Quote:
Hi,

Two days ago I converted the root filesystem of my newly installed woody
to LVM. It was an exciting procedure. The steps are listed below which
might be a reference for those who are interested.

Information about the original system, 3 partitions: /dev/hda6 24MB ext2
mounted as /boot, /dev/hda7 128MB as swap, /dev/hda8 14GB (used
1GB) reiserfs as /.

General steps: resize the reiserfs, resize the partition hda8, split
the partition hda8 to hda8 and hda9, create VG on hda9, create
LV_root on VG, mkreiserfs on LV_root, copy / from hda8 to LV_root, change
/etc/fstab on LV_root, create initrd-lvm-xxx.gz, add new entry in the
menu.lst of GRUB, reboot to the system based on LV_root, add hda8 to VG.

Detailed steps:

1. Create a bootable floppy containing "resize_reiserfs" and "fdisk" from
rip-10.exe (http://www.tux.org/pub/people/kent-r...looplinux/rip/).
Don't use the working system because it's dangerous to resized the mounted
partition. So a bootable tool disk is needed, on which only two tools are
needed, i.e., resize_reiserfs and fdisk. It's recommended to use cfdisk.
However, rip-10 only contains fdisk. It's also possible to use Linuxcare
BBC.

2. Backup the original system. I installed woody one week ago. So this
step is skipped.

3. Boot the computer by the bootable floppy.
Resize the reiserfs on hda8 :
# resize_reiserfs -s -5G /dev/hda8
You can confirm the change by:
# mount /dev/hda8 /mnt
# df
# umount
Run fdisk to resize the partition hda8:
# fdisk
First delete the partition hda8, then create a partition with size
larger than the resized reiserfs, here 11GB is used for safe. Keep
the SAME value for START cylinder. Then create new partition hda9
using the remaining space. Mark partition hda9 as 8e (Linux LVM).
Write the partition table.

4. Boot the computer into woody as before.
Install reiserfsprogs and lvm10:
# apt-get install reiserfsprogs lvm10

5. Create volume group vg00:
# pvcreate /dev/hda9
# vgcreate vg00 /dev/hda9
Create logical volume root:
# lvcreate -L2G -n root vg00
Make reisers for LV root:
# mkreiserfs /dev/vg00/root

6. Copy the / to newly created LV root:
# mount /dev/vg00/root /mnt
# find / -xdev |cpio -pvmd /mnt

7. Modify /mnt/etc/fstab:
#vi /mnt/etc/fstab
Replace the content in fstab: /dev/hda8 to /dev/vg00/root

8. Create initrd image:
# lvmcreate_initd
File /boot/initrd-lvm-2.4.18-bf2.4.gz are created.

9. Add an entry in the /boot/grub/menu.lst:
#-------------------------
title=LVM Debian 2.4.18-bf2.4
root (hd0,5)
kernel /vmlinuz-2.4.18-bf2.4 root=3a00 ramdisk=8192
initrd /initrd-lvm-2.4.18-bf2.4.gz
#-------------------------
Note that grub uses Major/Minor hex code to specify the LV.
Use "ls -l /dev/vg00/root" to find that the Major/Minor numbers are
58:0 (in hex 3a:00).

10. Restart the computer, choose to boot by LVM Debian 2.4.18-bf2.4. Any
error might be solved by booting into the original system.

11. When the system based on LVM works well, take back the partition hda8:
Mark the partition hda8 as 8e by fdisk
Then create PV on /dev/hda8:
# pvcreate /dev/hda8
Add hda8 to volume group vg00:
# vgextend vg00 /dev/hda8
The conversion is finished. It's time to create LVs for /home,
/var, etc. Everything is flexible now.

At the end, there are two exllent LVM documents:
1. LVM-howto, http://www.tldp.org/HOWTO/LVM-HOWTO.html
2. Learning Linux LVM, by Daniel Robbins,
http://www-106.ibm.com/developerwork...lvm/index.html
http://www-106.ibm.com/developerwork...ry/l-lvm2.html

One good article for Grub:
The GNU GRUB Boot Loader, by Jaswinder Singh Kohi,
http://www.linuxgazette.com/issue64/kohli.html

Hope I don't forget anything and it's useful to you.

Good luck,

Qian
Hope it helps

for question # 3
I have no answer but i have the same problem.
I have been promoting redhat to some custumors of me and now i can tell them not to update a version but a whole distro.
I feel a little left in the cold by RedHat.
Well Money Money Money makes the world go round.

Good luck

Ooh change your distro line in your profile rh 9. 0 and loving it

Last edited by Sylhouette; 12-03-2003 at 03:03 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting from RedHat 9.0 to Debian JediGuy_bob Debian 3 04-08-2004 10:58 PM
Redhat 9 users , need help with email server ! Drogo Linux - Software 4 11-15-2003 07:06 AM
what do I need to setup email server for redhat? ziggie216 Linux - Software 2 11-11-2003 03:51 AM
Email server with redhat?!?! cupubboy Linux - Networking 7 05-24-2003 04:04 PM
Email server with RedHat hawkpaul Linux - Software 4 05-06-2003 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration