# facing setup problem of RAID1,16GB,PAE kernel



## maheshkasbe (Mar 2, 2010)

I am installing 32 bit FreeBSD 7.2 in Virtual Machine (VM). The GENERIC kernel supports maximum 4GB of RAM. 

1. My requirement is VM should support at least 16GB RAM, so to achieve this I have compiled the PAE kernel. 

2. My second requirement is it should support software RAID1, so to achieve this after configuring the commands.
By using URL: http://onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html



Now the problem is, after rebooting the VM after 2 steps, the VM is not booting normally. Please find the screenshot.



-MAHESH


----------



## kungfujesus (Mar 2, 2010)

It looks to me like your vinum/gmirror driver isn't loading properly.  There is a chance that it is incompatible with the PAE kernel.  PAE isn't compatible with all drivers, but I suspect what's actually going on is you're not loading the correct driver into the kernel (a generic kernel vs. the installed kernel has far less built-ins).  Try loading the vinum/gmirror module from the bootloader before you actually try to boot.  If all else fails, you can change the root device for da0 temporarily and be out of sync on your mirror until you fix the issue.


----------



## maheshkasbe (Mar 3, 2010)

Hi,

Thanks for your quick reply.

I have already made entries in /boot/loader.conf as follows


```
geom_mirror_load="YES"
vfs.root.mountfrom="ufs:/dev/mirror/ga0s1a"
```

you said "Try loading the vinum/gmirror module from the bootloader before you actually try to boot." How to do so?
I am using root device da0 temporarily.


-MAHESH


----------



## maheshkasbe (Mar 3, 2010)

I am using the following steps to compile PAE kernel.


```
1) cd /usr/src/sys/i386/conf 
2) config PAE 
3) cd ../compile/PAE 
4) make cleandepend && make depend 
5) make  
6) make install 
7) reboot
```

Please suggest me if i am missing something and which things i need to recheck before reboot?


----------



## maheshkasbe (Mar 3, 2010)

I have verified that The new kernel will be installed to the /boot/kernel directory *"Not along with its modules"*, while the old kernel and its modules will be moved to the /boot/kernel.old directory.

What i need to do?


-MAHESH


----------



## kungfujesus (Mar 3, 2010)

Look at the kernel config, I don't think gmirror/vinum is configured as a built in w/generic (which is what PAE is sourcing in its config).  /boot/loader.conf will allow you to specify modules to load on bootup


----------



## maheshkasbe (Mar 4, 2010)

Hi,

FINALLY THE PROBLEM SOLVED 

Thanx buddy - kungfujesus :stud

Because it was not able to load geom modules boot time


SOLUTION:

At the first boot it load the modules from /boot/defaults/loader.conf
made geom entries as follows 

```
# Related stuff

geom_bde_load="YES"             # Disk encryption driver (see gbde(4,8))
geom_ccd_load="YES"             # Concatenated disk driver (see ccd(4),
                                # ccdconfig(8))
geom_concat_load="NO"           # Concatenated disk driver (see gconcat(8))
geom_eli_load="NO"              # Disk encryption driver (see geli(8))
geom_gate_load="NO"             # Userland disk driver (see geom_gate(4),
                                # ggatec(8), ggated(8), ggatel(8))
geom_label_load="NO"            # File system labels (see glabel(8))
geom_md_load="NO"               # Memory disk driver (vnode/swap/malloc) (see
                                # md(4), mdconfig(8))
geom_mirror_load="YES"          # RAID1 disk driver (see gmirror(8))
geom_nop_load="NO"              # Transparent disk driver (see gnop(8))
geom_raid3_load="NO"            # RAID3 disk driver (see graid3(8))
geom_shsec_load="NO"            # Shared secret disk driver (see gshsec(8))
geom_stripe_load="YES"          # RAID0 disk driver (see gstripe(8))
geom_uzip_load="NO"             # Compressed disk images driver (see mkuzip(8))
geom_vinum_load="YES"
```


I have compliled the PAE kernel as follows

```
1) cd /usr/src/sys/i386/conf 
2) config PAE 
3) cd ../compile/PAE 
4) make cleandepend && make depend 
5) make  
6) make install 
7) reboot
```



I have verified that The new kernel installed to the /boot/kernel directory "Not along with its modules"; i have simply copied the geom_* modules to new kernel 

e.g. [cmd=]#cp /boot/kernel.old/geom_* /boot/kernel[/cmd]

Now rebooted; 
Checked that the I have booted from PAE kernel my memory limitation problem solved 
e.g

```
[root@mahesh /boot/kernel.old]# uname -a
FreeBSD ashish2.patni.com 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Thu Mar  4 15:01:21 UTC 2010     root@mahesh:[B]/usr/src/sys/i386/compile/PAE[/B]  i386
```


and I have booted my mirrored OS [ RAID 1 ] 
e.g

```
[root@mahesh /boot/kernel.old]# mount
/dev/mirror/gm0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/mirror/gm0s1e on /tmp (ufs, local, soft-updates)
/dev/mirror/gm0s1f on /usr (ufs, local, soft-updates)
/dev/mirror/gm0s1d on /var (ufs, local, soft-updates)
```


----------



## kungfujesus (Mar 4, 2010)

instead of editing the loader.conf found under defaults, add that entry in /boot/loader.conf, as loader.conf overrides what's in the defaults and it won't be replaced on updates.


----------



## SirDice (Mar 5, 2010)

maheshkasbe said:
			
		

> I have compliled the PAE kernel as follows
> 
> ```
> 1) cd /usr/src/sys/i386/conf
> ...


This is the old way of doing things. Use this instead:


```
cd /usr/src
make buildkernel KERNCONF=PAE
make installkernel KERNCONF=PAE
```

Do NOT edit /boot/defaults/loader.conf. Add your modifications to /boot/loader.conf.


----------



## maheshkasbe (Mar 5, 2010)

OLD way doesn't work for me... 


I can load the geom_mirror module at *first stage* of booting [ i made the changes "as mentioned in previous my post" in /boot/defaults/loader.conf ] and *second stage* of booting [ i made entry in /boot/loader.conf e.g. geom_mirror_load="YES" ] ONLY after Copying geom_mirror.ko and geom_mirror.ko.symbols from old kernel to newly compiled PAE kernel


----------



## DutchDaemon (Mar 5, 2010)

@maheshkasbe: Using fonts and colors is severely discouraged.
I suggest you start reading the PMs and links I sent you and to follow the guidelines therein.


----------



## SirDice (Mar 5, 2010)

maheshkasbe said:
			
		

> I can load the geom_mirror module at *first stage* of booting [ i made the changes "as mentioned in previous my post" in /boot/defaults/loader.conf ] and *second stage* of booting [ i made entry in /boot/loader.conf e.g. geom_mirror_load="YES" ]


/boot/loader is the third stage. And again, do NOT edit /boot/defaults/loader.conf!

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html


----------



## maheshkasbe (Mar 8, 2010)

How do i complile PAE kernel along with its modules?
So that i can get newly PAE compiled kernel in /boot/kernel along with its modules

-MAHESH


----------



## SirDice (Mar 8, 2010)

maheshkasbe said:
			
		

> How do i complile PAE kernel along with its modules?
> So that i can get newly PAE compiled kernel in /boot/kernel along with its modules


Just like any other custom kernel:

```
cd /usr/src
make buildkernel KERNCONF=PAE
make installkernel KERNCONF=PAE
```

But don't use PAE, install the amd64 version and be done.


----------



## maheshkasbe (Mar 8, 2010)

Hi, 

I have INTEL m/c,
I am able to compile by using given procedure, but i am failed to install PAE kernel along with modules !!!

Is there any other way?:r



-Mahesh


----------



## SirDice (Mar 8, 2010)

maheshkasbe said:
			
		

> I have INTEL m/c,


Which uses the EM64T instructionset and is the same as AMD64.



> I am able to compile by using given procedure, but i am failed to install PAE kernel along with modules !!!


What errors?



> Is there any other way?:r


Nope.


----------



## maheshkasbe (Mar 9, 2010)

I am not getting error, i am getting only two files in newly compiled kernel [/boot/kernel]
"kernel" and "kernel.symbols" 

-Mahesh


----------



## DutchDaemon (Mar 9, 2010)

maheshkasbe said:
			
		

> Hi,
> 
> I have INTEL m/c,



AMD64 does *not* mean: for AMD processors only. It means for AMD/Intel 64-bit architectures -> http://www.freebsd.org/platforms/amd64.html

Post the output of [cmd=]dmesg -a | grep ^CPU[/cmd].

You may be able to simply run a 64-bit OS and be done with that PAE crap.


```
The Intel vProâ„¢, Intel Celeron D (some models since ``Prescott''), Intel CentrinoÂ® 
Duo, Intel CentrinoÂ® Pro, Intel Viivâ„¢, Intel Coreâ„¢2 Extreme, Intel Coreâ„¢2 Quad, Intel 
Coreâ„¢2 Duo, Intel Xeon (3000-sequence, 5000-sequence, and 7000-sequence) processors use 
the IntelÂ®64 architecture.
```


----------



## SirDice (Mar 9, 2010)

maheshkasbe said:
			
		

> I am not getting error, i am getting only two files in newly compiled kernel [/boot/kernel]
> "kernel" and "kernel.symbols"



Remove or rename /etc/make.conf and/or /etc/src.conf and build/install the kernel again.


----------

